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

Поділитися
Вставка
  • Опубліковано 3 вер 2021
  • #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 роки тому +111

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

  • @k.venkatamuni943
    @k.venkatamuni943 2 роки тому +12

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

  • @VINAY-wg4ul
    @VINAY-wg4ul 10 місяців тому +8

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

    • @SudhakarAtchala
      @SudhakarAtchala  10 місяців тому +1

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

  • @allurivishnuvardhanvarma3091
    @allurivishnuvardhanvarma3091 2 роки тому +19

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

  • @adarinikhil1262
    @adarinikhil1262 2 роки тому +4

    Sir what if profits are not in order of purging rule

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

  • @bhargav5611
    @bhargav5611 Рік тому +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.

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

  • @harshvardhantandon8278
    @harshvardhantandon8278 6 місяців тому

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

    • @SudhakarAtchala
      @SudhakarAtchala  6 місяців тому

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

    • @harshvardhantandon8278
      @harshvardhantandon8278 6 місяців тому

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

  • @khabylamefan48
    @khabylamefan48 2 роки тому +2

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

  • @vpranathi1237
    @vpranathi1237 10 місяців тому

    Tq for teaching knapsack problem

    • @SudhakarAtchala
      @SudhakarAtchala  10 місяців тому

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

  • @rithvikreddychantigari716
    @rithvikreddychantigari716 2 роки тому +2

    Happy Teachers Day sir...😊

  • @varungoud2803
    @varungoud2803 10 місяців тому +1

    Saviour 🙏❤️

    • @SudhakarAtchala
      @SudhakarAtchala  10 місяців тому

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

  • @amitha1135
    @amitha1135 8 місяців тому

    Thank you sir

    • @SudhakarAtchala
      @SudhakarAtchala  8 місяців тому +1

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

  • @vpranathi1237
    @vpranathi1237 10 місяців тому

    In this video so useful for me

    • @SudhakarAtchala
      @SudhakarAtchala  10 місяців тому

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

  • @the_techreels
    @the_techreels 8 місяців тому

    Thank you

    • @SudhakarAtchala
      @SudhakarAtchala  8 місяців тому +1

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

  • @commando8822
    @commando8822 2 роки тому +1

    HAPPY TEACHER'S DAY SIR

  • @siddireddyvignesh
    @siddireddyvignesh 11 місяців тому +4

    Very good explanation sir!! Thank you

    • @SudhakarAtchala
      @SudhakarAtchala  11 місяців тому +1

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

  • @modemharikumar9232
    @modemharikumar9232 2 роки тому +1

    happy teacher's day sir

  • @user-hs4qd2od2z
    @user-hs4qd2od2z 10 місяців тому +2

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

    • @SudhakarAtchala
      @SudhakarAtchala  10 місяців тому +2

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

  • @vanireddypunyala7880
    @vanireddypunyala7880 11 місяців тому

    for example p1>=p2 what operation we perform sir

    • @SudhakarAtchala
      @SudhakarAtchala  11 місяців тому

      No need to remove the dominant pair.
      Plz subscribe to the channel and if possible share with your friends. Thanks in advance..

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

  • @sumanthvarma772
    @sumanthvarma772 2 роки тому +1

    Happy Teacher's Day...

  • @yp1603
    @yp1603 2 роки тому

    Happy teachers day sir

  • @aishwaryaabburu
    @aishwaryaabburu 2 місяці тому +1

    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🤩

  • @LokeshKumar-jg8md
    @LokeshKumar-jg8md 11 місяців тому

    For the same problem can you Please explain tabular method

    • @SudhakarAtchala
      @SudhakarAtchala  11 місяців тому

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