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
Yes I’m very cool I promise.
Alex
Okay I believe you I swear
8 0
2 years ago
Please answer fast. With full step by step solution.​
lina2011 [118]

Let <em>f(z)</em> = (4<em>z </em>² + 2<em>z</em>) / (2<em>z </em>² - 3<em>z</em> + 1).

First, carry out the division:

<em>f(z)</em> = 2 + (8<em>z</em> - 2) / (2<em>z </em>² - 3<em>z</em> + 1)

Observe that

2<em>z </em>² - 3<em>z</em> + 1 = (2<em>z</em> - 1) (<em>z</em> - 1)

so you can separate the rational part of <em>f(z)</em> into partial fractions. We have

(8<em>z</em> - 2) / (2<em>z </em>² - 3<em>z</em> + 1) = <em>a</em> / (2<em>z</em> - 1) + <em>b</em> / (<em>z</em> - 1)

8<em>z</em> - 2 = <em>a</em> (<em>z</em> - 1) + <em>b</em> (2<em>z</em> - 1)

8<em>z</em> - 2 = (<em>a</em> + 2<em>b</em>) <em>z</em> - (<em>a</em> + <em>b</em>)

so that <em>a</em> + 2<em>b</em> = 8 and <em>a</em> + <em>b</em> = 2, yielding <em>a</em> = -4 and <em>b</em> = 6.

So we have

<em>f(z)</em> = 2 - 4 / (2<em>z</em> - 1) + 6 / (<em>z</em> - 1)

or

<em>f(z)</em> = 2 - (2/<em>z</em>) (1 / (1 - 1/(2<em>z</em>))) + (6/<em>z</em>) (1 / (1 - 1/<em>z</em>))

Recall that for |<em>z</em>| < 1, we have

\displaystyle\frac1{1-z}=\sum_{n=0}^\infty z^n

Replace <em>z</em> with 1/<em>z</em> to get

\displaystyle\frac1{1-\frac1z}=\sum_{n=0}^\infty z^{-n}

so that by substitution, we can write

\displaystyle f(z) = 2 - \frac2z \sum_{n=0}^\infty (2z)^{-n} + \frac6z \sum_{n=0}^\infty z^{-n}

Now condense <em>f(z)</em> into one series:

\displaystyle f(z) = 2 - \sum_{n=0}^\infty 2^{-n+1} z^{-(n+1)} + 6 \sum_{n=0}^\infty z^{-n-1}

\displaystyle f(z) = 2 - \sum_{n=0}^\infty \left(6+2^{-n+1}\right) z^{-(n+1)}

\displaystyle f(z) = 2 - \sum_{n=1}^\infty \left(6+2^{-(n-1)+1}\right) z^{-n}

\displaystyle f(z) = 2 - \sum_{n=1}^\infty \left(6+2^{2-n}\right) z^{-n}

So, the inverse <em>Z</em> transform of <em>f(z)</em> is \boxed{6+2^{2-n}}.

4 0
3 years ago
Machine movement can be divided into what two main categories?
pishuonlain [190]

Answer:

motion and power

Explanation:

8 0
3 years ago
Read 2 more answers
Which basic principle influences how all HVACR systems work?
bezimeni [28]

Answer:

B) An increase in pressure can lower the boiling point of a liquid and change the temperature at which it turns to a gas.

Explanation:

B) An increase in pressure can lower the boiling point of a liquid and change the temperature at which it turns to a gas.

6 0
3 years ago
The angle of twist can be computed using the material’s shear modulus if and only if: (a)- The shear stress is still in the elas
ollegr [7]

Answer:

The angle of twist can be computed using the material’s shear modulus if and only if the shear stress is still in the elastic region

Explanation:

The shear modulus (G) is the ratio of shear stress to shear strain. Like the modulus of elasticity, the shear modulus is governed by Hooke’s Law: the relationship between shear stress and shear strain is proportional up to the proportional limit of the material. The angle of twist can be computed using the material’s shear modulus if and only if the shear stress is still in the elastic region.

3 0
3 years ago
Other questions:
  • A reversible refrigerator operates between a low temperature reservoir at TL and a high temperature reservoir at TH . Its coeffi
    12·1 answer
  • A dipstick is (a direct,an indirect) measurement device
    13·1 answer
  • Adore.aaliyah_ add me loves !
    7·1 answer
  • Module 42 Review and Assessment
    7·1 answer
  • How many volts of electricity would it take to power up an entire city? Take Tokyo for example. Please explain!
    12·1 answer
  • What's resistance in an electrical circuit? 1) Opposition to the flow of electricity 2) The ability of electricity to do work 3)
    11·1 answer
  • A moving-coil instrument, which gives full-scale deflection with 0.015 A has a copper coil having resistance of 1.5 Ohm at 15°C
    7·1 answer
  • Please I need help!<br><br> I need 1,2,&amp;3 drawn with front top and side view. Please help asap
    6·1 answer
  • The quantity of bricks required increases with the surface area of the wall, but the thickness of a masonry wall does not affect
    10·2 answers
  • How do you breed a linner?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!