View
228
Download
2
Category
Preview:
Citation preview
An Interactive Tutorial for
NP-Completeness
MASTERS THESIS
BY
NABANITA MAJI
ADVISOR - DR. CLIFFORD SHAFFER
MAY - 2015
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
NP-Completeness
5/19/2015
Students’ perception of NP-Completeness
5/19/2015
2%
20%
64%
14%
Not at all difficult.
Somewhat less difficult
Average difficulty
Somewhat more difficult
Much more difficult
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
Tools and Framework
OpenDSA
JSAV - JavaScript Algorithm Visualization library
Khan Academy exercises
5/19/2015
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
NP-Complete problems covered:
Circuit-SAT
SAT
3-SAT
Clique
Independent Set
Vertex Cover
Hamiltonian Cycle
Traveling Salesman.
5/19/2015
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
Introducing the problem
5/19/2015
Explanation of relevant context (Example)
Definition of the problem
Illustration with examples.
The NP-Complete problems
5/19/2015
Circuit Satisfiability problem (Circuit-SAT)The Formula Satisfiability problem (SAT)The 3CNF Satisfiability problem ( 3SAT )The Clique problemThe Independent Set problemThe Vertex Cover problemThe Hamiltonian Cycle problemThe Traveling Salesman problem
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
Practice Exercises – Why?
5/19/2015
Better illustration of the problem
Hands-on experience on problem instances
Help to appreciate the computation complexity.
Practice Exercises – Design aspects
5/19/2015
Generation of problem instances
Level of Difficulty
Solution and Verification
The Practice Exercises
5/19/2015
3-SATThe Maximum Clique problem The Maximum Independent Set problemThe Minimum Vertex Cover problemThe Hamiltonian cycle problemThe Traveling Salesman problem
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
Proving NP-Completeness
5/19/2015
NP NP-HardNP-Complete
Reductions
Reductions
5/19/2015
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.
Order of Reductions
5/19/2015
Reductions in proving NP-Completeness
5/19/2015
Reduction of Circuit-SAT to SATReduction of SAT to 3-SATReduction of 3-SAT to Clique problemReduction of Clique to Independent Set problemReduction of Independent Set to Vertex Cover problemReduction of 3-SAT to Hamiltonian Cycle problemReduction of Hamiltonian Cycle to Traveling Salesman problem
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
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/2015
Analysis of Usage – Methodology
The tutorial was introduced as a supplementary resource in CS 5114 and CS 4104 in Spring 2015.
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/2015
Challenges in analyzing Interaction logs
Distinguishing between users.
Distinguishing between actual usage and idle time.
5/19/2015
CS-5114 : Categorized Usage
5/19/2015
3/12/2
015
3/13/2
015
3/14/2
015
3/15/2
015
3/16/2
015
3/17/2
015
3/18/2
015
3/19/2
015
3/20/2
015
3/21/2
015
3/22/2
015
3/23/2
015
3/24/2
015
3/25/2
015
3/26/2
015
3/27/2
015
3/28/2
015
3/29/2
015
3/30/2
015
3/31/2
015
4/1/2
015
4/2/2
015
4/3/2
015
4/4/2
015
4/5/2
015
4/6/2
015
4/7/2
015
4/8/2
015
4/9/2
015
4/10/2
0150
2
4
6
8
10
12
14
16
CS 5114 : Categorized usage
Theory Reduction Intro Proof
Date
Tim
e sp
ent (
hou
rs)
CS-5114 : Usage per module
5/19/2015
3/12/2
015
3/13/2
015
3/14/2
015
3/15/2
015
3/16/2
015
3/17/2
015
3/18/2
015
3/19/2
015
3/20/2
015
3/21/2
015
3/22/2
015
3/23/2
015
3/24/2
015
3/25/2
015
3/26/2
015
3/27/2
015
3/28/2
015
3/29/2
015
3/30/2
015
3/31/2
015
4/1/2
015
4/2/2
015
4/3/2
015
4/4/2
015
4/5/2
015
4/6/2
015
4/7/2
015
4/8/2
015
4/9/2
015
4/10/2
0150
2
4
6
8
10
12
14
16
CS 5114 Analysis of time spent per module
LimComp Reduction NPComplete hamiltonianCycle
circuitSAT NPCoping provingNPC threeSAT
SAT circuitSAT_to_SAT SAT_to_threeSAT clique
independentSet vertexCover TSP threeSAT_to_clique
clique_to_independentSet independentSet_to_vertexCover threeSAT_to_hamiltonianCycle hamiltonianCycle_to_TSP
Date
Tim
e sp
ent (
hou
rs)
CS-4104 : Categorized Usage
5/19/2015
4/1/2
015
4/2/2
015
4/3/2
015
4/4/2
015
4/5/2
015
4/6/2
015
4/7/2
015
4/8/2
015
4/9/2
015
4/10/2
015
4/11/2
015
4/12/2
015
4/13/2
015
4/14/2
015
4/15/2
015
4/16/2
015
4/17/2
015
4/18/2
015
4/19/2
015
4/20/2
015
4/21/2
015
4/22/2
015
4/23/2
015
4/24/2
0150
0.5
1
1.5
2
2.5
3
3.5
4104 Categorized usage analysis
Theory Reduction Intro Proof
Date
Tim
e sp
ent (
seco
nds)
CS-4104 : Usage per module
5/19/2015
4/1/2
015
4/2/2
015
4/3/2
015
4/4/2
015
4/5/2
015
4/6/2
015
4/7/2
015
4/8/2
015
4/9/2
015
4/10/2
015
4/11/2
015
4/12/2
015
4/13/2
015
4/14/2
015
4/15/2
015
4/16/2
015
4/17/2
015
4/18/2
015
4/19/2
015
4/20/2
015
4/21/2
015
4/22/2
015
4/23/2
015
4/24/2
0150
0.5
1
1.5
2
2.5
3
3.5
CS 4104 Analysis of time spent per module
LimComp Reduction NPComplete circuitSAT circuitSAT_to_SAT
threeSAT clique provingNPC threeSAT_to_hamiltonianCycle independentSet
SAT TSP vertexCover hamiltonianCycle SAT_to_threeSAT
threeSAT_to_clique NPCoping independentSet_to_vertexCover clique_to_independentSet hamiltonianCycle_to_TSP
Date
TIm
e sp
ent (
hour
s)
Time spent of exercises
5/19/2015
3/26/2015 3/28/2015 4/2/2015 4/16/2015 4/22/20150
0.2
0.4
0.6
0.8
1
1.2
Analysis of Exercises
hamiltonianCycle_KA threeSAT_KA clique_KAindependentSet_KA vertexCover_KA TSP_KA
Date
TIm
e sp
ent (
hour
s)
Overall usage for CS 5114
5/19/2015
0
2
4
6
8
10
12
14
16
CS 5114 Analysis of time spent per module
LimComp Reduction NPComplete hamiltonianCyclecircuitSAT NPCoping provingNPC threeSATSAT circuitSAT_to_SAT SAT_to_threeSAT cliqueindependentSet vertexCover TSP threeSAT_to_cliqueclique_to_independentSet independentSet_to_vertexCover threeSAT_to_hamiltonianCycle hamiltonianCycle_to_TSP
Date
Tim
e sp
ent (
hour
s)
Overall usage for CS 4104
5/19/2015
4/1/2
015
4/2/2
015
4/3/2
015
4/4/2
015
4/5/2
015
4/6/2
015
4/7/2
015
4/8/2
015
4/9/2
015
4/10/2
015
4/11/2
015
4/12/2
015
4/13/2
015
4/14/2
015
4/15/2
015
4/16/2
015
4/17/2
015
4/18/2
015
4/19/2
015
4/20/2
015
4/21/2
015
4/22/2
015
4/23/2
015
4/24/2
015
4/25/2
015
4/26/2
015
4/27/2
015
4/28/2
015
4/29/2
015
4/30/2
015
5/1/2
015
5/2/2
015
5/3/2
015
5/4/2
015
5/5/2
015
5/6/2
015
5/7/2
015
5/8/2
015
5/9/2
015
5/10/2
015
5/11/2
015
5/12/2
015
5/13/2
0150
1
2
3
4
5
6
7
CS 4104 Analysis of time spent per module for finals
LimComp Reduction NPComplete circuitSAT circuitSAT_to_SAT
threeSAT clique provingNPC threeSAT_to_hamiltonianCycle independentSet
SAT TSP vertexCover hamiltonianCycle SAT_to_threeSAT
threeSAT_to_clique NPCoping independentSet_to_vertexCover clique_to_independentSet hamiltonianCycle_to_TSP
Date
TIm
e sp
ent (
hour
s)
Student Survey
CS 5114
• 23 out of 34 responded to the survey
• Average time spent as reported - 2.28 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 4104
• 36 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/2015
Outline
Background and MotivationVisualizations
The NP-Complete Problems
Practice Exercises on NP-Complete Problem Instances.
Proof of NP-Completeness
Analysis of UsageConclusion and Future work
5/19/2015
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.
Future work
5/19/2015
Visualizations on more NP-Complete problems.
Pedagogical evaluation of the material.
Thank you
5/19/2015
Special mentions:
Dr . Cliff Shaffer
Dr. Lenwood Heath
Mohammed Farghally
Questions ??
Recommended