Matrix Chain Multiplication idea and its pattern detection
ฝัง
- เผยแพร่เมื่อ 18 ก.ย. 2024
- This video explains very important concepts and idea about matrix chain multiplication problem along with the pattern detection techniques to identify if a problem is an MCM variant.It is popularly known as the MCM problem.I have shown the parent problem along with how to think about observations and I have also shown how the pattern of the problems are when we get any MCM type of question.This video will be very good to begin learning about matrix chain multiplication.
HELP us by donating on patreon: / techdose
If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
========================================================================
Join this channel to get access to perks:
/ @techdose4u
INSTAGRAM : / surya.pratap.k
SUPPORT OUR WORK: / techdose
LinkedIn: / surya-pratap-kahar-47b...
WEBSITE: techdose.co.in/
TELEGRAM Channel LINK: t.me/codewithT...
TELEGRAM Group LINK: t.me/joinchat/...
=======================================================================
USEFUL LINKS:-
MCM idea: techdose.co.in...
Balloon Burst Problem: • Balloon burst problem ...
#dp #mcm #dynamicprogramming
This is what i was looking for.... This is the best method to teach.
This weekend was like pen, paper and tech dose. maza aa gaya..
Great :)
u deserve to be subscribed.....what an explanation!
literally no one explains the intution behind✌
Thanks 😊
You are highly underrated!
😅 Thanks for your support.
Thanks Sir
Welcome :)
Thank You !
Welcome
May I know what microphone you are using for recording this video? Brand name?
Thanks
Welcome :)
Shouldn't the base condition be initialized to INT_MAX
Thanks ❤❤❤ sir,
Welcome :)
We should sum left and right ??
u r life svr!!!!
Thanks :)
I have a silly doubt which I am not able to understand. In the code we take the INT_MAX variable inside function. While coding I kept it at class level which gave me wrong ans. Now I am not clear why is it. My thought was , first you divide the problem, then for 1st Iteration solve(left), solve(right) , take the min or max(according to the qs given) and store at class level. Continue the 2nd iteration do the same and check min or max from the 1st iteration ..and continue.Finally the stored result will be the ans. I am really struggling to find out where I am wrong. Please anyone help. I was coding recursive solution.
Hey you can't take max at class level . you have to make It local and compute it again and again as the recursive calls enumerate. why? so lets suppose you are lest with 1 element and you know the ans is zero as per your base case and you store this in your min but since it is the min value allowed so you min will always remain zero which is not the correct ans hence we are making it local in every call.
ans should be initialized with INT_MAX