The Partitioning Problem: Given a set ofnpositive integers, partition the integers into two subsets of equal or almost equal sum. The goal is to partition the input numbers into two groups such that the difference between the sums of the elements in the two group is minimum or as small as possible. a) Since no polynomial solutions are known for the above problem, implement an exponential algorithm for finding the optimal solution for any instance of the problem and test it for small input samples. Identify the maximum input size for which an optimal solution is possible to obtain using your algorithm in reasonable time (for example 3 hours). Hint: Every possible partition (solution) can be represented by a binary array of sizen
The Partitioning Problem: Given a set ofnpositive integers, partition the integers into two subsets of equal or almost equal sum. The goal is to partition the input numbers into two groups such that the difference between the sums of the elements in the two group is minimum or as small as possible.
a) Since no polynomial solutions are known for the above problem, implement an exponential
Step by step
Solved in 4 steps with 2 images