1 / 22

What happened to K ö nigsberg?

What happened to K ö nigsberg?. The Bridges of Königsberg. Can one take a walk in Königsberg and cross each of the seven bridges just once, returning to the starting point ?. Our Japanese Garden has four wooden bridges and three stone bridges.

rupali
Download Presentation

What happened to K ö nigsberg?

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. What happened to Königsberg?

  2. The Bridges of Königsberg • Can one take a walk in Königsberg and cross each of the seven bridges just once, returning to the starting point ?

  3. Our Japanese Garden has four wooden bridges and three stone bridges

  4. Map of Japanese Garden paths and bridgesCan one cross each bridge just once on a walk?

  5. N I E S The vertices and edges of a graph • In a graph, vertices represent states of being and edges joining them represent relationships. • In the Königsberg Bridge problem there are four states of being: in the N(orth), S(outh) or E(ast) part of town or on the I(sland), which we represent as nodes or vertices.The relationship between them is that they are joined by bridges, represented by the links or edges of the graph.

  6. Tabulating the links • All possible links between vertices may be recorded over a cross tabulation of vertices, or grid of all possible pairs of vertices, or a two-dimensional coordinate net of vertices. This coordinate net is called the Cartesian Product of the set of vertices, V={N,I,S,E} with itself. • It is denoted by Vx V.

  7. The Cartesian Product • The Cartesian Product, ST, of two sets, S and T, is the set of all ordered pairs of elements one from each set in the indicated order.For example, if S={blue , green , black } and T={shirt, tie} thenST = {blue shirt, blue tie, green shirt, green tie, black shirt, black tie} • NOTE: the Cartesian product in J-think is • S ( , each / ) T applied to the lists S and T.

  8. Coordinates in space • If R is the set of real numbers then RR is the set of all points in a coordinate plane or space. • If N is the set of whole numbers, then NN is the set of lattice points.

  9. Link (function) table for a graph • The adjacency function defined on Vx V, where V is the set of vertices, gives the number of edges joining each pair of vertices. • The degree of a vertex is the number of edges associated with it.

  10. Adjacency Matrix • The table of number of connections between vertices is called the adjacency matrixfor the graph. Note that the adjacency matrix is symmetric. The degree of a vertex is the sum of the entries in its row or column. • A graph is called simple if no entry is bigger than 1 and all diagonal entries are 0. A graph is complete if all non-diagonal entries are 1 (and diagonal entries are 0). • A vertex with degree 0 is isolated.

  11. Exercise: • Draw a graph of the Japanese Garden with the link between regions being the crossing of a bridge. • Construct the adjacency matrix for the graph and show that the graph is not simple. • It is possible to take a walk in the garden and cross each bridge only once … but there is a problem. What is that problem?

  12. Theorem 1 • The sum of the degrees of the vertices of a graph is twice the number of edges in the graph. • Proof (by induction on the number of edges) • First: one edge implies 2 vertices of degree 1 or 1 vertex of degree 2. Proposition is true for one edge.Next: Assume it is true for a graph of n edges. If an edge is added to a graph then it must add 2 to the sum of the degrees, which was 2n and must now be 2n+2 = 2(n+1), i.e proposition is true for n+1 edges.Consequently proposition is true for all n.

  13. Corollary to Theorem 1 • In any graph the number of vertices with odd degree is even.(Sometimes called the 'Handshaking Lemma') • Proof: The sum of the degrees must be even (twice the number of edges). Since the sum of the sum of an even number of odd numbers is even, the sum of an odd number of odd degrees will be odd and so would contradict the theorem.

  14. When are two graphs the same? • Clearly the number of vertices must be the same, and the degrees of the corresponding vertices should be the same, and with corresponding vertices written in the same order the adjacency matrices should be identical (but what order?).

  15. Paths and circuits • A path through a graph is a sequence of edges from the set of all edges {eSTu} of the graph { eABk , eBCl, ,…, eYZm }where eHKr is the rth edge joining vH to vK . The sequence of vertices may be deduced from this specification. If the graph is simple, then a list of vertices could also specify the path. • A circuit is a closed path, i.e. one whose last vertex is the same as the first. • A graph is said to be connected if there is a path between any two vertices.

  16. Eulerian paths • An Eulerian path is one that includes every edge exactly once. • An Eulerian circuit is an Eulerian path that is also a circuit. • A connected graph that has an Eulerian circuit is said to be Eulerian.A connected graph that has an Eulerian path, but no Eulerian circuit, is semi-Eulerian. • The Königsberg Bridge problem is then to determine whether the graph is Eulerian.

  17. Hamiltonian paths • A Hamiltonian path is a path that includes every vertex exactly once, except that the last vertex may coincide with the first. • A Hamiltonian circuit is a Hamiltonian path that is a circuit. • A connected graph that has a Hamiltonian circuit is said to be Hamiltonian.

  18. Theorem • Let G be a (non-empty) connected graph. • If all the vertices of G are of even degree, then the graph is Eulerian. • If exactly two vertices of G have odd degree then the graph is semi-Eulerian. • If G has more than two vertices of odd degree, the G is neither Eulerian nor semi-Eulerian. • {Remember the number of vertices of odd degree is even.}

  19. Proof : • When a path arrives and leaves a vertex along different edges, two edges of the graph have been used. If a vertex has an odd number of edges associated with it, then all edges in the path can only be used up if this vertex is a starting or an ending point of the path. Thus there cannot be more than two vertices of odd degree if the graph has an Eulerian path and none at all if there is an Eulerian circuit. • This is the third part of the Theorem. The first two parts assert that the converse is also true.

  20. Proof (continued) • Now suppose a graph, G, has no odd vertices. Starting with any arbitrary point v0 construct a path, C, from this vertex without repeating any edges. Any vertex that is arrived at in this path can be left since the degree is even. Since the number of vertices is finite we must eventually return to v0. If the resulting path is not an Eulerian circuit, then there are vertices of G not contained in the path and let G' denote the graph obtained by deleting all edges of C and any vertices of G that become isolated in so doing.

  21. Proof (continued) • There must be at least one vertex, v1, of C in G' since G is connected (otherwise the vertices of C would be disconnected from those of G').All vertices in G' have even degree, and starting with v1 construct a circuit C' in G' and extend circuit C to include C' when the path reaches v1. Call this extended circuit C and repeat the procedure.The result will be an Eulerian circuit.For the semi-Eulerian case, begin witha path between the odd vertices.

  22. What’s the big idea? • Some relationships which are not functional, ordering or equivalence have a graphical representation which we call a graph. The elements are called vertices and edges are used to identify related elements. An adjacency table (matrix) shows all relationships. • Connectivity – the ability to connect two vertices through a chain of edges – is commonly associated with the applications of graph relationships and degree is a simple but useful function defined on each vertex. The Handshaking lemma is an example. • Eulerian and Hamiltonian paths or circuits are important in various applications. Whether a graph is Eulerian can be determined and, if it is, an Eulerian path constructed using the same technique as in the proof of the theorem, .

More Related