Describe how the pair-wise summation computation provided below can be changed to find the maximum element of an array. Array has the following elements (x[0], x[1], x[2], x[3], x[4], x[5], x[6])
t[0] = x[0] + x [1];
t[1] = x[2] + x[3];
t[2] = x[4] + x[5];
t[3] = x[6] + x[7];
t[4] = t[0] + t[1];
t[5] = t[2] + t[3];
sum = t[4] + t[5];

Answers

Answer 1

Answer:

To change the pair-wise summation computation provided  to find a maximum element of an array we; Take two elements to check max element from that and add to the T ARRAY, the same process is then repeated for the next two elements, again we repeat the same process for the next two elements from T array until we get the max element  process going on pair-wise computation

Explanation:

Code written using pair-wise computation to describe how to change the given pair-wise summation computation provided to find the maximum element of an array

The given array element ; (x[0], x[1], x[2], x[3], x[4], x[5], x[6])

IF X[0] > X[1]

T[0]=X[0];

ELSE

T[0]=X[1]

IF X[2] > X[3]

T[1]=X[2];

ELSE

T[1]=X[3];

IF X[4] > X[5]

T[2]=X[4];

ELSE

T[2]=X[5];

T[3]=X[6];

IF T[0] > T[1]

T[4]=T[0];

ELSE

T[4]=T[1]

IF T[2] >T[3]

T[5]=T[2];

ELSE

T[5]=T[3];

IF T[4] > T[5]

MAX=T[4];

ELSE

MAX=T[5]


Related Questions

Mathematical modeling aids in technological design by simulating how.
1. A solution should be designed
2. A proposed system might behave
3. Physical models should be built
4. Designs should be used

Answers

It’s 4 because designs should be used

Mathematical modeling aids in technological design by simulating how proposed system might behave. The correct option is 2.

What is mathematical modelling?

Mathematical modelling describes a real world problem in mathematical terms or in the form of equations. This makes an engineer to discover new features about the problem and designer to alter his design for better function and output.

Mathematical models allow engineers and designers to understand how the proposed model and actual prototype will be produced.

Thus, the correct option is 2.

Learn more about mathematical modelling

https://brainly.com/question/731147

#SPJ2

A very large thin plate is centered in a gap of width 0.06 m with a different oils of unknown viscosities above and below; one viscosity is twice the other. When the plate is pulled at a velocity of 0.3 m/s, the resulting force on one square meter of plate due to the viscous shear on both sides is 29 N. Assuming viscous flow and neglecting all end effects calculate the viscosities of the oils.

Answers

Answer:

The viscosities of the oils are 0.967 Pa.s and 1.933 Pa.s

Explanation:

Assuming the two oils are Newtonian fluids.

From Newton's law of viscosity for Newtonian fluids, we know that the shear stress is proportional to the velocity gradient with the viscosity serving as the constant of proportionality.

τ = μ (∂v/∂y)

There are oils above and below the plate, so we can write this expression for the both cases.

τ₁ = μ₁ (∂v/∂y)

τ₂ = μ₂ (∂v/∂y)

dv = 0.3 m/s

dy = (0.06/2) = 0.03 m (the plate is centered in a gap of width 0.06 m)

τ₁ = μ₁ (0.3/0.03) = 10μ₁

τ₂ = μ₂ (0.3/0.03) = 10μ₂

But the shear stress on the plate is given as 29 N per square meter.

τ = 29 N/m²

But this stress is a sum of stress due to both shear stress above and below the plate

τ = τ₁ + τ₂ = 10μ₁ + 10μ₂ = 29

But it is also given that one viscosity is twice the other

μ₁ = 2μ₂

10μ₁ + 10μ₂ = 29

10(2μ₂) + 10μ₂ = 29

30μ₂ = 29

μ₂ = (29/30) = 0.967 Pa.s

μ₁ = 2μ₂ = 2 × 0.967 = 1.933 Pa.s

Hope this Helps!!!

a surveyor is trying to find the height of a hill . he/she takes a sight on the top of the hill and find that the angle of elevation is 40°. he/she move a distance of 150 metres on level ground directly away from the hill and take a second sight. from this point the angl.e of elevation is 22°. find the height of the
hill​

Answers

Answer:

height ≈ 60.60 m

Explanation:

The surveyor is trying to find the height of the hill . He takes a sight on the top of the hill and finds the angle of elevation is 40°. The distance from the hill where he measured the angle of elevation of 40° is not known.

Now he moves 150 m on level ground directly away from the hill and take a second sight from this point and measures the angle of elevation as 22°. This illustration forms a right angle triangle. The opposite side of the triangle is the height of the hill. The adjacent side of the triangle which is 150 m is the distance on level ground directly away from the hill.

Using tangential ratio,

tan 22° = opposite/adjacent

tan 22° = h/150

h = 150 × tan 22°

h = 150 × 0.40402622583

h = 60.6039338753

height ≈ 60.60 m

9. A Co has 500,000 total shares outstanding and each share is priced at 20$. B Co has 300,000 total shares outstanding and each share is priced at 40$. You have 100 shares in A Co and 200 shares in B Cos. After consolidation how many new shares you will own in consolidated AB Co?

Answers

Answer:

In consolidated AB Co 300 shares.

Explanation:

Consolidation is a process in which two different organizations are united. In this question A Co and B Co are consolidated and a new Co names AB Co is formed. The shares of both the companies will be combined and their total share capital will be increased.

Technician A say's that The most two-stroke engines have a pressure type lubrication system. Technician be says that four stroke engines do not require the mixing of oil with gasoline

Answers

Question:Technician A say's that The most two-stroke engines have a pressure type lubrication system. Technician be says that four stroke engines do not require the mixing of oil with gasoline . Which of them is correct ?

Answer: Technician  B is   correct

Explanation: Two types of engines exist , the two stroke (example, used in chainsaws)  is a type of engine that uses two strokes--a compression stroke and a return stroke to produce power in a crankshaft combustion cycle and the  four stroke engines(eg lawnmowers) which  uses four strokes,  2-strokes during  compression and exhaustion accompanied by 2 return strokes for each of the initial process to produce power in a combustion cycle.

While a 2 stroke system engine, requires mixing of oil and fuel to the crankshaft before  forcing  the mixture into the cylinder and do not require a pressurized system.  The 4 stroke system uses a splash and pressurized system where oil is not mixed with gasoline but drawn from the sump and  directed to  the main moving  parts of  crankshaft through its channels.

We can therefore say that Technician A is wrong while Technician B is  correct

You want to plate a steel part having a surface area of 160 with a 0.002--thick layer of lead. The atomic mass of lead is 207.19 . The density of lead is 11.36 . How many atoms of lead are required

Answers

Answer:

To answer this question we assumed that the area units and the thickness units are given in inches.

The number of atoms of lead required is 1.73x10²³.    

Explanation:

To find the number of atoms of lead we need to find first the volume of the plate:

[tex] V = A*t [/tex]

Where:

A: is the surface area = 160

t: is the thickness = 0.002

Assuming that the units given above are in inches we proceed to calculate the volume:

[tex]V = A*t = 160 in^{2}*0.002 in = 0.32 in^{3}*(\frac{2.54 cm}{1 in})^{3} = 5.24 cm^{3}[/tex]    

Now, using the density we can find the mass:

[tex] m = d*V = 11.36 g/cm^{3}*5.24 cm^{3} = 59.5 g [/tex]

Finally, with the Avogadros number ([tex]N_{A}[/tex]) and with the atomic mass (A) we can find the number of atoms (N):

[tex] N = \frac{m*N_{A}}{A} = \frac{59.5 g*6.022 \cdot 10^{23} atoms/mol}{207.19 g/mol} = 1.73 \cdot 10^{23} atoms [/tex]    

Hence, the number of atoms of lead required is 1.73x10²³.

I hope it helps you!

An airplane flies from San Francisco to Washington DC at an air speed of 800 km/hr. Assume Washington is due east of San Francisco at a distance of 6000 km. Use a Cartesian system of coordinates centered at San Francisco with Washington in the positive x-direction. At cruising altitude, there is a cross wind blowing from north to south of 100 km/hr.

Required:
a. What must be the direction of flight for the plane to actually arrive in Washington?
b. What is the speed in the San Francisco to Washington direction?
c. How long does it take to cover this distance?
d. What is the time difference compared to no crosswind?

Answers

Answer:

A.) 7.13 degree north east

B.) 806.23 km/h

C.) 7.44 hours

D.) 0.06 hours

Explanation:

Assume Washington is due east of San Francisco and Francisco with Washington in the positive x-direction

Also, the cross wind is blowing from north to south of 100 km/hr in y coordinate direction.

A.) Using Cartesian system of coordinates, the direction of flight for the plane to actually arrive in Washington can be calculated by using the formula

Tan Ø = y/x

Substitute y = 100 km/h and x = 800km/h

Tan Ø = 100/800

Tan Ø = 0.125

Ø = Tan^-1(0. 125)

Ø = 7.13 degrees north east.

Therefore, the direction of flight for the plane to actually arrive in Washington is 7.13 degree north east

B.) The speed in the San Francisco to Washington direction can be achieved by using pythagorean theorem

Speed = sqrt ( 800^2 + 100^2)

Speed = sqrt (650000)

Speed = 806.23 km/h

C.) Let us use the speed formula

Speed = distance / time

Substitute the speed and distance into the formula

806.23 = 6000/ time

Make Time the subject of formula

Time = 6000/806.23

Time = 7.44 hours

D.) If there is no cross wind,

Time = 6000/800

Time = 7.5 hour

Time difference = 7.5 - 7.44

Time difference = 0.06 hours

The velocity field of a flow is given by V = 2x2 ti +[4y(t - 1) + 2x2 t]j m/s, where x and y are in meters and t is in seconds. For fluid particles on the x-axis, determine the speed and direction of flow

Answers

Answer:

Explanation:

The value of a will be zero as it is provided that the particle is on the x-axis.

Calculate the velocity of particles along x-axis.

[tex]{\bf{V}} = 2{x^2}t{\bf{\hat i}} + [4y(t - 1) + 2{x^2}t]{\bf{\hat j}}{\rm{ m/s}}[/tex]

Substitute 0 for y.

[tex]\begin{array}{c}\\{\bf{V}} = 2{x^2}t{\bf{\hat i}} + \left( {4\left( 0 \right)\left( {t - 1} \right) + 2{x^2}t} \right){\bf{\hat j}}{\rm{ m/s}}\\\\ = 2{x^2}t{\bf{\hat i}} + 2{x^2}t{\bf{\hat j}}{\rm{ m/s}}\\\end{array}[/tex]

Here,

[tex]A = 2{x^2}t \ \ and\ \ B = 2{x^2}t[/tex]

Calculate the magnitude of vector V .

[tex].\left| {\bf{V}} \right| = \sqrt {{A^2} + {B^2}}[/tex]

Substitute

[tex]2{x^2}t \ \ for\ A\ and\ 2{x^2}t \ \ for \ B.[/tex]

[tex]\begin{array}{c}\\\left| {\bf{V}} \right| = \sqrt {{{\left( {2{x^2}t} \right)}^2} + {{\left( {2{x^2}t} \right)}^2}} \\\\ = \left( {2\sqrt 2 } \right){x^2}t\\\end{array}[/tex]

The velocity of the fluid particles on the x-axis is [tex]\left( {2\sqrt 2 } \right){x^2}t{\rm{ m/s}}[/tex]

Calculate the direction of flow.

[tex]\theta = {\tan ^{ - 1}}\left( {\frac{B}{A}} )[/tex]

Here, θ is the flow from positive x-axis in a counterclockwise direction.

Substitute [tex]2{x^2}t[/tex] as A and [tex]2{x^2}t[/tex] as B.

[tex]\begin{array}{c}\\\theta = {\tan ^{ - 1}}\left( {\frac{{2{x^2}t}}{{2{x^2}t}}} \right)\\\\ = {\tan ^{ - 1}}\left( 1 \right)\\\\ = 45^\circ \\\end{array}[/tex]

The direction of flow is [tex]45^\circ[/tex] from the positive x-axis.

Other Questions
What does the concept of federalism mean and why is it considered an important and innovative concept in the U.S. Constitution? You may want to start with a sentence defining federalism and how it relates to E Pluribus Unum. Create woodcuts enables the artist to ? Which describes a climate effect on the rate of weathering? Cold climates favor mechanical weathering. Chemical reactions occur slower at higher temperatures. Lower precipitation levels lead to more chemical reactions. The chemical reaction rates of minerals are not impacted by temperature. A large department store is curious about what sections of the store make the most sales. The manager has data from ten years prior that show 30% of sales come from Clothing, 25% Home Appliances, 18% Housewares, 13% Cosmetics, 12% Jewelry, and 2% Other. In a random sample of 550 current sales, 188 came from Clothing, 153 Home Appliances, 83 Housewares, 54 Cosmetics, 61 Jewelry, and 11 Other. At =0.10, can the manager conclude that the distribution of sales among the departments has changed? Enter the p-value - round to 4 decimal places. Make sure you put a 0 in front of the decimal. Jiangsu divided 751.6 by 10 by the power of 2 and got a quotient of 0.7516. yesseinafhinks that the quotient should be7.516. Who is correct? I would really appreciate it if you could help me please Levi would like to use a credit card to make a $3000 purchase. He is considering two credit options. The first requiresa down payment of $1000 followed by monthly payments of $125. The second requires a down payment of $1300followed by monthly payments of $110. The two options accumulate the same amount of interest and require thesame number of monthly payments.What is the amount of interest for this loan? how does the underlined sentence contribute to the theme that culture can limit your thinking What will apple, potato, and onion all taste if you eat them with your nose plugged ? The expected average rate of return for a proposed investment of $636,800 in a fixed asset with a useful life of 4 years, straight-line depreciation, no residual value, and an expected total net income of $191,560 for the 4 years is (round to two decimal points) Is this a Rattle snake a Garter Snake a Viper Snake Or a Cobra Match the description to the term.1. bridge between thoughtsDewey Decimal System2. note at the bottom of a source cardencyclopedia article3. library cataloguing systemannotation4. "three types of stairs"transition5. general information sourcelimited topic6. (Smithson and Foreman 62)."architecture"correct parenthetical7. broad subjectdocumentation What is 12 1/2 - (-4 1/2) please help.. GP is geometric progression 6 2hen+3pens-5anchors match the term with the definition I NEED HELP PLEASE, THANKS :) What does it mean when white light is diffracted and at a particular location the color seen is blue? Match the fallacy with its name. Victoria enjoys dance class; all girls enjoy dance class. Plato physical fitness final test. how many questions are on it The digits of both the two-digit numbers in the first calculation below have been reversed to give the two-digit numbers in the second calculation. The answers to the two calculations are the same. 62 13 = 806 26 31 = 806 For which one of the calculations below is the same thing true