Matroid theory was introduced to determine when this type of technique is optimal. One example, which makes use of the floor function, can be used to determine the decomposition, if it exists, of any integer into McNugget numbers. The Prim-Jarnik and
Matroid theory was introduced to determine when this type of technique is optimal. One example, which makes use of the floor function, can be used to determine the decomposition, if it exists, of any integer into McNugget numbers. The Prim-Jarnik and Kruskal approaches to computing minimum spanning trees are both examples of this type of method. The single-source shortest path problem for a directed graph with non-negative edge weights can be solved using Dijkstra's algorithm, an example of this class of algorithms. FTP, name this type of algorithm which always takes the best available temporary solution on its way to a final answer.
Matroid theory was introduced to determine when this type of technique is optimal.