1. A method for generating a distribution of optimal solutions to a nondeterministic polynomial optimization problem comprising: (a) providing n input polynucleotides, wherein n equals a number of data inputs, and wherein each input polynucleotide: (i) represents a unique data input; and (ii) comprises an x segment and a y segment; (b) providing z connection polynucleotides, wherein z equals a number of unique connections that can be made between the different data inputs, and wherein each polynucleotide in the set of connection polynucleotides is complementary to the x segment of one input polynucleotide and to they segment of one different input polynucleotide; (c) combining the input polynucleotides with the connection polynucleotides to form a mixture, wherein the combining is done under conditions to promote formation of hybridization complexes between complementary polynucleotides, and wherein each individual connection polynucleotide is added at a concentration based on a weight assigned to the individual connection polynucleotide; (d) ligating input polynucleotides that are present in a hybridization complex to form ligation products; and (e) determining a concentration of the ligation products, wherein the ligation products present at the highest concentration represent optimal solutions to the nondeterministic polynomial optimization problem.