0/1 knapsack problem | example| dynamic programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ต.ค. 2024

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

  • @harshlimbadiya9956
    @harshlimbadiya9956 5 ปีที่แล้ว +15

    In the first step you are forgot to check this condition ( j < weight(i) )condition is true then,
    Eqution are: T(i-1,j).
    I request to check it.

  • @pawanthanay
    @pawanthanay 6 ปีที่แล้ว +11

    thank you !!
    10:37 one small mistake..

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

    12:00 mam that is maximux value earned not weight

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

    If u people not getting then get lost guys. She has explained well keep going❤️

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

    u r not taking first maximum value like in ascending order?

  • @shubhamalchetti2157
    @shubhamalchetti2157 6 ปีที่แล้ว +12

    As there are 4 weights given then why to go from 0 to 5 and why not from 0 to 4 while preparing the table

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

      weight is 5 that's why

    • @SanthoshKumar-jc5fg
      @SanthoshKumar-jc5fg 2 ปีที่แล้ว +4

      @@dsaikumar7017 then y took 6 0,1,2,3,4 enough na

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

      ​@@SanthoshKumar-jc5fgthere isn't a bag with 0 kg

    • @esha.....7906
      @esha.....7906 ปีที่แล้ว

      N+1 we have to take

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

    Ma'am please pull the camera little upwards so that we could see the full page....!!!

  • @rajaammarzia8704
    @rajaammarzia8704 6 ปีที่แล้ว +17

    Kindly use another pager ... if u have. Dont turn again and again

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

    Why 3 value is not considered in step 1

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

    Inta daridram ayna question inta varuku chudala
    But thanks for the information

  • @saf025murali.mannam2
    @saf025murali.mannam2 6 หลายเดือนก่อน

    Mam T(1,1),4) is there T(1,1)=0 but max(0,4) is 4 but you write im matrix 0 why mam pls solve my dout

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

    T(1, 1) also gives maximum value 3 then why are you writing zero 0 at that place?

    • @Santhosh-vx6jo
      @Santhosh-vx6jo 2 ปีที่แล้ว

      Hmm crt

    • @Santhosh-vx6jo
      @Santhosh-vx6jo 2 ปีที่แล้ว +1

      But wrong she said when it comes in negative value you should ignore it:)

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

    if we just need the last column why did we calculate all 5?

  • @hinaparmar3784
    @hinaparmar3784 3 ปีที่แล้ว +24

    Mam u have done incorrect please first correct it and then upload 🥴

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

    Mam if weight is 20 then how to take columna

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

    what is the item value=

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

    Don't turn pages again n again..

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

    Very easy to understand Mam

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

    Thank u ma'am i understood esily❤🙏

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

    mam, is there any shortcut for large values

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

    Dhanyabaad mam

  • @harish.i6438
    @harish.i6438 5 หลายเดือนก่อน

    in step 2,2 you took j as 1 mam pls check it

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

    If profiles=(60,100,120), weight=(10,20,30)&m=50.
    Then what are optimal solution

  • @aminanouna7703
    @aminanouna7703 5 ปีที่แล้ว

    great explication thank's

  • @Sneha-qu8rb
    @Sneha-qu8rb 8 หลายเดือนก่อน

    Thank you mam

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

    Superb explanation mam..tq mam

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

    level ....well done

  • @ArunKumar-yq9rs
    @ArunKumar-yq9rs 2 ปีที่แล้ว

    Doesn't explained when w[i] will be used🤷

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

    didn't understand anything ma'am 😓

  • @mr.tinnu.editz......2661
    @mr.tinnu.editz......2661 2 ปีที่แล้ว

    Item 4 as not taken why mam

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

    Ur fluency is little hard to understand mam

  • @sanjaygorakhpuriya7519
    @sanjaygorakhpuriya7519 5 ปีที่แล้ว

    Good explanation

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

    Full mistakes... Pls refer

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

    Are u serious For Learning ?

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

    why 3 is not consided in step 1

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

      the second value came as negative so we choosen first value

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

    Why write on the reverse side of the paper? What a silly thing to do!

  • @unboxinghonestreview619
    @unboxinghonestreview619 5 ปีที่แล้ว

    T(3,2) value is 5 not 3

  • @ayshaissa21
    @ayshaissa21 5 ปีที่แล้ว

    Well done.

  • @safiyagani-5565
    @safiyagani-5565 ปีที่แล้ว +1

    Ma'am aap nai galat nikala nd please short mai mat li jie please confused I am

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

    Impressive

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

    Good one... But need to improve In explanation

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

    How hou calculate 7 at 2,5

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

      Bro how we value. 7 at 2,5

  • @XYZ9630
    @XYZ9630 6 ปีที่แล้ว

    thank you

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

    Pls say profit to value

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

    mam plzzzzzz firstly clear yuor concepts .........................

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

    Thanx

  • @naveenkanth7123
    @naveenkanth7123 5 ปีที่แล้ว

    Not ❌

  • @AhamBrahmosmi
    @AhamBrahmosmi 5 ปีที่แล้ว

    Nice

  • @safiyagani-5565
    @safiyagani-5565 ปีที่แล้ว +1

    (2, 3) =7
    Uh sad (2, 3) =4 waha se aap nai jo b step liye sb galat hai uh confused me sry mai aap k sari Vedos ko I am dislike I am not satisfied sry maam

  • @saichand1344
    @saichand1344 5 ปีที่แล้ว

    Form t(1,2) max value are intered directtly....i didn't stand it

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

      Ha u have to check the table .that 1 row n 2nd column ..so t(1,2) is 3

  • @travelWithHarsh2.0
    @travelWithHarsh2.0 6 ปีที่แล้ว +1

    Firstly i would like to thank you for this tutorial. But i have one concern related to my question, which i have solved with the helped of your tutorial.
    { weight: 7, value: 160 },
    { weight: 3, value: 90 },
    { weight: 2, value: 15 }
    capacity = 20;
    When i solved this, then i found i have to take second and third (weight:3, and weight:2) option, my question is how can we know that, how many units i have to pick, like for above question i have to pick 6 units of weight:3 and one unit of weight:2.
    please update me.
    Thanks
    Harsh

    • @nirajmeshram4
      @nirajmeshram4 5 ปีที่แล้ว

      bro if you have weight 5 then you have the colomn from 0-5

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

    T(2,2) m I or j ki value 1 or 2 how mtlb kuch bhe pdha Rhee ho etnii mistake kri h please sudhar lo

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

    T(2,5) value is 4

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

    Overall wrong

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

    🙂👍👍

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

    niceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

  • @hrishabhmanshore4274
    @hrishabhmanshore4274 6 ปีที่แล้ว

    kuch bhi pada rahi hai.

  • @ravisiddam
    @ravisiddam 6 ปีที่แล้ว

    This is not 0/1 knapsack problem

  • @amitabhbacchan-cz5ou
    @amitabhbacchan-cz5ou 2 ปีที่แล้ว

    O angrej thoda hindi m bhi bol liya kro

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

    Sorry but not understandable...

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

    Aaa@

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

    bahut hi bekaar padhai hai kuch acche se explain nhi ki hai
    kaun value ki trah aai nhi batai bus aise karenge to aise aayega yhi batai hai bada hi bekar padhai hai

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

    kitna ganda pdaya hai aise koi krta hai kya kbhi page idhar kbhi udhar kuch bhi pta nhi chl rha max kese liya hai

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

    You don't have enough proper knowledge and it's worst explanation from your side u completely copying the information from internet and saying us ....and also
    Please improve your English communication... it's becoming difficult to understand....