Question: Question 1 (15 points; 10 points; 5 points) Let S be a set of n positive integers, where n is even. a) Give an efficient
Question 1 (15 points; 10 points; 5 points) Let S be a set of n positive integers, where n is even. a) Give an efficient o(n2) algorithm to partition S into two subsets S1 and S2 of 2n elements each with the property that the difference between the sum of the elements in S1 and the sum of the elements in S2 is maximum. b) Analyze the time complexity of your algorithm? Question 2 (15 points; 13 points; 2 points) Consider the following recurrence relation f(n)=2f(n1)+n3n1=2n=0 a) Solve the above recurrence relation. b) Express the solution in part (a) in terms of () notation in the simplest form
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
