Introduction to Graph Theory

Slides:



Advertisements
Similar presentations
Chapter 9 Graphs.
Advertisements

Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
Review Binary Search Trees Operations on Binary Search Tree
1 Slides based on those of Kenneth H. Rosen Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Graphs.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
Discrete Structures Chapter 7A Graphs Nurul Amelina Nasharuddin Multimedia Department.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
GRAPH Learning Outcomes Students should be able to:
Graphs Chapter 10.
Graphs context: functions context: graphs and networks.
Data Structures Week 9 Introduction to Graphs Consider the following problem. A river with an island and bridges. The problem is to see if there is a way.
Based on slides by Y. Peng University of Maryland
Graphs.  Definition A simple graph G= (V, E) consists of vertices, V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements.
Data Structures & Algorithms Graphs
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
An Introduction to Graph Theory
Graph Theory and Applications
Basic properties Continuation
Graphs Basic properties.
Graphs Upon completion you will be able to:
Introduction to Graph Theory By: Arun Kumar (Asst. Professor) (Asst. Professor)
CS 261 – Nov. 17 Graph properties – Bipartiteness – Isomorphic to another graph – Pseudograph, multigraph, subgraph Path Cycle – Hamiltonian – Euler.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
CS Lecture 22 Graph Theory. Can I draw the above figure in one continuous trace with no line being drawn twice?
An Introduction to Graph Theory
Applied Discrete Mathematics Week 14: Trees
Graphs: Definitions and Basic Properties
Chapter 9 (Part 2): Graphs
Introduction to Graphs
Applied Discrete Mathematics Week 13: Graphs
Special Graphs By: Sandeep Tuli Astt. Prof. CSE.
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
CSE 373, Copyright S. Tanimoto, 2001 Graphs 1 -
Chapter 5 Fundamental Concept
Graph theory Definitions Trees, cycles, directed graphs.
Discrete Structures – CNS2300
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
Introduction to Graphs
Matrix Representation of Graph
Based on slides by Y. Peng University of Maryland
Can you draw this picture without lifting up your pen/pencil?
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Lecture 15: Graph Theory II
CSE 373, Copyright S. Tanimoto, 2002 Graphs 1 -
CS100: Discrete structures
Graph Operations And Representation
Walks, Paths, and Circuits
Warm Up – Wednesday.
Decision Maths Graphs.
Representing Graphs Wade Trappe.
Discrete Mathematics Lecture 12: Graph Theory
Discrete Mathematics Lecture 13_14: Graph Theory and Tree
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Graphs By Rajanikanth B.
Graphs G = (V, E) V are the vertices; E are the edges.
Trees-2, Graphs Data Structures with C Chpater-6 Course code: 10CS35
Applied Combinatorics, 4th Ed. Alan Tucker
Warm Up – Tuesday Find the critical times for each vertex.
Paths and Connectivity
Introduction to Graph Theory
Applied Discrete Mathematics Week 13: Graphs
Based on slides by Y. Peng University of Maryland
Agenda Review Lecture Content: Shortest Path Algorithm
GRAPHS.
Introduction to Graphs
Presentation transcript:

Introduction to Graph Theory CPSC 221 2011/03/09

Learning Goals Today, we will: - Formally define graphs. - Convert between adjacency matrices/lists and their corresponding graphs. - Examine graph isomorphism.

What is Graph Theory? It is a branch of mathematics dating back to the 1700s. Euler's paper on the Seven Bridges of Königsberg is considered to be the first paper on graph theory. Graph: adjective, relating to graphs. Theory: noun, theory. Thus, graph theory: theory relating to graphs.

What is Graph Theory? A graph is an abstract structure that expresses connections.

What is Graph Theory? A graph is an abstract structure that expresses connections. For example: a is connected to b, d, and e; b to c and d; d to e.

What is Graph Theory? A graph is an abstract structure that expresses connections. For example: a is connected to b, d, and e; b to c and d; d to e. Give your interpretation of this set of statements by drawing a picture.

Why Graph Theory? Some of its many applications include... - Search algorithms.

Why Graph Theory? Some of its many applications include... - Search algorithms. - Register allocation.

Why Graph Theory? Some of its many applications include... - Search algorithms. - Register allocation. - Flow networks.

Why Graph Theory? Some of its many applications include... - Search algorithms. - Register allocation. - Flow networks. - Social networks, naturally.

Definitions A graph is a tuple G = (V, E) where V is a set of vertices, and E is a set of edges. A vertex is a distinct value, such as a number or string. Bob, 5, ... An edge is a 2-element set of vertices from V. {Alice, Bob}, {4, 7}, ...

Definitions A loop is an edge connecting one vertex to itself, i.e. (x, x). A simple graph has no loops, and no more than 1 edge between any 2 vertices. A directed edge is an ordered pair of vertices, instead of a set. That is, (Alice, Bob) is different from (Bob, Alice). An undirected graph is one whose edges are not directed. We mostly work with simple, undirected graphs in CPSC 221.

Definitions Example: a is connected to b, d, and e; b to c and d; d to e. V = {a, b, c, d, e} E = {{a, b}, {a, d}, {a, e}, {b, c}, {b, d}, {d, e}} For each edge {x, y}, vertices x and y are said to be adjacent.

Examples of Graphs Trees: Complete graphs:

Adjacency List An adjacency list is a data structure for representing a graph. It maintains a list of vertices; associated with each vertex is a list of all vertices adjacent to it. a → {b, d, e} b → {a, c, d} c → {b} d → {a, b, e} e → {a, d}

Adjacency Matrix An adjacency matrix is another way to represent a graph. For a graph G, let n = |V|, its number of vertices. We arbitrarily number the vertices 1 to n. The adjacency matrix of G is an n by n matrix where each entry aij is equal to 1 if vertices i and j are adjacent, and 0 otherwise. 0 1 0 1 1 1 0 1 1 0 0 1 0 0 0 (a:1, b:2, c:3, d:4, e:5) 1 1 0 0 1 1 0 0 1 0

Isomorphism Consider these two graphs, G1 = (V1, E1) and G2 = (V2, E2). Are they similar in some way? V1 = {a, b, c, d, e} E1 = {{a, b}, {a, d}, {a, e}, {b, c}, {b, d}, {d, e}} V2 = {v, w, x, y, z} E2 = {{v, w}, {v, x}, {v, y}, {w, x}, {w, y}, {x, z}}

Isomorphism Consider these two graphs, G1 = (V1, E1) and G2 = (V2, E2). Are they similar in some way? V1 = {a, b, c, d, e} E1 = {{a, b}, {a, d}, {a, e}, {b, c}, {b, d}, {d, e}} V2 = {v, w, x, y, z} E2 = {{v, w}, {v, x}, {v, y}, {w, x}, {w, y}, {x, z}} Draw them.

Isomorphism If we apply to G1 the function (a, b, c, d, e) → (v, x, z, w, y), it would result in exactly G2!

Isomorphism If we apply to G1 the function (a, b, c, d, e) → (v, x, z, w, y), it would result in exactly G2! Recall that order does not matter in a set. V1' = {v, x, z, w, y} E1' = {{v, x}, {v, w}, {v, y}, {x, z}, {x, w}, {w, y}} Such a function is called an isomorphism between graphs. It means that the graphs have the same structure.

Isomorphism No polynomial-time algorithm for determining graph isomorphism in general has been found. However, the problem has been solved for special cases such as trees. What are some clues to isomorphism?

More Definitions The degree of a vertex v, deg(v), is the number of edges incident to (touching) it. On a drawing, simply count the number of segments radiating from a vertex. Note that a loop is counted twice. The degree sequence of a graph is a non- increasing sequence formed by the degrees of its vertices. A path in a graph is a sequence of vertices where each vertex has an edge to the next vertex. A cycle is a path whose first and vertices are the same.

More Isomorphism Consider these graphs, drawn for simplicity. Are they isomorphic? Why or why not?

More Isomorphism Are these graphs isomorphic? Why or why not?

Closing Remarks We see that if two graphs are isomorphic, they both satisfy some fact. ~SomeFact(G, H) → ~Isomorphic(G, H)

Closing Remarks We see that if two graphs are isomorphic, they both satisfy some fact. ~SomeFact(G, H) → ~Isomorphic(G, H) ∴ Isomorphic(G, H) → SomeFact(G, H)

Closing Remarks We see that if two graphs are isomorphic, they both satisfy some fact. ~SomeFact(G, H) → ~Isomorphic(G, H) ∴ Isomorphic(G, H) → SomeFact(G, H) However, this does not tell us anything about the other direction...

Closing Remarks We see that if two graphs are isomorphic, they both satisfy some fact. ~SomeFact(G, H) → ~Isomorphic(G, H) ∴ Isomorphic(G, H) → SomeFact(G, H) However, this does not tell us anything about the other direction... SomeOtherFact(G, H) → Isomorphic(G, H) ?

Closing Remarks An invariant of a graph is a fact shared by all of its isomorphisms. Examples of invariants: - Number of vertices and edges - Degree sequence - Vertex chromatic number Even two graphs that share many facts, such as those octagonal graphs, may not be isomorphic.

This slide is intentionally left blank.