You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I want to say thank you for the detailed explanation of the exercise that really helped me to wrap my head around the problem. I found though a little issue with the formula $$T(n,2) = \frac{n^2-3n}5+1$$. When n=12 it results in 22.6 which is more than twice as less the correct answer 49(as seen on the image). Although math is not of my strengths I suspected that starting the summation with index of zero is somehow wrong and I ended up with the following formula:
The latter one gives as result 48,6 $$\approx$$ 49 when the amount is 12. The former one gives correctly 35 when the amount is 10. I hope that is helpful. Thank you again for sharing this valuable knowledge.
The text was updated successfully, but these errors were encountered:
I found a different issue but it's related to the same exercises.
When calculating the number of calls of the cc function for kind of coins = 2, or T(n,2), I would expect the number of green nodes to be ceil of (n/5), rather than floor.
Am I correct or am I missing something?
I found a different issue but it's related to the same exercises.
When calculating the number of calls of the cc function for kind of coins = 2, or T(n,2), I would expect the number of green nodes to be ceil of (n/5), rather than floor. Am I correct or am I missing something?
First I want to say thank you for the detailed explanation of the exercise that really helped me to wrap my head around the problem. I found though a little issue with the formula$$T(n,2) = \frac{n^2-3n}5+1$$ . When n=12 it results in 22.6 which is more than twice as less the correct answer 49(as seen on the image). Although math is not of my strengths I suspected that starting the summation with index of zero is somehow wrong and I ended up with the following formula:
From this formula I derive two, because of the ceiling. When the amount is divisible by 5 without reminder:
With reminder:
The latter one gives as result 48,6$$\approx$$ 49 when the amount is 12. The former one gives correctly 35 when the amount is 10. I hope that is helpful. Thank you again for sharing this valuable knowledge.
The text was updated successfully, but these errors were encountered: