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
Calculate the radius of a circular orbit for which the period is 1 day​
astraxan [27]

Answer:

(T²/D³)sys1 = (T²/D³)sys2

sys1 = earth-moon

sys2 = earth-sat

(27.33day)²/(3.8e8m)³ = (1day)²/D³

D = cbrt(7.3e22m³) = 4.2e7 m

Explanation:

exchange in capacity whilst a satellite tv for pc differences altitude How plenty paintings could be executed to flow the satellite tv for pc into yet another around orbit it is bigger above the outdoors of the Earth? satellite tv for pc exchange in capacity with top Assuming the satellite tv for pc is to be boosted to a clean top r? Gravitational capacity capacity (to center of earth) new orbit(2) has a greater robust PE than old one(a million), so exchange is helpful PE = G m?m?/r earth GM = 3.98e14 ?PE = (GM)(m)(a million/r? – a million/r?) KE additionally differences. Get speed at each and every top. New orbit(2) has decrease speed, so exchange is damaging v = ?(GM/R) V? = ?(GM/r?) V? = ?(GM/r?) ?KE = –½m(V?² – V?²) ?KE = –½mGM(a million/r? – a million/r?) including the two ?E = (GM)(m)(a million/r? – a million/r?)– ½mGM(a million/r? – a million/r?) ?E = ½mGM(a million/r? – a million/r?) ?E = ½(3.98e14)(7500) [a million/(0.5e7) –a million/(3.3e7) ] ?E = ½(3.98e14)(7500)(1e-7) [a million/(0.5) –a million/(3.3) ] ?E = ½(3.98e7)(7500) [2 – 0.303 ] ?E = ½(3.98e7)(7500)(a million.70) ?E = 2.04e11 Joules edit, corrected .

8 0
3 years ago
To unload a bound stack of plywood from a truck, the driver first tilts the bed of the truck and then accelerates from rest. Kno
azamat

Answer:

a) The truck must have an acceleration of at least 3.92 * cos(θ)^2 for the stack to start sliding.

b) a = 2.94 * cos(θ)^2 + 0.32 * L * cos(θ)

Explanation:

The stack of plywood has a certain mass. The weight will depend on that mass.

w = m * g

There will be a normal reaction between the stack and the bed of the truck, this will be:

nr = -m * g * cos(θ)

Being θ the tilt angle of the bed.

The static friction force will be:

ffs = - m * g * cos(θ) * fJK

The dynamic friction force will be:

ffd = - m * g * cos(θ) * fik

These forces would produce accelerations

affs = -g * cos(θ) * fJK

affd = -g * cos(θ) * fik

affs = -9.81 * cos(θ) * 0.4 = -3.92 * cos(θ)

affd = -9.81 * cos(θ) * 0.3 = -2.94 * cos(θ)

These accelerations oppose to movement and must be overcome by another acceleration to move the stack.

The acceleration of the truck is horizontal, the horizontal component of these friction forces is:

affs = -3.92 * cos(θ)^2

affd = -2.94 * cos(θ)^2

The truck must have an acceleration of at least 3.92 * cos(θ)^2 for the stack to start sliding.

Assuming the bed has a lenght L.

The horizontal movement will be over a distance cos(θ) * L because L is tilted.

Movement under constant acceleration:

X(t) = X0 + V0 * t + 1/2 * a * t^2

In this case X0 = 0, V0 = 0, and a will be the sum of the friction force minus the acceleration of the truck.

If we set the frame of reference with the origin on the initial position of the stack and the positive X axis pointing backwards, the acceleration of the truck will now be negative and the dynamic friction acceleration positive.

L * cos(θ) = 1/2 * (2.94 * cos(θ)^2 - a) * 0.4^2

2.94 * cos(θ)^2 - a = 2 * 0.16 * L * cos(θ)

a = 2.94 * cos(θ)^2 + 0.32 * L * cos(θ)

6 0
4 years ago
the frequencies 10, 12, 23 and 45 Hz. (a) What is the minimum sampling rate required to avoid aliasing? (b) If you sample at 40
ValentinkaMS [17]

Answer:

Sampling rate = 90

23 and 45 Hz

Explanation:

The Nyquist criteria states that the sampling frequency must be at least twice of the highest frequency component.

(a) We have 10, 12, 13, 23, and 45 Hz signals

The highest frequency component in this list is 45 Hz

So minimum sampling frequency needed to avoid aliasing would be

Sampling rate = 2*45 = 90 sps

Hence a sampling rate of 90 samples per second would be required to avoid aliasing.

(b) if a sampling rate of 40 sps is used then

40 = 2*f

f = 40/2 = 20 Hz

Hence 23 and 45 Hz components will be aliased.

3 0
3 years ago
The stagnation chamber of a wind tunnel is connected to a high-pressure airbottle farm which is outside the laboratory building.
Natasha2012 [34]

This question is not complete, the complete question is;

The stagnation chamber of a wind tunnel is connected to a high-pressure air bottle farm which is outside the laboratory building. The two are connected by a long pipe of 4-in inside diameter. If the static pressure ratio between the bottle farm and the stagnation chamber is 10, and the bottle-farm static pressure is 100 atm, how long can the pipe be without choking? Assume adiabatic, subsonic, one-dimensional flow with a friction coefficient of 0.005

Answer:

the length of the pipe is 11583 in or 965.25 ft

Explanation:

Given the data in the question;

Static pressure ratio; p1/p2 = 10

friction coefficient f = 0.005

diameter of pipe, D =4 inch

first we obtain the value from FANN0 FLOW TABLE for pressure ratio of ( p1/p2 = 10 )so

4fL_{max} / D = 57.915

we substitute

(4×0.005×L_{max}) / 4  = 57.915

0.005L_{max} = 57.915

L_{max} = 57.915 / 0.005

L_{max}  = 11583 in

Therefore, the length of the pipe is 11583 in or 965.25 ft

6 0
3 years ago
Water exiting the condenser of a power plant at 45 Centers a cooling tower with a mas flow rate of 15,000 kg/s. A stream of cool
MariettaO [177]

Answer: hello your question is incomplete below is the missing part

question :Determine the temperature of the cooled water exiting the cooling tower

answer : T  = 43.477° C

Explanation:

Temp of water at exit = 45°C

mass flow rate of cooling tower = 15,000 kg/s

Temp of makeup water = 20°C

Assuming an atmospheric pressure of = 101.3 kPa

<u>Determine temperature of the cooled water exiting the cooling tower</u>

Water entering cooling tower at 45°C

Given that Latent heat of water at 45°C = 43.13 KJ/mol

Cp(wet air) = 1.005+ 1.884(y1)

where: y1 - Inlet mole ratio = (0.01257) / (1 - 0.01257) = 0.01273

Hence : Cp(wet air) = 29.145 +  (0.01273) (33.94) = 29.577 KJ/kmol°C

<u>First step : calculate the value of Q </u>

Q = m*Cp*(ΔT) + W(latent heat)

Q = 321.6968 (29.577) (40-30) +  43.13 (18.26089)

Q =  95935.8547 KJ/s

Given that mass rate of water = 15000 kg/s

<u>Hence the temperature of the cooled water can be calculated using the equation below</u>

Q = m*Cp*∆T

Cp(water) = 4.2 KJ/Kg°C

95935.8547 = (15000)*(4.2)*(45 - T)

( 45 - T ) = 95935.8547/ 63000.    ∴ T  = 43.477° C

5 0
3 years ago
Other questions:
  • Vapor lock occurs when the gasoline is cooled and forms a gel, preventing fuel flow and
    7·2 answers
  • A soil has the following Green-Ampt parameters Effective porosity 0.400 Initial volumetric moisture content-15% Hydraulic Conduc
    6·1 answer
  • Nitrogen enters a steady-flow heat exchanger at 150 kPa, 10°C, and 100 m/s, and it receives heat as it flows through it. Nitroge
    15·1 answer
  • Consider a 0.15-mm-diameter air bubble in a liquid. Determine the pressure difference between the inside and outside of the air
    10·1 answer
  • A 1200-kg car moving at 20 km/h is accelerated
    5·1 answer
  • A car accelerates uniformly from rest to 60 km/h in 30 s. What is its displacement during this time?
    7·1 answer
  • Technician A says that a lack of lubrication on the back of the disc brake pads can cause brake noise. Technician B says that pa
    8·1 answer
  • How many astronauts work<br> in the International Space Station
    7·1 answer
  • Pointttttttttttttssssssssssss
    12·1 answer
  • I want to know if anyone else know how to tell apart real leather from fake leather?!?!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!