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
Tadpoles raised in water with atrazine levels of 0.1 ppb should produce a higher percentage of male frogs with gonadal abnormali
Kobotan [32]

Answer:

correct option is c. a testable prediction leading to design of an experiment

Explanation:

The results of raising tadpoles were estimated to be water with an atrazine level of 0.1 ppb compared to those grown in pure water. So, this is not the question. If this assumption can now be tested, an experiment can be made in which a certain number of tadpoles can be raised in pure water and the same number of tadpoles can be raised in water with a 0.1ppb atrazine level can. The difference between the two populations can be estimated or compared.

8 0
3 years ago
Volume of sale (i.e., the number of parts sold) is a factorwhen determining which
nadya68 [22]

Answer: N has to be lesser than or equal to 1666.

Explanation:

Cost of parts N in FPGA = $15N

Cost of parts N in gate array = $3N + $20000

Cost of parts N in standard cell = $1N + $100000

So,

15N < 3N + 20000 lets say this is equation 1

(cost of FPGA lesser than that of gate array)

 Also. 15N < 1N + 100000  lets say this is equation 2  

(cost of FPGA lesser than that of standardcell)

Now

From equation 1

12N < 20000

N < 1666.67

From equation 2

14N < 100000

N < 7142.85

AT the same time, Both conditions must hold true

So N <= 1666 (Since N has to be an integer)

N has to be lesser than or equal to 1666.

3 0
3 years ago
Select the correct answer.
juin [17]
Orthographic projection, common method of representing three-dimensional objects, usually by three two-dimensional drawings in each of which the object is viewed along parallel lines that are perpendicular to the plane of the drawling.
4 0
3 years ago
Consider fully developed laminar flow in a circular pipe. If the viscosity of the fluid is reduced by half by heating while the
gladu [14]

Answer:

The pressure drop across the pipe also reduces by half of its initial value if the viscosity of the fluid reduces by half of its original value.

Explanation:

For a fully developed laminar flow in a circular pipe, the flowrate (volumetric) is given by the Hagen-Poiseulle's equation.

Q = π(ΔPR⁴/8μL)

where Q = volumetric flowrate

ΔP = Pressure drop across the pipe

μ = fluid viscosity

L = pipe length

If all the other parameters are kept constant, the pressure drop across the circular pipe is directly proportional to the viscosity of the fluid flowing in the pipe

ΔP = μ(8QL/πR⁴)

ΔP = Kμ

K = (8QL/πR⁴) = constant (for this question)

ΔP = Kμ

K = (ΔP/μ)

So, if the viscosity is halved, the new viscosity (μ₁) will be half of the original viscosity (μ).

μ₁ = (μ/2)

The new pressure drop (ΔP₁) is then

ΔP₁ = Kμ₁ = K(μ/2)

Recall,

K = (ΔP/μ)

ΔP₁ = K(μ/2) = (ΔP/μ) × (μ/2) = (ΔP/2)

Hence, the pressure drop across the pipe also reduces by half of its initial value if the viscosity of the fluid reduces by half of its value.

Hope this Helps!!!

4 0
3 years ago
Whats the best used for cable -stayed bridge
nalin [4]

Answer:

a cable -stayed bridge has, one or more towers,from which cable support the bridge deck.

7 0
3 years ago
Other questions:
  • (10 points) A single crystal in the titanium cable is oriented so that the [001] direction is parallel to the applied load. If t
    14·1 answer
  • (8 points) Consider casting a concrete driveway 40 feet long, 12 feet wide and 6 in. thick. The proportions of the mix by weight
    8·1 answer
  • A driver on a leveltwo-lane highway observes a
    6·1 answer
  • Determine the average and rms values for the function, y(t)=25+10sino it over the time periods (a) 0 to 0.1 sec and (b) 0 to 1/3
    9·1 answer
  • Convection ovens operate on the principle of inducing forced convection inside the oven chamber with a fan. A small cake is to b
    6·1 answer
  • A minor road intersects a major 4-lane divided road with a design speed of 50 mph and a median width of 12 ft. The intersection
    13·1 answer
  • A positive slope on a position-time graph suggests
    15·1 answer
  • Why do stores still sell those 1.5 volt batteries that are like three times the size of other 1.5 volt batteries. What is the po
    9·2 answers
  • 1) Plastics that soften when heated,harden when cooled, and then can be heated and softened many times
    6·1 answer
  • the left rear brake drum is scored, but the right rear drum looks as good as new. technician a says the left-side drum should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!