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
A manometer containing a fluid with a density of 60 lbm/ft3 is attached to a tank filled with air. If the gage pressure of the a
8090 [49]

Answer:

The fluid level difference in the manometer arm = 22.56 ft.

Explanation:

Assumption: The fluid in the manometer is incompressible, that is, its density is constant.

The fluid level difference between the two arms of the manometer gives the gage pressure of the air in the tank.

And P(gage) = ρgh

ρ = density of the manometer fluid = 60 lbm/ft³

g = acceleration due to gravity = 32.2 ft/s²

ρg = 60 × 32.2 = 1932 lbm/ft²s²

ρg = 1932 lbm/ft²s² × 1lbf.s²/32.2lbm.ft = 60 lbf/ft³

h = fluid level difference between the two arms of the manometer = ?

P(gage) = 9.4 psig = 9.4 × 144 = 1353.6 lbf/ft²

1353.6 = ρg × h = 60 lbf/ft³ × h

h = 1353.6/60 = 22.56 ft

A diagrammatic representation of this setup is presented in the attached image.

Hope this helps!

5 0
3 years ago
Force = 33 newtons
kicyunya [14]

Answer:

answer

Explanation:

4 0
3 years ago
Mahamad Siddiqui sent false emails and letters of recommendation on behalf of individuals without their permission to nominate h
shusha [124]

Mahamad Siddiqui sent false emails and letters of recommendation on behalf of individuals without their permission to nominate himself for the Waterman Award at the National Science Foundation. His earlier emails were offered where he had solicited letters were offered as evidence. Siddiqui claimed that content of earlier emails was hearsay. Do the earlier emails come in is given below

Explanation:

1.Mohamed Siddiqui appeals his convictions for fraud and false statements to a federal agency, and obstruction in connection with a federal investigation.   Siddiqui challenges the district court's admission into evidence of e-mail and foreign depositions.

2.On February 18, 1997, Jodi Saltzman, a special agent with the NSF interviewed Siddiqui at Siddiqui's office at the University of South Alabama.   During the interview, Siddiqui signed a statement admitting that he had nominated himself for the Waterman Award, but that he had permission from Yamada and von Gunten to submit forms on their behalf.   Siddiqui also acknowledged in the statement that Westrick had recommended Siddiqui for a different award, the PECASE Award, but that Siddiqui had changed the wording of the letter to apply to the Waterman Award.   Siddiqui was indicted on April 29, 1997.

3.Siddiqui opposed the taking of the depositions on the grounds that the witnesses' personal presence at trial was necessary, and that Indian travel restrictions for its citizens residing abroad prevented him from traveling to Japan and Switzerland.   Specifically, Siddiqui asserted that because of religious persecution in India his travel to Japan or Switzerland related to the criminal action would put his family members still living in India at risk.   The magistrate judge ruled that the government had carried its burden of showing that Yamada and von Gunten would be unavailable to appear at trial, and instructed that Siddiqui's fear of obtaining a travel visa from India because of the threat of persecution of family members should not preclude the taking of the foreign depositions.

4.Yamada's deposition was taken in Japan on March 6, 1998.   At government expense, Siddiqui's counsel attended the deposition and cross-examined the witness, but was not in telephonic contact with Siddiqui during the deposition.   Yamada testified that on February 1, 1997, she received an e-mail stating that if she received a phone call from the NSF to “please tell good words about me.”   Yamada testified that she knew the e-mail was from Siddiqui because the name on the e-mail had Siddiqui's sender address, and it ended with the name “Mo” which Siddiqui had previously told her was his nickname, and which he had used in previous e-mail.

5.Yamada later admitted to Saltzman that she had not given Siddiqui permission to sign, but had made the earlier representation because she thought Siddiqui would go to jail.

6.During cross-examination of Yamada at the deposition, Siddiqui's counsel introduced an e-mail from Yamada to Siddiqui.   This e-mail contained the same e-mail address for Siddiqui as the e-mail received by Yamada and von Gunten apparently from Siddiqui.

7.Von Gunten's video deposition was taken in Switzerland.   At government expense, Siddiqui's counsel attended the deposition and cross-examined von Gunten.   During the deposition, Siddiqui was in communication with his counsel by telephone.   Von Gunten testified at the deposition that he had not submitted a letter of recommendation in favor of Siddiqui for the Waterman Award, and that he had not given Siddiqui permission to submit such a letter in his name.

8 0
3 years ago
The hot and cold inlet temperatures to a concentric tube heat exchanger are Th,i = 200°C, Tc,i = 100°C, respectively. The outlet
alexgriva [62]

Answer:Counter,

0.799,

1.921

Explanation:

Given data

T_{h_i}=200^{\circ}C

T_{h_o}=120^{\circ}C

T_{c_i}=100^{\circ}C

T_{c_o}=125^{\circ}C

Since outlet temperature of cold liquid is greater than hot fluid outlet temperature therefore it is counter flow heat exchanger

Equating Heat exchange

m_hc_{ph}\left [ T_{h_i}-T_{h_o}\right ]=m_cc_{pc}\left [ T_{c_o}-T_{c_i}\right ]

\frac{m_hc_{ph}}{m_cc_{pc}}=\frac{125-100}{200-120}=\frac{25}{80}=C\left ( capacity rate ratio\right )

we can see that heat capacity of hot fluid is minimum

Also from energy balance

Q=UA\Delta T_m=\left ( mc_p\right )_{h}\left ( T_{h_i}-T_{h_o}\right )

NTU=\frac{UA}{\left ( mc_p\right )_{h}}=\frac{\left ( T_{h_i}-T_{h_o}\right )}{T_m}

T_m=\frac{\left ( 200-125\right )-\left ( 120-100\right )}{\ln \frac{75}{20}}

T_m=41.63^{\circ}C

NTU=1.921

And\ effectiveness \epsilon =\frac{1-exp\left ( -NTU\left ( 1-c\right )\right )}{1-c\left ( -NTU\left ( 1-c\right )\right )}

\epsilon =\frac{1-exp\left ( -1.921\left ( 1-0.3125\right )\right )}{1-0.3125exp\left ( -1.921\left ( 1-0.3125\right )\right )}

\epsilon =\frac{1-exp\left ( -1.32068\right )}{1-0.3125exp\left ( -1.32068\right )}

\epsilon =\frac{1-0.2669}{1-0.0834}

\epsilon =0.799

5 0
3 years ago
(a) Aluminum foil used for storing food weighs about 0.3 grams per square inch. How many atoms of aluminum are contained in one
atroni [7]

Answer:

note:

solution is attached due to error in mathematical equation. please find the attachment

3 0
3 years ago
Other questions:
  • Air is compressed in a piston-cylinder device. List three examples of irreversibilities that could occur
    13·1 answer
  • A thin metal disk of mass m=2.00 x 10^-3 kg and radius R=2.20cm is attached at its center to a long fiber. When the disk is turn
    11·1 answer
  • Torque is a twisting force. If the required torque applied on a 3 ft wrench is 45 ft·lb, what is the force that must be applied?
    5·1 answer
  • A force 25 N makes an angle of 30,45 and 75 degree with x,y and z axis. What should be the corresponding force vector?
    8·1 answer
  • A water skier leaves the end of an 8 foot tall ski ramp with a speed of 20 mi/hr and at an angle of 250. He lets go of the tow r
    5·1 answer
  • DE QUE MANERA LA ALEGRIA NOS AYUDA A CONSEGIR AMIGOS <br> ≤→ω←≥
    10·1 answer
  • An isothermal CSTR with a first order irreversible reaction A â&gt; B (and rA[mol/(ft3*min)] = - 0.5 CA) has a constant flow rat
    13·1 answer
  • What is the purpose of encryption?
    13·1 answer
  • What are the philological elements of interior design most like?
    15·1 answer
  • The centre of the circumstancribing circle of a triangle can be found by using the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!