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:30
Linda subscribes to a cloud service. the service provider hosts the cloud infrastructure and delivers computing resources over the internet.what cloud model is linda using
Answers: 1
question
Computers and Technology, 22.06.2019 14:40
For this assignment you have to write a c program that will take an infix expression as input and display the postfix expression of the input. after converting to the postfix expression, the program should evaluate the expression from the postfix and display the result. what should you submit? write all the code in a single file and upload the .c file. compliance with rules: ucf golden rules apply towards this assignment and submission. assignment rules mentioned in syllabus, are also applied in this submission. the ta and instructor can call any students for explaining any part of the code in order to better assess your authorship and for further clarification if needed. problem: we as humans write math expression in infix notation, e.g. 5 + 2 (the operators are written in-between the operands). in computer's language, however, it is preferred to have the operators on the right side of the operands, ie. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix write a program that takes an "infix" expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % ( example infix expression: (7-3)/(2+2) postfix expression: 7 3 2 2 result: rubric: 1) if code does not compile in eustis server: 0. 2) checking the balance of the parenthesis: 2 points 3) incorrect postfix expression per test case: -2 points 4) correct postfix but incorrect evaluation per test case: -i points 5) handling single digit inputs: maximum 11 points 6) handling two-digit inputs: 100 percent (if pass all test cases)
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
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, 06.06.2020 19:57