Such algorithms are called greedy because while the optimal solution to each smaller instance will provide an immediate output, the algorithm doesn't consider the larger problem as a whole. Greedy algorithms work by recursively constructing a set of objects from the smallest possible constituent parts.