show that any comparison-based algorithm for sorting can be modified to remove all duplicates without requiring any more comparisons to be performed show that any comparison-based algorithm for removing duplicates from list of values must use ohm( log ncomparisons given list of elementsan element of the list is majority if it appears more than / times (aassume that the input is list of integers design an algorithm that is linear in the number of integer-integer comparisons in the worst case that will find and report the majority if one existsand report that there is no majority if no such integer exists in the list (bassume that the input is list of elements that have no relative orderingsuch as colors or fruit so all that you can do when you compare two elements is ask if they are the same or not design an algorithm that is linear in the number of element-element comparisons in the worst case that will find majority if one existsand report that there is no majority if no such element exists in the list given an undirected graph gthe problem is to determine whether or not is connected use an adversary argument to prove that it is necessary to look at all ( )/ potential edges in the worst case (awrite an equation to describe the average cost for finding the median (bsolve your equation from part ( (awrite an equation to describe the average cost for finding the ith-smallest value in an array this will be function of both and it(ni(bsolve your equation from part ( suppose that you have objects that have identical weightexcept for one that is bit heavier than the others you have balance scale you can place objects on each side of the scale and see which collection is heavier your goal is to find the heavier objectwith the minimum number of weighings find and prove matching upper and lower bounds for this problem imagine that you are organizing basketball tournament for teams you know that the merge insert sort will give you full ranking of the teams with the minimum number of games played assume that each game can be played in less than an hourand that any team can play as many games in row as necessary show schedule for this tournament that also attempts to minimize the number of total hours for the tournament and the number of courts used if you have to make tradeoff between the twothen attempt to minimize the total number of hours that basketball courts are idle