Question: In class we showed using an adversary argument that any algorithm to compute the MAX and the MIN of a set of n distinct numbers
In class we showed using an adversary argument that any algorithm
to compute the MAX and the MIN of a set of n distinct numbers
simultaneously using pairwise comparisons must, in the worstcase, use
at least n comparisons.
a Use the decision tree argument finding a lower bound on the num
ber of possible responses, which is a lower bound on the number
of leaves, and using this as a bound on the height of the tree
to develop a worstcase lower bound on the number of pairwise
comparisons.
b If this bound is different than n explain how seemingly
contradictory bounds can both be correct.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
