5 ms·
This shows nothing but one's ability to code-up a math formula. The blog post goes into much detail about how to solve the problem using matrices and memoizatio
by webo 12y ago
This shows nothing but one's ability to code-up a math formula. The blog post goes into much detail about how to solve the problem using matrices and memoization.
Edit: Looks like sillysaurus3 edited his comment.
- sillysaurus3 12y agoI wasn't trying to one-up anyone. I thought it was interesting, so I figured others might find it interesting too. In particular, it was surprising to find that there's a closed-form solution for the Fibonacci sequence. Sorry.
- obfuskater 12y agoDon't be sorry! I found your comment very interesting and was also surprised to find that there exists a closed-form solution.
- sillysaurus3 12y agoThe whole book is pretty fascinating, "Mathematics for Computer Science" by Lehman and Leighton: http://www.cs.princeton.edu/courses/archive/spring10/cos433/mathcs.pdf http://www.cs.princeton.edu/courses/archive/spring10/cos433/... The formula came from section 17.3.2, which goes into detail about how to derive it.
- obfuskater 12y agoThanks. I like the way they introduce what a proof is in chapter 1, I feel like they have a good, subtle sense of humor. I don't have a mathematical background so it might be a tough read for me, but it seems like a great resource.
- obfuskater 12y agoWas the purpose of this post to help people prepare for interviews? Does code always have to show off one's ability? This code inspired me to learn about Binet's formula and for that reason I think it was valuable.