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

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024
  • #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

ความคิดเห็น • 65

  • @dabbiruhaneesh2714
    @dabbiruhaneesh2714 3 ปีที่แล้ว +137

    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 ❤️

  • @bharathbunny12
    @bharathbunny12 หลายเดือนก่อน +5

    Sir thankyou so much your classes are very clear and understandable 🙏

    • @SudhakarAtchala
      @SudhakarAtchala  หลายเดือนก่อน

      All the best. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.

  • @VINAY-wg4ul
    @VINAY-wg4ul ปีที่แล้ว +11

    Your explanation outstanding sir. Thank you sir thank you sooo much❤

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว +2

      You are most welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @k.venkatamuni943
    @k.venkatamuni943 2 ปีที่แล้ว +14

    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 🙏🙏🙏🙏

  • @allurivishnuvardhanvarma3091
    @allurivishnuvardhanvarma3091 3 ปีที่แล้ว +19

    Happy teacher's day sir ❤️
    Best teacher ever 😃

  • @rampandusatla
    @rampandusatla หลายเดือนก่อน

    Never understood this tricky concepts in entire sem , what a detail and clear explanation sir our exams doesn't ends with your clases .... tqqq you 😇♥you sir

    • @SudhakarAtchala
      @SudhakarAtchala  หลายเดือนก่อน +1

      All the best. Please like the video, subscribe to the channel, and share it with your friends. Thanks in advance.

  • @KukuluriSravani
    @KukuluriSravani 16 วันที่ผ่านมา

    Sir , meeru lekapothe memu mamimun kuda pass avvamu sir , u r my real god of teacher sir ....

    • @SudhakarAtchala
      @SudhakarAtchala  12 วันที่ผ่านมา

      All the best. Please like the videos, subscribe to the channel, and share it with your friends. Thanks in advance.

  • @sonufazi8977
    @sonufazi8977 หลายเดือนก่อน +1

    Sir you're a saviour ❤

    • @SudhakarAtchala
      @SudhakarAtchala  หลายเดือนก่อน +1

      So nice of you. Please like the video, subscribe to the channel, and share it with your friends. Thanks in advance.

  • @veerabhadrareddy2133
    @veerabhadrareddy2133 5 หลายเดือนก่อน

    Thank you so much sir, your videos are very useful for many b-tech students, keep rocking sir....🤝

    • @SudhakarAtchala
      @SudhakarAtchala  5 หลายเดือนก่อน

      All the best. Plz subscribe to the channel and if possible share with your friends. Thanks in advance...

  • @s.mahaboobbasha7820
    @s.mahaboobbasha7820 ปีที่แล้ว +2

    U R REALLY GREAT SIR 💕

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว +1

      Thank you so much 😀 Plz subscribe to the channel and if possible share with your friends. Thanks in advance...

  • @adarinikhil1262
    @adarinikhil1262 2 ปีที่แล้ว +4

    Sir what if profits are not in order of purging rule

  • @Lohitha-v7j
    @Lohitha-v7j ปีที่แล้ว +2

    Thank a lot sir😇😇😇your video lectures are very helpful for us......... And your teaching was too good sir......

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว +2

      It's my pleasure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @siddireddyvignesh
    @siddireddyvignesh ปีที่แล้ว +4

    Very good explanation sir!! Thank you

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว +1

      You are welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @khabylamefan48
    @khabylamefan48 3 ปีที่แล้ว +2

    Happy Teachers day sir ❤️

  • @harshvardhantandon8278
    @harshvardhantandon8278 10 หลายเดือนก่อน

    Thank you sir this is the best explanation on TH-cam thanks a lot 😊❤

    • @SudhakarAtchala
      @SudhakarAtchala  10 หลายเดือนก่อน

      You are most welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

    • @harshvardhantandon8278
      @harshvardhantandon8278 10 หลายเดือนก่อน

      @@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 🙂

  • @aishwaryaabburu
    @aishwaryaabburu 5 หลายเดือนก่อน +2

    Sir your explanatiom is excellent but video length is so much 😢 please try to say fast

    • @SudhakarAtchala
      @SudhakarAtchala  5 หลายเดือนก่อน

      Okay, noted. Plz subscribe to the channel and if possible share with your friends. Thanks in advance...

    • @aishwaryaabburu
      @aishwaryaabburu 5 หลายเดือนก่อน

      @@SudhakarAtchala Ok sir🤩

  • @rithvikreddychantigari716
    @rithvikreddychantigari716 3 ปีที่แล้ว +2

    Happy Teachers Day sir...😊

  • @Bhargav1245-g7dc
    @Bhargav1245-g7dc ปีที่แล้ว +1

    Nice explanation sir thank you

  • @k.venkatamuni943
    @k.venkatamuni943 2 ปีที่แล้ว +1

    Tq for giving useful information

    • @SudhakarAtchala
      @SudhakarAtchala  2 ปีที่แล้ว +1

      Welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.

  • @modemharikumar9232
    @modemharikumar9232 3 ปีที่แล้ว +1

    happy teacher's day sir

  • @vpranathi1237
    @vpranathi1237 ปีที่แล้ว

    Tq for teaching knapsack problem

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว

      It's my pleasure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @commando8822
    @commando8822 3 ปีที่แล้ว +1

    HAPPY TEACHER'S DAY SIR

  • @sivarajupunju7793
    @sivarajupunju7793 ปีที่แล้ว

    TQ so much sir all ur videos are sooo useful to mee

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว +1

      So nice of you. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @varungoud2803
    @varungoud2803 ปีที่แล้ว +1

    Saviour 🙏❤️

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว

      Thanks. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @vpranathi1237
    @vpranathi1237 ปีที่แล้ว

    In this video so useful for me

    • @SudhakarAtchala
      @SudhakarAtchala  ปีที่แล้ว

      Glad it helped. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @vanireddypunyala7880
    @vanireddypunyala7880 ปีที่แล้ว +1

    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..

  • @amitha1135
    @amitha1135 11 หลายเดือนก่อน

    Thank you sir

    • @SudhakarAtchala
      @SudhakarAtchala  11 หลายเดือนก่อน +1

      So nice of you. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @the_techreels
    @the_techreels 11 หลายเดือนก่อน

    Thank you

    • @SudhakarAtchala
      @SudhakarAtchala  11 หลายเดือนก่อน +1

      You're welcome. Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

  • @sumanthvarma772
    @sumanthvarma772 3 ปีที่แล้ว +1

    Happy Teacher's Day...

  • @LokeshKumar-jg8md
    @LokeshKumar-jg8md ปีที่แล้ว +1

    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..

  • @chiranjeevisaibhuvanagiri9975
    @chiranjeevisaibhuvanagiri9975 2 ปีที่แล้ว

    You want to do video on reliability design problem

    • @SudhakarAtchala
      @SudhakarAtchala  2 ปีที่แล้ว

      Ya sure. Plz subscribe to the channel and if possible share with your friends. Thanks in advance.

  • @yp1603
    @yp1603 3 ปีที่แล้ว

    Happy teachers day sir