Copyright © Zeph Grunschlag, 2001-2002. More on Graphs.

Slides:



Advertisements
Similar presentations
Chapter 9 Graphs.
Advertisements

Introduction to Graphs
GOLOMB RULERS AND GRACEFUL GRAPHS
1 Section 8.2 Graph Terminology. 2 Terms related to undirected graphs Adjacent: 2 vertices u & v in an undirected graph G are adjacent (neighbors) in.
The Instant Insanity Game
SE561 Math Foundations Week 11 Graphs I
Graph Theory in CS Route Search in Online Map Services
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
Selected Topics in Data Networking Graph Representation.
Applied Discrete Mathematics Week 12: Trees
Graphs.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
9.2 Graph Terminology and Special Types Graphs
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
Lecture 5.2: Special Graphs and Matrix Representation CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Zeph Grunschlag.
Module #19: Graph Theory: part I Rosen 5 th ed., chs. 8-9 내년 3 월 ? 교환 학생 프로그램 영어 점수 미리미리 준비하세요.
CSE, IIT KGP Graph Theory: Introduction Pallab Dasgupta Dept. of CSE, IIT
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 2): Graphs  Graph Terminology (9.2)
aka “Undirected Graphs”
ساختمانهای گسسته دانشگاه صنعتی شاهرود – فروردین 1392.
Advanced Computer Networks: Part 1 Complex Networks, P2P Networks and Swarm Intelligence on Graphs.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Based on slides by Y. Peng University of Maryland
9.1 Introduction to Graphs
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Introduction Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
Graphs What are Graphs? General meaning in everyday math: A plot or chart of numerical data using a coordinate system. Technical meaning in discrete.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
September1999 CMSC 203 / 0201 Fall 2002 Week #13 – 18/20/22 November 2002 Prof. Marie desJardins.
ساختمانهای گسسته دانشگاه صنعتی شاهرود – فروردین 1392.
An Introduction to Graph Theory
Graph Theory and Applications
Lecture 10: Graph-Path-Circuit
Introduction to Graphs. This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer.
Lecture 5.4: Paths and Connectivity CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Zeph Grunschlag.
Graphs Basic properties.
Basic Operations on Graphs Lecture 5.. Basic Operations on Graphs Deletion of edges Deletion of vertices Addition of edges Union Complement Join.
CSE, IIT KGP Graph Theory: Introduction Pallab Dasgupta Dept. of CSE, IIT
LOGO.  Relations:  In these slides: Introductions to graphs Graph terminology Representing graphs and graph isomorphism Connectivity Euler and Hamilton.
Chapter 9: Graphs.
CS 261 – Nov. 17 Graph properties – Bipartiteness – Isomorphic to another graph – Pseudograph, multigraph, subgraph Path Cycle – Hamiltonian – Euler.
CSC 252: Algorithms October 28, 2000 Homework #5: Graphs Victoria Manfredi (252a-ad) notes: -Definitions for each of the graph concepts are those presented.
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
Lecture 5.3: Graph Isomorphism and Connectivity CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Zeph Grunschlag.
Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph.
Fundamental Graph Theory (Lecture 1) Lectured by Hung-Lin Fu 傅 恆 霖 Department of Applied Mathematics National Chiao Tung University.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Chapter 9 (Part 2): Graphs
Lecture 5.2: Special Graphs and Matrix Representation
Lecture 19: CONNECTIVITY Sections
Applied Discrete Mathematics Week 13: Graphs
Special Graphs By: Sandeep Tuli Astt. Prof. CSE.
Copyright © Zeph Grunschlag,
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
Grade 11 AP Mathematics Graph Theory
CS 250, Discrete Structures, Fall 2015
Graph theory Definitions Trees, cycles, directed graphs.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
Graphs Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Graphs.
Graph.
Chapters 8.1 and 8.2 Based on slides by Y. Peng University of Maryland
CS100: Discrete structures
Graphs Discrete Structure CS203.
Let us switch to a new topic:
Lecture 5.3: Graph Isomorphism and Paths
Applied Discrete Mathematics Week 13: Graphs
Concepts of Computation
Presentation transcript:

Copyright © Zeph Grunschlag, More on Graphs

L232 Graph Patterns Complete Graphs - K n A simple graph is complete if every pair of distinct vertices share an edge. The notation K n denotes the complete graph on n vertices. K 1 K 2 K 3 K 4 K 5

L233 Graph Patterns Cycles - C n The cycle graph C n is a circular graph with V = {0,1,2,…,n-1} where vertex i is connected to i +1 mod n and to i -1 mod n. They look like polygons: C 1 C 2 C 3 C 4 C 5 Q: What type of graph are C 1 and C 2 ?

L234 Graph Patterns Wheels - W n A: Pseudographs The wheel graph W n is just a cycle graph with an extra vertex in the middle: W 1 W 2 W 3 W 4 W 5 Usually consider wheels with 3 or more spokes only.

L235 Graph Patterns Cubes - Q n The n-cube Q n is defined recursively. Q 0 is just a vertex. Q n+1 is gotten by taking 2 copies of Q n and joining each vertex v of Q n with its copy v’ : Q 0 Q 1 Q 2 Q 3 Q 4 (hypercube)

L236 Bipartite Graphs A simple graph is bipartite if V can be partitioned into V = V 1  V 2 so that any two adjacent vertices are in different parts of the partition. Another way of expressing the same idea is bichromatic : vertices can be colored using two colors so that no two vertices of the same color are adjacent.

L237 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L238 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L239 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2310 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2311 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2312 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2313 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2314 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2315 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2316 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2317 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it:

L2318 Bipartite Graphs EG: C 4 is a bichromatic: And so is bipartite, if we redraw it: Q: For which n is C n bipartite?

L2319 Bipartite Graphs A: C n is bipartite when n is even. For even n color all odd numbers red and all even numbers green so that vertices are only adjacent to opposite color. If n is odd, C n is not bipartite. If it were, color 0 red. So 1 must be green, and 2 must be red. This way, all even numbers must be red, including vertex n-1. But n-1 connects to 0 .

L2320 Graph Patterns Complete Bipartite - K m,n When all possible edges exist in a simple bipartite graph with m red vertices and n green vertices, the graph is called complete bipartite and the notation K m,n is used. EG: K 2,3 K 4,5

L2321 Subgraphs Notice that the 2-cube occurs inside the 3-cube. In other words, Q 2 is a subgraph of Q 3 : DEF: Let G = (V,E ) and H = (W,F ) be graphs. H is said to be a subgraph of G, if W  V and F  E. Q: How many Q 2 subgraphs does Q 3 have?

L2322 Subgraphs A: Each face of Q 3 is a Q 2 subgraph so the answer is 6, as this is the number of faces on a 3-cube:

L2323 Unions In previous example can actually reconstruct the 3-cube from its 6 2- cube faces:

L2324 Unions If we assign the 2-cube faces (aka Squares) the names S 1, S 2, S 3, S 4, S 5, S 6 then Q 3 is the union of its faces: Q 3 = S 1  S 2  S 3  S 4  S 5  S 6

L2325 Unions DEF: Let G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) be two simple graphs (and V 1,V 2 may or may not be disjoint). The union of G 1, G 2 is formed by taking the union of the vertices and edges. I.E: G 1  G 2 = (V 1  V 2, E 1  E 2 ). A similar definitions can be created for unions of digraphs, multigraphs, pseudographs, etc.

L2326 Graph Isomorphism Various mathematical notions come with their own concept of equivalence, as opposed to equality: Equivalence for sets is bijectivity: EG {,, }  {12, 23, 43} Equivalence for graphs is isomorphism: EG 

L2327 Graph Isomorphism Intuitively, two graphs are isomorphic if can bend, stretch and reposition vertices of the first graph, until the second graph is formed. Etymologically, isomorphic means “same shape”. EG: Can twist or relabel: to obtain:

L2328 Graph Isomorphism Undirected Graphs DEF: Suppose G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) are pseudographs. Let f :V 1  V 2 be a function s.t.: 1) f is bijective 2) for all vertices u,v in V 1, the number of edges between u and v in G 1 is the same as the number of edges between f (u) and f (v ) in G 2. Then f is called an isomorphism and G 1 is said to be isomorphic to G 2.

L2329 Graph Isomorphism Digraphs DEF: Suppose G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) are directed multigraphs. Let f :V 1  V 2 be a function s.t.: 1) f is bijective 2) for all vertices u,v in V 1, the number of edges from u to v in G 1 is the same as the number of edges from f (u) and f (v ) in G 2. Then f is called an isomorphism and G 1 is said to be isomorphic to G 2. Note: Only difference between two definitions is the italicized “from” in no. 2 (was “between”).

L2330 Graph Isomorphism -Example EG: Prove that is isomorphic to. First label the vertices:

L2331 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star

L2332 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star. The next vertex seen is 3, not 2 so set f (2) =

L2333 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star. The next vertex seen is 3, not 2 so set f (2) = 3. Next vertex is 5 so set f (3) =

L2334 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star. The next vertex seen is 3, not 2 so set f (2) = 3. Next vertex is 5 so set f (3) = 5. In this fashion we get f (4) =

L2335 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star. The next vertex seen is 3, not 2 so set f (2) = 3. Next vertex is 5 so set f (3) = 5. In this fashion we get f (4) = 2, f (5) =

L2336 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star. The next vertex seen is 3, not 2 so set f (2) = 3. Next vertex is 5 so set f (3) = 5. In this fashion we get f (4) = 2, f (5) = 4. If we would continue, we would get back to f (1) =1 so this process is well defined and f is a morphism

L2337 Graph Isomorphism -Example Next, set f (1) = 1 and try to walk around clockwise on the star. The next vertex seen is 3, not 2 so set f (2) = 3. Next vertex is 5 so set f (3) = 5. In this fashion we get f (4) = 2, f (5) = 4. If we would continue, we would get back to f (1) =1 so this process is well defined and f is a morphism. Finally since f is bijective, f is an isomorphism

L2338 Properties of Isomorphims Since graphs are completely defined by their vertex sets and the number of edges between each pair, isomorphic graphs must have the same intrinsic properties. I.e. isomorphic graphs have the same… …number of vertices and edges …degrees at corresponding vertices …types of possible subgraphs …any other property defined in terms of the basic graph theoretic building blocks!

L2339 Graph Isomorphism -Negative Examples Once you see that graphs are isomorphic, easy to prove it. Proving the opposite, is usually more difficult. To show that two graphs are non-isomorphic need to show that no function can exist that satisfies defining properties of isomorphism. In practice, you try to find some intrinsic property that differs between the 2 graphs in question.

L2340 Graph Isomorphism -Negative Examples A: Why are the following non- isomorphic? u1u1 u2u2 u3u3 u5u5 u4u4 v1v1 v2v2 v3v3 v4v4

L2341 Graph Isomorphism -Negative Examples A: 1 st graph has more vertices than 2 nd. Q: Why are the following non- isomorphic? u1u1 u2u2 u3u3 u5u5 u4u4 v1v1 v2v2 v3v3 v5v5 v4v4

L2342 Graph Isomorphism -Negative Examples A: 1 st graph has more edges than 2 nd. Q: Why are the following non- isomorphic? u1u1 u2u2 u3u3 u5u5 u4u4 v1v1 v2v2 v3v3 v5v5 v4v4

L2343 Graph Isomorphism -Negative Examples A: 2 nd graph has vertex of degree 1, 1 st graph doesn't. Q: Why are the following non- isomorphic? u1u1 u2u2 u3u3 u6u6 u4u4 u5u5 u7u7 u9u9 v1v1 v2v2 v3v3 v6v6 v4v4 v5v5 v7v7 v8v8 v9v9 u8u8

L2344 Graph Isomorphism -Negative Examples A: 1 st graph has 2 degree 1 vertices, 4 degree 2 vertices and 2 degree 3 vertices. 2 nd graph has 3 degree 1 vertices, 3 degree 2 vertices and 3 degree 3 vertices. Q: Why are the following non-isomorphic? u1u1 u2u2 u3u3 u6u6 u4u4 u5u5 u7u7 u8u8 v1v1 v2v2 v3v3 v6v6 v4v4 v5v5 v7v7 v8v8

L2345 Graph Isomorphism -Negative Examples A: None of the previous approaches work as there are the same no. of vertices, edges, and same no. of vertices per degree. LEMMA: If G and H are isomorphic, then any subgraph of G will be isomorphic to some subgraph of H. Q: Find a subgraph of 2 nd graph which isn’t a subgraph of 1 st graph. u1u1 u2u2 u3u3 u6u6 u4u4 u5u5 u7u7 u8u8 v1v1 v2v2 v3v3 v6v6 v4v4 v5v5 v7v7 v8v8

L2346 Graph Isomorphism -Negative Examples A: This subgraph is not a subgraph of the left graph. Why not? Deg. 3 vertices must map to deg. 3 vertices. Since subgraph and left graph are symmetric, can assume v 2 maps to u 2. Adjacent deg. 1 vertices to v 2 must map to degree 1 vertices, forcing the deg. 2 adjacent vertex v 3 to map to u 3. This forces the other vertex adjacent to v 3, namely v 4 to map to u 4. But then a deg. 3 vertex has mapped to a deg. 2 vertex   u1u1 u2u2 u3u3 u6u6 u4u4 u5u5 u7u7 u8u8 v1v1 v2v2 v3v3 v6v6 v4v4 v5v5 v7v7 v8v8