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
kumpel [21]
3 years ago
12

give a recursive algorithm for finding the maximum of a finite set of integers, making use of the fact that the maximum of n int

egers is the larger of the last integer in the list and the maximum of the first n-1 integers in the list
Mathematics
1 answer:
Karolina [17]3 years ago
7 0

Answer:

Recursive algorithms call itself with simpler or smaller input values. They can be used to solve large problems by using the solutions to minor parts of the problem, these minor problems are then further broken down to solvable cases.

Given the input as a sequence;

max(z_{1}, z_{2}, ... z_{k}: integers)

if k=1 return z_{1}

else

          c=max(z_{1}, z_{2},...z_{k-1})

          if c > z_{1} return c

          else return z_{1}

You might be interested in
Write the inverse function for the function, ƒ(x) =1/2x + 4. Then, find the value of ƒ^ -1(4). Type your answers in the box.
Kipish [7]

Answer:

f⁻¹(x) = 2x - 8

f⁻¹(4) = 2 × 4 - 8

f⁻¹(4) = 0

Step-by-step explanation:

f(x) = \frac{1}{2} x + 4\\x = \frac{1}{2} f^{-1}(x) + 4\\x - 4 = \frac{1}{2} f^{-1}(x)\\2x - 8 = f^{-1}(x)\\f^{-1}(x) = 2x - 8

Let's test it

f^{-1}(f(x)) = 2(f(x)) - 8\\f^{-1}(f(x)) = 2( \frac{1}{2}x + 4) - 8\\f^{-1}(f(x)) = \frac{2}{2}x + 8 - 8\\f^{-1}(f(x)) = x

So we do indeed have the inverse function, so using that we can plug in the values requested:

f⁻¹(x) = 2x - 8

f⁻¹(4) = 2 × 4 - 8

f⁻¹(4) = 0

4 0
3 years ago
2 fractions have the same denominator. Which is the greater fraction: the fraction with the greater numerator or thr lesser nume
irinina [24]
If two fractions have the same denominator, that means the total number of parts is the same.  For example, you have two batches of cookies, which each have 8 cookies.

But the numerator tells you the number of parts you are dealing with.  Going back to our cookie example, say you ate 3 cookies and your little brother only had 1.  If you ate 3 cookies, you ate 3/8 of the cookies.  Your little brother ate 1/8 of the cookies.

So, which one is the greatest fraction?  In this case, who had more cookies?  That would be you.  So, the greater numerator means a greater fraction.

Answer: the fraction with the greater numerator
5 0
3 years ago
Express all the trigonometric ratios in terms of cot A.​
victus00 [196]

Answer:

Who is the youngest in your family?

5 0
2 years ago
An oblique cone has a radius of 4 units, a height of 8.5 units, and a slant length of 11.7 inches. What is the volume of the obl
trasher [3.6K]

Oblique Cone

The volume of the oblique cone is 144.49 cubic inches , if an oblique cone has a radius of 4 units, a height of 8.5 units, and a slant length of 11.7 inches.

Step-by-step explanation:

             An oblique cone has a radius of 4 units

             A height of 8.5 units

             A slant length of 11.7 inches

We have to use the slant height to calculate actual base

So in a right angle triangle when two sides are given the third side is calculated by

Root (sqr(11,7) - sqr(8.5)) = 8.03 units

\sqrt{11.7^{2}  - 8.5^{2} }

⇒ 8.03 units

Formula to calculate the volume of oblique cone,......................(1)

V = \frac{1}{3} bh

If r is the distance of the base of the height from the center of the circle [ this is because the base of the height is outside the oblique cone]

V = \frac{1}{3} \pi r^{2} h

Where r is the distance if the base of the height from the center of the circle [ this is because the base of the height is outside the oblique cone]

Here r = 8.03 - 4 = 4.03 units

Volume = \frac{1}{3}× 3.14 × 4.03 × 4.03 × 8.5

Volume = 144.49 cubic inches

Hence, the volume of the oblique cone is 144.49 cubic inches , if an oblique cone has a radius of 4 units, a height of 8.5 units, and a slant length of 11.7 inches.

6 0
3 years ago
Read 2 more answers
Part of the population of 6,750 elk at a wildlife preserve is infected with a parasite. A random sample of 50 elk shows that 3 o
Anastasy [175]

Answer:

405

Step-by-step explanation:

We can use a ratio to solve

3 infected           x infected

------------------ = ----------------

50 sampled     6750 population

Using cross products

3*6750 = 50x

Divide each side by 50

3*6750/50 = x

405

7 0
3 years ago
Read 2 more answers
Other questions:
  • Please help i need this quickly
    7·1 answer
  • When I graph the inequality symbol &gt; should it be a open or closed<br> circle on the number line?
    5·2 answers
  • Complete: __:11= 1/3 :6
    12·2 answers
  • A friend has placed a large number of plastic disks in a hat and invited you to select one at random. He informs you that they h
    5·1 answer
  • (7x+3)(x-9) simplify then find the difference
    15·1 answer
  • Answer if u can please will mark brainest show work please
    11·1 answer
  • What is the answer(10+66-4to the power of 2)÷(3+3)in order of operations
    5·2 answers
  • If you guys are in K12 and are in 7th grade help me!!!!!!!!!!!
    10·1 answer
  • Please give an explanation on why the answer is the answer
    6·1 answer
  • An ice cream shop sells an empty cone for 4.00 plus an additional 1.25 per scoop of ice cream. You have 6.75 to spend. How many
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!