Question
Textbook link: http://discrete.openmathbooks.org/dmoi3/sec_recurrence.html Problem 2. Think back to the magical candy machine at your neighborhood grocery store. Suppose that the first time a quarter is
Textbook link: http://discrete.openmathbooks.org/dmoi3/sec_recurrence.html
Problem 2. Think back to the magical candy machine at your neighborhood grocery store. Suppose that the first time a quarter is put into the machine 1 Skittle comes out. The second time, 4 Skittles, the third time 16 Skittles, the fourth time 64 Skittles, etc.
a. Find both a recursive and closed formula for how many Skittles the nth customer gets, denote it (an)n1
b. Check your solution for the closed formula by solving the recurrence relation using the Characteristic Root technique.
c. Now, consider a recurrence relation bn= bn-1 + bn-2+ bn-3 + bn-4: with initial values as above, i.e., b1= 1, b2= 4, b3 = 16 and b4= 64. Compute b5
d. Explain why are (an)n1 and (bn)n1 distinct sequences.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started