In recent articles we presented a general methodology for finite optimization. The new method, the Nested Partitions (NP) method, combines partitioning, random sampling, a selection of a promising index, and backtracking to create a Markov chain that converges to a global optimum. In this paper we demonstrate, through examples, how the NP method can be applied to solve both deterministic and stochastic finite optimization problems in a unified framework.