Kat H.

asked • 03/13/21

Suppose you owe 10 dollars to a friend. Each week you pay your friend at least 1 dollar back.

Sometimes however you might pay your friend back 2 dollars in a week and other times you might pay your friend 5 dollars in a week. How many different payment sequences are possible? Here are a couple possible sequences:


1-1-1-1-1-1-1-1-1-1 , 5-5, 5-2-2-1, 2-2-1-5, etc.


Hint: Try to find a recursive function that answers this question for n-dollars and then use it on an n-value of 10.


Part b: Give another function to answer the first part o the question above, this time your function must NOT be recursive. Hint: Think about the counting theory.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.