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
List five areas that increased energy prices impact.
Effectus [21]

Answer:

Supply, demand, global markets, imports and exports, and government Regulation.

Explanation:

7 0
3 years ago
A person walks into a refrigerated warehouse with head uncovered. Model the head as a 25- cm diameter sphere at 35°C with a surf
galina1969 [7]

Answer:

Hello some parts of your question is missing below is the missing part

Convection coefficient = 11 w/m^2. °c

answer : 44.83 watts

Explanation:

Given data :

surface emissivity ( ε )= 0.95

head ( sphere) diameter( D )  = 0.25 m

Temperature of sphere( T )  = 35° C

Temperature of surrounding ( T∞ )  = 25°C

Temperature of surrounding surface ( Ts ) = 15°C

б  = ( 5.67 * 10^-8 )

Determine the total rate of heat loss

First we calculate the surface area of the sphere

As = \pi D^{2}  

= \pi * 0.25^2 =  0.2 m^2

next we calculate heat loss due to radiation

Qrad = ε * б * As( T^{4} - T^{4} _{s} )  ---- ( 1 )

where ;

ε = 0.95

б = ( 5.67 * 10^-8 )

As = 0.2 m^2

T = 35 + 273 = 308 k

Ts = 15 + 273 = 288 k

input values into equation 1

Qrad = 0.95 * ( 5.67 * 10^-8 ) * 0.2 ( (308)^4 - ( 288)^4 )

         = 22.83  watts

Qrad ( heat loss due to radiation ) = 22.83 watts

calculate the heat loss due to convection

Qconv = h* As ( ΔT )

           = 11*0.2 ( 35 -25 )  = 22 watts

Hence total rate of heat loss

=  22 + 22.83

= 44.83 watts

5 0
3 years ago
A gas in a piston–cylinder assembly undergoes a compression process for which the relation between pressure and volume is given
viktelen [127]

Answer:

A.) P = 2bar, W = - 12kJ

B.) P = 0.8 bar, W = - 7.3 kJ

C.) P = 0.608 bar, W = - 6.4kJ

Explanation: Given that the relation between pressure and volume is

PV^n = constant.

That is, P1V1^n = P2V2^n

P1 = P2 × ( V2/V1 )^n

If the initial volume V1 = 0.1 m3,

the final volume V2 = 0.04 m3, and

the final pressure P2 = 2 bar. 

A.) When n = 0

Substitute all the parameters into the formula

(V2/V1)^0 = 1

Therefore, P2 = P1 = 2 bar

Work = ∫ PdV = constant × dV

Work = 2 × 10^5 × [ 0.04 - 0.1 ]

Work = 200000 × - 0.06

Work = - 12000J

Work = - 12 kJ

B.) When n = 1

P1 = 2 × (0.04/0.1)^1

P1 = 2 × 0.4 = 0.8 bar

Work = ∫ PdV = constant × ∫dV/V

Work = P1V1 × ln ( V2/V1 )

Work = 0.8 ×10^5 × 0.1 × ln 0.4

Work = - 7330.3J

Work = -7.33 kJ

C.) When n = 1.3

P1 = 2 × (0.04/0.1)^1.3

P1 = 0.6077 bar

Work = ∫ PdV

Work = (P2V2 - P1V1)/ ( 1 - 1.3 )

Work = (2×10^5×0.04) - (0.608 10^5×0.1)/ ( 1 - 1.3 )

Work = (8000 - 6080)/ -0.3

Work = -1920/0.3

Work = -6400 J

Work = -6.4 kJ

5 0
4 years ago
Steam enters a two-stage adiabatic turbine at 8 MPa and 5008C. It expands in the first stage to a state of 2 MPa and 3508C. Stea
Nataly [62]

Answer:

1) The exergy of destruction is approximately 456.93 kW

2) The reversible power output is approximately 5456.93 kW

Explanation:

1) The given parameters are;

P₁ = 8 MPa

T₁ = 500°C

From which we have;

s₁ = 6.727 kJ/(kg·K)

h₁ = 3399 kJ/kg

P₂ = 2 MPa

T₂ = 350°C

From which we have;

s₂ = 6.958 kJ/(kg·K)

h₂ = 3138 kJ/kg

P₃ = 2 MPa

T₃ = 500°C

From which we have;

s₃ = 7.434 kJ/(kg·K)

h₃ = 3468 kJ/kg

P₄ = 30 KPa

T₄ = 69.09 C (saturation temperature)

From which we have;

h₄ = h_{f4} + x₄×h_{fg} = 289.229 + 0.97*2335.32 = 2554.49 kJ/kg

s₄ =  s_{f4} + x₄×s_{fg} = 0.94394 + 0.97*6.8235 ≈ 7.563 kJ/(kg·K)

The exergy of destruction, \dot X_{dest}, is given as follows;

\dot X_{dest} = T₀ × \dot S_{gen} = T₀ × \dot m × (s₄ + s₂ - s₁ - s₃)

\dot X_{dest} = T₀ × \dot W×(s₄ + s₂ - s₁ - s₃)/(h₁ + h₃ - h₂ - h₄)

∴ \dot X_{dest} = 298.15 × 5000 × (7.563 + 6.958 - 6.727 - 7.434)/(3399 + 3468 - 3138  - 2554.49) ≈ 456.93 kW

The exergy of destruction ≈ 456.93 kW

2) The reversible power output, \dot W_{rev} = \dot W_{} + \dot X_{dest} ≈ 5000 + 456.93 kW = 5456.93 kW

The reversible power output ≈ 5456.93 kW.

6 0
3 years ago
A house is losing heat at a rate of 1700 kJ/h per °C temperature difference between the indoor and the outdoor temperatures. Exp
Furkat [3]

Answer:

1700kJ/h.K

944.4kJ/h.R

944.4kJ/h.°F

Explanation:

Conversions for different temperature units are below:

1K = 1°C + 273K

1R = T(K) * 1.8

= (1°C + 273) * 1.8

1°F = (1°C * 1.8) + 32

Q/delta T = 1700kJ/h.°C

T (K) = 1700kJ/h.°C

= 1700kJ/K

T (R) = 1700kJ/h.°C

= 1700kJ/h.°C * 1°C/1.8R

= 944.4kJ/h.R

T (°F) = 1700kJ/h.°C

= 1700kJ/h.°C * 1°C/1.8°F

= 944.4kJ/h.°F

Note that arithmetic operations like subtraction and addition of values do not change or affect the value of a change in temperature (delta T) hence, the arithmetic operations are not reflected in the conversion. Illustration: 5°C - 3°C

= 2°C

(273+5) - (273+3)

= 2 K

5 0
3 years ago
Other questions:
  • Two well-known NP-complete problems are 3-SAT and TSP, the traveling salesman problem. The 2-SAT problem is a SAT variant in whi
    7·1 answer
  • Explain why different types of equipment are required for proper conditioning of air
    7·1 answer
  • 1. The area of the given triangle is 25 square units. What is the value of x?<br> X+2
    8·1 answer
  • A torsion member has an elliptical cross section with major and minor dimensions of 50.0 mm and 30.0 mm, respectively. The yield
    10·1 answer
  • A cubic transmission casing whose side length is 25cm receives an input from the engine at a rate of 350 hp. If the vehicle's ve
    5·1 answer
  • The alternator must be operated with the battery disconnected or with the terminals at the back of the alternator
    15·2 answers
  • 4 points
    13·1 answer
  • The electrical panel schedules are located on EWR Plan number ___.
    13·1 answer
  • P9.28 A large vacuum tank, held at 60 kPa absolute, sucks sea- level standard air through a converging nozzle whose throat diame
    12·1 answer
  • PLZZZZZ HELP
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!