Question: (Grading details: correct answer=10, empty=0, wrong answer=-5) Consider the problem of finding maximum and minimum elements in a list by a comparison-based algorithm. Remember the

(Grading details: correct answer=10, empty=0, wrong answer=-5) Consider the problem of finding maximum and minimum elements in a list by a comparison-based algorithm. Remember the lower bound analysis of this problem with the adversary technique we covered in the lectures (where we made use of the lists U, W, L, WL). This question is about visualization of this analysis on an example. Suppose that there is an algorithm for solving this problem. Given an input list L= [10,20,30,40,50], the algorithm makes the following comparisons in this order: compares 30 and 40 compares 10 and 30 compares 30 and 40 compares 40 and 50 compares 10 and 50 In the answers below, each line shows the contents of the lists after each comparison. That is, the first line shows the lists after the first comparison, etc. Which one of the following is a possible configuration when we take into account the interventions of the adversary? Select one: U = [10 20 50], W = [40], L = [30], WL = [] U = [20 50], W = [30 40), L =[10], WL = [] U = [20 50], W = [40], L = [10 30], WL = [] U = [20], W = [50], L = [10 30 40), WL = 0 U = [20], W = [50], L= [10 30 40), WL = [] U = [10 20 50), W = [40], L = [30], WL = [] U= [20 50), W = [35 40), L = [30], WL = [] U = [20 50), W = [35 40), L= [30], WL = [] U = [20], W = [35 55), L = [30 50], WL = [] U = [20], w = [55 60), L = [30 50], WL = [] b. c. U = [10 20 50], W=[40], L = [30], WL = [] U = [20 50), W =[40], L = [10], WL = [30] U = [20 50), W = [40), L = [10], WL = [30] U = [20], W = [50], L = [10], WL = [3040] U = [20], W = (50), L = [10], WL = [30 40) U = [10 20 50), W = [40], L = [30], WL = [] U = [20 50), W = [35 40), L = [10], WL = [] U = [20 50], W = [40], L = [10], WL = [35] U = [20], W = [50], L = [10], WL = [3545] U = [20], W = [50], L = [10], WL = [35 451 d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
