Exercise 2 Number Different Values Set Set N Numbers Taking K Different Values Value K Unk Q43903982
could you please solve it by divide-and-conquer?
Exercise 2. THE NUMBER OF DIFFERENT VALUES IN A SET. We have a set of n numbers taking only k different values, where the value of k is unknown. We have a binary comparison oracle at our disposal. Please explain how you can compute k using not more than n log2k + O(n) comparisons. Show transcribed image text Exercise 2. THE NUMBER OF DIFFERENT VALUES IN A SET. We have a set of n numbers taking only k different values, where the value of k is unknown. We have a binary comparison oracle at our disposal. Please explain how you can compute k using not more than n log2k + O(n) comparisons.
Expert Answer
Answer to Exercise 2. THE NUMBER OF DIFFERENT VALUES IN A SET. We have a set of n numbers taking only k different values, where th…
OR