5. The recursive algorithm given below can be used to compute gcd(a, b) where a and b are non-negative integer, not both zero.

procedure gcd(a, b)

if a b then gcd(a, b) := = gcd (b, a)

else if a = 0 then gcd (a, b) = b

else if a = 1 then gcd (a, b) :

:=1

else if a and b are even then gcd(a, b) 2gcd(a/2, b/2) := else if a is odd and b is even then gcd(a, b) := gcd(a, b/2)

else gcd(a, b) := gcd(a, b - a)

Use this algorithm to compute

(a) gcd(124, 244)

(b) gcd (4424, 2111).u

5. The Recursive Algorithm Given Below Can Be Used To Compute Gcd(a, B) Where A And B Are Non-negative

Answers

Answer 1

Implementating the given algorithm in python 3, the greatest common divisors of (124 and 244) and (4424 and 2111) are 4 and 1 respectively.

The program implementation is given below and the output of the sample run is attached.

def gcd(a, b):

#initialize a function named gcd which takes in two parameters

if a>b:

#checks if a is greater than b

return gcd (b, a)

#if true interchange the Parameters and Recall the function

elif a == 0:

return b

elif a == 1:

return 1

elif((a%2 == 0)and(b%2==0)):

#even numbers leave no remainder when divided by 2, checks if a and b are even

return 2 * gcd(a/2, b/2)

elif((a%2 !=0) and (b%2==0)):

#checks if a is odd and B is even

return gcd(a, b/2)

else :

return gcd(a, b-a)

#since it's a recursive function, it recalls the function with new parameters until a certain condition is satisfied

print(gcd(124, 244))

print()

#leaves a space after the first output

print(gcd(4424, 2111))

Learn more :https://brainly.com/question/25506437

5. The Recursive Algorithm Given Below Can Be Used To Compute Gcd(a, B) Where A And B Are Non-negative

Related Questions

what is the next number 3 7 8 3 12 9

Answers

4 8 9 i believe that's it

What is the value of w?

Answers

Answer: b = 89

Step-by-step explanation:

1. Use Supplementary Angles

180 - (b + 33)

180 - b - 33

147 - b

2. The Angles in a Triangle add up to 180.

147 - b + b - 7 + b - 49 = 180

91 + b = 180

b = 89

Hope it helps :) and let me know if you want me to elaborate.

Melissa can buy an 8 pound bag of dog food for $7.20. What is the cost of 1 pound? PLZZ I REALLY NEED HELP!

Answers

Answer:

$0.90

Step-by-step explanation:

7.20/8 = $0.90

A model rocket is launched with an initial upward velocity of 125/fts. The rocket's height h (in feet) after t seconds is given by the following.

h=125t- -16t^2

Answers

Answer:

H = V0 t + 1/2 g t^2   is the equation in question with V0 and g in different directions, they have different signs

Felicia bought 20.8 gallons of gasoline. There are approximately 3.8 liters in 1 gallon.

Answers

Answer:

79.04 liters

Step-by-step explanation:

20.8 x 3.8 = 79.04

According to the Community College Research Center at the Teachers College of Columbia University in New York, 32% of community college students work full-time (full-time defined to be a person working 35 or more hours per week). Bryanna believes that this percentage may be higher among CBC students, so she decides to take a survey of CBC students to determine if her hypothesis is correct or not.

Required:
What is an appropriate formal hypothesis statement for Bryanna's study?

Answers

According to her study, we have that:

The null hypothesis is [tex]H_0: p = 0.32[/tex]The alternative hypothesis is: [tex]H_1: p > 0.32[/tex]

At the null hypothesis, it is tested if the CBC's students proportion is the same as all community college students, that is, of 32%, hence:

[tex]H_0: p = 0.32[/tex]

At the alternative hypothesis, it is tested if the proportion for CBC's students is greater than 32%, that is:

[tex]H_1: p > 0.32[/tex]

A similar problem is given at https://brainly.com/question/25679468

If z varies directly as x and inversely as y and is equal to 4 when x and y have the values 12 and 8 respectively, what is the value of z when x is equal to 6/7 and y is equal to 5/28?

Answers

Answer:

[tex]z = \frac{2}{7} [/tex] when x= [tex] \frac{6}{7} [/tex],

z= 179.2 when y= [tex] \frac{5}{28} [/tex]

Step-by-step explanation:

Let's start by writing out the two general equations for z.

Since z varies directly with x,

z= kx, where k is a constant.

Since z varies inversely with y,

[tex]z = \frac{k}{y} [/tex], where k is a constant.

When x= 12, z= 4,

4= k(12)

12k= 4

k= 4 ÷12

k= ⅓

∴ z= ⅓x

When x=[tex] \frac{6}{7} [/tex],

[tex]z = \frac{1}{3} ( \frac{6}{7} )[/tex]

[tex]z = \frac{2}{7} [/tex]

When y= 8, z= 4,

[tex]4 = \frac{k}{8} [/tex]

k= 4(8)

k= 32

[tex]∴z = \frac{32}{y} [/tex]

When y= [tex] \frac{5}{28} [/tex],

[tex]z = 32 \div \frac{5}{28} [/tex]

[tex]z = 32 \times \frac{28}{5} [/tex]

z= 179.2

5 divided by 325 what is the strategy to this question and answer

Answers

Answer: 65

Step-by-step explanation: divided the 2

Evaluate (32 – 1)when z = 6

Answers

Answer:

17

Step-by-step explanation:

(3z - 1) when z = 6

Let's plug in 6 into the equation (3(6)-1)

Now we multiply the parenthesis (18-1)

Now we subtract (17)

So the answer is 17!

in
given points.
1. (10,4), (4, 15)
Find the slope of the line.

Answers

Answer:

[tex]m = -\frac{11}{6}[/tex]

Step-by-step explanation:

Slope is rise over run.

[tex]\frac{15-4}{4- 10}=\frac{11}{-6} = \boxed{-\frac{11}{6}}[/tex]

Hope this helps.

Gul can run 800 meters in 139 seconds.About how long would it take her to run 6 times far if she runs at the same speed? Choose the best estimate.

Answers

Answer:

834 seconds or 13 minutes and 54 seconds

Step-by-step explanation:

139 x 6 = 834

A plumber charges a base fee of $60, and then each hour of work costs $15. Yesterday Joe hired the plumber to fix his sink, at a total cost of $240. How many hours did the plumber work?

Answers

The answers or your question is 12

A right triangle with a hypotenuse of square root of 61 has an area of 15 square inches. Find the lengths of the other two sides.



Answers

The lengths of the other two sides are 6 inches and 5 inches

Let b represent the base of the right triangle, h represent the height of the right triangle and x represent the hypotenuse.

Since the area of the triangle is 15 in², hence:

Area(A) = (1/2) * base * height

15 = (1/2)bh

bh = 30  

b = 30/h         (1)

Applying Pythagoras theorem also:

x² = b² + h²

(√61)² = b² + h²

61 = (30/h)² + h²

61 = 900/h² + h²

61h² = 900 + h⁴

h⁴ - 61h² + 900 = 0

h = -6, -5, 5, 6

Since the length cant be negative, hence h = 5 or h = 6

When h = 5; b = 30/5 = 6

When h = 6; b = 30/6 = 5

Therefore the lengths of the other two sides are 6 inches and 5 inches

Find out more at: https://brainly.com/question/2773823

The length of a flat-screen tv is 5 inches less than 3 times its width if the perimeter of the tv is 150 inches find the demensions

Answers

Answer:

Length(L) is 55

Width(W) is 20

Step-by-step explanation:

If 7 cats take 7 minutes to catch 7 mice how long will it take for 21 cats to catch 21 mice

Answers

Answer:

21 min

Step-by-step explanation:

A teacher always arranged the content of his lessons as teaching and practicing learnt skills in the ratio 3: 2 If a lesson lasted for 45 minutes. How much teaching would he do?


HELP PLSSS !!!

Answers

Answer:

27 minutes

Step-by-step explanation:

3 + 2 = 5

45 / 5 = 9

3 * 9 : 2 * 9

27 : 18

7) What symbol should be used to show the relationship of 101.768 101.867 between the numbers?​

Answers

The symbol that can be used to show the relationship of 101.768 -----

101.867 between the numbers is < (less than)

The question is what symbol should be used to show the relationship

between 101.768 and 101.867.

Both numbers are decimal numbers.

101.768  is not equal to 101.867.

Instead,  101.768 is less than 101.867.

Therefore, the symbol that can be used to show the relationship of 101.768 ---

-- 101.867 between the numbers are as follows:

101.768 <  101.867

read more: https://brainly.com/question/21507430?referrer=searchResults

I need help really bad! I have literally no clue what the answer is to this question

Answers

Answer: C is the answer

Answer:

The second answer: {(-1, 4),(2, 7),(3,7)} because every x value has one y value

what is pulmonary function ​

Answers

Answer:

pulmonary function is the blood or gas flow from or to the lungs

Step-by-step explanation:

the lungs take in oxygen and take out c02

The lungs' main role is to bring in air from the atmosphere and pass oxygen into the bloodstream. From there, it circulates to the rest of the body. Help is required from structures outside of the lungs in order to breathe properly.

Calculator
Which ordered pair is the solution to the system of equations?
1 -5x - 3y = 12
Y=x-12
0 (0, -4)
0 (-6, 6)
O (1, -11)
O (3,-9)

Answers

[tex] \text{Given : Which ordered pair is the solution to the system of equations?} \\ \\ \begin{cases}-5x - 3y = 12 \\ y - x = 12 \end{cases} [/tex]

[tex] \text{Solution : According to the question, here let's take these variables as two} \\ \text{equations then get their value and finally get the answer.} \\ \\ \sf {1}^{st} \: equation : \\ \leadsto \frak{-5x - 3y = 12} \\ \\ \leadsto \frak{-5x = 12 + 3y} \\ \\ \leadsto \frak{x= \frac{12 + 3y}{-5}} \qquad \sf ...eq(1) \\ \\ \sf 2^{nd} \: equation : \\ \leadsto \frak{y = x - 12} \qquad \sf ...eq(2) \\ \\ \underline{ \frak{finding \: x }} : \\ \\ \dashrightarrow \frak{x= \frac{12 + 3y}{-5}} \\ \\ \dashrightarrow \frak{x= \frac{12 + 3(x - 12)}{-5}} \\ \\ \dashrightarrow \frak{x= \frac{12 + 3x - 36}{-5}} \\ \\ \dashrightarrow \frak{-5x= 12 + 3x - 36} \\ \\ \dashrightarrow \frak{-5x - 3x= - 24} \\ \\ \dashrightarrow \frak{-8x = - 24} \\ \\ \star \quad \underline{ \boxed{ \green{ \frak{x = 3}}}} \\ \\ \underline{ \frak{ getting \: y}} : \\ \\ \dashrightarrow \frak{y = 3 - 12} \\ \\ \star \quad\underline{ \boxed{\blue{ \frak{y = - 9}}}} \\ \\ [/tex]

[tex] \green{ \mathbb{HENCEFORTH, \: THE \: PAIR \: IS \: \pink{\frak{ (3,-9)}}}}[/tex]

Please help!! I don't have a whole lot of time!!​

Answers

The midpoint of the line segment is the average of the respective coordinates.

So the x-value of the midpoint if the average of the two individual x-coordinates.

    (-3.5 + 4)/2 = 0.5/2 = 0.25

And the y-value of the midpoint if the average of the two individual y-coordinates.

    (2 + (-2.5))/2 = -0.5/2 = -0.25

So, the midpoint is (0.25, -0.25) or (1/4, -1/4) or "C".

Solve the given equations. PLEASE show your work. Tell me if there is no solution or infinite.




17 + 2(1 + 3x) = x - 5(3 - x)

Answers

Answer:

x = 17/5

Step-by-step explanation:

17+2+6x = x-15 +5x

19+6x =16x -15

19+15 = 16x-6x

34 = 10x

34/10= 10x/10

17/5 = x

x = 17/5 or 3 2/3

Precalc please help

Answers

The second one hope this helps

The radius of a circle is constantly increasing. At a certain moment, the rate of increase of the circumference is the same as the rate of increase of the area. At that moment, what is the area of the circle?
a. 1/pi
b.pi/4
c.4pi
d.pi
e.4/pi

Answers

rate of change circumference=rate of change area, derivative of circumference(2piR)=derivative of area(piR^2), 2pi=2piR, R=1, plug back into area formula: piR^2, pi(1)^2, area=pi :)

Clare had t books. After she bought 8 more books, she had 24 books. Write and solve an equation to find the number of books Clare started with

Answers

Answer:

24-8=t

Step-by-step explanation:

I cant really explain much...

but, Hope it helps

plz mark brainiest if it does

Kayla is serving vegetables at a soup kitchen. She has 18 carrot sticks and 12 baby potatoes that she wants to divide evenly, with no food left over. What is the greatest number of plates Kayla can prepare?
Group of answer choices

18

12

6

3

Answers

Answer: 6

Step-by-step explanation:

18/2=6=12/2

Answer:

6

Step-by-step explanation:

She could put 3 carrots on each plate: 18/3=6. And 2 baby potatoes on each plate: 12/2=6. So, she can make a maximum of 6 plates of veggies. Hope this helps. :D

Multiply (-2-i)(4+I)

Answers

Answer:

Step-by-step explanation:

(-2-i)(4+I)

= (-8-2i-4i-l)

thats it basically since there are two unknowns so it cant be simplified further

there are 5 major train tracks from city x to city y and 3 major train tracks from city y to city z. how many trips can be made from city x to city z, passing through city y?

Answers

Answer:

3 trips

Step-by-step explanation:

I think it is three trips because 3 out of the 5 train tracks from city x were found in city y, therefore only 3 train tracks will be found in city z so there are 3 trips

Write the equation of the line in y=mx + b form

Answers

Answer:

y=-4x+2

Step-by-step explanation:

all you need to do is find the x-axis and y-axis. That information is already there, so put It together

If you earn 15% on your investment how long will it take for your money to double using the rule of 72

Answers

Answer:

If you earn 15% the answer will be 10.8

Step-by-step explanation:

I know this because if you use the rule of 72 you will have to divide the two numbers together and the you will come out with 10.8

Other Questions
hastc) What is the name of this item The theme of Stage Fright is that it's fun to perform even when you don't do it perfectly. Which of the details supports the theme? A. The boy wanted the part of the Prince and he got it. B. Even though the boy stuttered, his classmates cheered him on. C. The boy was really nervous to go on stage. D. The boy practiced a lot to get the part he wanted.HELPP What is the meaning of the following sentence? Este monumento es increble! This movement is difficult! This monument is disgusting! This monument is incredible! This movement is disgusting!. What theory stresses how people pass through a series of stages in the evolution of their sense of justice and in the kind of reasoning they use to make moral judgments What describes the order in which waste products travel through the urinary system? a star that expands after exhausting its hydrogen fuel How many more people spoke Asian and Pacific Island languages in the West than the Northeast, according to the 2000 Census? 1 million more2.3 million more 3.2 million more 4.5 million more How will a strengths-based perspective change the way you deliver services or make referrals? there aren't enough/ too much / little health options How does America's culture and way of life influence immigrants to move to America? A robot can complete 5 tasks in 34 hour.Each task takes the same amount of time.**Round to the hundredths place.a. How long does it take the robot tocomplete one task?3/4 divided by 5 = 3/4, so its 3/4 hours per task SUPER EASYYYYYYYYYYYYYYYY name the star shaped cells present in hydrophytes solve pls brainliest please help I will give 30 points but I need this answer please. Answer: Select the letter of the term that identifies the verb tense used in the sentence: Babe Ruth was a great baseball player. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future14 Answer: Select the letter of the term that identifies the verb tense used in the sentence: People are still talking about his amazing abilities. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future15 Answer: Select the letter of the term that identifies the verb tense used in the sentence: By age thirty Ruth had already become an American legend. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future16 Answer: Select the letter of the term that identifies the verb tense used in the sentence: In 1927 Ruth was playing for the New York Yankees. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future17 Answer: Select the letter of the term that identifies the verb tense used in the sentence: That season he hit a record sixty home runs. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future18 Answer: Select the letter of the term that identifies the verb tense used in the sentence: Ruth has attracted the admiration of generations of ball players. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future19 Answer: Select the letter of the term that identifies the verb tense used in the sentence: Many of today's great players admire Ruth's successes. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future20 Answer: Select the letter of the term that identifies the verb tense used in the sentence: Certainly he will remain one of baseball's greats forever. a. present d. past progressive f. present perfect b. past e. past perfect g. present progressive c. future21 Answer: Josh and Inez _____ their pet canary out of its cage yesterday. a. let b. lot c. letted d. letting22 Answer: The bird _____ straight out an open window and into a shrub. a. fly b. flown c. flew d. flied23 Answer: It had never _____ that before. a. do b. did c. deed d. done24 Answer: Now Josh has _____ the bird again. a. catch b. catched c. caught d. catching25 Answer: He quickly _____ on the canary and carried it back to its cage. a. spring b. sprang c. springed d. sprunged26 Answer: The bird _____ Josh lightly on the thumb. a. bited b. bitten c. biting d. bit How do i add a picture on a computer? Its a random question but i dont know how to do it. It needs to be a very detailed description. -28- 15 + 3_________8-(-2) Why is Romeo's killing of Tybalt a problem? O A. He has angered the gods. O O O B. He has created a feud between the two families. C. He has killed one of Juliet's relatives. D. He has ruined his chances of marrying Juliet. The power to tax is called a "concurrent power" because it is a powera-))A)only held by state governments.B)that only is held by the national governmentC)that affects both individuals and corporations.D)jointly held by the national and state governments.