Title: Graph theory
1Graph theory
- A graph consists of
- set of vertices
- A set of edges connecting vertex pair
- Incidence matrix which edges are connected
2The 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
3These are all equivalent
4Euler and the Konigsberg bridges
5Types of graphs
- Eulerian circuit that traverses each edge
exactly once - Which graphs possess Euler circuits?
6Problem does this graph have an Euler cycle?
7Theorem If every vertex has even degree then
there is an Eulerian path
8What 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
9Heuristic 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
10Hamiltonian graph
11(No Transcript)
12Hamiltons puzzle find a path in the
dodecahedron graph that traverses each vertex
exactly once
13Is the following graph Hamiltonian?
14Is the following graph Hamiltonian?
15Petersen graph symmetry
16Graph colorings
17Other types of graphs
18Other properties
- Diameter
- Girth
- Chromatic number
- etc
19Which continent is this?
20(No Transcript)
21(No Transcript)
22(No Transcript)
23(No Transcript)
24Bosss dilemna
- Six employees, A,B,C,D,E,F
- Some do not get along with others
- Find smallest number of compatible work groups
25What does this graph have to do with the Bosss
dilemma?
26Complementary graph
27Complete subgraph
- Subgraph vertices subset of vertex set, edges
subset of edge set - Complete every vertex is connected to every
other vertex.
28Complementary graph
29Handshakes, 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?
30Visualize 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?
31Some 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?
32Camelot
- 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?
33The PNP 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.
34P vs NP classes
35- 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.
36- 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.
37(No Transcript)
38- This is item 1
- This is item 2
- This is item 3
39Example 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
40NP-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.
41- 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.
42Is 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.
43- 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.
44Millennium Prize Problems
- The Millennium Prize Problems are seven problems
in mathematics that were stated by the Clay
Mathematics Institute in 2000. Currently, six of
the problems remain unsolved. A correct solution
to each problem results in a US1,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.
45Turing 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.
46Turing 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.
47Universal 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'.
48Schematics
49The Busy Beaver
50(No Transcript)
51(No Transcript)
52(No Transcript)