# greedy algorithm

Published articles for greedy algorithm.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Singular Value Decomposition Part 2: Theorem, Proof, Algorithm

DevFeed: [Singular Value Decomposition Part 2: Theorem, Proof, Algorithm](<https://devfeed.tech/articles/singular-value-decomposition-part-2-theorem-proof-algorithm-40399.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2016/05/16/singular-value-decomposition-part-2-theorem-proof-algorithm/>)

Published: 2016-05-16T08:00:19Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [data](<https://devfeed.tech/topics/data.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [code](<https://devfeed.tech/tags/code.md>), [data](<https://devfeed.tech/tags/data.md>), [examples](<https://devfeed.tech/tags/examples.md>), [github](<https://devfeed.tech/tags/github.md>), [github-repository](<https://devfeed.tech/tags/github-repository.md>), [greedy-algorithm](<https://devfeed.tech/tags/greedy-algorithm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [singular-value-decomposition](<https://devfeed.tech/tags/singular-value-decomposition.md>)

### AI overview

This tutorial develops the mathematical foundations of singular value decomposition through definitions, proofs, and an algorithm. It explains best-approximating k-dimensional linear subspaces, vector projection, and squared distance, and mentions testing the method on a thousand-story CNN news dataset with accompanying code and examples in a GitHub repository.

### Source excerpt

I'm just going to jump right into the definitions and rigor, so if you haven't read the previous post motivating the singular value decomposition, go back and do that first. This post will be theorem, proof, algorithm, data. The data set we test on is a thousand-story CNN news data set. All of the data, code, and examples used in this post is in a github repository, as usual. We start with the best-approximating $ k$-dimensional linear subspace.

## When Greedy Algorithms are Perfect: the Matroid

DevFeed: [When Greedy Algorithms are Perfect: the Matroid](<https://devfeed.tech/articles/when-greedy-algorithms-are-perfect-the-matroid-40364.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/08/26/when-greedy-algorithms-are-perfect-the-matroid/>)

Published: 2014-08-26T09:00:02Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [graph theory](<https://devfeed.tech/topics/graph-theory.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [math](<https://devfeed.tech/topics/math.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [graph-theory](<https://devfeed.tech/tags/graph-theory.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [greedy](<https://devfeed.tech/tags/greedy.md>), [greedy-algorithm](<https://devfeed.tech/tags/greedy-algorithm.md>), [kruskal-s-algorithm](<https://devfeed.tech/tags/kruskal-s-algorithm.md>), [linear-independence](<https://devfeed.tech/tags/linear-independence.md>), [matroids](<https://devfeed.tech/tags/matroids.md>), [minimum-spanning-trees](<https://devfeed.tech/tags/minimum-spanning-trees.md>), [trees](<https://devfeed.tech/tags/trees.md>), [vertex](<https://devfeed.tech/tags/vertex.md>)

### AI overview

This article explains when greedy algorithms are guaranteed to produce optimal solutions. It introduces matroids as the framework characterizing that guarantee and uses the minimum spanning tree problem as an example, with background on matroid history and connections to linear algebra and graph theory.

### Source excerpt

Greedy algorithms are by far one of the easiest and most well-understood algorithmic techniques. There is a wealth of variations, but at its core the greedy algorithm optimizes something using the natural rule, "pick what looks best" at any step. So a greedy routing algorithm would say to a routing problem: "You want to visit all these locations with minimum travel time? Let's start by going to the closest one. And from there to the next closest one.

## When Greedy Algorithms are Good Enough: Submodularity and the (1--1/e)-Approximation

DevFeed: [When Greedy Algorithms are Good Enough: Submodularity and the (1--1/e)-Approximation](<https://devfeed.tech/articles/when-greedy-algorithms-are-good-enough-submodularity-and-the-1-1-e-approximation-40361.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/07/07/when-greedy-algorithms-are-good-enough-submodularity-and-the-1-1e-approximation/>)

Published: 2014-07-07T10:00:01Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [approximation](<https://devfeed.tech/tags/approximation.md>), [approximation-algorithms](<https://devfeed.tech/tags/approximation-algorithms.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [coverage](<https://devfeed.tech/tags/coverage.md>), [greedy](<https://devfeed.tech/tags/greedy.md>), [greedy-algorithm](<https://devfeed.tech/tags/greedy-algorithm.md>), [matroids](<https://devfeed.tech/tags/matroids.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [submodularity](<https://devfeed.tech/tags/submodularity.md>), [theory](<https://devfeed.tech/tags/theory.md>)

### AI overview

This article explains when greedy algorithms can produce optimal or near-optimal solutions. It introduces submodularity as a diminishing-returns property and discusses how it can provide a reasonably good approximation to the optimal solution.

### Source excerpt

Greedy algorithms are among the simplest and most intuitive algorithms known to humans. Their name essentially gives their description: do the thing that looks best right now, and repeat until nothing looks good anymore or you're forced to stop. Some of the best situations in computer science are also when greedy algorithms are optimal or near-optimal. There is a beautiful theory of this situation, known as the theory of matroids. We haven't covered matroids on this blog (edit: we did), but in this post we will focus on the next best thing: when the greedy algorithm guarantees a reasonably good approximation to the optimal solution.

## On Coloring Resilient Graphs

DevFeed: [On Coloring Resilient Graphs](<https://devfeed.tech/articles/on-coloring-resilient-graphs-40346.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/02/21/on-coloring-resilient-graphs/>)

Published: 2014-02-21T08:45:39Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Graphs](<https://devfeed.tech/topics/graphs.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [approximation-algorithms](<https://devfeed.tech/tags/approximation-algorithms.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graph-coloring](<https://devfeed.tech/tags/graph-coloring.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [greedy-algorithm](<https://devfeed.tech/tags/greedy-algorithm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [research](<https://devfeed.tech/tags/research.md>), [resilience](<https://devfeed.tech/tags/resilience.md>)

### AI overview

An informal explanation of graph coloring, including why deciding 3-colorability is considered NP-hard and several graph properties that can make coloring problems easier. The article also announces the author's paper on resilient graphs.

### Source excerpt

I'm pleased to announce that another paper of mine is finished. This one just got accepted to MFCS 2014, which is being held in Budapest this year (this whole research thing is exciting!). This is joint work with my advisor, Lev Reyzin. As with my first paper, I'd like to explain things here on my blog a bit more informally than a scholarly article allows. A Recent History of Graph Coloring One of the first important things you learn when you study graphs is that coloring graphs is hard.

## Complete Sequences and Magic Tricks

DevFeed: [Complete Sequences and Magic Tricks](<https://devfeed.tech/articles/complete-sequences-and-magic-tricks-40288.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/10/02/complete-sequences-and-magic-tricks/>)

Published: 2012-10-02T11:28:16Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Sequences](<https://devfeed.tech/topics/sequences.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Code](<https://devfeed.tech/topics/code.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [code](<https://devfeed.tech/tags/code.md>), [dynamic-programming](<https://devfeed.tech/tags/dynamic-programming.md>), [greedy-algorithm](<https://devfeed.tech/tags/greedy-algorithm.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [numberphile](<https://devfeed.tech/tags/numberphile.md>), [primes](<https://devfeed.tech/tags/primes.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sequences](<https://devfeed.tech/tags/sequences.md>)

### AI overview

This tutorial explains complete integer sequences through a card trick inspired by a Numberphile video. It presents a greedy algorithm that generates the cards and selects the smallest representation of each number, then shows how to implement the method in JavaScript.

### Source excerpt

Numberphile posted a video today describing a neat trick based on complete sequences: The mathematics here is pretty simple, but I noticed at the end of the video that Dr. Grime was constructing the cards by hand, when really this is a job for a computer program. I thought it would be a nice warmup exercise (and a treat to all of the Numberphile viewers) to write a program to construct the cards for any complete sequence.