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).

Answers

Answer 1

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

The program implementation goes thus :

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)

A sample run if the program on the values given :

print(gcd(124, 244))

print()

#leaves a space after the first output

print(gcd(4424, 2111))

Learn more :brainly.com/question/25506437

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

Related Questions

What is the slope of the line ?

Answers

Answer:

y = -3x + 4

Step-by-step explanation:

Use the slope intercept equation y = mx + b.

b is the y-intercept which is 4 in this equation.

The slope can be found from a graph using rise over run. This graph is decreasing so the slope is negative. Therefore, the slope is -3.

Write a polynomial function of the least degree that has roots of 3 and (4 + i).

Roots:
Polynomial Function:

Answers

Answer:

x³ - 11x² + 41x - 51

Step-by-step explanation:

The least number of degree is 3 and the third root should be (4 - i) to make polynomial rational.

The polynomial is:

(x - 3)(x - (4 + i))(x - (4 + i)) = (x - 3)(x² -x(4 + i + 4 - i) + (4 + i)(4 - i)) = (x - 3)(x² - 8x + 16 - (-1)) = (x - 3)(x² - 8x + 17) = x³ - 8x² + 17x - 3x² + 24x - 51 = x³ - 11x² + 41x - 51

Ano po tawag dito pinapalipad po to lalagay nyo po yung shape fan blade sa stick tapos po lilipad.

Wag nyo po sagutin kung di po alam.

Mga tutors pasagot po di ko po kau mapili dahil Wala po pambayad

Answers

Answer:

Flower stick hahhhahaHaha


Find x

Will be marked brainliest

Answers

Answer:

x = -49

Step-by-step explanation:

The sum of the angles of a triangle is 180°. Set up the following equation and solve for x.

[tex]-x-5+37+99=180\\\\-x+131=180\\\\-x=49\\\\x=-49[/tex]

5. Aaron sold 126 boxes of cookies. This is 14 more than twice the
number of boxes his sister, Victoria, sold. How many boxes of
cookies did Victoria sell?

Answers

Answer:

112

Step-by-step explanation:

Aaron = y

Victoria = x

y = 14 +x

126 = 14 + x

x = 112

Victoria sold 112 boxes of cookies

what is the sequre of 9?

Answers

Answer:

3

Step-by-step explanation:

Answer:

3

Step-by-step explanation:

The square root of 9 is 3.

√9=3

Hope this helps :)

A table is on sale for 32% off. The sale price is $459.
What is the regular price?

Answers

the regular price is "x", which of course is the 100%, but we also know that $459 is 32% off that, hmmmmm well 100% - 32% = 68%, so $459 is really 68% of "x", because $459 is whatever "x" is minus 32%.

[tex]\begin{array}{ccll} amount&\%\\ \cline{1-2} x&100\\ 459&68 \end{array}\implies \cfrac{x}{459}=\cfrac{100}{68}\implies \cfrac{x}{459}=\cfrac{25}{17} \\\\\\ 17x = 11475\implies x = \cfrac{11475}{17}\implies x = 675[/tex]

$675 is the regular price. $459 is 68% of the original price. (100-32=68). To find the original price you would do 459 divided by 0.68 and would get 675. To check that you would do 675 times 0.68 and would get 459. I hope this helps

Bruno's Burgers has a cook to server ratio of 2 to 5. The total number of servers and cooks is 42. How many more servers does Bruno's Burgers employ than cooks?

Answers

Answer:

18

Step-by-step explanation:

2 to 5 2+5=7 42/7=6

6x2=12. cooks

6x5=30 servers

servers subtracted by cooks equals difference

30-12=18

Reduce 45/36 fraction into the
lowest terms.

Answers

Answer:

[tex] \frac{5}{4} [/tex]

Hello there! :)

45/36

Let's look for common factors:

45 is divisible by 3, 9 (I list the common factors here)

36 is divisible by 3, 9

Now, the greatest common factor (9) is the one we will use.

Divide 45 by 9:

5

36 by 9:

4

So the answer is 5/4.

Hope this helps!

~Just a determined gal

#CarryOnLearning

[tex]MysteriousNature[/tex]

need help asap please !!

Answers

Answer:

g(3) = 13

Step-by-step explanation:

The function g(3) means you replace every x value in the g(x) equation with 3:

[tex]g(x) = x^2 + 4\\g(3) = 3^2 + 4\\g(3) = 9 + 4\\g(3) = 13[/tex]

Hope this helps!

Answer:

13

Step-by-step explanation:

putting the 3 there just means to replace all x's with 3. If you do that you get g(3) = 3^2 + 4 and if you solve that its 13

anyone good at maths?​

Answers

1 ) 4 × 11 = 44 yd

____________________

2) 4 × 2 = 8 ft

____________________

3) 4 × 4 = 16 in

____________________

4) 4 × 6 = 24 ft

____________________

5) 4 × 18 = 72 in

____________________

6) 4 × 5 = 20 yd

____________________

7) 4 × 9 = 36 in

____________________

8) 4 × 13 = 52 yd

____________________

9) 4 × 10 = 40 ft

Answer:

I am good, but not for peremiter

Step-by-step explanation:

Kiran wants to buy blueberries and raspberries to make a fruit tart. Blueberries cost $3.25 per pound and raspberries cost $2.50 per pound. How many pounds of fruit does he buy if he buys 2 pounds of blueberries and 1.5 pounds of raspberries? How many pounds of fruit does he buy if he buys x pounds of blueberries and y pounds of raspberries?

Answers

Answer:

$10.25 pounds of fruit

Step-by-step explanation:

3.25 x 2 = 6.5

2.50 x 1.5 = 3.75

3.75 + 6.5 = 10.25

A rectangle has vertices at (-2, 1), (3, 1). (3,-2), and (-2,-2).
What is the area of the rectangle?
8 square units
B. 10 square units
O c. 12 square units
O D. 15 square units

Answers

Answer:

C

Step-by-step explanation:

Answer:

D. 15 square units

Step-by-step explanation:

Explanation shown in the screenshots of the graph.

Match question I need help
Please.

Answers

Answer:

b

Step-by-step explanation:

Answer:

Step-by-step explanation:

PLEASE SHOW YOUR WORK!!!





Solve for y: 3^3 + 14 y- (25y - 13) = y + 7y - 9y

Answers

Answer:

y = 4

Step-by-step explanation:

3^3 + 14y - (25y - 13) = y + 7y - 9y

Exponents first.

27 + 14y - (25y - 13) = y + 7y - 9y

Distribute the negative sign from the parenthesis.

27 + 14y - 25y + 13 = y + 7y - 9y

Common terms.

27 + 13 = 40

14y - 25y = -11y

y + 7y - 9y = -y

40 - 11y = -y

Add 11 to both sides.

40 = 10y

Divide both sides by 10.

4 = y

Rearrange.

y = 4.

A small publishing company is releasing a new book. The production costs will include a one-time fixed cost for editing and an additional cost for each book
printed. The total production cost C (in dollars) is given by the function C-550 +15.95N, where N is the number of books,
The total revenue earned (in dollars) from selling the books is given by the function R=31.90N.
Let P be the profit made (in dollars). Write an equation relating P to N. Simplify your answer as much as possible.

Please answer me ASAP I need an answer.

Answers

Answer:

P = 15.95N - 550

Step-by-step explanation:

The profit is the difference between the revenue and the total cost:

P = R - C

Substitute values:

P = 31.90N - (550 + 15.95N)P = 31.90N - 15.95N - 550P = 15.95N - 550

The difference between cost and revenue is profit

P=R-CP=31.90N-(15.95N+550)P=31.90N-15.95N-550P=15.95N-550

what are the correct answers whoever answers it correctly gets brainlist

Answers

Answer:

So the answer is... Hold on... Ok i did my research and the answer is........

Step-by-step explanation:

1. Economic

The Industrial Revolution stimulated the hunt for colonies. First, colonies provided raw

materials. Second, colonies served as a market for surplus manufactured goods.

2. Political

Every country wanted national hegemony – that is, to be the No. 1 imperialist country in the

world. To achieve this, they wanted to control as much of the world as

possible. The nation’s greatness is measured by the quality and quantity

of its colonies. Folks wanted to plant the flag in as many places as

possible. Every country wanted recognition as a world power. They

wanted to improve their reputation among other European countries.

They wanted to increase their political power and prestige. Every country

was in competition with its rivals. You took territory – simply to prevent

your rival from getting it!

3. Military

Every imperialist country was worried about its own national security: The competition

among imperialist powers was vicious. One had to protect one’s own

country and its colonies. Every country wanted to gain military

advantage over its rivals. A colony could serve as a fueling station for

the Navy. A ship could stop and load up on supplies. Some spots in the

world, especially waterways, were strategically important. The Navy

was paramount: It must have freedom to travel to and from the

colonies.

4. Cultural

Social Darwinism was the prevailing belief in Europe. It explained why some countries were

rich and some were poor. People compete for survival. The strong survive.

The rich were naturally superior. The weak were unfit. Poverty was a sign of

being unfit. The poor were naturally inferior. The European colonizers were

the Superior Races. The African and Asian colonized were Inferior Races. The

Europeans regarded themselves as racially and culturally superior to the people

of Africa and Asia. Humanitarians argued that it was Europe’s noble duty to

uplift and enlighten the backward peoples. Belief in Anglo-Saxon superiority

was prevalent.

5. Religious

The “missionary impulse”: Christianity is superior to all other religions. We must

spread Christianity to Asia and Africa. Religion encouraged imperialism. People

felt they needed to acquire territory in order to Christianize people. A serious

moral issue – Christianity is in direct conflict with Social Darwinism. Under

Christianity, all people are equal in God’s eyes. Under Social Darwinism, the

Europeans are superior and the Africans and Asians are inferior. There was also a

certain element of hypocrisy: While the Europeans spoke of uplifting people, they

were actually motivated by profit and greed.

Answer this question fast pls

Answers

Answer:

Lemons ( 27 ) = Cups ( 9 )

Cups ( 50) = Lemons (30)

help me again due today there is more question after

Answers

Given equation

[tex]\\ \sf\longmapsto 42=6b[/tex]

[tex]\\ \sf\longmapsto 6b=42[/tex]

Take 6 to right

[tex]\\ \sf\longmapsto b=\dfrac{42}{6}[/tex]

[tex]\\ \sf\longmapsto b=7[/tex]

Option D

Find the slope given the coordinate points.

(12, 7) (-4, 2)

Answer as a fraction in reduced form.

Will mark brainliest if correct

Answers

5 / 16

m = rise/run = y2 - y1 / x2 - x1

m = 2-7 / (-4) - 12 = -5 / -16

m = 5 / 16
i think it’s 13 over -160

NASA launches a rocket at t = 0 seconds. Its height, in meters above sea level, as a function of time is
given by h(t) = – 4.9t2 + 235t + 269.
Assuming that the rocket will splash down into the ocean, at what time does splashdown occur?

Answers

if h is m above the ocean and your trying to find when the rocket reaches that ocean… as the function gives the height above the ocean at a given time, when the height equals 0 the rocket will have reached the ocean so solve for t when h=0. working out in the photo. i got t=48.88seconds

20 EASY POINTS PLUS BRAINLIEST IF YOU ANSWER THIS QUESTION

Answers

Mark me as Brainliest Please

ill mark brainliest thanks​

Answers

Answer:

x=10

Step-by-step explanation:

The exterior angle of a triangle is equal to the sum of the opposite interior angles

6x-7 = 26+2x+7

Combine like terms

6x-7 = 2x+33

Subtract 2x

6x-7-2x =2x+33-2x

4x-7 = 33

Add 7 to each isde

4x-7 +7 = 33+7

4x=40

Divide by 4

4x/4 = 40/4

x=10

Add 4/9 +2/9 and simplify answer

Answers

Answer: 6/9 = 2/3

Step-by-step explanation: The answer is 2/3 or 6/9 is because you add 2 to 4 and that is 6 you keep the denominator the same because both fractions have the same denominator and you get 6/9, 6/9 is simplified to 2/3

Jon makes 20 free throws in practice on
Monday. He makes 25% more free throws
on Friday than Monday. Enter the number
of free throws Jon makes on Friday.
Show your work.

Answers

Answer:

25 free throws on Friday.

Step-by-step explanation:

On Monday  made 20 free throws

On Friday made 25%  more free throws on Friday than Monday

On Friday made 20 free throws + 25% of Monday free throws

On Friday = Monday throws + 25% × Monday throws

On Friday       = 20 + (.25 × 20)

On Friday        = 20 + 5

On Friday         = 25

Calculate SP (the sum of products of deviations) for the following scores. Note: Both means are whole numbers, so the definitional formula works well: X Y 4 5 0 2 1 1 3 4

Answers

Applying the formula, it is found that the SP for both numbers is of 7.

The first step is finding the mean for both sets, hence:

[tex]M_x = \frac{4 + 0 + 1 + 3}{4} = 2[/tex]

[tex]M_y = \frac{5 + 2 + 1 + 4}{4} = 3[/tex]

Then, the SP(sum of products of deviations) is the sum of the multiplications between each value x and the mean, with each respective value of y(same index) and the mean, hence:

[tex]SP = (4 - 2)(5 - 3) + (0 - 2)(2 - 3) + (1 - 2)(1 - 3) + (3 - 2)(3 - 4) = 7[/tex]

The SP for both numbers is of 7.

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

Dan bought a truck for $29,800. The value of the truck depreciated at a constant rate per year. The table shows the value of the truck after the first and second years: Year 1 2 Value (in dollars) 26,522 23,604.58 Which function best represents the value of the truck after t years? f(t) = 29,800(0.89)t f(t) = 26,522(0.89)t f(t) = 29,800(0.11)t f(t) = 26,522(0.11)t

Answers

Answer:

A) f(t) = 29,800(0.89)^t

Step-by-step explanation:The truck value decreases by 11% each year.

The present value of the truck was $29,800.

29,800 x 0.11 = 3,728 dollars lost from value.

29,800 - 3,728 = 26,522, the value of the truck after one year.

26,522 x 0.11 = 2,917.42 cash lost from value.

26,522 - 3,728 = 23,604.58, the value of the truck after two years.

Therefore, the answer is A) f(t) = 29,800(0.89)^t.

A pair of Beats Wireless Headphones normally cost $299.99. They are on sale for $229.99. Find the percent of markdown.

Answers

Answer:

$159.99

Step-by-step explanation:

Use the graph below to find the slope of the line that goes through the points
|(1, 2) and (6,6).

Answers

Answer:

4/5

Step-by-step explanation:

m=y2-y1/x2-x1

=6-2/6-1

4/5

A runner is 7/8 mile from the finish line. If she can travel 3/8 mile per minute, how long will it take her to finish the race?​

Answers

Answer:

2 1/3 minutes

Step-by-step explanation:

Distance:

d = 7/8 mile

Speed:

s = 3/8 mpm

Time:

t = d/st = 7/8 : 3/8 = 7/8 * 8/3 = 7/3 = 2 1/3 min

Answer:

Step-by-step explanation:

Other Questions
The holding period of property acquired by gift may begin on:A. The date the property was acquired by the donor only.B. The date of the gift only.C. Either the date the property was acquired by the donor or the date of the gift.D. The last day of the tax year in which the property was originally acquired by the donor. 5. Is the data point, P, an outlier, an influential point, both, or neither? Which of the following lines from the poem best explains the first hardship that Prince Rama faces?Answer choices for the above questionA. How Rama wept and raved in vain, / And how the Vulture-king was slain. / How Ram fierce Kab slew;B. The choice of Rama for the throne; / The malice by Kai shown, / Whose evil counsel marred the plan / And drove him forth a banished man.C. The ring by Rama's hand bestowed; / The cave wherein the bear abode. / The fast proposed, their lives to end; / Sam gained to be their friend.D. His love for all, his patient youth, / His gentleness and constant truth, / And many a tale and legend old / By holy Vis told.PLEASE QUICK An experiencing LPN/LVN under the supervision of the team leader RN, is assigned to provde nursing care for a client with respiratory problem. Which actions are appropriate to the scope of practice of an experienced Identify the mood of this setting: Janet looked at the rickety rope bridge as it swayed in the wind. The small planks on the floor of the bridge were spaced about a foot apart. They looked like they had been made from driftwood or wine corks. Janet looked down into the canyon below the rope bridge. It was wide and deep. She could barely make out what was at the bottom. She inched onto the first plank. It creaked loudly. Then she put her weight onto the weathered plank, clinging tightly to the ropes. The wind had a ghostly whistle O Guilty, fearful, ashamed O Tense, perilous, frightening O Courage persistence O Humble, honest, hardworking reading class. whats the difference between saturated and unsaturated fat Can you tell me how and what the answer is Help ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!:) How did King Hamlet die?A) He was killed in battle.B) He was murdered by Queen Gertrude.C) He died of illness.D) He was poisoned by Claudius. what is the additve inverse of 9/10 explain plz branist is u get it right Preparing to Read an Informational TextPre-Reading ActiveHighlighterCyanMagentaGreeenClear HighlightsHeadphones PLEASE HELP WITH THIS QUESTION HELP ME HELP ME HELP ME!!! Given f(x) below, find f^-1(x). The predicted yield for a reaction was 10g of product. If the percentage yield for this reaction was 50%, how much product was formed? which two expressions are equivalent to 7(t + 5)?A). 7 5 tB). 7 5 + tC). 7 5 + 7 t D). (5 + t) 7 E). 5(t + 7) ____________ diffuses out of the alveoli and into the pulmonary capillaries, while _______ diffuses out of the pulmonary capillaries and into the alveolar sacs. Read the passage.How did this passage influence the ProtestantReformation?86. Again: 'Why does not the pope, whose wealth is to-day greater than the riches of the richest, build just thisone church of St. Peter with his own money, rather thanwith the money of poor believers?"O It led the pope to accept Luther's ideas.O It caused people to lose their faith in God.O It moved Protestants to build simpler churches thanCatholics.It inspired people to challenge practices within theCatholic Church.-The 95 Theses,Martin Luther Elijah has a muffin and a banana. To find the banana's weight, Elijah uses a balance scale twice and the scale is balanced both times as shown below. How much does the banana weigh? please help me I don't get it HELPPPPPPPPPPPPPA: equilateral and rightB: equilateral and isosceles C: isosceles and scaleneD: isosceles and right