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, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 22.06.2019 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Jennifer has to set up a network in a factory with an environment that has a lot of electrical interference. which cable would she prefer to use? jennifer would prefer to use because its metal sheath reduces interference.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
Answers: 1
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
Mathematics, 20.09.2020 14:01
question
History, 20.09.2020 14:01
question
Biology, 20.09.2020 14:01
Questions on the website: 13722363