No SIM 417 PM 53 K Back Viewer Undo 411 Why do we have to s

No SIM 4:17 PM 53% , K Back Viewer Undo 4.1.1 Why do we have to specify exactly two of the elements to begin with? Why not one or three? Before trying to say more about these numbers, let us consider another counting problem A staircase has n steps. You walk up taking one or two at a time. How many ways can you go up? 4.1 Fibonacci\'s Exercise 6 For n 1, there is only 1 way. For n = 2, you have 2 choices: take one step twice or two once. For n 3, you have 3 choices: three single steps, or one single followed by one double, or one double followed by one single. Now stop and try to guess what the answer is in general! If you guessed that the number of ways to go up on a stair with n steps is n, you are wrong. The next case, 4, gives 5 possibilities (111+1, 2+1+1, So instead of guessing, let\'s try the following strategy. Let\'s denote by Jn the answer. We try to figure out what Jn+1 is, assuming we know the value of J for 1 k

Solution

4.1.2

LEt, x candies and y ice cream be bought

So,

x+2y=n

x>=0

y>=0

x,y both integers

n candies in 1 way by spending all n dollars on candy

n-2 candies in 1 way and then 1 ice cream

..........

n-2k candies in 1 way and then k ice creams

So, total number of ways to spend

= floor(n/2)+1

 No SIM 4:17 PM 53% , K Back Viewer Undo 4.1.1 Why do we have to specify exactly two of the elements to begin with? Why not one or three? Before trying to say m

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site