0/1 Knapsack Problem Using Dynamic Programming || Design and Analysis of Algorithms || DAA

  Рет қаралды 117,359

Sudhakar Atchala

Sudhakar Atchala

2 жыл бұрын

#sudhakaratchala #daavideos #daaplaylist
We are having ‘n’ objects and a knapsack or a bag in which the object ‘i’ has weight ‘wi’ is to be placed. And the knapsack has capacity ‘M’.
The profit pixi can be earned, if an object ‘i’ has to be placed into the knapsack.
The objective of the knapsack problem is to fill the knapsack with maximum profitable objects and the sum of the weights of the object is lessthan or equal to the capacity of the knapsack. That is
Maximize ∑2_(𝑖=0)^𝑛▒"pixi"
Purging rule (or) Dominance rule
If Si+1 contains (pj, wj) and (pk, wk) two pairs such that (pj ≤ pk ) and (wj ≥ wk)
then (pj, wj) pair can be eliminated. This purging rule is also called "dominance rule”.
In purging rule basically the dominated tuples get purged that is remove the pair with less profit and more weight.
The formula for solving the problem is
Si+1 = Si U S1i

Пікірлер: 57
@dabbiruhaneesh2714
@dabbiruhaneesh2714 2 жыл бұрын
Happy Teachers day sir.. without you there would be many backlogs in my btech but you made me clear all in the first attempt itself! thank you so much sir for teaching many students like us and helping them to pass their exams ❤️
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@k.venkatamuni943
@k.venkatamuni943 2 жыл бұрын
Ur videos are most useful to btech students sir thank you so much sir ur videos are useful in my exams for that tq so much sir 🙏🙏🙏🙏
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
So nice of you
@VINAY-wg4ul
@VINAY-wg4ul 10 ай бұрын
Your explanation outstanding sir. Thank you sir thank you sooo much❤
@SudhakarAtchala
@SudhakarAtchala 10 ай бұрын
You are most welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@adarinikhil1262
@adarinikhil1262 2 жыл бұрын
Sir what if profits are not in order of purging rule
@allurivishnuvardhanvarma3091
@allurivishnuvardhanvarma3091 2 жыл бұрын
Happy teacher's day sir ❤️ Best teacher ever 😃
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@k.venkatamuni943
@k.venkatamuni943 2 жыл бұрын
Tq for giving useful information
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@s.mahaboobbasha7820
@s.mahaboobbasha7820 Жыл бұрын
U R REALLY GREAT SIR 💕
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Thank you so much 😀 Plz subscribe to the channel and if possible share with your friends. Thanks in advance...
@bhargav5611
@bhargav5611 Жыл бұрын
Nice explanation sir thank you
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
welcome
@vpranathi1237
@vpranathi1237 11 ай бұрын
Tq for teaching knapsack problem
@SudhakarAtchala
@SudhakarAtchala 11 ай бұрын
It's my pleasure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@veerabhadrareddy2133
@veerabhadrareddy2133 2 ай бұрын
Thank you so much sir, your videos are very useful for many b-tech students, keep rocking sir....🤝
@SudhakarAtchala
@SudhakarAtchala 2 ай бұрын
All the best. Plz subscribe to the channel and if possible share with your friends. Thanks in advance...
@sivarajupunju7793
@sivarajupunju7793 Жыл бұрын
TQ so much sir all ur videos are sooo useful to mee
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
So nice of you. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@harshvardhantandon8278
@harshvardhantandon8278 7 ай бұрын
Thank you sir this is the best explanation on KZfaq thanks a lot 😊❤
@SudhakarAtchala
@SudhakarAtchala 7 ай бұрын
You are most welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@harshvardhantandon8278
@harshvardhantandon8278 7 ай бұрын
@@SudhakarAtchala already subscribed your channel 3 years ago and shared with friends as well carry on the good work 😉😄 but plz also tell that how to represent these types of questions in exam question paper in your videos thanks a lot once again 🙂
@the_techreels
@the_techreels 8 ай бұрын
Thank you
@SudhakarAtchala
@SudhakarAtchala 8 ай бұрын
You're welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@khabylamefan48
@khabylamefan48 2 жыл бұрын
Happy Teachers day sir ❤️
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@amitha1135
@amitha1135 8 ай бұрын
Thank you sir
@SudhakarAtchala
@SudhakarAtchala 8 ай бұрын
So nice of you. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@siddireddyvignesh
@siddireddyvignesh Жыл бұрын
Very good explanation sir!! Thank you
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
You are welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@rithvikreddychantigari716
@rithvikreddychantigari716 2 жыл бұрын
Happy Teachers Day sir...😊
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@vpranathi1237
@vpranathi1237 11 ай бұрын
In this video so useful for me
@SudhakarAtchala
@SudhakarAtchala 11 ай бұрын
Glad it helped. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@user-hs4qd2od2z
@user-hs4qd2od2z 11 ай бұрын
Thank a lot sir😇😇😇your video lectures are very helpful for us......... And your teaching was too good sir......
@SudhakarAtchala
@SudhakarAtchala 11 ай бұрын
It's my pleasure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@modemharikumar9232
@modemharikumar9232 2 жыл бұрын
happy teacher's day sir
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@commando8822
@commando8822 2 жыл бұрын
HAPPY TEACHER'S DAY SIR
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@varungoud2803
@varungoud2803 10 ай бұрын
Saviour 🙏❤️
@SudhakarAtchala
@SudhakarAtchala 10 ай бұрын
Thanks. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@vanireddypunyala7880
@vanireddypunyala7880 Жыл бұрын
for example p1>=p2 what operation we perform sir
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
No need to remove the dominant pair. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@sumanthvarma772
@sumanthvarma772 2 жыл бұрын
Happy Teacher's Day...
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
T
@chiranjeevisaibhuvanagiri9975
@chiranjeevisaibhuvanagiri9975 Жыл бұрын
You want to do video on reliability design problem
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Ya sure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.
@yp1603
@yp1603 2 жыл бұрын
Happy teachers day sir
@SudhakarAtchala
@SudhakarAtchala 2 жыл бұрын
Thanks
@LokeshKumar-jg8md
@LokeshKumar-jg8md Жыл бұрын
For the same problem can you Please explain tabular method
@SudhakarAtchala
@SudhakarAtchala Жыл бұрын
Okay sure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..
@aishwaryaabburu
@aishwaryaabburu 2 ай бұрын
Sir your explanatiom is excellent but video length is so much 😢 please try to say fast
@SudhakarAtchala
@SudhakarAtchala 2 ай бұрын
Okay, noted. Plz subscribe to the channel and if possible share with your friends. Thanks in advance...
@aishwaryaabburu
@aishwaryaabburu 2 ай бұрын
@@SudhakarAtchala Ok sir🤩
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 4,1 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 14 МЛН
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 24 МЛН
0/1 knapsack problem-Dynamic Programming | Data structures and algorithms
27:31
Jenny's Lectures CS IT
Рет қаралды 1,1 МЛН
4.5 0/1 Knapsack - Two Methods - Dynamic Programming
28:24
Abdul Bari
Рет қаралды 2,7 МЛН
4.7 Traveling Salesperson Problem - Dynamic Programming
15:25
Abdul Bari
Рет қаралды 1,5 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН