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 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 22.06.2019 23:00
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e.g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
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
History, 04.12.2021 09:10
question
Computers and Technology, 04.12.2021 09:10
question
Mathematics, 04.12.2021 09:20
question
Mathematics, 04.12.2021 09:20
question
Mathematics, 04.12.2021 09:20
question
Mathematics, 04.12.2021 09:20
question
History, 04.12.2021 09:20
Questions on the website: 13722362