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
A group of n Ghostbusters is battling n ghosts. Each Ghostbuster carries a proton pack, which shoots a stream at a ghost, eradic
babunello [35]

Answer:

Using the above algorithm matches one pair of Ghostbuster and Ghost. On  each side of the line formed by the pairing, the number of Ghostbusters and Ghosts are  the same, so use the algorithm recursively on each side of the line to find pairings. The  worst case is when, after each iteration, one side of the line contains no Ghostbusters  or Ghosts. Then, we need n/2 total iterations to find pairings, giving us an P(n^{2} lg n)-  time algorithm.

4 0
3 years ago
A six-lane freeway (three lanes in each direction) in rolling terrain has 10-ft lanes and obstructions 5 ft from the right edge.
Anon25 [30]
That is too hard but u got that cuz i believe in you!!!
3 0
3 years ago
A one-dimensional plane wall of thickness 2L=80 mm experiences uniform thermal generation of q= 1000 W/m^3 and is convectively c
Eduardwww [97]

Answer:

h=1.99998\ W/m^2.C

k=33.333\ W/m.C

Explanation:

Considering the one dimensional and steady state:

From Heat Conduction equation considering the above assumption:

\frac{\partial^2T}{\partial x^2}+\frac{\dot e_{gen}}{k}=0       Eq (1)

Where:

k is thermal Conductivity

\dot e_{gen} is uniform thermal generation

T(x) = a(L^2-x^2)+b

\frac{\partial\ T(x)}{\partial x}=\frac{\partial\ a(L^2-x^2)+b}{\partial x}=-2ax\\\frac{\partial^2\ T(x)}{\partial x^2}=\frac{\partial^2\ -2ax}{\partial x^2}=-2a

Putt in Eq (1):

-2a+\frac{\dot e_{gen}}{k}=0\\ k=\frac{\dot e_{gen}}{2a}\\ k=\frac{1000}{2*15}\\ k=33.333\ W/m.C

Energy balance is given by:

Q_{convection}=Q_{conduction}

h(T_L-T_{inf})=-k(\frac{dT}{dx}) _L     Eq  (2)

T(x) = a(L^2-x^2)+b

Putting x=L

T(L) = a(L^2-L^2)+b\\T(L)=b\\T(L)=40^oC

\frac{dT}{dx}=\frac{d(a(L^2-x^2)+b}{dx}=-2ax\\Put\ x\ =\ L\\\frac{dT}{dx}=-2aL\\(\frac{dT}{dx})_L=-2*15*0.04=-1.2

From Eq (2)

h=\frac{-k*-1.2}{(40-20)} \\h=\frac{-33.333*-1.2}{(40-20)}\\h=1.99998\ W/m^2.C

7 0
3 years ago
Identify an object in your house that contains a physical system and list three questions you could use to define the system
jonny [76]

Answer:

ALL CAREFULLY ANSWERED CORRECTLY

Explanation:

1) A loaf of Bread PHYSICAL SYSTEM

✓ How can the environment affect the edibility of the bread

✓ What are the constituents that makes up the bread

✓ What process is involved in these constituents mixing to form the loaf.

2) The law of thermodynamics makes us to understand that when heat/energy passes through a system, the systems internal energy changes with respect to the conservation of energy law. That is energy lost = energy gained. Typically, ice would melt in a cup of hot tea because of the thermal energy in the molecules of the hot tea. When you heat a material, you are adding thermal kinetic energy to its molecules and usually raising its temperature. The temperature of the ice raises due to the kinetic energy added to it and it melts to water.

3) The theory of systems view the world as a complex system of interconnected parts. If we consider the society; (financial systems, political systems, etc) we will agree that they individually have their own components and it's the summation of this components that makes the system, this implies that system thinking could be applicable in this kinda of systems as long as they are made up of components.

4) Technology has boosted every sector of our lives and it has the capacity to do more. Restricting it's importance to entertainment alone would be an underusing of its potentials. Engineering students infact should not need any drive to be encouraged about maximizing all it can do in shaping our world.

5) ~ Nature shows its splendid soul

~Never ceases to leave us in amazement

~And we are in love

4 0
2 years ago
The cubic capacity of a four-stroke over-square spark-ignition engine is 245cc. The over-square ratio is (1.1) The clearance vol
pashok25 [27]

Answer:

Bore = 7 cm

stroke = 6.36 cm

compression ratio = 10.007

Explanation:

Given data:

Cubic capacity of the engine, V = 245 cc

Clearance volume, v = 27.2 cc

over square-ratio = 1.1

thus,

D/L = 1.1

where,

D is the bore

L is the stroke

Now,

V = \frac{\pi}{4}D^2L

or

V = \frac{\pi}{4}\frac{D^3}{1.1}

on substituting the values, we have

245 =  \frac{\pi}{4}\frac{D^3}{1.1}

or

D = 7.00 cm

Now,

we have

D/L = 1.1

thus,

L = D/1.1

L = 7/1.1

or

L= 6.36 cm

Now,

the compression ratio is given as:

\textup{compression ratio}=\frac{V+v}{v}

on substituting the values, we get

\textup{compression ratio}=\frac{245+27.2}{27.2}

or

Compression ratio = 10.007

4 0
3 years ago
Other questions:
  • Alberto's mom is taking a splinter out of his hand with a pair of tweezers. The tweezers are 3 inches long. She is applying .25
    12·2 answers
  • Both carpenters and building inspectors have been associated with the personality characteristics identified as realistic, conve
    12·1 answer
  • Carnot heat engine A operates between 20ºC and 520ºC. Carnot heat engine B operates between 20ºC and 820ºC. Which Carnot heat en
    5·1 answer
  • A manager has a list of items that have been sorted according to an item ID. Some of them are duplicates. She wants to add a cod
    7·1 answer
  • Electrical pressure or “force”<br><br> A) current<br> B) resistance <br> C) voltage
    6·1 answer
  • you are planning to buy a new couch for your family room you measure the available space and conclude that the couch should be b
    5·1 answer
  • FREEEEEE POOIIIINTS RIGHT HERE EVERYONE LEVEL UPPPP​
    13·2 answers
  • The natural material in a borrow pit has a mass unit weight of 110.0 pcf and a water content of 6%, and the specific gravity of
    11·1 answer
  • Water flow enters a pipe at a velocity of 1m/s. The pipe inlet is 10cm. The pipe outlet is 6cm. 1. Determine the velocity of the
    9·1 answer
  • 2) What kinds of food can you eat in space?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!