2)
The key to solving this problem is computing how many different inputs
there are such that pairwise they have different answers for the given
problem. We do this by counting all the possiblities for
how the 2 elements are merged into the n elements. There are n+1 slots
(before the first element of A, after the first element of A, ...., after
the last element of A). Hence there are C(n+1,2) = n(n+1)/2 ways in which
the two elements fall in different slots (their orderis fixed since they
were sorted) and n+1 ways in which they fall into the same slot. Hence
by the sum rule, there are n(n+1)/2 + (n+1) = (n+1)(n+2)/2 possibilities.
Hence there must be at least (n+1)(n+2)/2 leaves.
Since a decision tree of height h has at most 2^h leaves, it follows
that h must be large enough so that 2^h >= (n+1)(n+2)/2. Taking
base-2 logarithms of both sides yields we must have
h >= log_2 (n+1)(n+2)/2 = log_2 (n+1) + log_2 (n+2) -1 >= 2 log_2 (n+1) - 1.
Hence any comparison-based algorithm for this problem must make at least
2 log_2 (n+1) - 1 comparisons and hence have time complexity >= 2 log_2 (n+1) - 1.