Question: ( 1 0 points ) The input is a sequence of real numbers x = ( x 1 , x 2 , cdots, x n

(10 points) The input is a sequence of real numbers x=(x1,x2,cdots,xn) in a non-decreasing order where
n is even. The problem is to find a partition of x into n2 pairs that minimizes the maximum value in S=
{s1,s2,cdots,sn2} where each siinS denotes the sum of two numbers in pair i.
For example, let x=(1,2,2,4,6,6) and consider two partitions P1=((1,2),(2,4),(6,6)) and P2=
((1,6),(2,6),(2,4)). Then, the maximum value of S1={3,6,12} resulted from P1 is 12 and the maximum
value of S2={7,8,6} resulted from P2 is 8.
Describe an O(n) time algorithm to solve the problem.
( 1 0 points ) The input is a sequence of real

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!