An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete.

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Advertisements

Polynomial-time reductions We have seen several reductions:
Reducibility Class of problems A can be reduced to the class of problems B Take any instance of problem A Show how you can construct an instance of problem.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Lecture 21 NP-complete problems
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Evaluating Online Tutorials for Data Structures and Algorithms Courses June 24, Simin Hall, PhD Mechanical Engineering Prof. Clifford A. Shaffer,
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Introduction to Approximation Algorithms Lecture 12: Mar 1.
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
Graphs 4/16/2017 8:41 PM NP-Completeness.
1 Approximation Algorithms CSC401 – Analysis of Algorithms Lecture Notes 18 Approximation Algorithms Objectives: Typical NP-complete problems Approximation.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
NP-Complete Problems Problems in Computer Science are classified into
Analysis of Algorithms CS 477/677
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
MASTERS THESIS DEFENSE QBANK A Web-Based Dynamic Problem Authoring Tool BY ANN PAUL ADVISOR: PROFESSOR CLIFF SHAFFER JUNE 2013 Computer Science Department.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Invariant Based Programming in Education Tutorial, FM’08 Linda Mannila
Teaching Thermodynamics with Collaborative Learning Larry Caretto Mechanical Engineering Department June 9, 2006.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
Polynomial-time reductions We have seen several reductions:
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
More Computational Complexity Shirley Moore CS4390/5390 Fall August 29,
Instructor: Shengyu Zhang 1. Tractable While we have introduced many problems with polynomial-time algorithms… …not all problems enjoy fast computation.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-Complete problems.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
CSC 413/513: Intro to Algorithms
Computational Complexity Shirley Moore CS4390/5390 Fall 2013 August 27, 2013.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
More NP-complete problems
Supporting Active Learning by Introducing an Interactive Teaching Tool in a Data Structures and Algorithms Course Tommy Färnqvist 47th ACM Technical Symposium.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
CS21 Decidability and Tractability
Lecture 24 NP-Complete Problems
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

An Interactive Tutorial for NP-Completeness

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/2015 2

NP-Completeness 5/19/2015 3

Students’ perception of NP-Completeness 5/19/2015 4

Related Work  “Using Interactive Visualization for Teaching the Theory of NP- completeness.”  “Incorporating an interactive visualization of NP-Completeness proofs into a web-based learning environment.”  “Visualizing NP-completeness through circuit-based widgets.”  GraphBench  AlViE  Swan 5/19/2015 5

Tools and Framework  OpenDSA  JSAV - JavaScript Algorithm Visualization library  Khan Academy exercises 5/19/2015 6

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/2015 7

NP-Complete problems covered:  Circuit-SAT  SAT  3-SAT  Clique  Independent Set  Vertex Cover  Hamiltonian Cycle  Traveling Salesman. 5/19/2015 8

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/2015 9

Introducing the problem 5/19/2015  Explanation of relevant context (Example) (Example)  Definition of the problem  Illustration with examples. 10

The NP-Complete problems 5/19/2015 Circuit Satisfiability problem (Circuit-SAT) The Formula Satisfiability problem (SAT) The 3CNF Satisfiability problem ( 3SAT ) The Clique problem The Independent Set problem The Vertex Cover problem The Hamiltonian Cycle problem The Traveling Salesman problem 11

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/

Practice Exercises – Why? 5/19/2015  Better illustration of the problem  Hands-on experience on problem instances  Help to appreciate the computation complexity. 13

Practice Exercises – Design aspects 5/19/2015  Generation of problem instances  Level of Difficulty  Solution and Verification 14

The Practice Exercises 5/19/2015  3-SAT 3-SAT  The Maximum Clique problem The Maximum Clique problem  The Maximum Independent Set problem The Maximum Independent Set problem  The Minimum Vertex Cover problem The Minimum Vertex Cover problem  The Hamiltonian cycle problem The Hamiltonian cycle problem  The Traveling Salesman problem The Traveling Salesman problem 15

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/

Proving NP-Completeness 5/19/ NP NP-HardNP-Complete Reductions

5/19/

Proof of NP-Completeness 5/19/2015 The visualizations should include –  Description of each step of a reduction.  Explanation of correctness of the reduction.  Illustration using examples. 19

Order of Reductions 5/19/

Reductions in proving NP-Completeness 5/19/2015 Reduction of Circuit-SAT to SAT Reduction of SAT to 3-SAT Reduction of 3-SAT to Clique problem Reduction of Clique to Independent Set problem Reduction of Independent Set to Vertex Cover problem Reduction of 3-SAT to Hamiltonian Cycle problem Reduction of Hamiltonian Cycle to Traveling Salesman problem 21

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/

Hypothesis  Students would spend a reasonable amount of time on the tutorial if it helps in their learning.  Students would have a good experience with the tutorial. 5/19/

Analysis of Usage – Methodology The tutorial was introduced as a supplementary resource in CS 5114 and CS 4104 in Spring  Interaction logs : We analyzed the logs of students’ interactions with the tutorial.  Student survey : We collect feedback from students in the form of a survey. 5/19/

Challenges in analyzing Interaction logs  Distinguishing between users.  Distinguishing between actual usage and idle time. 5/19/

CS-5114 : Categorized Usage 5/19/

CS-5114 : Usage per module 5/19/

CS-4104 : Categorized Usage 5/19/

CS-4104 : Usage per module 5/19/

Overall usage for CS /19/

Overall usage for CS /19/

Student Survey CS out of 34 responded to the survey Average time spent as reported hours 65% found it useful for their homework 82% say they will use the tutorial to prepare for finals. 97% of the students provided a positive feedback when asked about their experience with the tutorial. CS out of 62 responded to the survey Average time spent as reported - 32 minutes 19% found it useful for their homework 86% say the tutorial will be helpful for their finals. 72% of the students had a positive feedback when asked about their experience with the tutorial. 5/19/

Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete Problem Instances.  Proof of NP-Completeness  Analysis of Usage  Conclusion and Future work 5/19/

Conclusion 5/19/2015  18 visualizations and 6 practice exercises in the tutorial.  Students think it is a good resource.  They use it on a need-to-know basis. 35

Future work 5/19/2015  Visualizations on more NP-Complete problems.  Pedagogical evaluation of the material. 36

Thank you 5/19/2015 Special mentions: Dr. Cliff Shaffer Dr. Lenwood Heath Mohammed Farghally Questions ?? 37