Need help with a discrete math story problem.
@phi
any ideas ?
Well I would need to write some kind of equation.
A: if B = bills, D = dimes, q = quarters, n = nickles I know that B = 2D + 1Q N = Q
For machine A
Machine B: Q = B + 2N D = B
I would try to find what I have after using A then B then do it a few more times, and hope I can see a pattern...
Also, I have some notes which I don't really understand.
Ok, I tried that. After one trip to machine A changing a dollar bill: I get 2D + 1Q I get 2B and B + 2N in machine B. So altogether I have 3B + 2N
they almost ring a bell with me. But I would have to look this stuff up... I don't know it off the top of my head.
So I know that after one trip to both the machines, 1B becomes 3B + 2N and if I go back to the machine I assume 3B would become 9B + 3N and the 2N would become 2Q which would become 2B + 4N So I would be left with 11B + 7N after the second time.
I just don't understand how to find the equation to calculate the amount each time we loop.
I get 11B + 10N the 2nd time through
oh woops, I changed the B into Ds and Ns instead of Ds and Qs
So in the notes, Nn+1 = 2(Bn + Nn) Bn+1 = 3Bn + Nn These equations work when I plug the numbers in to give us the next B and N
yes. and your notes find a "characteristic equation" with roots 1 and 4 That should be helpful, but I would have to study up on this stuff...
So Nn+2 = 5Nn+1 - 4Nn N > 0 is the characteristic function?
yes. See http://www.wikihow.com/Solve-Recurrence-Relations method three for how I think you solve this.
oops, method 4
Hmm, this looks complicated. :/
Let me look at a few minutes. Meanwhile, read over Method 4: Linear
ok
In your problem, your characteristic equation for the number of nickels N is \[ N_{n+2} = 5N_{n+1} - 4N_n \\ x^2 - 5x + 4 = 0 \] which factors \[ (x-1)(x-4)=0 \\ x=1, \ x=4 \] the roots are 1 and 4 according to method 4 (why this works, I don't know) \[ N_n= c_1 1^n + c_2 4^n \] where 1 and 4 are the roots 1^n is always 1 so this is the same as \[ N_n= c_1 + c_2 4^n \]
now we need to find the constants. when n=1 we found 3B + 2N , so N = 2 when n=2 we found 11B+10N, so N=10 at n=2 use those numbers to find c1 and c2
Do I need to use step 6 for this?
or am I solving for the equation above?
same idea. but for your problem we use your numbers.
in other words, \[ c_1 + c_2 4^n=N_n\\ n=1, \ c_1 + c_2 4^1= 2 \\ n=2,\ c_1 + c_2 4^2= 10\]
c1 = 2-c2(4) c2(8) + 2 - c2(4) = 10 c2(32) = 8 c2 = 1/4
c1 = 10 - c2(8) c1 = 10 - 2 c1 = 8
Would that be right?
I think 4^2 = 16
oops
I would just subtract the 2 equations
Not sure how to do that
c1 = 2 - c2(4) 2 - c2(4) + c2(16) = 10 2 - c2(20) = 10 c2 = -8/20
you can use substitution, also. but for subtraction: \[ c_1 + 16 c_2 = 10\\ - c_1 -4 c_2 = -2\\ ----------\\ 12 c_2=8\\ c_2= \frac{8}{12}=\frac{2}{3} \]
ah nice, that is much quicker, lol. Guess I still didn't get the right answer.
ah ok, I see the mistake.
you added 4 instead of subtracting 4 in your work. you should get 2- 12 c2 = 10
c1 = 14/3
your algebra is unacceptable
c1 = 2 - c2(4) c1 = 2 - ⅔ *4= 2 - 8/3 = 6/3 - 8/3 = -2/3
I made another dumb mistake, sorry.
Multiplied by the wrong number in the first step.
so the number of nickels is at step n is \[ N_n = \frac{2(4^n -1)}{3} \] the number of bills B is 1 more than the number of N, so we can say \[ B_n= \frac{2(4^n -1)}{3}+1= \\\frac{2\cdot 4^n -2}{3}+\frac{3}{3}= \\\frac{2\cdot 4^n +1}{3} \]
Awesome, thank you so much for the help.
now when you learn why, explain how this works, because it is a mystery to me
haha, if I ever learn how I will let you know. :D
This was the last problem on my second to last homework in the class though, since class is almost finished, I doubt I will ever figure out exactly how this works. :/
But thanks again! I will try to be less dull when it comes to algebra in the future. -_-
Join our real-time social learning platform and learn together with your friends!