Тёмный

4.5 0/1 Knapsack - Two Methods - Dynamic Programming 

Abdul Bari
Подписаться 1 млн
Просмотров 2,8 млн
50% 1

0/1 Knapsack Problem
Dynamic Programming
Two Methods to solve the problem
Tabulation Method
Sets Method
PATREON : www.patreon.co...
Courses on Udemy
================
Java Programming
www.udemy.com/...
Data Structures using C and C++
www.udemy.com/...
C++ Programming
www.udemy.com/...

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1,2 тыс.   
@rishisingh1296
@rishisingh1296 2 года назад
Why to worry when you have Abdul Bari
@dossexplores
@dossexplores 3 месяца назад
Dei avanthada periya velaya pathutu poitan 😂😂
@vishalrajal
@vishalrajal 3 месяца назад
​@@dossexploresyean enna achu
@giannismaris13
@giannismaris13 3 года назад
this man deserves a nobel or something. You are Ω(2^n) times better than my teacher!
@muhammadusama5329
@muhammadusama5329 2 года назад
hey, No teacher is better or worse. A teacher is a teacher and we have to respect every teacher around us. If you feel your teacher is not suitable for your mindset then change your path. No offense. Thanks.
@sushantatimalsina9064
@sushantatimalsina9064 2 года назад
@@muhammadusama5329 oh yeah your vision matters
@sircosm
@sircosm 2 года назад
@@muhammadusama5329 Very well said! All teachers deserve respect for what they do. There will always be some exceptions but even they should be respected for their passion and dedication towards this noble profession.
@PureAsbestos
@PureAsbestos 2 года назад
@@muhammadusama5329 You clearly haven't had a class with a professor who teaches so poorly that more than half the students fail or drop out. There is such a thing as bad teaching.
@tuskoub
@tuskoub 2 года назад
@@muhammadusama5329Counterexample: My professor falsely accuses students, ruins their lives with the accusation, blocks students from receiving tutoring or seeking help, has driven other professors away, and gloats about his high (nearly 70%) fail-rate. His algorithms assignments have nothing to do with what he teaches. There are no other options at this school and you can't transfer the class in. My teacher is absolutely the worst, ever.
@samudragupta719
@samudragupta719 5 лет назад
While others were struggling I just rocked in VIVA ! Showed full iteration. Thanks a ton Sir. Looking forward more from your Pandora's box. Take my humble regards 🙏
@arkasingha6111
@arkasingha6111 3 года назад
Bro what do u study???
@rapahel3717
@rapahel3717 3 года назад
@@arkasingha6111 DAA or Design and Analysis of Organisation
@fathimashahana9594
@fathimashahana9594 3 года назад
Hjjjkjlĺo9
@pkyadav6230
@pkyadav6230 2 года назад
@@fathimashahana9594 wt f babe
@Aspect_GT
@Aspect_GT 2 года назад
@@pkyadav6230 nice go say it to your mom also
@akashsaxena2590
@akashsaxena2590 6 лет назад
i have not enough words to thank you.I had spine injury 2 years ago.So i am in wheelchair .With your help i have completed my degree. Really thank you sir. God bless you sir
@yashdeepsingh1519
@yashdeepsingh1519 9 месяцев назад
lmao
@cityisbetter
@cityisbetter 5 месяцев назад
@@yashdeepsingh1519 dude wtf 😂, why would u "lmao" this comment
@singhshrankhala
@singhshrankhala 4 месяца назад
i hope you're better now.
@fayezchamp9365
@fayezchamp9365 2 месяца назад
Meaning of imao?​@@cityisbetter
@cityisbetter
@cityisbetter 2 месяца назад
@@fayezchamp9365 its L M A O not i, Laughing My Ass Off
@divijjain4674
@divijjain4674 3 года назад
Remember to always write the weight in ascending order on the left of the table.
@jay-rathod-01
@jay-rathod-01 3 года назад
bro did you watch the video.
@haidershahid371
@haidershahid371 3 года назад
@@jay-rathod-01 He is not wrong
@theundescribable1643
@theundescribable1643 2 года назад
i dont think it is necessary as by the end all of the objects are considered and you would have filled the cells with maximum profit
@liammeck1379
@liammeck1379 2 года назад
Just for future readers: the order of the items does not matter; no need to sort them. ``` import random m = 8 p = 1, 2, 5, 6 w = 2, 3, 4, 5 items = list(zip(p, w)) random.shuffle(items) results = [0] * (m + 1) for item_profit, item_weight in items: for target_weight in range(m, item_weight - 1, -1): results[target_weight] = max(results[target_weight], results[target_weight - item_weight] + item_profit) print(results) ```
@-BONDLAMADHURI
@-BONDLAMADHURI Год назад
​@@theundescribable1643aq1
@MichaelJohnson-Moonlight
@MichaelJohnson-Moonlight 5 месяцев назад
It was easy to understand. Thank you, professor.😎
@vivek__pandey
@vivek__pandey 6 лет назад
your way of explaining is best among all videos.
@vbvgtm
@vbvgtm 6 лет назад
Vivek Pandey achcha Bhai pandey😂😂 bilkul shi kaha
@vivek__pandey
@vivek__pandey 6 лет назад
Exam kesa gya bro , mera to first class gya...
@CreatingUtopia
@CreatingUtopia 5 лет назад
agree
@BackToBackSWE
@BackToBackSWE 5 лет назад
nah fam, check me out :) I cover this topic
@nagamanikilari2996
@nagamanikilari2996 5 лет назад
@@BackToBackSWE you explained string edition so well
@sanilasabu5864
@sanilasabu5864 5 лет назад
Thank you for this amazing lecture sir.. Wonderful explanation. Clear.
@smrjt9102
@smrjt9102 4 года назад
SET method for solving 0/1 Knapsack starts at 19:26. And for Tabular method watch the lecture from the beginning. Thanks
@rawnakfreak3539
@rawnakfreak3539 Год назад
🤣 thanks
@aarushitiwari4787
@aarushitiwari4787 Год назад
Hey can you tell me that while we eliminate an ordered pair using dominance rule...so for applying that rule our ordered pairs should be arranfed in ascending order of profits right??
@adarshsharma7229
@adarshsharma7229 8 месяцев назад
yes profits should be in ascending order @@aarushitiwari4787
@adityaranjansahoo6261
@adityaranjansahoo6261 8 месяцев назад
@@aarushitiwari4787 arranging the weights in ascending is the key here...because then we always check which prev weight to include or not
@anything1154
@anything1154 2 месяца назад
Tomorrow exam 😅
@saitejasherla1551
@saitejasherla1551 2 года назад
Amazing thing is , you don't need any institute but student's like us need you most sir 🙏🏻 For your teaching experience and explanation take a bow👏🙌💯
@GretgorPooper
@GretgorPooper Год назад
Perfect lesson! So well paced and comprehensive.
@gameboyatron1405
@gameboyatron1405 4 года назад
Besides actually learning what I need to know, the best part about these videos is how nice and respectful everyone is
@Forexx_boy
@Forexx_boy Год назад
Pasd hua kya😂
@ritikraj.18
@ritikraj.18 6 лет назад
Words are not enough to Thank you Sir! After going through a lot of videos, finally i found something which has cleared all my doubts regarding this problem. Thankyou 🙏🙏
@adamberry7536
@adamberry7536 4 года назад
Watching your videos is when it really clicked for me that I need to drop the just-show-me-the-code-already mentality. Interviewers are more interested in this level of understanding than regurgitating flawless code on a whiteboard. If you take the time to watch videos like this you can write the code yourself because you really understand the underlying algorithm.
@michaelkochka7668
@michaelkochka7668 3 года назад
Love your videos! Just purchased your data structures course on Udemy because you explain things so well.
@sankararaoijjada4786
@sankararaoijjada4786 3 года назад
I will be graduated by watching these videos only rather than listening my faculty lectures ❤
@abuzaformohammedaman9205
@abuzaformohammedaman9205 3 года назад
Same bro
@sumant9120
@sumant9120 3 года назад
Breakdown of the formula: ⭐V: DP table which stores values of subproblems ⭐V[i, w]: Maximum profit by considering the first 'i' elements in a bag of weight 'w' ⭐V[i-1, w]: Case when the current object is not included(~0) and the bag with current weight 'w' must be filled with the maximum profit possible (stored at 'i-1') ⭐V[i-1, w-w[i]] + p[i]: Case when the current object is included(~1) and the remaining part of the bag 'w-w[i]' must be filled with the maximum profit possible (stored at 'i-1') (~ Hence the name 0/1 knapsack problem)
@varun6480
@varun6480 2 года назад
My brain got damaged
@swarnaislam8528
@swarnaislam8528 2 года назад
Thnx
@jaideepsingh7955
@jaideepsingh7955 2 года назад
why 0/1 knapsack needs a 2d array to memoize whereas house robber needs 1d array ? both are similar problems
@anshgoel2607
@anshgoel2607 2 года назад
@@jaideepsingh7955 In house robber we calculate Profit/weight where as in 0/1 Knapsack we can't divide the objects thus we store the profit value..
@panchalmahidilip9415
@panchalmahidilip9415 2 года назад
Brain left
@jhguygih
@jhguygih 4 года назад
I've watched 95% of the alghoritms playlist. I sure own this teacher some money, is to much work done. How do we support him?
@rishabmallick6
@rishabmallick6 4 года назад
He has a patreon link in the description of this video
@BrokiesOfficial
@BrokiesOfficial 2 года назад
Sir why did you stop uploading videos you are great please continue it 🙏 dsa , java, courses etc. all my concepts are clear by your videos. I humbly request u to start uploading again.
@savirc84
@savirc84 Год назад
His course available on Udemy
@dinushachathuranga7657
@dinushachathuranga7657 Год назад
You are born to teach complex concepts in a simple way. Bunch of thanks sir❤❤💫
@MuffinLucas
@MuffinLucas 3 года назад
A simple white board and you blow most teachers out of the water. You are a VERY gifted teacher and I thank you!
@-_RonyMir
@-_RonyMir 4 года назад
sir ,whenever i watch you explaining a topic one word pops up in my head "Learning sometimes seems Beautiful! and this is the way we should learn something".
@yourealive1
@yourealive1 Год назад
13 words hai bhaisaab
@neelamanikanta7137
@neelamanikanta7137 6 лет назад
Thnqs sir....u delivered the prblm in a simple English and in understandable way....It is very helpful to the students
@amitkumarchoubey2003
@amitkumarchoubey2003 Год назад
गुरू ब्रह्मा गुरू विष्णु, गुरु देवो महेश्वरा गुरु साक्षात परब्रह्म, तस्मै श्री गुरुवे नमः 🙏🚩🚩🙏 इम्तिहान में सर्वदा अवल व बेहतर अंक आए 🙏🙏🚩🚩🛕🛕💐💐🪔🪔🌞🌞😊😊🕉️🕉️🕉️🛕🛕🚩🚩🙏🙏🌹🌹🌷🌷⛳⛳😃😃🇮🇳🇮🇳👏👏🦚🦚
@amitkumarchoubey2003
@amitkumarchoubey2003 Год назад
Great Gurudev Ji 🙏🙏🌹🌹🙏🙏⚽⚽🤗🤗💖💖💯💯🇮🇳🇮🇳⛳⛳🌹🌹🚩🚩🕉️🕉️🛕🛕🌞🌞🌸🌸📚📚🌺🌺🎈🎈🎯🎯💓💓✅✅💯💯🇮🇳🇮🇳🙏🙏
@Gamer_Harsh-i8s
@Gamer_Harsh-i8s 9 месяцев назад
In 9:35 what do you mean we will consider 2 and 4?? Like why you should specify your reason right?
@affafa100
@affafa100 3 года назад
This might help somebody: In the last row of tabulation method, the formula basically says we are checking the max of: 1) the best profit we have till now for a bag with weight w, versus 2) if we put current item, the profit we could have + the max profit in remaining bag capacity we calculated. So, for e.g. consider 7kg bag. 5kg we put for last row item. Remaining 2. What's the best profit we can have with that 2kg.
@samhita2917
@samhita2917 3 года назад
Hey, we do that formula just at last row right..??
@affafa100
@affafa100 3 года назад
@@samhita2917 Yes.
@Satvik47
@Satvik47 11 месяцев назад
Sir but this approach is not applicable for every question for eg - Weights: {3, 4, 6, 5} Profits: {2, 3, 1, 4} The weight of the knapsack is 8 kg The number of items is 4 how to do this question
@haidershahid371
@haidershahid371 3 года назад
Amazing sir. I simply love it when you release an "Acha" During your lecture
@hmm7458
@hmm7458 3 года назад
haha.. can't hold his Indian back for long
@cynthiachristelle
@cynthiachristelle 2 года назад
thank you so much!!! i'll make sure I mention your name during my degree acceptance speech
@theoneinyou2233
@theoneinyou2233 5 лет назад
Here i found how many future engineers are struggling like me to understand.... Yeah classroom teaching sucks...
@gourabchanda6427
@gourabchanda6427 Год назад
Best approach to solve any dp: 1. Learn to develop recursive logic from scratch. (TC is worst, you might end up with TLE) 2. Memoize the same recursive logic. (optimize TC but end up using extra space. SC is probably worse now) 3. Learn the art of transforming recursive logic to tabular. (you end up saving call stacks) 4. Optimize the space complexity as well. (now you have optimized space as well) PS: thank you sir, if you weren't there, probably many wouldn't have tried in the first place.
@alexwhitewood6480
@alexwhitewood6480 Год назад
Love the explanation! Can you elaborate what is meant by TC, TLE and SC?
@gourabchanda6427
@gourabchanda6427 Год назад
@@alexwhitewood6480 TC : Time complexity TLE: Time limit Exceeded SC: Space complexity
@stormblessed30
@stormblessed30 5 лет назад
The good thing is, even if you watch at 2x the speed, you can still understand
@mohit6673
@mohit6673 4 года назад
Lol
@zainerikat4704
@zainerikat4704 4 года назад
really made my day
@govindjangid6201
@govindjangid6201 2 года назад
Thank you sir .. very well explained 😊
@engineerhiteshahuja
@engineerhiteshahuja 4 года назад
I wish we had such great material during our college days. Huge thanks to you!! Keep rocking.
@kausikdevanathan192
@kausikdevanathan192 5 месяцев назад
Thank you so much for your explanation sir, it was very clear and left no room for ambiguity. Really appreciate the efforts you make for us! Thanks again!
@UR.RONAIDOO
@UR.RONAIDOO 11 месяцев назад
Thankyou sirr😉😉
@charulpatel7003
@charulpatel7003 Год назад
why youtube has the best faculties ??? and colleges don't .......OUR EDUCATION SYSTEM NEEDS SUCH TEACHERS
@haiderwaseem8355
@haiderwaseem8355 2 года назад
I tried to learn it from people but salute to this guy. He's Amazing!!! Thank you so much.
@UpdateWithAstro
@UpdateWithAstro 4 года назад
Best channel on RU-vid for DAA Stop wasting time on finding others channel just follow this channel
@nuwantattygalle5645
@nuwantattygalle5645 4 года назад
and this udemy course is also super nice
@vipulahuja2044
@vipulahuja2044 5 лет назад
Sir, I have never studied before the set method of 0/1 knapsack, after watching this video, i got to know about the set method which is very easy method, Thank you so much Sir
@shreyaarya2885
@shreyaarya2885 5 лет назад
The second method was much easier... N i watched your other videos as well ... Really useful for my DAA exam preparation... properly explained all steps
@brockobama257
@brockobama257 Год назад
but its 2^n bro
@Hayleeyyo
@Hayleeyyo 5 лет назад
Sir you saved my life, I’m from university of Toronto, computer science specialist, I have adhd and always fell asleep in class, I found it’s hard to follow with my professor, but your videos made the topic understandable and interesting !!
@AkshatSinghania
@AkshatSinghania 2 года назад
lmao , university of toronto is awesome , good luck with classes
@gamerboy-su1uq
@gamerboy-su1uq 2 года назад
So you have Schizophrenia as well?
@ConverttoHinduism
@ConverttoHinduism Год назад
University doesn't matter, knowledge matter. People who don't get seats here in India go to Toronto University
@MK-zf6or
@MK-zf6or 10 месяцев назад
@@ConverttoHinduism indians love to go to canada lol, UofT is far superior than anything in India we see indians go to canada for education but never a canadian who went to india 😂
@shahriarmim4696
@shahriarmim4696 5 лет назад
1:06 a mosquito left his classroom!
@girishpareek7617
@girishpareek7617 4 года назад
Fan of Sherlock huh!
@DaniloTeodoroTI
@DaniloTeodoroTI 4 года назад
It came back at 19:24 for the explanation using the Set method
@theonlyvhk28
@theonlyvhk28 4 года назад
lol
@RitikSharma-pc5yj
@RitikSharma-pc5yj 4 года назад
hahahahh
@avinandanpal4521
@avinandanpal4521 4 года назад
It came back at 1:55
@kartikpeddinti487
@kartikpeddinti487 6 лет назад
thanks a Ton for the set method.Great explanation sir.Your video order almost matches with my syllabus.You are my DAA exam saviour
@sripeddada8708
@sripeddada8708 6 лет назад
Hahahaha Even mine😘😘
@tejaswidutsharma6819
@tejaswidutsharma6819 6 лет назад
my too
@hotaru6765
@hotaru6765 6 лет назад
me too....in my case it's ADA subject
@comedyvinesvkb2721
@comedyvinesvkb2721 6 лет назад
Peddinti Kartik cmt Ĺugj
@maheshvangala8472
@maheshvangala8472 6 лет назад
Even mine too
@Axayubale
@Axayubale 5 лет назад
You are not teacher you are god of computer science...hats off u sir
@sanemind5712
@sanemind5712 2 года назад
Well I have my algorithm exam tomorrow and honestly I don't like to read algo .. i was depressed that I might fail on my exam but then I found your channel and started learning ... And i'm quiet sure that I'm not gonna fail atleast ... Your videos really helped me a lot .. thank you so much sir ... Thanks a lot
@53_ananyayadav73
@53_ananyayadav73 4 месяца назад
Truly sir, watch many 0/1 knapsack video, got too puzzeled, how to solve this tabulation, readings article for the same, but gets on the sport clearation here, thank u so much sir for sharing ur vast knowledge with the students like us
@ritamdas8641
@ritamdas8641 3 года назад
Thank you sir for your kind knowledge. One request sir, please upload an another video of hash function using Linear probing approach. Again Thank You.
@sagarmistry6210
@sagarmistry6210 2 года назад
There teachers are freely available on RU-vid, whereas after paying lacs of rupees, we don't get such tutors in our colleges. This is true Digital India.
@praveenakushwaha9221
@praveenakushwaha9221 3 года назад
Sir, you cleared all confusions. Thanks a ton, You made it very easy to understand.
@goodje07
@goodje07 Год назад
After watching, my understanding is much better, but I still have 3 questions. 1. we must sort the items by weight first? 2. in the example, the profit is higher as the weight get higher, that means, you will always choose the heavier weight as you have a bigger sack, what if the profit is smaller than the one's with lighter weight, for example, item 1 has a weight of 1 and profit of 2, item 2 has a weight of 2 and profit of 1, now the iterator goes to item 2, the sack capacity is 2, is the profit 1(item 2's value) or 2(item 1's value) to be filled to the table v{2, 2}? if I understand correctly, if the iterator goes to item 2, we will choose item 2, so the profit is 1 instead of 2, in this case, how do we know what the max capacity is when the sack's capacity is 2?(It should be 2) 3. how you result in getting the formula, what is the reasoning process?
@michelletan4249
@michelletan4249 2 года назад
the best professor I ever had, professor Abdul Bari is amazing!
@naveen4421
@naveen4421 2 года назад
Yup
@SrinivasAdapa
@SrinivasAdapa 3 года назад
I am getting confused while creating the table for this problem - can you please solve this problem using the tabular method 0/1 knapsack problem - wi - (2,3,5,7,1,4,1) and respective profits are pi - (10,5,15,7,6,18,3) using dynamic programming. Thanks in advance.
@abhineelnandi9552
@abhineelnandi9552 3 года назад
First of all sort both the array wrt to wi arr in increasing order. Then try to make the table
@shuaib3788
@shuaib3788 3 года назад
This dude is a legend or what ??? ! His calmness , calms my soul! .,.. *Cries* !! Keep it up Bari Bhai
@stith_pragya
@stith_pragya Год назад
Thank You So much sir for this amazing and very very helpful video......🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@TsuharesuLuciel
@TsuharesuLuciel 5 лет назад
I liked the explanation of the formula and how it works, but I missed how that formula was achieved. I had to do some thinking of what the table really means and what is saved in there. For example, why am I getting the number from previous row and the column minus the current weight? Except from that this is a superb explanation. Thanks so much!
@nikithanikki3398
@nikithanikki3398 Год назад
Hey guys I haven't watched the playlist yet... but can someone confirm if sir has explained code as well for all the algorithms?
@AdamWhitakerWilson
@AdamWhitakerWilson 6 лет назад
Saving my life just in time for finals! Thank You!
@obliteratedcisco4709
@obliteratedcisco4709 3 года назад
wait u dont think he is ugly tho that was slightly off-putting lol 😅
@VaibhavShewale
@VaibhavShewale 5 лет назад
2nd method is little confusing
@gyanimanushya2696
@gyanimanushya2696 4 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-VJbnWKUw-jw.html try this
@mmqkl85
@mmqkl85 3 года назад
@@gyanimanushya2696 lol what
@AbdulMalik999
@AbdulMalik999 3 года назад
Thank you Mr. Abdul Bari. I am grateful for your lectures.
@harshita6683
@harshita6683 Год назад
Bhai this is the best explanation ever😭
@mayurisanjaynikam202
@mayurisanjaynikam202 4 года назад
Seriously sir just because of you i feel relax ....i was just in depression of this type of examples cause i thought it takes lot of time ...but you proved me wrong .. thanking you sir
@mohammadyousef2812
@mohammadyousef2812 5 лет назад
i pray Allah award you jannah for this explanation. Thank you so much.
@nohaelhaddad4425
@nohaelhaddad4425 3 года назад
AMEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEN
@abuzaformohammedaman9205
@abuzaformohammedaman9205 3 года назад
Right bro
@KingBobXVI
@KingBobXVI 2 года назад
Well explained and easy to understand - though there's a mistake I think at around 18:20 where you say to subtract the profit of the item to get what to search for in the previous row, but you should be subtracting the weight of the chosen item from the weight of the bag (8-5 = 3) to get the column of the previous row(s) to check for inclusion. This more intuitively makes sense to me as well, because you're ultimately just splitting the problem into smaller sub-problems - you've chosen the 4th item to include in the bag, and now you're looking at the previous row to determine what was the optimal solution for a bag of size 3, now that the _remaining_ weight you have to work with is 3. The additional profit you can add to a bag of size 3 is 2, so the rest of the explanation is the same. With that correction, I think the explanation is good enough as well that it's really easy to expand from a 0/1 solution to a 0/n solution (including as many of each item as you want).
@fardinalam7290
@fardinalam7290 9 месяцев назад
i think 8-6 =2 used because max profit for bag is 8 and 8 is located in 5th row which is wight 5 which selected for including in bag. and then maximum profit is 8 5th row profit is 6 then 8-6 = 2 , and now we have to search in which row profit 2 is located which is 3rd row of weight 3 so in bag{wi 3,5} selected with max profit 8. please correct me if i am wrong
@KingBobXVI
@KingBobXVI 9 месяцев назад
@@fardinalam7290 - I think that's incorrect, you want to subtract weight because that's the bounded variable. You want the most profit per unit of weight, and there's no limit to potential profit. Conceptually, you're solving sub-problems until you reach the final query. If ƒ(8) says the optimal item to take is weight 5, then you add its value, and query with the remaining bag capacity for ƒ(3), repeat until done. You don't want to take off the price, because that's a different unit than your input variable of weight. Note: I haven't watched this in a while, so I'd have to review it to be sure. I recommend solving the problem on paper, it helps give a better understanding of how it works. Especially if you explain it to someone else. However, that gave me an idea - it could be interesting to add another bound for this to limit the price as well - rather than taking items worth as much as possible like some kind of heist, maybe you're instead buying so you want to keep the price low, haha.
@varun6480
@varun6480 2 года назад
*My brain stopped working.exe*
@hjklmn9526
@hjklmn9526 3 года назад
110% marks to you sir.. This is a very complicated problem to understand. But after going through this video and actually drawing it in notebook i found it actually very easy..
@omprakashdewangan798
@omprakashdewangan798 5 лет назад
Sir, all video lectura are excellent. Can u suggest list out algorithm for minimum spanning tree in terms of DAA? Kindly suggest!!!
@namansingh7721
@namansingh7721 4 года назад
I was expecting a little more of concept involved rather than just formula
@ChitrankDixit
@ChitrankDixit 3 года назад
great one, the best explanation I have found for knapsack is this one, great work sir.
@bhuvneshmahajan6573
@bhuvneshmahajan6573 6 лет назад
It was easy to understand. I'm grateful to teachers like you for your great way of explaining concepts of C.S.E.
@shubhamdalvi9347
@shubhamdalvi9347 4 года назад
Get this man a shield of subscribers! U are saving ur time ...for understanding these problems. Keep working and THANKS IS ADVANCE FOR FUTURE VIDEOS.
@madhavgupta3976
@madhavgupta3976 4 года назад
Your method is the easiest, which explains the two method. It makes the algorithm easy to understand. Thanks a lot sir.
@sharwanigarisa7910
@sharwanigarisa7910 3 года назад
Sir can you please explain algorithm for these topics Dynamic programming: General Method, Multistage graphs, All-pairs shortest paths, Optimal binary search trees, 0/1 knapsack, the traveling salesperson problem.
@sharwanigarisa7910
@sharwanigarisa7910 3 года назад
Sir please reply
@the_mia_mia
@the_mia_mia 5 лет назад
Wow, thank you so much, I've been struggling with this and you explained it so nicely!! Excellent job!!
@pratiktata3388
@pratiktata3388 6 лет назад
*1.25 thank me later
@KevrenBey
@KevrenBey 3 года назад
king of the algorithms ...thanks from Turkey..
@alexandrag.6680
@alexandrag.6680 2 года назад
very detailed and simple-explained lecture.One question.If they ask us for the optimization function,will our answer be the Table formula? and whats the cost/time complexity of the Table method?
@priscillabenedetti4182
@priscillabenedetti4182 3 года назад
This is the clearest explanation of the knapsack problem I've ever found online, thank you sir!
@rohankalkumbe6800
@rohankalkumbe6800 9 месяцев назад
Excellent ❤ Sir-G 🫶🏻
@siddharthasriramvinjam167
@siddharthasriramvinjam167 5 лет назад
Seriously I owe you a lot as your way of explaining the concept is very helpful to below average students like me. Thank you so much Sir.
@vaidiksharma1187
@vaidiksharma1187 10 месяцев назад
kya sir aapke padhane ka tarika bohot galt hai zaruri formula last me batate ho kuch samajh hi nahi aaata esa hi appne optimal binary search me kiya tha puri video me kuch samajh nhi aaya tha.
@_outcyrptolist
@_outcyrptolist 4 года назад
Assalamualikum Sir ! Your videos are precise and to the point ! Provides decent understanding of the topic ! No words to thank you .
@harish_madhan
@harish_madhan Год назад
Dear Sir, Only the Genius mind can give these kind of explanation and make it looks simple. You are genius sir. Thanks a lot for sharing tremendous knowledge to us. According to me, for this moment. I can see the God in you that shows a way for my well being. You are the GOD ❤
@audreygoveas1239
@audreygoveas1239 5 лет назад
You're the best! You teach in such a way that we understand the concept entirely!
@alltube4227
@alltube4227 3 года назад
well explained sir!!,I wish you were my teacher....Thanks a ton for the video sir!!
@manuzsanand
@manuzsanand 6 лет назад
Do we have to list the objects with increasing order of weight or profit? (To the left of the table). In this example, the profits and weights were equally incrementing so I couldn't differentiate.
@satishchandramedi9729
@satishchandramedi9729 4 года назад
if the profits are not in increasing order with weights then this method will fail
@pragmatic_p8
@pragmatic_p8 3 года назад
@18:30 rather than subtracting profits from 8,can we subtract weights to know what are objects included?
@majidzarinkolah
@majidzarinkolah 3 года назад
In w - w[i] expression, the first w refers to the capacity and the second w refers to the weights list. It would be better to rename one of them. for example declaring the capacity as c. totally the way of teaching is delicious and the teacher has so much of charisma. Thanks to him!
@sogatturlakshmi1245
@sogatturlakshmi1245 9 месяцев назад
Sir, when you excellently explained the logic for three rows, then for fourth row I really don't care about what the formula is. Because I understood the concept well. This is the actual way of explaining things to students. They should not be told the formula first. The concept should be explained first. Then the formula should be told. Then students can easily relate both of them together 🙂. Thank you so much for this video sir.
@md.nayeemhasanadil5938
@md.nayeemhasanadil5938 4 года назад
without you sir what would we do. You are the savior of computer engineering students
@shubhragarg875
@shubhragarg875 4 года назад
why did you filled the rows with 111111 or 33333 , when in bag we can only have 2+3=5 objects at 8:21. Please clarify!!
@sagaralwani75
@sagaralwani75 4 года назад
He is filling it by 3 because knapsack capacity is much large and weight is the same that can be placed inside it, see weight is same for each row..
@EXO_and_ENHYPEN_GaveMeBirth
@EXO_and_ENHYPEN_GaveMeBirth 5 лет назад
THE BEST TEACHER EVER !!! VERY WELL EXPLAINED #THANK_YOU_SIR !
@georgepaul8808
@georgepaul8808 Год назад
Sir your explanation is incredibly helpful! Thank you
@aakarshilangovan8284
@aakarshilangovan8284 3 года назад
thank you so much sir. this lecture really helped me a lot
@marck-edwardkemeh9899
@marck-edwardkemeh9899 5 лет назад
can we have a video on greedy algorithm for a 52 deck card problem? with two players. one of the players uses the greedy method while the other uses optimum results
@samaypashine
@samaypashine 5 лет назад
It is best explanation video of knapsack. Thank you sir!!
@shivamanand8998
@shivamanand8998 3 года назад
There is a better way to understand the formulae max(profit when you include the object,profit when you don't include it ) This way makes the formulae more clear and easier to understand.
@nitinnindane9775
@nitinnindane9775 6 лет назад
Thank you so much sir I wasn't getting the set method but because of you I am now able to solve problem using it You are a great teacher sir .You are doing a great job. It will help me in passing the exam
@TOI-700
@TOI-700 3 года назад
Excellent, explanation at its best,thank you sir,it greatly helps to tier 3 college students,sir ❤️
Далее
3.1 Knapsack Problem - Greedy Method
15:30
Просмотров 2,3 млн
Провал со стеклянным хлебом…
00:41
🛑самое главное в жизни!
00:11
Просмотров 132 тыс.
Шоколадная девочка
00:23
Просмотров 821 тыс.
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
3.2 Job Sequencing with Deadlines - Greedy Method
13:29
7.3 Traveling Salesman Problem - Branch and Bound
24:42
Провал со стеклянным хлебом…
00:41