1. A method for solving a unit commitment problem for a set of generators with a set of configurations having a set of 2 N*T schedules, wherein N is a number of generators i and T is a number of decision time steps, wherein for each decision time step there is 2 N configurations in the set of configurations, comprising the steps of: determining, from the set of configurations, a reduced set of configurations of the set of generators, wherein the determining includes selecting, for each decision time step, a subset of configurations of N generators, such that each configuration in the subset meets a power demand for the decision time step, wherein the selecting includes determining which configurations in the reduced set of configurations have minimal cost of meeting the power demand allowing for contingences for when one or more generators of the set of generators are not available for the decision time step; and defining a functional metric to measure a similarity of all possible pairs of the reduced set of configurations; applying dynamic programming to the reduced set of configurations using the functional metric to determine an optimal configuration in the reduced set of configurations, wherein the dynamic programming uses approximation and the functional metric to measure a difference of a cost-to-go of a configuration that is not in the subset of configurations of N generators for successive decision time steps, wherein the method is performed in a processor.