Argue briefly that to test whether a given n-element permutation can be sorted by an n-input comparison network, it suffices to test the network on n—1 sequences of 0’s and 1’s.
Ambiguity in a proposed algorithm - Explain the distinction between an ambiguity in a proposed algorithm and an ambiguity in the representation of an algorithm.
Algorithm to find majority element - Let A be an array of n elements. An element x is said to be a majority element in A if it occurs in A more than n/2 times. Assume that the only comparisons allowed between elements are tests of equa ...
Divide and conquer - Design and analyze a divide-and-conquer algorithm for finding the maximum element in a list L[0:n-1].
Algorithms - Analyzing Algorithm Performance - Design an algorithm that tests whether or not two input lists of size n have at least one element in common. Give formulas for B(n) and W(n) for your algorithm.