R8. NP-Complete Problems

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มี.ค. 2016
  • MIT 6.046J Design and Analysis of Algorithms, Spring 2015
    View the complete course: ocw.mit.edu/6-046JS15
    Instructor: Amartya Shankha Biswas
    In this recitation, problems related to NP-Completeness are discussed.
    License: Creative Commons BY-NC-SA
    More information at ocw.mit.edu/terms
    More courses at ocw.mit.edu

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

  • @karansvnit
    @karansvnit 6 ปีที่แล้ว +83

    4:34 Hamiltonian cycle -> Hamiltonian Path
    13:00 Clique -> Independent Set

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

      karan patel thanks

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

    My dude walked in straight from the afterparty. Respect!

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

      thought I was the only one that noticed

    • @MS-qh3iz
      @MS-qh3iz ปีที่แล้ว

      how did you know?

  • @luisribeiro2239
    @luisribeiro2239 6 ปีที่แล้ว +24

    Great explanation! The first lecture that really makes sense... Very well explained in details. Very smart guy! Thank you, Amartya! Keep on!

  • @hassanalamri2665
    @hassanalamri2665 6 ปีที่แล้ว +8

    I have a professor that I pearly understand what he was talking about for like four classes with total 12 hours. However, all that I can say is thank you so much. I am really glad to have knowledge from a person like you.

  • @ahmedrekik4534
    @ahmedrekik4534 7 ปีที่แล้ว +22

    After showing several videos about NP Problems and reductions (especially in graph theory), it's the first time that I could find such an intuitive lecture and understand these problem. Thank you Amartya!!

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

      He went fast, but still did well

  • @unknown6656
    @unknown6656 5 ปีที่แล้ว +9

    04:30 HamiltonianCycle ==> HamiltonianPath
    13:00 K-CLIQUE ==> K-INDSET
    21:50 K-CLIQUE ==> MAX2SAT

  • @MagnifiqueRarity
    @MagnifiqueRarity 7 ปีที่แล้ว +10

    Great video!
    Very comprehensible!

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

    **NP-complete decision problem:**
    Given a value for X, determine whether there exist integers A and B such that:
    * A - B = X
    * B = ln(A)
    This problem is NP-complete because it is a special case of the subset sum problem, which is a known NP-complete problem.
    **Reduction from subset sum problem:**
    Given a set of integers S and a target integer T, the subset sum problem is to determine whether there exists a subset of S that sums to T.
    We can reduce the subset sum problem to the NP-complete decision problem as follows:
    1. Let S = {a1, a2, ..., an} be the set of integers and T be the target integer.
    2. Create a new integer X = T + 1.
    3. Determine whether there exist integers A and B such that:
    ```
    * A - B = X
    * B = ln(A)
    ```
    If there exist integers A and B that satisfy these conditions, then there exists a subset of S that sums to T. This is because we can set A = T + 1 + sum(subset) and B = ln(A), where subset is the subset of S that sums to T.
    Conversely, if there do not exist integers A and B that satisfy these conditions, then there does not exist a subset of S that sums to T.
    Therefore, the NP-complete decision problem is NP-complete.
    In this case, the decision problem of finding the values of A and B that satisfy the equation A - B = 4 and B = ln(A), where A and B are integers, is NP-complete. However, there do not exist any integers that satisfy this equation.
    Therefore, we can conclude that P does not equal NP.
    This is a very important result in computer science, and it has many implications for the field. For example, it means that there are some problems that cannot be solved efficiently by any computer, no matter how powerful.

  • @alexba1771
    @alexba1771 7 ปีที่แล้ว +12

    Nice video presented by a clever guy. I really like the video!

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

    Its awesome to see TH-cam is recommending mother's lecture when son is delivering lecture... :D

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

      Same thing happened with me XD

  • @l441828872
    @l441828872 5 ปีที่แล้ว +23

    What a brilliant young lecturer!

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

    Given the completeness theorem what problem in proof theory about syntax does the SAT problem translate to?

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

    Thank you, now everything is clear.

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

    Great recitation! The later the video the more tricky, creative and fun 🤣🤣

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

    Great explanation! Thank you!

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

    well explained! Thank you!

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

    we have to show number of clauses to be more than k then what's the need of E' and k as only V number of clauses should be sufficient, isn't it?

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

    5:40 how? Aren't we supposed to not repeat any vertex in Hamaltonion cycle?

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

    kind of wanted to see him talk about turan's theorem

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

    why do we have to create a dummy variable z???

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

    Is there another lesson on this topic

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

    Great Explanation!

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

    Amazing video overall, really appreciate it.
    One note of feedback from me:
    I got confused for a while at 31:47 because I thought you were writing out subtractions.
    Once I rewinded a bit to listen to how you defined V' , then the 3 clauses became clear to me.

  • @xuhuiwang5682
    @xuhuiwang5682 8 ปีที่แล้ว

    hope more examples could come up....

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

    great explanation

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

    12:51, His style, juz bring it on.

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

    Since 2sat is in P, can anyone explain the difference between max2sat and 2 sat?

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

      2 sat is whether if there is an assignment to the literals so ALL clauses are satisfied; max2sat is whether there is an assignment to the literals so at least K clauses are satisfied. So s sat is a special case of max2sat, where k = number of clauses. If that helps.

  • @FaNTaCoLa90
    @FaNTaCoLa90 7 ปีที่แล้ว +8

    There is a minor error in the "Clique - Independent set" reduction example. An edge is missing in the transformed graph.

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

    What is the definition of Z? what's its role?

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

      I think it's an arbitrary addition to the literals for the purpose of isolating certain vertices

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

      It’s an additional variable to prevent a zero solution: Without z you can set x_i = 0 for all i and obtain the maximum, since all (not x_i or not x_j) would be 1.
      Adding constraints with z prevents this. Note, however, that z is still a variable and thus is either 1 or 0, still potentially allowing a zero solution. Adding a constraint on both z and not z prevents the zero solution.
      For example:
      No z:
      x_i = 0 for all i
      -> (not x_i or not x_j) = 1 for all (i, j) in c(E)
      -> All constraints are fullfilled, i.e. the maximal solution
      Only constraint with z:
      x_i = 0 for all i, z = 1
      -> (not x_i or not x_j) = 1 for all (i, j) in c(E) and (x_i or z) = 1 for all i in V
      -> All constraints are fullfilled, i.e. maximal solution
      Constraints on both:
      x_i = 0 for all i, z = 1
      -> (not x_i or not x_j) = 1 for all (i, j) in c(E) and (x_i or z) = 1 [always fulfilled!] and (x_i or not z) = 0 for all i in V
      -> Potentially not maximal! Changing one x_k to 1 already increases the number of fulfilled constraint by 1, namely: (x_k or not z) = 1

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

    I thought my player was stuck at double playback speed... thanks for the lecture Amartya!

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

      Same here :)

  • @ILORVYt
    @ILORVYt 6 ปีที่แล้ว +16

    Make sense?

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

    Thanks a lot bud :)

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

    very helpful

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

    excellent

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

    23:12

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

    INAUDIBLE: @5:39 And, that problem is NP-Hard, so you can't solve it in polynomial time

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

    INAUDIBLE: @6:03 ==> You can just start anywhere and visit all the vertices and stop

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

    make sense!!!!

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

    What the hell of that "Nintendo games or something" xDD

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

      See lecture 16, they showed how to reduce 3SAT to a nintendo problem

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

    He is so cute!

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

    It really does not make sense!

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

    👏👏

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

    "..you can't solve it polynomial then...", true if P != NP 5:38

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

    TH-cam why am i seeing this

  • @slybuster
    @slybuster 8 ปีที่แล้ว +30

    Take your coat off--stay awhile.

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

      Maybe he is cold.

    • @OLGACT2011
      @OLGACT2011 6 ปีที่แล้ว +25

      Man's not hot

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

      Style is everything

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

      this guy explains well...doesn't actually matter whether he wears a coat or not

  • @nanoha94
    @nanoha94 7 ปีที่แล้ว +52

    he's cute ^^

    • @SHASHANKRUSTAGII
      @SHASHANKRUSTAGII 6 ปีที่แล้ว +5

      he's INDIAN

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

      @@SHASHANKRUSTAGII wow a cute indian xd

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

      definitely cute

    • @vas_show
      @vas_show 4 วันที่ผ่านมา

      THATS WHAT I THOUGHT

  • @user-tk2jy8xr8b
    @user-tk2jy8xr8b 5 ปีที่แล้ว

    So many "so" and "dash" instead of "prime". But everything else is fine

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

    Isn't he hot in that jacket?

  • @RANVEERSINGH-ly5ee
    @RANVEERSINGH-ly5ee 5 ปีที่แล้ว +1

    As far as I know 2SAT is in P and Max Clique is NP-Complete. Sorry to say but I did not understand this lecture at all.

    • @victos-vertex
      @victos-vertex 5 ปีที่แล้ว +6

      Because you missed the word "max" in front of 2SAT. The example wasn't about 2SAT, which is indeed in P, it was about max2SAT. Max2SAT is NP complete and this is what was shown in this lecture.

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

      @@victos-vertex damn you came with some attitude

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

    👽

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

    lets just say this is connected to this guy..haha

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

    this is too difficult to comprehend.

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

    Not helpful at all ! waste 20 minutes of my time + 2 min for this comment. He can use little example for some reduction e.g. max2sat reduction from k-clique, that was so unclear to me.

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

    A potato would do better than this cameraman! Show the board!!! The board!!!!

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

    I never understood why so many teachers insist on using a chalk board instead of a computer to explain things about programming

    • @eclipsicallane9179
      @eclipsicallane9179 6 ปีที่แล้ว +38

      i wouldn't really say this lecture is about programming

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

    he sounds like an INDIAN.?

    • @xavyz06
      @xavyz06 5 ปีที่แล้ว +9

      Yeah, Captain Obvious

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

    IITian product 😎😎

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

    He's an INDIAN