1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Natali5045456 [20]
3 years ago
13

Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routin

e that we covered in class on the quicksort slides. Consider another almost-best case for quicksort, in which the pivot always splits the arrays 1/3: 2/3, i.e., one third is on the left, and two thirds are on the right, for all recursive calls of Deterministic Quicksort. (a) Give the runtime recurrence for this almost-best case. (b) Use the recursion tree to argue why the runtime recurrence solves to Theta (n log n). You do not need to do big-Oh induction. (c) Give a sequence of 4 distinct numbers and a sequence of 13 distinct numbers that cause this almost-best case behavior. (Assume that for 4 numbers the array is split into 1 element on the left side, the pivot, and two elements on the right side. Similarly, for 13 numbers it is split with 4 elements on the left, the pivot, and 8 elements on the right side.)
Engineering
1 answer:
juin [17]3 years ago
3 0

Answer:

Answer for the question:

Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routine that we covered in class on the quicksort slides. Consider another almost-best case for quicksort, in which the pivot always splits the arrays 1/3: 2/3, i.e., one third is on the left, and two thirds are on the right, for all recursive calls of Deterministic Quicksort. (a) Give the runtime recurrence for this almost-best case. (b) Use the recursion tree to argue why the runtime recurrence solves to Theta (n log n). You do not need to do big-Oh induction. (c) Give a sequence of 4 distinct numbers and a sequence of 13 distinct numbers that cause this almost-best case behavior. (Assume that for 4 numbers the array is split into 1 element on the left side, the pivot, and two elements on the right side. Similarly, for 13 numbers it is split with 4 elements on the left, the pivot, and 8 elements on the right side.)

is given in the attachment.

Explanation:

Download pdf
You might be interested in
If we didn’t have the spark what could not happen?
Sloan [31]

Answer:

there's no electric current

8 0
3 years ago
The volume at a section of a 2-lane highway is 1800 vph in each direction and the density is approximately 30 bpm. A slow moving
katrin [286]

Answer:

Idk

Explanation:

8 0
3 years ago
A heat pump receives heat from a lake that has an average wintertime temperature of 6o C and supplies heat into a house having a
Dafna1 [17]

Answer:

a) \dot W = 1.062\,kW

Explanation:

a) Let consider that heat pump is reversible, so that the Coefficient of Performance is:

COP_{HP} = \frac{T_{H}}{T_{H}-T_{L}}

COP_{HP} = \frac{298.15\,K}{298.15\,K-279.15\,K}

COP_{HP} = 15.692

The minimum heat received by the house must be equal to the heat lost to keep the average temperature constant. Hence:

\dot Q_{H} = 60000\,\frac{kJ}{h}

The minimum power supplied to the heat pump is:

\dot W = \frac{\dot Q_{H}}{COP}

\dot W = \frac{\left(60000\,\frac{kJ}{h}  \right)\cdot \left(\frac{1\,h}{3600\,s}  \right)}{15.692}

\dot W = 1.062\,kW

5 0
3 years ago
For the following conditions determine whether a CMFR or a PFR is more efficient in removing a reactive compound from the waste
andrew11 [14]

Answer:

The PFR is more efficient in the removal of the reactive compound as it has the higher conversion ratio.

Xₚբᵣ = 0.632

X꜀ₘբᵣ = 0.5

Xₚբᵣ > X꜀ₘբᵣ

Explanation:

From the reaction rate coefficient, it is evident the reaction is a first order reaction

Performance equation for a CMFR for a first order reaction is

kτ = (X)/(1 - X)

k = reaction rate constant = 0.05 /day

τ = Time constant or holding time = V/F₀

V = volume of reactor = 280 m³

F₀ = Flowrate into the reactor = 14 m³/day

X = conversion

k(V/F₀) = (X)/(1 - X)

0.05 × (280/14) = X/(1 - X)

1 = X/(1 - X)

X = 1 - X

2X = 1

X = 1/2 = 0.5

For the PFR

Performance equation for a first order reaction is given by

kτ = In [1/(1 - X)]

The parameters are the same as above,

0.05 × (280/14) = In (1/(1-X)

1 = In (1/(1-X))

e = 1/(1 - X)

2.718 = 1/(1 - X)

1 - X = 1/2.718

1 - X = 0.3679

X = 1 - 0.3679

X = 0.632

The PFR is evidently more efficient in the removal of the reactive compound as it has the higher conversion ratio.

3 0
3 years ago
What happens when force is placed on a square/rectangle?
mart [117]

im not sure i need to see a photo and also is this science

7 0
3 years ago
Read 2 more answers
Other questions:
  • Magnesium sulfate has a number of uses, some of which are related to the ability of the anhydrate form to remove water from air
    15·1 answer
  • I dont undertand this coding problem (Java):
    8·1 answer
  • A Scalar can only be a positive quantity that has a magnitude but no direction ? a)-True b)-False
    5·1 answer
  • Give a reason why fighter aircraft use mid-wing design.
    11·1 answer
  • First person to tell me what this car is gets 10 points
    10·2 answers
  • A benefit to using the medium the author used in "Great Rock and Roll
    12·2 answers
  • Of the core elements of successful safety and health programs, Management Leadership, Worker Participation, and what else relate
    10·2 answers
  • Nitrogen (N2) enters an insulated compressor operating at steady state at 1 bar, 378C with a mass flow rate of 1000 kg/h and exi
    8·1 answer
  • Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
    12·2 answers
  • By the end of the day, a 45 ft x 25 ft x 8 ft office has a carbon dioxide air level of 1,100 ppm. Determine the time in hours ne
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!