subject

Suppose you are given a sequence or array of n real numbers (a1, a2, . . . , an), all distinct. We are interested in sorting this list, and ideally sorting it as efficiently as possible / with minimal effort. All information relevant to sorting a list can be thought of as contained in the order permutation. If a list (a1, a2, a3) has an ordering permutation of (3, 1, 2), that would mean a3 ≤ a1 ≤ a2, hence, the sorted form of the list would be (a3, a1, a2). This permutation encodes how all the elements compare to one another.
1) How many possible ways could a list of n values be ordered, i. e., how many ordering permutations are there?
2) Argue that if you know a list’s order permutation, sorting is easy (linear time), and conversely, if you know the steps to sort the list, you can easily generate the order permutation.
3) Given this, argue that sorting can’t be easier than finding the order permutation.
4) If every element comparison (testing where ai ≤ aj ) provides at most one bit of information, argue that in order to be able to sort any list, you need to perform at least approximately log2 (n!) many comparisons.
5) Based on the prior result, argue that merge sort is, asymptotically, as or more efficient than any other sorting algorithm.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:20
Wireless communications is likely to be viewed as an essential part of an enterprise network infrastructure when: select one: a. mobile communication is needed b. communication facilities must be installed at low initial cost c. communication must take place in a hostile or difficult terrain that makes wired communication difficult or impossible d. the same information must be broadcast to many locations
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
What is the foundation for proper monitoring, load balancing and routing in distributed systems
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
Need ! will choose brainliest! discuss the role of abstraction in the history of computer software.
Answers: 1
question
Computers and Technology, 23.06.2019 21:40
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
You know the right answer?
Suppose you are given a sequence or array of n real numbers (a1, a2, . . . , an), all distinct. We a...
Questions
question
Spanish, 27.09.2020 22:01
question
Mathematics, 27.09.2020 22:01
question
Mathematics, 27.09.2020 22:01
question
Mathematics, 27.09.2020 22:01
Questions on the website: 13722362