Reduction : 3-CNF SAT to Subset Sum

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

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

  • @shivendraiitkgp
    @shivendraiitkgp 6 ปีที่แล้ว +51

    If you don't want to revise P, NP, Np-Complete and straightaway jump to the reduction then you should start viewing the video from 10:00.

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

    a rare video that actually explains everything used. Deserves more upvotes

  • @deadchannel-x2m
    @deadchannel-x2m ปีที่แล้ว +8

    This video is a gem. One of the most beautiful explanations on the topics.
    Please, add NP, NP-Hard, and NP-Complete, etc to the keywords list or to the title. So that more people can access such an elegant lecture.
    The basic discussion on NP at the beginning was really amazing.

  • @jeangeorge6950
    @jeangeorge6950 5 ปีที่แล้ว +22

    Your explanation > literally anything else > my teacher's explanation. Respects from Brazil (2).

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

    I appreciate the non-jargon explanation using a concrete example. Thank you. I understand the reduction now.

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

    this was the best example I have ever seen, completely makes sense.Thank you

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

    that was actually really good explanation! My prof could never

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

    The best example I've found. Been looking for days!

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

    Amazing explanation. It answered all my questions. I was so confused. God bless you

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

    The color coding helps to facilitate learning. I actually do that too in my documentation; use different colors to highlight and distinguish one part from another. Thanks for the tutorial as well. Makes sense how the helpers are used to get the sum or not get the sum.

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

    It might seems difficult when watching for the first time, but if you watch it for 2nd time then one would definitely understand it. But explanation is awsome.

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

    Thanks Informal-CS for simply explaining the proof of subset sum is NPcom

  • @AI-zw1rz
    @AI-zw1rz 5 ปีที่แล้ว +4

    Nice explanation brother first i thought how i will mug up these things because tommorrow is my exam and now thanks to you i don't have to mug up

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

    This video really deserves more views, helped me a lot to understand!

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

    Your channel should have more subs and more views in videos. I really liked your content. Thanks! Keep creating.

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

    could someone explain me why the 1 and 2s in the down right square?

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

    Thanks for your explanation! One question: Do we determine the target value (1 1 1 4 4 4 4) and the value of the helper variables (1 and 2, on the right-down part) arbitrarily?

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

      The number of 1s is dependent on the number of variables and the number of 4s is dependant on the number of clauses. This makes sense because the 1s are used to eliminate assignments where variables can be both true and false. And the 4s are used to eliminate assignments where none of the clauses are true.

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

    Thank you, it clarifies many things to me

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

    Awesome dude, finally i really understand. Respects from brazil

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

    Thanks, the explanation helps a lot!

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

    Thanks for clear explanation! it helps a lot and i'm just preparing my algorithm exam :)

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

    Thanks, Sir. You helped me in this tutoriel!

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

    Thanks bro, This helped a lot in understanding this concept.

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

    For those that are confused by 4th quadrant here is what I understood
    SAT is satisfied if for all clauses, any one literal within each clause is satisfied
    However, it may be the case that more than one literal is satisfied within each clause but *Subset Sum* requires a specific target
    This is where the helpers come in
    These helpers help to hit the target if at least one literal is satisfied
    Lets think about a column with target = 4 and helpers {1, 2}
    If you add all the numbers in the helper, it becomes 3 which makes it impossible to hit the target unless you have at least one literal = True
    If you have 2 literals = True, then you only need to add 2 from the helper and you've reached the target
    *_The point is that as long as you have at least one literal within clause to satisfy the clause, you have made it possible to reach the target by using different sum of helpers_*

    • @chaitanyareddy5279
      @chaitanyareddy5279 4 ปีที่แล้ว

      How to fix the target? like in this case 4?

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

      @@chaitanyareddy5279 The 1s prevent variables from having 2 values, and the 4s are the number of clauses.

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

      @@chaitanyareddy5279 You can select any target and then your helper values need to sum up to (target - 1), because you want the target to be satisfied only if at least one clause is satisfied.

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

      @@stevenfletcher3389
      are the 4's really the number of clauses ? My prof also used 4 as target but had the number of clauses variable (m).
      I am struggling a bit, because there may be an assignment, which satisfies all clauses in the sat problem, but needs 5 literals to be true. Then the target would be overshot ?
      Edit: I just understood it a bit better: because we are in 3cnf there are only three literals per clause 🙈🙈🙈
      Therefore max 3 literals in one column can be 1 and with one helper line it sums up to 4

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

      @@janniklasbertram9436 Yes, you're right. Your comment actually helped explain this to me.

  • @SZ-jw9my
    @SZ-jw9my 3 ปีที่แล้ว +2

    Fantastic video, thank you!

  • @ecarter1117
    @ecarter1117 5 ปีที่แล้ว +8

    So where did the bottom rows of 4 come from? If you added another clause to this example would that number change? Thank you for this video by the way it is extremely specific and well explained!!

    • @informal-cs3251
      @informal-cs3251  5 ปีที่แล้ว +6

      Thanks for the nice comment :)
      The 4 in the bottom rows come from the fact that each clause has at maximum 3 literals and thus each clause can be satisfied if it is satisfied by at least 1 literal and then with the help of the slack variable si and si' we can make it reach 4. But if a clause it not satisfied by any of the literals, then using both the slacks we won't be able to make 4.
      So, if we add another clause, the number 4 is not going to change. You will simply add one more column and 2 slack rows to go with it.

    • @Ahmed-wj5sd
      @Ahmed-wj5sd 5 ปีที่แล้ว

      @@informal-cs3251 But if you replace all the "2" by "1" you can replace all the "4" by "3"?

    • @informal-cs3251
      @informal-cs3251  5 ปีที่แล้ว +5

      @@Ahmed-wj5sd Yes, exactly. And you can imagine that you can put whatever you want and adjust the sum accordingly.

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

      @@informal-cs3251 I got confused once again, when you said "each clause has at maximum 3 literals and thus each clause can be satisfied if it is satisfied by at least 1 literal (****understood till here****) and then with the help of the slack variable si and si' we can make it reach 4". Could you please explain in lil more simpler words that why to use the slack variables or the garbage values in order to reach "4". Sorry for being dumb now. Thanks in advance.

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

      @@BiswaRanjanNanda I would like to understand this too. I don't understand either.

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

    저를 살려주셔서 커다란 감사를 드립니다. 당신은 제 은인!

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

    i struggled a lot on subset sum, thank u very much

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

    Hi, I would like to contact you. I like this video and your teaching style and I am an undergraduate student of CS who is interested in theoretical computer science such as this complexity theory. Is there anyway I would be able to do so?

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

    So helpful!!! Thank you so much!!!

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

    Great video and very detailed. Thank you

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

    Awesome explanation 👏
    How to get the result of sum of subsets problem from this result?

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

    Amazing Explanation! Thanks a lot

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

    Sorry what happens after minuts 17:50....why 1/2 1/2 why t = 1/1/1/1 4/4/4/4 ?

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

    Note: The 1,2 on C1 through C4 can be 1, 1 and they all can add up to 3 instead of 4. It is one and the same thing.

  • @001afifafatima5
    @001afifafatima5 ปีที่แล้ว

    But did u write 1's and 2's in last quadrant?

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

    in the verification part you are telling that no matter how many helper variable we are going to take we can never reach 4. That's true but I am not getting that you yourself put the value of helper variable as 1 and 2 and claiming so.
    I want to say that if I wish I can take any random value in the helper variable and make the assignment true.
    So, basically you didn't tell any algorithm to fill the clause's helper value. is there any way to fill the helper value?

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

    U can also make in similar graphic way for TSP and prove cook-levin therom of why 3sat is first npc ?
    It would be great.

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

    Great video, really helpful!

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

    Thank you so so much!!!

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

    bhai badiya vedio hain, Indian Universities bhi chutiya kaata ab main MS kar raha hoon, US ki bhi universities bhi chutiya kaat rahi hain.

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

    Great video. Thanks!!!

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

    12:43 Instead of brackets you can mention it as clauses

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

    Great video man.

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

    Nice one!

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

    Thanks sir

  • @SonuKumar-q5o1b
    @SonuKumar-q5o1b ปีที่แล้ว

    well done bro #zeff eriction

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

    Thank you

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

    11/10 in confuesing

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

    This works pretty well as ASMR hahaha!!

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

    please prepare before shooting the video its a bit confusing.No offence

  • @Madnomad._
    @Madnomad._ 4 ปีที่แล้ว +2

    Thanks a lot! You explained it very well.

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

    Great video, thanks!