1.Charlie Programmer is given the problem of dividing a group (of an even number of people) into two disjoint subgroups of equal size so that the difference between the total
ages of each subgroup is as large as possible. He proposes the solution of forming all possible subgroup pairs, computing the difference between the age totals of each pair, and
selecting the pair with the largest difference. Mary Programmer, on the other hand, proposes that the original group first be sorted by age and then divided into two subgroups by forming one subgroup from the younger half of the sorted group and the other from the older half. What is the complexity of each of these solutions? Is the problem itself of polynomial, NP, or nonpolynomial complexity?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here