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
Tcecarenko [31]
3 years ago
9

Consider two different versions of algorithm for finding gcd of two numbers (as given below), Estimate how many times faster it

will be to find gcd (31415, 14142) by Euclid’s algorithm compared with the algorithm based on checking consecutive integers from min{m, n} down to gcd(m,n). Provide all the steps related to your solution.
Engineering
1 answer:
juin [17]3 years ago
5 0

Answer:

Explanation:

Step 1:

a) The formula for compute greatest advisor is

     gcd(m,n) = gcd (n,m mod n)

the gcd(31415,14142) by applying Euclid's algorithm is

    gcd(31,415,14,142) =gcd(14,142,3,131)

                                  =gcd=(3,131, 1,618)

                                   =gcd(1,618, 1,513)

                                   =gcd(1,513, 105)

                                   =gcd(105, 43)

                                    =gcd(43, 19)

                                     =gcd(19, 5)

                                      =gcd(5, 4)

                                      =gcd(4, 1)

                                      =gcd(1, 0)

                                      =1

STEP 2

b)  The number of comparison of given input with the algorithm based on  checking consecutive integers and Euclid's algorithm is

     The number of division using Euclid's algorithm =10 from part (a)

      The consecutive integer checking algorithm:

      The number of iterations =14,142 and 1 or 2 division of iteration.

        14,142 ∠= number of division∠ = 2*14,142

         Euclid's algorithm is faster by at least 14,142/10 =1400 times

          At most 2*14,142/10 =2800 times.

You might be interested in
Five kg of nitrogen gas (N2) in a rigid, insulated container fitted with a paddle wheel is initially at 300 K, 150 kPa. The N2 g
andrew-mc [135]

Answer:

A) attached below

B) 743 KJ

C) 1.8983 KJ/K

Explanation:

A) Diagram of system schematic and set up states

attached below

<u>B) Calculate the amount of work received from the paddle wheel </u>

assuming ideal gas situation

v1 = v2 ( for a constant volume process )

work generated by paddle wheel = system internal energy

dw = mCv dT .     where ; Cv = 0.743 KJ/kgk

     = 5 * 0.743 * ( 500 - 300 )

     = 3.715 * 200 = 743 KJ

<u>C) calculate the amount of entropy generated  ( KJ/K )</u>

S2 - S1 = 1.8983 KJ/K

attached below is the detailed solution

4 0
3 years ago
Required information NOTE: This is a multi-part question. Once an answer is submitted, you will be unable to return to this part
ra1l [238]

Answer:

h1 = 290.16kj/kg

P = 1.2311

Prandil expression at 8

P=p1/p7×pr

=8(1.2311)

=9.85

Enthalpy state at 8 corresponding to 9.85

h1 = 526.13kj/kg

Now prandtl state at 9 that correspond to 1400k.

h9 = 1515.42kj/kg

Pr = 450.5

Prandtl expression at state 10

P= p10/p9×pr

=1/8(450.5)

=56.31

Enthalpy at state 10 corresponding to prandtl 56.31

h10 = 860.39kj/kg

At 520k

h11 = 523.63kj/kg

4 0
3 years ago
Please help<br> describe the impact that a toy robot has had or could have on its intended audience
GuDViN [60]
Depending on the age the toy is made for it could teach younger children things such as letters and numbers and for a older kid it could teach them how different things are put in the robot to help it work
3 0
3 years ago
Read 2 more answers
A circular ceramic plate that can be modeled as a blackbody is being heated by an electrical heater. The plate is 30 cm in diame
denis23 [38]

Answer:

Q = 125.538 W

Explanation:

Given data:

D = 30 cm

Temperature T_\infity = 15 degree celcius

T_S =  220 + 273 = 473 K

Heat coefficient = 12 W/m^2 K

Efficiency 80% = 0.8

Q = hA(T_S - T_{\infty}) \eta

= 12(\frac{\pi}{4} 0.3^2) (473 - 288) 0.8

Q = 125.538 W

5 0
3 years ago
Air enters a compressor at 100 kPa and 25 ⁰C. It is compressed to 2 MPa and exits the compressor at 540 K. The compressor is at
AysviL [449]

Answer:

(a) The reversible work is 207 kJ/kg

(b) The irreversibility rate is -38.39 kJ/kg

Explanation:

State1 : p1 = 100kpa, T1= 25+273 =298k

From air table, h1 =298.18 kJ/kg, s10= 1.69528 kJ/kgK

State 2a:p2=2mpa,t2=540k (actual condition 2a)

h2a= 544.35 kJ/kg,s2a0=2.29906

actual work input to the compressor =wout=h1-h2+Qin

=298.18-544.35+(-150)kJ/kg(- sign indicate heat loss)

=(-246.17)kJ/kg(-ve sign indicates the work is given into the system

a) Reversible work= Win actual - any irreversiblities present

                             =246.17 + irreversibilty

b) irreversibility = T0(Entopy generation Sgen) for air, Sgen

                         =s20-s10-Rln(p2/p1), T0=250C

                         =(25+273)(s2a0-s10-Rlnp2/p1+Qout/Tsurr)

    = 298x[(2.29906-1.69528-0.287kJ/kgK xln(2000kpa/100) + 150 /298]

  = -38.39 kJ/kg

a)Reversible work = Win actual -any irreversiblities present                  

                           =246.17 + irreversibilty

                           =246.17+-38.39

                          =207 kJ/kg

8 0
3 years ago
Other questions:
  • Thermoplastics burn upon heating. a)-True b)- false?
    14·1 answer
  • A cylinder contains 480 cm3 of loose dry sand which weighs 820 g. Under a static load of 200 kPa the volume is reduced 1%, and t
    15·1 answer
  • Which of the following is used as part of a four-wheel drive system? A. Front drive axles B. Transfer Case C. Front Drive Shaft
    10·1 answer
  • List two common units of measurement to describe height
    5·2 answers
  • The mean of 10 numbers is 9, then the sum (total) of these numbers will be​
    10·2 answers
  • Stucco will shrink as it hardens and cures.<br> A. true<br> B. false
    11·1 answer
  • You want to improve your grades so that you make all A's next 6 weeks. List examples of quantitative and qualitative data you sh
    11·1 answer
  • While reflecting on the solutions and the process of concept generation, the development team takes a look at some critical ques
    10·1 answer
  • What happens if you leave your car on while pumping gas
    8·1 answer
  • Situation: Peter is designing a new hybrid car that functions on solar power. He is currently working on sketches of his design
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!