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
chubhunter [2.5K]
4 years ago
8

If necessary, open the Cleanup Animator and choose the Shuffle Left algorithm from the Select Algorithm drop-down list. Click Ru

n and observe the "loop inside a loop" nature of this algorithm by watching the animation. The general idea is that the L marker moves to the right trying to detect 0s. Each time it detects a 0, the R marker moves to the right, shuffling the data items to the left. Try this three or four times, remembering to click Reset to prepare for each run. Suppose the original data set consists of these numbers: What is the final arrangement of the data when the algorithm terminates?
Engineering
1 answer:
jek_recluse [69]4 years ago
3 0

Answer:

A = 42 32 0 0 0 77 23 71 is the list of numbers taken here as the question is incomplete.

L marker moves to the right trying to detect 0s. Each time it detects a 0, the R marker moves to the right, shuffling the data items to the left.

Get the array, A and its size, n

L = 1

R = 2

Repeat the following steps until left > legit

if AL ≠ 0

L ++

R ++

else

legit --

Repeat the following steps until right > n

Copy AR to AR

R ++

R = L + 1

stop

Explanation: The arrangement of data is as follows:

A = 42 32 0 0 0 77 23 71

N = 8; L= 1; R = 2

Iteration 1: 42 ≠ 0 => L = 2; R = 3

A = 42 32 0 0 0 77 23 71

Iteration 2: 32 ≠ 0 => L = 3; R = 4

A = 42 32 0 0 0 77 23 71

Iteration 3: 0 = 0 => N = 7

Copy the remaining elements one position to its left

A = 42 32 0 0 77 23 71

Iteration 4: 0 = 0 => N = 6

Copy the remaining elements one position to its left

A = 42 32 0 77 23 71

Iteration 5: 0 = 0 => N = 5

Copy the remaining elements one position to its left

A = 42 32 77 23 71

Iteration 6: 77 ≠ 0 => L = 4; R = 5

A = 42 32 77 23 71

Iteration 7: 23 ≠ 0 => L= 5; R = 6

A = 42 32 77 23 71

Iteration 8: 71 ≠ 0 => L= 6; R = 7

A = 42 32 77 23 71

L > N ---- stop

final arrangement of the data when the algorithm terminates

42 32 77 23 71

You might be interested in
For an Otto cycle, plot the cycle efficiency as a function of compression ratio from 4 to 16.
Elza [17]

Assumptions:

  • Steady state.
  • Air as working fluid.
  • Ideal gas.
  • Reversible process.
  • Ideal Otto Cycle.

Explanation:

Otto cycle is a thermodynamic cycle widely used in automobile engines, in which an amount of gas (air) experiences changes of pressure, temperature, volume, addition of heat, and removal of heat. The cycle is composed by (following the P-V diagram):

  • Intake <em>0-1</em>: the mass of working fluid is drawn into the piston at a constant pressure.
  • Adiabatic compression <em>1-2</em>: the mass of working fluid is compressed isentropically from State 1 to State 2 through compression ratio (r).

        r =\frac{V_1}{V_2}

  • Ignition 2-3: the volume remains constant while heat is added to the mass of gas.
  • Expansion 3-4: the working fluid does work on the piston due to the high pressure within it, thus the working fluid reaches the maximum volume through the compression ratio.

         r = \frac{V_4}{V_3} = \frac{V_1}{V_2}

  • Heat Rejection 4-1: heat is removed from the working fluid as the pressure drops instantaneously.
  • Exhaust 1-0: the working fluid is vented to the atmosphere.

If the system produces enough work, the automobile and its occupants will propel. On the other hand, the efficiency of the Otto Cycle is defined as follows:

           \eta = 1-(\frac{1}{r^{\gamma - 1} } )

where:

           \gamma = \frac{C_{p} }{C_{v}} : specific heat ratio

Ideal air is the working fluid, as stated before, for which its specific heat ratio can be considered constant.

           \gamma = 1.4

Answer:

See image attached.

5 0
4 years ago
Does a food market have any rooms in particular? Also whats units?
makkiz [27]

Answer:

to be or not to be

Explanation:

Vivi is a drummer for a band. She burns 756756756 calories while drumming for 333 hours. She burns the same number of calories each hour.

8 0
3 years ago
Read 2 more answers
⦁ An ideal Otto cycle has a compression ratio of 8. At the beginning of the compression process, air is at 95 kPa and 27°C, and
Anon25 [30]

Answer:

<u><em>note:</em></u>

<u><em>solution is attached in word form due to error in mathematical equation. furthermore i also attach Screenshot of solution in word due to different version of MS Office please find the attachment</em></u>

Download docx
8 0
4 years ago
Explain the term electric current as used in engineering principles​
vodomira [7]

Answer:

<em>Electric current is the movement of electrons through a wire. Electric current is measured in amperes (amps) and refers to the number of charges that move through the wire per second. If we want current to flow directly from one point to another, we should use a wire that has as little resistance as possible.</em><em>Current is directly proportional to voltage, inversely proportional to resistance. One of the most common electrical measurements you'll use is the watt, a unit of electrical power: W (Watts) = E (Volts) x I (Amperes). The quantity of electric charge is measured in coulombs.</em><em>They can even pass through bones and teeth. This makes gamma rays very dangerous. They can destroy living cells, produce gene mutations, and cause cancer.</em>

Explanation:

hey mate this is the best answer if you're studying engineering!

8 0
3 years ago
Read 2 more answers
Substances A and B have retention times of 16.63 and 17.63 min, respectively, on a 30 cm column. An unretained species passes th
Svet_ta [14]

Answer:

The time required to elute the two species is 53.3727 min

Explanation:

Given data:

tA = retention time of A=16.63 min

tB=retention time of B=17.63 min

WA=peak of A=1.11 min

WB=peak of B=1.21 min

The mathematical expression for the resolution is:

Re_{s} =\frac{2(t_{B}-t_{A})}{W_{A}+W_{B} } =\frac{2*(17.63-16.63)}{1.11+1.21} =0.8621

The mathematical expression for the time to elute the two species is:

\frac{t_{2}}{t_{1}} =(\frac{Re_{B} }{Re_{s} } )^{2}

Here

ReB = 1.5

t_{2} =t_{1} *(\frac{Re_{B} }{Re_{s} } )^{2} =17.63*(\frac{1.5}{0.8621} )^{2} =53.3727min

6 0
3 years ago
Other questions:
  • Consider the series solution, Equation 5.42, for the plane wall with convection. Calculate midplane (x* = 0) and surface (x* = 1
    5·1 answer
  • Refrigerant-134a enters a diffuser steadily as saturated vapor at 600 kPa with a velocity of 160 m/s, and it leaves at 700 kPa a
    10·2 answers
  • Use the APWA 5600 methodology to compute the 1/25 design discharge for the following catchment. The catchment area consists of 1
    9·1 answer
  • Calculate the differential pressure in kPa across the hatch of a submarine 320m below the surface of the sea. Assume the atmosph
    6·1 answer
  • What is the correct statement regarding the stress over the section of a shaft in torsion?
    13·1 answer
  • The current through a 10-mH inductor is 10e−t∕2 A. Find the voltage and the power at t = 8 s.
    15·2 answers
  • No question but thx<br> reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
    7·2 answers
  • Foam weather stripping is often placed in the frames of doors and
    14·1 answer
  • When hermetic refrigerant motor-compressors are designed to operate continuously at currents greater than 156 percent of the rat
    10·1 answer
  • What car is this? I thinks its a nissan 240sx but i dont know
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!