Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For each of the problems below use Selection as a black box algorithm to derive an O(n) time algorithm. It is common these days to
For each of the problems below use Selection as a black box algorithm to derive an O(n) time algorithm. It is common these days to hear statistics about wealth inequality in the United States. A typical statement is that the the top 1% of earners together make more than ten times the total income of the bottom 70% of earners. You want to verify these statements on some data sets. Suppose you are given the income of people as an n element unsorted array A, where A[i] gives the income of person Describe an algorithm that given A checks whether the top 1% of earners together make more than ten times the bottom 70% together. Assume for simplicity that n is a multiple of 100 and that all numbers in A are distinct. You do not need to formally prove the correctness of the algorithms but they should be clear and high-level. You need to justify the running time of your algorithms. For each of the problems below use Selection as a black box algorithm to derive an O(n) time algorithm. It is common these days to hear statistics about wealth inequality in the United States. A typical statement is that the the top 1% of earners together make more than ten times the total income of the bottom 70% of earners. You want to verify these statements on some data sets. Suppose you are given the income of people as an n element unsorted array A, where A[i] gives the income of person Describe an algorithm that given A checks whether the top 1% of earners together make more than ten times the bottom 70% together. Assume for simplicity that n is a multiple of 100 and that all numbers in A are distinct. You do not need to formally prove the correctness of the algorithms but they should be clear and high-level. You need to justify the running time of your algorithms
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started