Graph theory  A graph consists of: set of vertices A set of edges connecting vertex pair Incidence matrix: which edges are connected.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Complexity Classes: P and NP
NP-Hard Nattee Niparnan.
Lecture 24 MAS 714 Hartmut Klauck
Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
1 The Limits of Computation Intractable and Non-computable functions.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
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 
Great Theoretical Ideas in Computer Science for Some.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Computational problems, algorithms, runtime, hardness
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
1 NP-Completeness Objectives: At the end of the lesson, students should be able to: 1. Differentiate between class P, NP, and NPC 2. Reduce a known NPC.
The Theory of NP-Completeness
I've just found the internet. How does information travel across the internet? TCP/IP TCP wiki IP wiki Request generated by user (“click”) Response sent.
NP-complete and NP-hard problems
Analysis of Algorithms CS 477/677
Circuits CSE 373 Data Structures Lecture 22. 3/12/03Circuits - Lecture 222 Readings Reading ›Sections and 9.7.
NP-complete and NP-hard problems. Decision problems vs. optimization problems The problems we are trying to solve are basically of two kinds. In decision.
Complexity Theory: The P vs NP question Lecture 28 (Dec 4, 2007)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
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.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Lecture 30. P, NP and NP Complete Problems 1. Recap Data compression is a technique to compress the data represented either in text, audio or image form.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Polynomial-time reductions We have seen several reductions:
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
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.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
I've just found the internet
NP-Complete Problems Algorithm : Design & Analysis [23]
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Week 13 - Monday.  What did we talk about last time?  B-trees  Hamiltonian tour  Traveling Salesman Problem.
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
NP-Completeness  For convenience, the theory of NP - Completeness is designed for decision problems (i.e. whose solution is either yes or no).  Abstractly,
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
CSC 413/513: Intro to Algorithms
Computational Complexity Shirley Moore CS4390/5390 Fall 2013 August 27, 2013.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
More NP-complete problems
Part VI NP-Hardness.
Presentation transcript:

Graph theory  A graph consists of: set of vertices A set of edges connecting vertex pair Incidence matrix: which edges are connected

The incidence matrix of a graph gives the (0,1)-matrix which has a row for each vertex and column for each edge, and (v,e)=1 iff vertex v is incident upon edge e

These are all equivalent

Euler and the Konigsberg bridges

Types of graphs Eulerian: circuit that traverses each edge exactly once Which graphs possess Euler circuits?

Problem: does this graph have an Euler cycle?

Theorem: If every vertex has even degree then there is an Eulerian path

What is a theorem? A statement that no one can understand A statement that only a mathematician can understand A statement that can be verified from “first principles” A statement that is “always true”

Heuristic argument An argument that appeals to intuition, but may not be compelling by itself. In the case of the Eulerian graph theorem, think of the vertex as a room and the edges as hallways connecting rooms. If you leave using one hallway then you have to return using a different one. “Induction argument”

Hamiltonian graph

Hamilton’s puzzle: find a path in the dodecahedron graph that traverses each vertex exactly once

Is the following graph Hamiltonian?

Petersen graph: symmetry

Graph colorings

Other types of graphs

Other properties Diameter Girth Chromatic number etc

Which continent is this?

Boss’s dilemna Six employees, A,B,C,D,E,F Some do not get along with others Find smallest number of compatible work groups WorkerABCDEF Doesn’t like B,CA,CA,B,D,EC,F D,E

What does this graph have to do with the Boss’s dilemma?

Complementary graph

Complete subgraph Subgraph: vertices subset of vertex set, edges subset of edge set Complete: every vertex is connected to every other vertex.

Complementary graph

Handshakes, part 2 There are several men and 15 women in a room. Each man shakes hands with exactly 6 women, and each woman shakes hands with exactly 8 men. How many men are in the room?

Visualize whirled peas Samantha the sculptress wishes to make “world peace” sculpture based on the following idea: she will sculpt 7 pillars, one for each continent, placing them in circle. Then she will string gold thread between the pillars so that each pillar is connected to exactly 3 others. Can Samantha do this?

Some additional exercises in graph theory There are 7 guests at a formal dinner party. The host wishes each person to shake hands with each other person, for a total of 21 handshakes, according to: Each handshake should involve someone from the previous handshake No person should be involved in 3 consecutive handshakes Is this possible?

Camelot King Arthur and his knights wish to sit at the round table every evening in such a way that each person has different neighbors on each occasion. If KA has 10 knights, for how long can he do this? Suppose he wants to do this for 7 nights. How many knights does he need, at a minimum?

The P=NP problem The question is whether, for all problems for which a computer can verify a given solution quickly (that is, in polynomial time), it can also find that solution quickly. This is generally considered the most important open question in theoretical computer science as it has far- reaching consequences in mathematics, philosophy and cryptography.

P vs NP classes

P = NP? asks: if 'yes'-answers to a 'yes'-or-'no'- question can be verified "quickly" (in polynomial time), can the answers themselves also be computed quickly? Example: subset-sum problem: "easy" to verify, believed (but not proven) "difficult" to compute. Given a set of integers, does some subset of them sum to 0? Example: {−2, −3, 15, 14, 7, −10} {−2, −3, −10, 15} adds up to zero” finding such a subset in the first place could take much longer. this problem is in NP.

IF P = NP then problems like the subset-sum problem are as "easy" to compute as to verify. If P does not equal NP, some NP problems are substantially "harder" to compute than to verify.

This is item 1 This is item 2This is item 3

This is item 1 This is item 2 This is item 3

Example: Primality Testing whether a number is prime can be done in “polynomial time” (Shor, 1994) on a quantum computer (qubits), but not on a classical computer (bits) On a classical computer, the problem is “subexponential”

NP-complete NP-hard problems are those to which any problem in NP can be reduced in polynomial time. For instance, the decision problem version of the traveling salesman problem is NP-complete, so any instance of any problem in NP can be transformed mechanically into an instance of the traveling salesman problem, in polynomial time. The traveling salesman problem is one of many such NP- complete problems. If any NP-complete problem is in P, then it would follow that P = NP. Unfortunately, many important problems have been shown to be NP-complete and as of 2008, not a single fast algorithm for any of them is known.

It is not obvious that NP-complete problems exist. Given a description of a Turing machine M guaranteed to halt in polynomial time, does there exist a polynomial-size input that M will accept? This is in NP: given an input, it is simple to check whether or not M accepts the input by simulating M It is NP-hard: the verifier for any particular instance of a problem in NP can be encoded as a polynomial-time machine M that takes the solution to be verified as input. The question of whether the instance is a yes or no instance is determined by whether a valid input exists.

Is P equal to NP? In a 2002 poll of 100 researchers, 61 believed the answer is no, 9 believed the answer is yes, 22 were unsure, and 8 believed the question may impossible to prove or disprove.

Most computer scientists believe that P≠NP. Key reason: no one has been able to find a polynomial-time algorithm for any of the more than 3000 NP-complete problems These algorithms were sought long before the concept of NP-completeness was even known The result P = NP would imply many other startling results that are currently believed to be false, such as NP = co-NP and P = PH.

Millennium Prize Problems The Millennium Prize Problems are seven problems in mathematics that were stated by the Clay Mathematics Institute in Currently, six of the problems remain unsolved. A correct solution to each problem results in a US$1,000,000 prize (sometimes called a Millennium Prize) being awarded by the institute. Only the Poincaré conjecture has been solved, but the solver Grigori Perelman has not pursued the conditions necessary to claim the prize.

Turing machine A Turing machine is a basic, abstract symbol- manipulating device that can be adapted to simulate the logic of any computer algorithm. Described in 1936 by Alan Turing. Not intended as a practical computing technology, rather as a thought experiment about the limits of mechanical computation. Never actually constructed but… their abstract properties yields many insights into computer science and complexity theory.

Turing machine (details) TAPE: divided into cells, one next to the other. Each cell contains a symbol from some finite alphabet. The alphabet contains a special blank symbol (here written as '0') and one or more other symbols. The tape is assumed to be arbitrarily extendable to the left and to the right, i.e., the Turing machine is always supplied with as much tape as it needs for its computation. Cells that have not been written to before are assumed to be filled with the blank symbol A HEAD that can read and write symbols on the tape and move the tape left and right one (and only one) cell at a time. In some models the head moves and the tape is stationary. A finite ACTION TABLE : given the current state(qi) and the symbol(aj) it is reading, tells the machine to do the following in sequence (for the 5-tuple models): * either erase or write a symbol (instead of aj written aj1), and then * move the head 'L' for one step left or 'R' for one step right or 'H' for staying put; * assume the same or a new state as prescribed (go to state qi1). A state register that stores the state of the Turing table, one of finitely many.

Universal Turing Machine (UTM) A UTM is able to simulate any other Turing. Church-Turing thesis: Turing machines indeed capture the informal notion of effective method in logic and mathematics, and provide a precise definition of an algorithm or 'mechanical procedure'.

Schematics

The Busy Beaver