Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A certain diner has parallel parking along the street. Being so popular with mot

ID: 3121130 • Letter: A

Question

A certain diner has parallel parking along the street. Being so popular with motorcyclists, the parking spots are marked to accommodate the length of a motorcycle. A car can also park there, and fits just right in two consecutive spots. Let tn denote the number of ways that such a parking strip with n motorcycle spaces can be filled with cars and motorcycles. For example, t3 = 3: (m|m|m), (CCC|m), (m|CCC). Find a recurrence relation (base case(s) and recurrence) for {tn}. (Hint: consider the last vehicle parked in the strip.)

Explanation / Answer

This is a classic example of the fibonacci principle.

Hence the recurrence would would come out to be f(n) = f(n-1) + f(n-2).

And the base cases are f(1) = 1 and f(0) = 1.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote