Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question: Comparison of Sorts In class, we discussed two quadratic sorting algorithms (Insertion-Sort and Selection-Sort) aswell as onenlgnsorting algorithm (Merge-Sort). Dozens, if not hundreds, of

Question:

Comparison of Sorts

In class, we discussed two quadratic sorting algorithms (Insertion-Sort and Selection-Sort) aswell as onenlgnsorting algorithm (Merge-Sort). Dozens, if not hundreds, of other sorting algo-rithms have been developed. Another well-known sorting algorithm isShell?Sortwhose asymp-totic running time is on the order ofnlg2n, when implemented appropriately.

In the problems that follow, you will compare these three algorithms for sorting. Ignoringlower order terms and constant factors, letT1(n),T2(n), andT3(n) be the "effort" required byInsertion/Selection-Sort, Shell-sort, and Merge-Sort, respectively, to sort a list of lengthn. We have:

T1(n) =n2

T2(n) =nlg2n

T3(n) =nlgn

where lgnis log2(n) and lg2n= (lgn)2

i.On asinglesheet of graph paper, plot the effort required by each of the these algorithmswhen run on lists of lengthn= 2, 4, 8, 16, and 32. For each algorithm, connect the plotpoints with a smooth, hand-drawn curve. See the plots given in the "Exponentials and Logs"appendix of the text for examples of what you should do. You may print a piece of graphpaper from the PDF located at the following URL:

https://www.printfreegraphpaper.com/gp/c-i-14.pdf

ii.Suppose that you were given a budget of 1,000 units of "effort." For each of the threealgorithms, determine the largest list length such that the sorting effort required is guaranteedto be at most 1,000.

iii.How many times larger is the list that Merge-Sort can handle, as compared to the lists thatInsertion/Selection-Sort and Shell-sort can handle? How many times larger is the list thatShell-sort can handle, as compared to the list that Insertion/Selection-Sort can handle?

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
Properties of Quadrilateral Diagonals Congruent Diagonals Intersection of Name of Diagonals Bisected Diagonals Quadrilateral Yes No Both One Neither. Perpendicular NotDetermine whether the following value is a continuous random variable, discrete random variable, or not a random variable, a. The height of a randomly selected person b. The "yes" or "no" response to a survey question c. The number of pigeons in a country d. The number of statistics students now doing their homework e. The distance a football travels in the air after being thrown f. The exact time it takes to evaluate 67 + 29 a. Is the height of a randomly selected person a discrete random variable, continuous random variable, or not a random variable? O A. It is a continuous random variable B. It is a discrete random variable. O C. It is not a random variable b. Is the "yes" or "no" response to a survey question a discrete random variable, continuous random variable, or not a random variable? O A. It is a continuous random variable O B. It is a discrete random variable. O C. It is not a random variable. C. Is the number of pigeons in a country a discrete random variable, continuous randorn variable, or not a random variable? O A. It is a continuous random variable. O B. It is a discrete random variable O C. It is not a random variable. d. Is the number of statistics students now doing their homework a discrete random variable, continuous random variable, or not a random variable? O A. It is a continuous random variable O B. It is a discrete random variable, O C. It is not a random variable. @. Is the distance a football travels in the air after being thrown a discrete random variable, continuous random variable, or not a random variable ? O A. It is a discrete random variable O B. It is a continuous random variablea. ha the height of a randomly selected person a discrete random variable, continuous random variable, or not a random variable? O A. It is a continuous random variable B. It has a docrete random variable C. It has not a random variable b. Is the hair color of adults in the United States a discrete random vailable, continuous random variable, or not a random vielable? A. It Is a continuous random variable O B. It ha discrete random variable O C. It is not a random variable c. In the cant time it takes to evaluate 67 + 29 a discrete random vhilable, continuous random variable, or not a random variable? O'A hisa decele random variable Q Q. It is a continuous random variable O C. itis not a random variable d. In the number of pigeons in a country a decrate markfor variable, continuous random variable, or not a random variable? D A. it is a discrete random variable Of eth a continuous iandorn variable O.C. It is not a random variable1. For a bivariate distribution with the following joint pdf 0 2Y) 2. Repeat with f(x, y) = exp(-x) r>y>0 3. A random variable X has the following pdf: 3c when -1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Calculus I With Integrated Precalculus

Authors: Laura Taalman

1st Edition

1464153027, 9781464153020

More Books

Students also viewed these Mathematics questions