1 / 52

Graph theory

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

nola
Télécharger la présentation

Graph theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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

  3. These are all equivalent

  4. Euler and the Konigsberg bridges

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

  6. Problem: does this graph have an Euler cycle?

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

  8. 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”

  9. 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”

  10. Hamiltonian graph

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

  12. Is the following graph Hamiltonian?

  13. Is the following graph Hamiltonian?

  14. Petersen graph: symmetry

  15. Graph colorings

  16. Other types of graphs

  17. Other properties • Diameter • Girth • Chromatic number • etc

  18. Which continent is this?

  19. 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

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

  21. Complementary graph

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

  23. Complementary graph

  24. 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?

  25. 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?

  26. 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?

  27. 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?

  28. 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.

  29. P vs NP classes

  30. 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.

  31. 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.

  32. This is item 1 • This is item 2 • This is item 3

  33. 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”

  34. 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.

  35. 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.

  36. 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.

  37. 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.

  38. Millennium 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 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.

  39. 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.

  40. 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.

  41. 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'.

  42. Schematics

  43. The Busy Beaver

More Related