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]
3 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]3 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
An automobile having a mass of 1100 kg initially moves along a level highway at 110 km/h relative to the highway. It then climbs
Greeley [361]

Answer:

Change in kinetic energy=-513.652 KJ

Change in potential energy=431.64KJ

Explanation:

We are given that

Mass of an automobile , m=1100 kg

Initial speed, u=110 km/h=110\times \frac{5}{18}=30.56 m/s

Where 1 km/h=5/18 m/s

Height , h_2=40 m

g=9.81 m/s^2

Final speed, v=0

Change in kinetic energy,\Delta K.E=\frac{1}{2}m(v^2-u^2)

\Delta K.E=\frac{1}{2}(1100)(0-(30.56)^2)=-513652.48 J

\Delta K.E=-\frac{513652.48}{1000}=-513.652 KJ

Where 1 KJ=1000 J

Change in potential energy,\Delta P.E=mgh(h_2-h_1)

Initially height, h1=0

Using the formula

\Delta P.E=1100\times 9.81(40-0)

\Delta P.E=431640J

\Delta P.E=431.64KJ

6 0
3 years ago
Consider two different types of motors. Motor A has a characteristic life of 4100 hours (based on a MTTF of 4650 hours) and a sh
Daniel [21]

Answer:B

Explanation:

Given

For motor A

Characteristic life(r)=4100 hr

MTTF=4650 hrs

shape factor(B )=0.8

For motor B

Characteristic life(r)=336 hr

MTTF=300 hr

Shape Factor (B)=3

Reliability for 100 hours

R_a=e^{-\left ( \frac{T-r}{n}\right )B}

R_a=e^{-\left ( \frac{4650-4100}{100}\right )0.8}

R_a=e^{-4.4}=0.01227

For B

R_b=e^{-\left ( \frac{300-336}{100}\right )3}

R_b=e^{1.08}=2.944

B is better for 100 hours

(b)For 750 hours

R_a=e^{-0.5866}=0.55621

R_b=e^{0.144}=1.154

So here B is more Reliable.

3 0
3 years ago
Calculate the availability of a system where the mean time between failures is 900 hours and the mean time to repair is 100 hour
Debora [2.8K]

Answer:

The availability of system will be 0.9

Explanation:

We have given mean time of failure = 900 hours

Mean time [to repair = 100 hour

We have to find availability of system

Availability of system is given by  \frac{mean\time\ of\ failure}{mean\ time\ of\ failure+mean\ time\ to\ repair}

So availability of system =\frac{900}{900+100}=\frac{900}{1000}=0.9

So the availability of system will be 0.9

7 0
3 years ago
Which of the following statements about glycogen metabolism is FALSE?
Ratling [72]

Answer:

Glycogen is the primary energy source for muscle and liver cells.

Explanation:

Glycogen is a readily mobilized storage form of glucose. It is a very large, branched polymer of glucose residues that can be broken down to yield glucose molecules when energy is needed. Most of the glucose residues in glycogen are linked by α-1,4-glycosidic bonds. Branches at about every tenth residue are created by α-1,6-glycosidic bonds.

Glycogen is not as reduced as fatty acids are and consequently not as energy rich. Why do animals store any energy as glycogen? Why not convert all excess fuel into fatty acids? Glycogen is an important fuel reserve for several reasons. The controlled breakdown of glycogen and release of glucose increase the amount of glucose that is available between meals. Hence, glycogen serves as a buffer to maintain blood-glucose levels. Glycogen's role in maintaining blood-glucose levels is especially important because glucose is virtually the only fuel used by the brain, except during prolonged starvation. Moreover, the glucose from glycogen is readily mobilized and is therefore a good source of energy for sudden, strenuous activity. Unlike fatty acids, the released glucose can provide energy in the absence of oxygen and can thus supply energy for anaerobic activity.

3 0
3 years ago
Maintain a distance of at least
Virty [35]
The answer is c. 4 seconds
8 0
2 years ago
Read 2 more answers
Other questions:
  • To ensure safe footing on penetrable surfaces,use?
    5·1 answer
  • PLZ HURRY IM ON A TIMER
    6·1 answer
  • Can someone please do this for me? I’m so behind on other work for different classes and this one is due today! please I’d appre
    11·1 answer
  • Is air conditioner a refrigerator?
    10·1 answer
  • What is Euler's equation?
    6·1 answer
  • Two technicians are discussing a vehicle that will not start. Tech A states that a problem with the immobilizer system may be th
    9·1 answer
  • Can a real refrigerator have higher COP than the COP of the Carnot refrigerator?
    7·2 answers
  • Simplify the following expressions, then implement them using digital logic gates. (a) f = A + AB + AC (b) f = AB + AC + BC (c)
    5·1 answer
  • How do guest room hotel smoke alarms work and differ then regular home versions?
    10·2 answers
  • Who made the frist ever car
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!