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
What is the mean absolute deviation of the following numbers? 18 14 0 7 5 7 10 7 6 9 12 3 14 4 11 16 0 10 9 5 0 16 11 2 4
maks197457 [2]
The MAD is 4.32. To find the mean absolute deviation of the data, start by finding the mean of the data set. Find the sum of the data values, and divide the sum by the number of data values. Find the absolute value of the difference between each data value and the mean
6 0
3 years ago
Read 2 more answers
Study the adjoining figure and then explain why x = y
Pavel [41]

Answer:

Step-by-step explanation:

y is the remote exterior angle. The remote exterior angle has the strange property that it is equal to the two remote interior angle. The two remote interior angles are the two, neither of which is the supplement of the exterior angle

So y = x/2 + x/2 which are marked as being opposite equal angles.

1/2 x + 1/2 x = x

y by substitution is = x /2 + x/2

y = x

7 0
3 years ago
Beverly used 2.4 yards of ribbon on the border of a quilt. If each side used 0.6 yard of ribbon, how many sides did she use the
nika2105 [10]

Answer: She used 4 sides.

Step-by-step explanation:

2.4 ÷ 0.6 = 4

7 0
3 years ago
A chemist whishes to prepare 100 liters of 45% purity of sulphuric acid .He has two kinds of acid solutions in stock ,one is 55%
tester [92]

Answer:

the chemist should use 60 liters of 55% solution and 40  litres of 30% solution in order to prepare 100 liters of 45% purity of sulphuric acid.

Step-by-step explanation:

From the given information,

Let x be the litres of 55% pure solution

Let y be the litres of 30% pure solution

Also;

Given that our total volume of solution is  100 litres

x+y =100  ---- (1)

The total solution of pure by related by the sum of the individual pure concentrations to make up the concentration of final solution.

(0.55)(x)+(0.30)(y) = 0.45(100) ---- (2)

From equation (1)

Let ; y = 100 - x

Replacing the value for y = 100 - x into equation (2)

(0.55)(x)+(0.30)(100-x) = 0.45(100)

0.55x + 30 - 0.30x = 45

0.55x - 0.30x = 45 - 30

0.25x = 15

x = 15/0.25

x = 60 liters of 55% solution

From ; y = 100 - x

y = 100 - 60

y = 40  litres of 30% solution.

Therefore, the chemist should use 60 liters of 55% solution and 40  litres of 30% solution in order to prepare 100 liters of 45% purity of sulphuric acid.

7 0
4 years ago
Solve the system of equations by substitution
antiseptic1488 [7]
Substitute x = -4y into x+5y = 2.
-4y + 5y = 2
y = 2. Substitute this value into the first equation: x = -4 × 2 = -8.
So the answer is (-8,2).
3 0
4 years ago
Other questions:
  • Padgett made p pizzas.
    14·2 answers
  • Zia is building a plastic model rocket that has the combined shape of a cone and a cylinder as shown. additionally, the cylinder
    6·1 answer
  • HELP PLS after multiplying each side of the equation by the LCD and simplifying, the resulting equation is .
    15·1 answer
  • Determine whether w= 1.8 is a solution to the equation 9.5 = w/0.2
    10·2 answers
  • The art teacher has 6 packages of brushes and 8 single brushes each package has the same amount of brushes the teacher has 80 br
    9·1 answer
  • C=16cm<br><br> round to the nearest tenth as needed
    7·1 answer
  • Please help this is easy if yu have more than 2 brain cells because my 2 brain cells are struggling
    7·2 answers
  • 14<br> 6<br> 4<br> 2<br> Y<br> -2<br> -2<br> -4
    6·1 answer
  • If it takes 16 men 15 days to complete a work,how long will it take 20 men?​
    8·2 answers
  • How to Estimate √40 to the nearest tenth.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!