You can walk 3 miles per hour, jog 5 miles per hour, or run 10 miles per hour. You go a full hour before changing pace. At the end of each hour, you make a choice as to whether to walk, jog, or run for the next hour.

a. Find a recurrence relation for the number of ways to go n miles.
b. How many ways arc there to go 12 miles?
c. How many ways arc there to go 20 miles?
d. How many ways arc there to go 22 miles?

Respuesta :

Answer:

b. How many ways arc there to go 12 miles?

≡ p(12) = 25

c. How many ways arc there to go 20 miles?

≡ p(20) = 131

d. How many ways arc there to go 22 miles?

≡p(22)  199

Step-by-step explanation:

a) supposed you walked for the first hour. Then you would have travelled 3 miles. if you jogged you would have covered 5miles and if you run you would have covered 10miles. now you have to decide how to run the rest miles from the n miles.

Thus, the number of ways one can cover n miles will be given by the recurrence relation

p(n) = p( n-3) + p( n-5) + p( n - 10)

now to solve the rest of the question, let us make a table which provides the number of ways for n = 1  to 22.

check the attachment for the table

b. How many ways arc there to go 12 miles?

≡ p(12) = 25

c. How many ways arc there to go 20 miles?

≡ p(20) = 131

d. How many ways arc there to go 22 miles?

≡p(22)  199

Ver imagen adebayodeborah8