An Introduction to Graph Theory

Similar documents
Graphs. Introduction To Graphs: Exercises. Definitions:

DEFINITION OF GRAPH GRAPH THEORY GRAPHS ACCORDING TO THEIR VERTICES AND EDGES EXAMPLE GRAPHS ACCORDING TO THEIR VERTICES AND EDGES

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

(5.2) 151 Math Exercises. Graph Terminology and Special Types of Graphs. Malek Zein AL-Abidin

Graph Theory. Part of Texas Counties.

Graph Theory: Applications and Algorithms

CPCS Discrete Structures 1

CHAPTER 2. Graphs. 1. Introduction to Graphs and Graph Isomorphism

Graphs. Pseudograph: multiple edges and loops allowed

Section 8.2 Graph Terminology. Undirected Graphs. Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between u and v.

Introduction III. Graphs. Motivations I. Introduction IV

Foundations of Discrete Mathematics

Introduction aux Systèmes Collaboratifs Multi-Agents

Introduction to Graphs

Graphs (MTAT , 6 EAP) Lectures: Mon 14-16, hall 404 Exercises: Wed 14-16, hall 402

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

Graph and Digraph Glossary

Adjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.

Combinatorics Summary Sheet for Exam 1 Material 2019

Math 776 Graph Theory Lecture Note 1 Basic concepts

Chapter 11: Graphs and Trees. March 23, 2008

Introduction to Graph Theory

Graph Theory. Connectivity, Coloring, Matching. Arjun Suresh 1. 1 GATE Overflow

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Varying Applications (examples)

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

Basics of Graph Theory

Chapter 1 Graph Theory

GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs

BIL694-Lecture 1: Introduction to Graphs

Chapter 2 Graphs. 2.1 Definition of Graphs

Chapter 8 Topics in Graph Theory

2. CONNECTIVITY Connectivity

Elements of Graph Theory

Math 778S Spectral Graph Theory Handout #2: Basic graph theory

Artificial Intelligence

Module 2: NETWORKS AND DECISION MATHEMATICS

Number Theory and Graph Theory

0.0.1 Network Analysis

Discrete Mathematics (2009 Spring) Graphs (Chapter 9, 5 hours)

Course Introduction / Review of Fundamentals of Graph Theory

1 Matchings in Graphs

CMSC 380. Graph Terminology and Representation

Foundations of Discrete Mathematics

Characterizing Graphs (3) Characterizing Graphs (1) Characterizing Graphs (2) Characterizing Graphs (4)

WUCT121. Discrete Mathematics. Graphs

Worksheet for the Final Exam - Part I. Graphs

Paths. Path is a sequence of edges that begins at a vertex of a graph and travels from vertex to vertex along edges of the graph.

CHAPTER 10 GRAPHS AND TREES. Copyright Cengage Learning. All rights reserved.

γ(ɛ) (a, b) (a, d) (d, a) (a, b) (c, d) (d, d) (e, e) (e, a) (e, e) (a) Draw a picture of G.

Graphs. The ultimate data structure. graphs 1

v V Question: How many edges are there in a graph with 10 vertices each of degree 6?

Outline. Introduction. Representations of Graphs Graph Traversals. Applications. Definitions and Basic Terminologies

Assignment 4 Solutions of graph problems

Discrete Wiskunde II. Lecture 6: Planar Graphs

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

Assignment 1 Introduction to Graph Theory CO342

Graph Theory. ICT Theory Excerpt from various sources by Robert Pergl

MC 302 GRAPH THEORY 10/1/13 Solutions to HW #2 50 points + 6 XC points

Ordinary Differential Equation (ODE)

6.2. Paths and Cycles

Lecture 22 Tuesday, April 10

Lecture 3: Recap. Administrivia. Graph theory: Historical Motivation. COMP9020 Lecture 4 Session 2, 2017 Graphs and Trees

Graph Theory. Probabilistic Graphical Models. L. Enrique Sucar, INAOE. Definitions. Types of Graphs. Trajectories and Circuits.

Graphs: Definitions Trails, Paths, and Circuits Matrix Representations Isomorphisms. 11. Graphs and Trees 1. Aaron Tan. 30 October 3 November 2017

Algebraic Graph Theory- Adjacency Matrix and Spectrum

CS 311 Discrete Math for Computer Science Dr. William C. Bulko. Graphs

Introduction to Mathematical Programming IE406. Lecture 16. Dr. Ted Ralphs

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

Lecture 5: Graphs & their Representation

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities?

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

Lecture 1: Examples, connectedness, paths and cycles

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

Graphs. The ultimate data structure. graphs 1

Graph theory: basic concepts

Simple graph Complete graph K 7. Non- connected graph

Discrete Structures CISC 2315 FALL Graphs & Trees

MATH 350 GRAPH THEORY & COMBINATORICS. Contents

Figure 2.1: A bipartite graph.

Graphs Definitions. Gunnar Gotshalks. GraphDefinitions 1

March 20/2003 Jayakanth Srinivasan,

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

1 Digraphs. Definition 1

CS 441 Discrete Mathematics for CS Lecture 26. Graphs. CS 441 Discrete mathematics for CS. Final exam

Chapter 2: Graph Theory

CS388C: Combinatorics and Graph Theory

5 Matchings in Bipartite Graphs and Their Applications

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

by conservation of flow, hence the cancelation. Similarly, we have

Ma/CS 6b Class 13: Counting Spanning Trees

Inf 496/596 Topics in Informatics: Analysis of Social Network Data

Transcription:

An Introduction to Graph Theory CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 12:00, Friday 17 th February 2012

Outline 1 Graphs 2 Paths and cycles 3 Graphs and Matrices

Outline 1 Graphs 2 Paths and cycles 3 Graphs and Matrices

A graph can refer to a function graph or graph of a function, i.e. a plot. A graph can also be a collection of points and lines connecting some subset of them. Points of a graph are most commonly known as graph vertices, but may also be called nodes or simply points. Lines connecting the vertices of a graph are most commonly known as graph edges, but may also be called arcs or lines. The study of graphs is known as graph theory, and was first systematically investigated by D. König in the 1930s.

A normal graph in which edges have no direction is said to be undirected. When arrows are placed on one or both endpoints of the edges of a graph to indicate direction, the graph is said to be directed. A directed graph in which each edge is given a unique direction (one arrow on each edge) is called an oriented graph. A graph with numbers on the edges is called a weighted graph, in a weighted graph the length of a path is the sum of the weights of the edges in the path. A graph or directed graph together with a function which assigns a positive real number to each edge is known as a network.

Example (Undirected graph) Example (Oriented graph) Luton Liverpool Luton Liverpool Glasgow Manchester Glasgow Manchester Example (Directed graph) Example (Weighted graph) Luton Liverpool Luton 164 219 Liverpool 371 34 Glasgow Manchester Glasgow Manchester

Graphs A graph (or undirected graph) G consists of a set V of vertices and a set E of edges such that each edge e E is associated with an unordered pair of vertices. If there is a unique edge e associated with the vertices v and w, we write e = (v, w) or e = (w, v). In this context, (v, w) denotes an edge between v and w in an undirected graph (not an ordered pair). A directed graph (or digraph) G consists of a set V of vertices and a set E of edges such that each edge e E is associated with an ordered pair of vertices. If there is a unique edge e associated with the ordered pair (v, w) of the vertices, we write e = (v, w), which denotes an edge from v to w. An edge e of a graph (directed or undirected) that is associated with the pair of vertices v and w is said to be incident on v and w, and v and w are said to be incident on e and to be adjacent vertices. The degree of a vertex v, δ(v), is the number of edges incident on v.

graphs An edge incident on a single vertex is called a loop. A vertex that has no incident edges is called and isolated vertex. Distinct edges associated with the same pair of vertices are called parallel edges. A graph with neither loops nor parallel edges is called a simple graph. Example (Simple Graph) Example (Non-simple graph)

graphs A complete graph on n vertices, denoted K n, is a simple graph with n vertices in which there is an edge between every pair of distinct vertices. A graph G = (V, E) is bipartite if there exist subsets V 1 and V 2 of v such that V 1 V 2 =, V 1 V 2 = V, and each edge in E is incident on one vertex in V 1 and one vertex in V 2. A complete bipartite graph on m and n vertices, denotes K m,n, is the simplest graph whose vertex set is partitioned into sets V 1 with m vertices and V 2 with n vertices in which the edge set consists of all edges of the form (v 1, v 2) with v 1 V 1 and v 2 V 2 Example (Complete Graph) Example (Complete Bipartite graph)

Outline 1 Graphs 2 Paths and cycles 3 Graphs and Matrices

Paths Let v 0 and v n be vertices on a graph. A path from v 0 to v n of length n is an alternating sequence of n + 1 vertices and n edges beginning with vertex v 0 and ending with vertex v n. (v 0, e 1, v 1, e 2, v v,..., v n 1, e n, v n) in which edge e i is incident on vertices v i 1 and v i, for i = 1,..., n. v 1 e 1 v 2 e 2 v 5 e 4 v 4 e 3 v 3

connected graphs A graph G is connected if given any vertices v and w in G, there is a path from v to w. Below is an example of a graph that is not connected. v 1 e 1 v 2 e 3 e 2 v 5 e 4 v 4 v 3

Subgraphs Let G = (V, E) be a graph. We call (V, E ) a subgraph of G if: V V and E E For every edge e E, if e is incident on v and w, then v, w V v 1 e 1 v 2 e 8 e 3 e 2 e 5 v 6 e 6 v 5 e 4 v 4 e 7 v 3 A graph G v 1 e 1 v 2 e 3 e 2 e 5 v 6 e 6 v 5 e 4 v 4 v 3 A graph G, a subgraph of G Let G be a graph and let v be a vertex in G. The subgraph G of G consisting of all edges and vertices in G that are contained in some path beginning at v is called the component of G containing v.

Cycles Let v and w be vertices in a graph G. A simple path from v to w is a path from v to w with no repeated vertices. A cycle (or circuit) is a path of nonzero length from v to v with no repeated edges. A simple cycle is a cycle from v to v in which, except for the beginning and ending vertices that are both equal to v, there are no repeated vertices. A cycle in a graph G that includes all of the edges and all of the vertices of G is called an Euler cycle.

Euler cycle Theorem If a graph G has an Euler cycle, then G is connected and every vertex has an even degree. Theorem If G is a connected graph and every vertex has even degree, the G has an Euler cycle. Theorem If G is a graph with m edges and vertices {v 1, v 2,..., v n}, then n δ(v i ) = 2m i=1 In particular, the sum over the degrees of all the vertices in a graph is even. Also, in any graph, the number of vertices of odd degree is even.

Euler cycle Theorem A graph has a path with no repeated edges from v to w (v w) containing all the egdes and vertices if and only if it is connected and v and w are the only vertices having odd degree. Theorem If a graph G contains a cycle from v to v, G contains a simple cycle from v to v.

Hamiltonian cycle A cycle in a graph G that contains each vertex in G exactly once, except for the starting and ending vertex that appears twice, is called a Hamiltonian cycle.

Outline 1 Graphs 2 Paths and cycles 3 Graphs and Matrices

The adjacency matrix The adjacency matrix of a graph is a matrix with rows and columns labeled by graph vertices, with a 1 or 0 in position (v i,v j ) according to whether v i and v j are adjacent or not. For a simple graph with no self-loops, the adjacency matrix must have 0s on the diagonal. For an undirected graph, the adjacency matrix is symmetric. If i = j the element is twice the number of the loops incident on the vertex. The eigenvalues of a graph are defined as the eigenvalues of its adjacency matrix. The set of eigenvalues of a graph is called a graph spectrum.

The adjacency matrix Example (Adjacency matrix) v 1 v 2 2 0 1 1 0 0 2 0 1 2 0 1 1 0 1 0 v 4 v 3

The incidence matrix The physicist Kirchhoff (1847) was the first to define the incidence matrix. To obtain the incidence matrix of a graph, we label the rows with the vertices and the columns with edges (in some arbitrary order). The entry for a row v and column e is 1 if e is incident on v and 0 otherwise.

The incidence matrix Example (Incidence matrix) e 1 v 1 v 2 e 6 e 4 e 3 e 2 1 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 v 4 e 5 v 3

Exercises Draw a graph for the following adjacency matrices: 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 2 0 0 1 0 0 1 2 0 2 0 1 2 0 1 0 0 0 0 1 0 1 0 0 1 0 0 2 0 1 0 0 1 0 1 0 0 0

Exercises Draw a graph for the following incidence matrices: 1 0 0 0 0 1 1 0 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 1 0 0 1 1 2 0 1 1 0 1 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0

Further Exercises 1 Wrtie a programme that determines whether a graph contains an Euler cycle, where inputs are given in the form of an adjaceny matrix or an incidence matrix. 2 Wrtie a programme that lists all simple paths between two given vertices.