6.2 Sum Of Subsets Problem - Backtracking

  Рет қаралды 1,352,834

Abdul Bari

Abdul Bari

6 жыл бұрын

Sum of Subsets problem
PATREON : www.patreon.com/bePatron?u=20...
Courses on Udemy
================
Java Programming
www.udemy.com/course/java-se-...
Data Structures using C and C++
www.udemy.com/course/datastru...
C++ Programming
www.udemy.com/course/cpp-deep...

Пікірлер: 418
@monishpidugu5134
@monishpidugu5134 3 жыл бұрын
Excellent sir I slept while my professor was teaching during my online classes but tomorrow I'm having my exam and I am watching your video's it was very helpful
@worldvieweye
@worldvieweye 2 жыл бұрын
👍🏻👍🏻
@srujangurram
@srujangurram 2 жыл бұрын
Same bro, hope you scored good in your exam
@monishpidugu5134
@monishpidugu5134 2 жыл бұрын
@@srujangurram yeah bro I scored 80 percent in my sem end examination
@srujangurram
@srujangurram 2 жыл бұрын
@@monishpidugu5134 that's awesome ! we have exam tomorrow. hope i does well too 🤞
@ingloriousmedia3096
@ingloriousmedia3096 2 жыл бұрын
I read I slept with my professor 🤣
@manish4275
@manish4275 5 жыл бұрын
Even my professor watches ur videos! If she forgets something we say her video is buffering 😂😂
@bharamberishikesh508
@bharamberishikesh508 5 жыл бұрын
My Professor Watches too but shortly explains algorithm 😂
@anupriyaranjan8966
@anupriyaranjan8966 5 жыл бұрын
You got me at "buffering" 😂😂
@karamchauhan7860
@karamchauhan7860 4 жыл бұрын
@@anupriyaranjan8966 Mam aap yaha 😄😀😄😀😄
@Randude14
@Randude14 4 жыл бұрын
DEAD
@ManishKumar-rz9ub
@ManishKumar-rz9ub 3 жыл бұрын
Possibly you will get the same question in the exam 😂😂
@ayounghosh9218
@ayounghosh9218 5 жыл бұрын
beautifully explained, amazingly clear videography, easily understandable hand writing, simple examples, clear simple English speech so that everyone can understand, slow paced speech so that anyone can grasp the concept, clear audio and the best part is the calm attitude of explanation, just everything that is needed for a perfect explanation, your channel has it.
@unscripted_india
@unscripted_india 6 жыл бұрын
Hit like if you have exams tomorrow and are watching this for end semester.
@Pankajkumar-dy9ef
@Pankajkumar-dy9ef 6 жыл бұрын
yes
@abhinavsharma8395
@abhinavsharma8395 5 жыл бұрын
yes bro
@rishiraj8416
@rishiraj8416 5 жыл бұрын
Hit like i have exam today 😂😂😂😂
@carlosgallegos1265
@carlosgallegos1265 5 жыл бұрын
If I watched this as my last resource the day before having an exam, I wouldn't pass anything. It's good to take a first glance, or to break apart a problem and solve it, but not as an academic foundation. Step up your game, don't be lazy.
@TheRegalstreak
@TheRegalstreak 5 жыл бұрын
@@carlosgallegos1265well it depends on person to person. I'm used to studying on the last minute and KZbin videos are my last resort if I don't understand anything from books and Abdul Bari has been like a God to me literally. I wasn't much into algos and I'm really interested to get into this more. The teachers we have are too underpaid and are not as qualified as well as don't have their concepts clear some of the times. Having a community online helps us help one another and get info quickly without looking into 100s of pages lol.
@alexisxander817
@alexisxander817 6 жыл бұрын
You are such an amazing teacher; everything you explain is understood by me at once, and I am not even a meritorious student lol... thank you
@yashspr
@yashspr 6 жыл бұрын
I have never come across a better teacher than you sir. Hats off!
@NguyenTuan-ek1pv
@NguyenTuan-ek1pv 2 жыл бұрын
The best teacher ever on KZbin. +1 vote!
@XYZ-nz5gm
@XYZ-nz5gm 2 жыл бұрын
not many people can explain this well even though they understand inside out. You did a really good job!
@Deepak-jk1eh
@Deepak-jk1eh 5 жыл бұрын
because of your videos i study only one night before of exam ,you r making every student life very easy by just giving these all videos in free ,so thanks you sir .
@gaurav_jha
@gaurav_jha Жыл бұрын
Just brilliant, it's a privilege to have a teacher like you.
@gnanajeyam6259
@gnanajeyam6259 3 жыл бұрын
The way you are explaining the recursion (DFS) is the unique skill you have. I appreciate your time for making this video's. Hope this will helps many people.
@kurru_kamiz3458
@kurru_kamiz3458 11 ай бұрын
does not sound like a compliment
@sumanthn5120
@sumanthn5120 10 ай бұрын
​@@kurru_kamiz3458why?it did sound like one
@f4lld4ark3
@f4lld4ark3 6 жыл бұрын
Best video professor, much hq quality, very nice kanimambo
@MBindu-kc2nj
@MBindu-kc2nj Жыл бұрын
Very helpful sir thank you. Initially I thought your videos are too lengthy but now I realized your way of teaching is the best.
@michaelekoka3263
@michaelekoka3263 10 ай бұрын
This is an excellent explanation for the backtracking technique to solve this problem. An important precision about this approach, that is missing from the video and that may trip up or confuse the problem solver is that the *weights must be positive*. Without this precision, the bounding function doesn't make sense, since at the time we exceed the target sum during traversal, a later negative weight could bring it to target. So this backtracking approach works only if the weights are positive.
@ahdibiaimene3588
@ahdibiaimene3588 2 жыл бұрын
You deserve all my respect sir , such a great teacher i wish you all the best
@surajkumar-px5lf
@surajkumar-px5lf Жыл бұрын
I don't go class because I know you will clear my all concept before exam. My teacher also made pdf from your lecture's screenshot. You are truly amazing. Sir
@droptimistic7419
@droptimistic7419 4 жыл бұрын
I was just misunderstanding of something and by seeing this great video all confusions became clear, thank you
@M-aggi-e
@M-aggi-e 6 жыл бұрын
By far the best explanation Sir. Thank you very much.
@rajmourya35
@rajmourya35 3 жыл бұрын
the way of teaching is so unique. awesome content sir.
@adarshshenoy0623
@adarshshenoy0623 5 жыл бұрын
Thank you so much sir for your videos it ws too good and the way your explaining the concepts are not complicated . It helped me a lot thank you once again.
@bk5268
@bk5268 6 жыл бұрын
Tq u sir it is very useful me because tmr my daa exam tq u so much it is one of the my dout how to solve this but now i know how to subsititute
@jimmiejohnsson2272
@jimmiejohnsson2272 Жыл бұрын
Great explanation, good example and very easy to follow. I managed to implement and use this very quickly. Thanks a lot!
@yashjamsandekar5173
@yashjamsandekar5173 7 ай бұрын
Thankyou so much sir !!!!! The way you explained was way more better than any teacher I've came across.
@mekalasailatha8613
@mekalasailatha8613 4 жыл бұрын
It may be any tough sum,u make it easier by your explanation 😊
@ShubhamKumar-wq9kw
@ShubhamKumar-wq9kw 6 жыл бұрын
content is good...including pseudocode explaination would be really helpful
@damansaroa
@damansaroa 4 жыл бұрын
+1
@subinaypanda9936
@subinaypanda9936 4 жыл бұрын
Sir have already explained how to solve the problem. Now it's your task of solving the whole problem.
@codelearner3666
@codelearner3666 6 жыл бұрын
thank you so much, sir, your videos are really knowledgeable and helpful.
@rakshakedlaya8752
@rakshakedlaya8752 3 жыл бұрын
You explained it very well... This video helped me a lot...Thank you so much sir❤🙏
@anaghaprabhu9293
@anaghaprabhu9293 6 жыл бұрын
I appreciate ur work sir. You are really amazing. .
@arafatahmmed263
@arafatahmmed263 4 жыл бұрын
Thn...x for your explanation. Addition or discussion of time and space complexity will make you unique form others.
@marypulapa3743
@marypulapa3743 6 жыл бұрын
Sir outstanding explanation ... Sir really its easy to understand
@cswalker21
@cswalker21 4 жыл бұрын
Thanks Abdul! Very clear walkthrough of backtracking! It helped me greatly. LOL at the inconsequential arithmetic mistake at 6:39! ;) just shows you're human!
@vikasgoutam02
@vikasgoutam02 4 жыл бұрын
I also notice.
@ivandrofly
@ivandrofly 4 ай бұрын
yeah, noticed as well :D
@bharatishinde7169
@bharatishinde7169 6 жыл бұрын
NICE METHODS AND WAY OF TEACHING
@visakh_vijayakumar_
@visakh_vijayakumar_ 6 жыл бұрын
thanks :) only suggestion is @ 6 : 40 it is 27 + 15 =42 ..
@aadarshkumayan5960
@aadarshkumayan5960 6 жыл бұрын
Very informative lecture series for starting with Backtracking
@chandukrishna4809
@chandukrishna4809 4 жыл бұрын
Thanks for the wonderful videos and It would be really helpful if you include writing code for this kind of DP, Back tracking Problems. May be, by watching your code, most people may get essence of "how to write code" for this kind of problems. My request is to include code for at least one problem of such type as including for all will be hectic.
@vinayaktulsian6276
@vinayaktulsian6276 6 жыл бұрын
Very nice sir thank you for helping us one day before our exam , you teach very well.
@GopiNath-pe3qz
@GopiNath-pe3qz 4 жыл бұрын
Alaguseriel Azagu
@tng3100
@tng3100 Жыл бұрын
Just saw this video on morning of my sem exam for 4 min ,dayumm just helped a lot ,didn't expect they would ask this. Guess im so lucky afterall
@NIKHIL-nv8wu
@NIKHIL-nv8wu 5 жыл бұрын
Thank you sir for good video lecture,I can understand easily
@bgminever7436
@bgminever7436 3 жыл бұрын
Sir u will get world's best teaching skills person🙏Award
@footballforyou8856
@footballforyou8856 6 жыл бұрын
Thanks a lot sir.good explanation.
@VipulDhaigude
@VipulDhaigude 4 жыл бұрын
Such simple and excellent explaination.
@francomartnlumovich4323
@francomartnlumovich4323 Жыл бұрын
Very good video. I want to add an improvement to this backtracking. You can add another bonding function, if w array is sorted ascending so X_(i-1) < X_i < X_(i+1) then you know if adding X_i is already greater than m then you kill the node and it's brothers because X_i+1 > X_i
@SahdevSingh-io3qp
@SahdevSingh-io3qp 6 ай бұрын
But sorting also takes some time O(nlogn) and here you are taking time to reduce time, which is meaningless
@snigdhakasimahanthi3963
@snigdhakasimahanthi3963 2 жыл бұрын
Amazing explanation! Thank you very much!
@himanshusingh3056
@himanshusingh3056 5 жыл бұрын
Superb Explanation for this problem !
@ok123ut
@ok123ut 5 жыл бұрын
amazing explanation on this!
@pradeepalluri1195
@pradeepalluri1195 6 жыл бұрын
Very nice explanation sir
@FaKe-rq7cu
@FaKe-rq7cu 3 жыл бұрын
Very good explanation. I had a little doubt, at 8:18 shouldn't it be greater than or equal to 'm' instead of greater than 'm' in 2nd bounding function. Eg if arr = [1,2,3] & sum = 6, then after including 1 ( [1,5] ), the 2nd bounding function will not let it go further (even though taking all elements would have generated the sum).
@anuragjoshi667
@anuragjoshi667 3 жыл бұрын
Yeah, It seems so. Should have been ≥ m.
@mentisdominus
@mentisdominus 3 жыл бұрын
The 2nd bounding function is correct. It should be greater than m. You only apply the 2nd bounding function when descending down the right branch. When you descend down the right branch, it means that x[i]=0. In your example, after [1,5] and descending down the right branch x[2]=0 which means that 2 will not be included in the solution. The 2nd bounding function is telling you that you will not have enough values to reach the sum 'm' because the values going down the right branch will not be included in the solution. So for arr[1,2,3] and m=6, after taking 1 but not taking 2, you can't reach the value m=6.
@peksn
@peksn 3 жыл бұрын
No because if the rest of the weights can't add up to the number you are searching for then why continue? If the sum of your current sum plus the rest of the objects are less than that number then you'll never get it, so you stop.
@rajanarasada2081
@rajanarasada2081 2 жыл бұрын
Super explanation sir I hope this explanation will make all queries clear
@sankeerthreddy9865
@sankeerthreddy9865 5 жыл бұрын
Master of teaching😃
@saicharan8675
@saicharan8675 5 жыл бұрын
Hi Sir, Thanks for the very good explination
@Nagasuhas_Shastry_M
@Nagasuhas_Shastry_M 5 жыл бұрын
Sir please make videos about other core computer science subjects Thank you sir great explanation
@captainsamar
@captainsamar 6 жыл бұрын
Very well explained Abdul
@mandilal94
@mandilal94 5 жыл бұрын
Excellent Teaching sir.Thank you
@itsupport8245
@itsupport8245 6 жыл бұрын
Sir, pls give us code with this problem..
@hitmandevil6935
@hitmandevil6935 5 жыл бұрын
Sir, the way you explain is actually great (it clears the concepts well). But I have a question, how to implement these solutions in a program, how to code these strategies with an efficient implementation. It would be very kind of you if you attach a link in the description (or make some more videos) stating the codes and what's the idea behind its efficient implementation. Thanks in advance....!!!
@vincentrastello720
@vincentrastello720 2 жыл бұрын
Great explanation, much better than my professor
@priyankarangarajan9336
@priyankarangarajan9336 4 жыл бұрын
You take class awesome sir mainly this subset class sir i learn subset sir👌👌👌
@-PriyankaReddy-tk5ti
@-PriyankaReddy-tk5ti 4 жыл бұрын
Seriously ... my professor given same example...I think she watches ur vedios 😂😂😂😅
@samudraladivya992
@samudraladivya992 3 жыл бұрын
Same 😅😅😅
@kingwillbeking3110
@kingwillbeking3110 3 жыл бұрын
Oh yeah, *Vedio.*
@BiswajitDas-lk7pp
@BiswajitDas-lk7pp Жыл бұрын
Same here also
@nikitamishra1126
@nikitamishra1126 3 ай бұрын
Ya same here..even my professor gave the same example🤭
@vinit173
@vinit173 3 ай бұрын
Same 😂
@shilpapushparaj9988
@shilpapushparaj9988 6 жыл бұрын
Excellent teaching 😎😎
@sohaibanwaar5181
@sohaibanwaar5181 5 жыл бұрын
Great Work Sir! Thank you
@henryzhang2992
@henryzhang2992 4 жыл бұрын
The time complexity for this is still exponential. Consider the case where all of the elements are 1 and the last element is massive. If the target sum is less than the less element but more than all the other elements combined, no nodes are pruned
@SahdevSingh-io3qp
@SahdevSingh-io3qp 6 ай бұрын
See the second bounding condition, if the considered weight + total remaining weight is less than target sum, then no need to search further
@SahdevSingh-io3qp
@SahdevSingh-io3qp 6 ай бұрын
At first call, your example will be terminated
@fernandosanchezvillanueva4762
@fernandosanchezvillanueva4762 4 жыл бұрын
Save me the day!! I will see you on Udemy
@balajisolunke4482
@balajisolunke4482 8 ай бұрын
THANK YOU SIR , YOUR EXPLAINATION WAS SO EXCELLENT
@relaxationmusic3535
@relaxationmusic3535 Жыл бұрын
what an explaination just outstanding thanku so much sir
@DhruvPatel-km8kj
@DhruvPatel-km8kj 6 жыл бұрын
Excellent work..
@shoaibshaik1507
@shoaibshaik1507 4 жыл бұрын
Mashallah Sir aap ki class superb...Ur teaching mind-blowing sir 👍
@abdul_bari
@abdul_bari 4 жыл бұрын
Thanks for liking
@vinitsunita
@vinitsunita 5 жыл бұрын
crisp and clear explaination
@RAGHUNATHSINGHBCI
@RAGHUNATHSINGHBCI Жыл бұрын
Thank you sir, I love your explaination😍 just one suggestion keep video time minimum for other video
@gopikrishna1551
@gopikrishna1551 3 жыл бұрын
sir what is the time complexity for this problem? do we consider height as timecomplexity?
@satyamgupta5234
@satyamgupta5234 2 жыл бұрын
Hats off||It helped me a lot thank you once again.
@ItsmeBhanu.19
@ItsmeBhanu.19 3 жыл бұрын
wonderful teaching sir thank u so much
@priyanshigupta1359
@priyanshigupta1359 3 жыл бұрын
best explanation ever , thanks sir
@gsreddy2654
@gsreddy2654 5 жыл бұрын
Thank you sir that was really very helpful
@alfabinomial6183
@alfabinomial6183 4 жыл бұрын
wow !! so intelligent lecture !! sir
@abhishekdubey9268
@abhishekdubey9268 4 жыл бұрын
thank you sir , thank you sooo much sir .....my concept is completely cleared
@santanu3633
@santanu3633 5 жыл бұрын
Thanks.... really nice explanation
@luis-azanza
@luis-azanza 5 жыл бұрын
Amazing, thank you!!
@user-dd4en4jo9e
@user-dd4en4jo9e 4 ай бұрын
This man is a savior.
@svarajdhanulkar1791
@svarajdhanulkar1791 4 жыл бұрын
Sir ji dhnayaavad bot thanku apkaa. Iss sem ka Daa aap hi nikalonge mera😊
@yizhang7027
@yizhang7027 2 жыл бұрын
State-space tree is such an amazing tool. Why haven't I heard about it earlier?
@abmsamsuzzaman4805
@abmsamsuzzaman4805 4 жыл бұрын
To understand the algorithm your videos are awesome. But I would suggest if you could please add the pseudocode at least while explaining the algorithm it would been more helpful.
@sepehrshahsavar9943
@sepehrshahsavar9943 4 жыл бұрын
thank you for your awesome tutorials sir , could you please make a video for monte carlo algorithm ?
@battlefist6884
@battlefist6884 4 жыл бұрын
sir once came to our college , when i was in second year , hope once agian he will come to for gest lecture on DAA
@member828
@member828 4 жыл бұрын
I need to write a paper about the sum of subsets - backtracking, do you have any suggestions for good resources?
@miguelduarte4287
@miguelduarte4287 Ай бұрын
you re the real king, Abdul Bari
@santaram4687
@santaram4687 6 жыл бұрын
Sir what is variable size tuple formation for solving sum of subsets using backtracking???
@c.danielpremkumar8495
@c.danielpremkumar8495 6 жыл бұрын
What if some of the weights/elements were to be negative ? Would it be different kind of problem altogether ?
@pankajkumarprasad1489
@pankajkumarprasad1489 4 жыл бұрын
Best explanation ever 😊
@amirawaheed3714
@amirawaheed3714 2 жыл бұрын
Many many thanks, i understanded it very well
@kamal-kz4xs
@kamal-kz4xs 6 жыл бұрын
Nice sir, can you upload the code?
@mokshjain4623
@mokshjain4623 6 жыл бұрын
great explanation
@sangeethamshare
@sangeethamshare 5 жыл бұрын
Sir, please publish a video for the same problem using DP. Thanks
@irmachan1
@irmachan1 5 жыл бұрын
I love you man. thank you
@noorullahkhan7482
@noorullahkhan7482 5 жыл бұрын
Sir, please upload a video on sum of subsets using dynamic programming.
@nuriagiselaocampo5467
@nuriagiselaocampo5467 Жыл бұрын
Colaboren con este excelentísimo !
@ChillitsmecarlChill
@ChillitsmecarlChill 2 ай бұрын
Ye toh Abdul baari haii ye toh acha bacha haiii, ye duayein sunta haiii, achi baatein batata haii 💆🧘
@mumbaikachallenge5526
@mumbaikachallenge5526 2 жыл бұрын
Beautiful explained❤️
@mohammedadel8948
@mohammedadel8948 2 жыл бұрын
Thank you for your hard work
@huseyinbarin1653
@huseyinbarin1653 3 жыл бұрын
Man, you're really great!!
@sonucksgowda2351
@sonucksgowda2351 6 жыл бұрын
excellent teaching sir
6.3 Graph Coloring Problem - Backtracking
15:52
Abdul Bari
Рет қаралды 1,1 МЛН
6.1 N Queens Problem using Backtracking
13:41
Abdul Bari
Рет қаралды 1,9 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 32 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 75 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 22 МЛН
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
The Algorithm Behind Spell Checkers
13:02
b001
Рет қаралды 408 М.
6.4 Hamiltonian Cycle - Backtracking
18:35
Abdul Bari
Рет қаралды 993 М.
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 266 М.
Germany | Can you solve this ? | Math Olympiad  (x,y)=?
11:02
Learncommunolizer
Рет қаралды 10 М.
7.3 Traveling Salesman Problem - Branch and Bound
24:42
Abdul Bari
Рет қаралды 1,7 МЛН
IMO 2024 Problem 5 - most *TROLL* problem in IMO history?
20:41
Dedekind cuts
Рет қаралды 22 М.
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН