an interactive tutorial for np-completeness. outline background and motivation visualizations the...

37
An Interactive Tutorial for NP-Completeness MASTERS THESIS BY NABANITA MAJI ADVISOR - DR. CLIFFORD SHAFFER MAY - 2015

Upload: cody-bishop

Post on 04-Jan-2016

228 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

An Interactive Tutorial for

NP-Completeness

MASTERS THESIS

BY

NABANITA MAJI

ADVISOR - DR. CLIFFORD SHAFFER

MAY - 2015

Page 2: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 3: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

NP-Completeness

5/19/2015

Page 4: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 5: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 6: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Tools and Framework

OpenDSA

JSAV - JavaScript Algorithm Visualization library

Khan Academy exercises

5/19/2015

Page 7: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 8: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

NP-Complete problems covered:

Circuit-SAT

SAT

3-SAT

Clique

Independent Set

Vertex Cover

Hamiltonian Cycle

Traveling Salesman.

5/19/2015

Page 9: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 10: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Introducing the problem

5/19/2015

Explanation of relevant context (Example)

Definition of the problem

Illustration with examples.

Page 12: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 13: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Practice Exercises – Why?

5/19/2015

Better illustration of the problem

Hands-on experience on problem instances

Help to appreciate the computation complexity.

Page 14: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Practice Exercises – Design aspects

5/19/2015

Generation of problem instances

Level of Difficulty

Solution and Verification

Page 16: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 17: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Proving NP-Completeness

5/19/2015

NP NP-HardNP-Complete

Reductions

Page 18: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Reductions

5/19/2015

Page 19: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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.

Page 20: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Order of Reductions

5/19/2015

Page 21: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 22: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 23: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 24: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 25: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Challenges in analyzing Interaction logs

Distinguishing between users.

Distinguishing between actual usage and idle time.

5/19/2015

Page 26: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 27: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 28: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 29: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 30: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 31: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 32: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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)

Page 33: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 34: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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

Page 35: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

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.

Page 36: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Future work

5/19/2015

Visualizations on more NP-Complete problems.

Pedagogical evaluation of the material.

Page 37: An Interactive Tutorial for NP-Completeness. Outline  Background and Motivation  Visualizations  The NP-Complete Problems  Practice Exercises on NP-Complete

Thank you

5/19/2015

Special mentions:

Dr . Cliff Shaffer

Dr. Lenwood Heath

Mohammed Farghally

Questions ??