Solving the Fibonacci Sequence with Matrix Exponentiation

preview_player
Показать описание
This is a tutorial to find large fibonacci numbers using matrix exponentiation, speeded up with binary exponentiation.
The part where dynamic programming comes in, is when storing the 2th powers of the base matrix.

We do this using an array where each element is populated using the square of the last element. a[i]=a[i-1]^2.
The fibonacci sequence can be evaluated using the recursive matrix form as shown in this lecture. This lets us evaluate the Nth fibonacci term in O(logN)

References:
Fibonacci Numbers:

Matrix exponentiation:

Solving Recurrences:

#fibonacci #matrix-exponentiation #dynamic-programming
Рекомендации по теме
Комментарии
Автор

Its always that one Indian person that explains it better than your learning materials and the teacher combined

killuazoldyck
Автор

6 years later, and still the best video explaining this on youtube!

ITACHIUCHIHA-drsz
Автор

You’ve been the first and the best to clearly explain the math behind fast Fibonacci matrix computation .

alessandrocamillo
Автор

when the yellow tee turns blue magically! nice video though :)

shreyasahu
Автор

I loved the Maths involved into this problem, fascinated!

manishankar
Автор

This is amazing! It's so satisfying to watch this.

FeroChau
Автор

Appreciate your work a lot, Man!
Something I like about you is that you choose your words very carefully before speaking just so that every kind of audience can understand you.

iprakhar
Автор

Wow! Thank you for making it so simple to understand. This was the clearest explanation of matrix exponentiation.

shreyaghosh
Автор

Best Explanation so far with reason behind each and every step! Loved it... Thank you Sir.. ♥

akhilesh
Автор

Great video Gaurav! Please keep posting such wonderful videos. Thanks a lot!

Manojshankaraj
Автор

You've explained it wonderfully. Wow!

siddhantsharma
Автор

It really helped me understand how to apply Matrix Exponentiation for my particular problem. Great video, thanks!

andermerketegi
Автор

Great Teaching. Your energy is very engaging to the viewer and your explanations are clear and intuitive.

subhodip
Автор

Great explanation! You made math much easier to understand. All the explanations from the internet are to mathematical and imply having prior knowledge to all these terms and formulaes.

LuisaGrigorescu
Автор

the channel I should have found a year ago. Awesome explanation.

theIcemanYT
Автор

Thanks bhai....
People like you help guys, those are not from good colleges in ind.. to improve their competitive programming

vidhansharma
Автор

your explanations are awesome, I really like the mathematical explanations . This video really helped me understand the log(n) approach to find fibonacci sequence which i couldn't understand from texts :D.

viditmathur
Автор

Wow solid explaination!!! Very easy to understand

abhimanyubahree
Автор

Very well explained. Thanks for sharing.

beautifultime
Автор

Exactly this depth all we need... tx brother

khudkikhoz