Paths, Circuits, and Connected Graphs

Similar documents
Majority and Friendship Paradoxes

Graphs. Pseudograph: multiple edges and loops allowed

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.

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

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

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

2. CONNECTIVITY Connectivity

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Varying Applications (examples)

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.

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

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

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Basics of Graph Theory

Number Theory and Graph Theory

Two Characterizations of Hypercubes

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

Graph theory - solutions to problem set 1

Algorithms. Graphs. Algorithms

Ma/CS 6b Class 26: Art Galleries and Politicians

1 Digraphs. Definition 1

Elements of Graph Theory

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))

Discrete mathematics , Fall Instructor: prof. János Pach

Algorithms: Graphs. Amotz Bar-Noy. Spring 2012 CUNY. Amotz Bar-Noy (CUNY) Graphs Spring / 95

Planar graphs. Chapter 8

Fundamental Properties of Graphs

Math 776 Graph Theory Lecture Note 1 Basic concepts

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Lecture 20 : Trees DRAFT

Part II. Graph Theory. Year

Introduction III. Graphs. Motivations I. Introduction IV

Math 170- Graph Theory Notes

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

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Definition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1

BIL694-Lecture 1: Introduction to Graphs

WUCT121. Discrete Mathematics. Graphs

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas

Chapter 11: Graphs and Trees. March 23, 2008

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

Definition 1.1. A matching M in a graph G is called maximal if there is no matching M in G so that M M.

8.2 Paths and Cycles

Exercise set 2 Solutions

22 Elementary Graph Algorithms. There are two standard ways to represent a

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

CMSC 380. Graph Terminology and Representation

Graph Theory Questions from Past Papers

11.2 Eulerian Trails

Module 11. Directed Graphs. Contents

22 Elementary Graph Algorithms. There are two standard ways to represent a

Graphs. Introduction To Graphs: Exercises. Definitions:

Combinatorics Summary Sheet for Exam 1 Material 2019

Graph Definitions. In a directed graph the edges have directions (ordered pairs). A weighted graph includes a weight function.

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

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

Copyright 2000, Kevin Wayne 1

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Figure 2.1: A bipartite graph.

Algorithm Design and Analysis

INTRODUCTION TO GRAPH THEORY. 1. Definitions

Discrete Mathematics and Probability Theory Spring 2015 Vazirani Note 5

Topic 10 Part 2 [474 marks]

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

Lecture 4: Walks, Trails, Paths and Connectivity

Assignment 1 Introduction to Graph Theory CO342

Introduction to Graph Theory

Lecture 5: Graphs. Graphs! Euler Definitions: model. Fact! Euler Again!! Planar graphs. Euler Again!!!!

Theorem 3.1 (Berge) A matching M in G is maximum if and only if there is no M- augmenting path.

Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr. Radhika Nagpal.

Ma/CS 6b Class 10: Ramsey Theory

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

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

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

Trees. Arash Rafiey. 20 October, 2015

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

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

GRAPH THEORY: AN INTRODUCTION

Graph Connectivity G G G

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Discrete mathematics II. - Graphs

Ma/CS 6b Class 12: Ramsey Theory

Characterizations of Trees

Face Width and Graph Embeddings of face-width 2 and 3

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

ECS 20 Lecture 17b = Discussion D8 Fall Nov 2013 Phil Rogaway

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.

Lecture 10. Elementary Graph Algorithm Minimum Spanning Trees

List of Theorems. Mat 416, Introduction to Graph Theory. Theorem 1 The numbers R(p, q) exist and for p, q 2,

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Ma/CS 6b Class 5: Graph Connectivity

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Trees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.

K 4 C 5. Figure 4.5: Some well known family of graphs

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

CPCS Discrete Structures 1

Computer Science 280 Fall 2002 Homework 10 Solutions

CONNECTIVITY AND NETWORKS

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

Transcription:

Paths, Circuits, and Connected Graphs

Paths and Circuits Definition: Let G = (V, E) be an undirected graph, vertices u, v V A path of length n from u to v is a sequence of edges e i = {u i 1, u i} E for i = 1,..., n where initial vertex u 0 = u and final vertex u n = v. For simple graph G, represent path via vertex sequence u 0, u 1,..., u n. A path is a circuit if u = v. A path is simple if no edge e i appears more than once (a vertex can appear more than once)

Erdős Number Example: Collaboration graph with V = all mathematicians E = pairs of coauthors Definition: The Erdős number of a mathematician u, denoted Erdős(u), is the length of the shortest path from him/her to mathematician Paul Erdős. Erdős(u) = 0 iff u is Erdős Erdős(u) = 1 iff u has written a paper with Erdős Erdős(u) = 2 iff u has not written a paper with Erdős, but has written a paper with a co-author of Erdős. As of 2006 number of mathematicians with Erdős number 1, 2, and 4 was 504, 6,593, and 83K.

Connected Graphs Definition: A graph G = (V, E) is connected if there is a path between every two distinct vertices in V. Connectedness important in Computer networks (access and security) Transportation networks (can t get there from here) Social networks (disease transmission, gossip)

Connected Graphs and Simple Paths Theorem: If G = (V, E) is undirected and connected, then there exists a simple path between every pair of vertices in V. Proof: Fix u, v V with u v. Let P = {all paths p between u and v in G} By assumption P, as G connected. Let p = u 0, u 1,..., u n with u 0 = u, u n = v be the vertex sequence of a path p P with smallest length n. Claim: path p is simple.

Connected Components

Connected Components Definition: A connected component of a graph G = (V, E) is a maximal connected subgraph, i.e., a graph H such that H G H is connected No edge in G connects V (H) and V (H) Note: The last condition equivalent to If H H G and H is not equal to H, then H is not connected.

Connectivity, cont. Basic Facts: Let G = (V, E) be an undirected graph If G is connected, then it has one connected component (itself) G can be expressed as a disjoint union of its connected components There is a path between vertices u, v V if and only if they belong to the same connected component of G Definition: Let G = (V, E) be an undirected graph v V is a cut vertex if removing v and all edges incident on it increases the number of connected components in G e E is a cut edge if removing it increases the number of connected components in G

Paths and Isomorphisms Given: Isomorphic graphs G 1, G 2 with isomorphism f. Note that path p = u 0, u 1,..., u n in graph G 1 corresponds to path p = f(u 0), f(u 1),..., f(u n) in graph G 2 and conversely. Moreover, definition of f ensures p simple p simple p circuit p circuit Upshot: For k 3 property P k (G) = G has a simple circuit of length k is a graph invariant. Useful tool to determine when two graphs are not isomorphic

Counting Paths with the Adjacency Matrix Theorem: Let G be an undirected graph with vertices v 1,..., v n and adj. matrix A. Then # paths of length r from v i to v j = (i, j) entry of A r. Proof: Induction on r. Basis step: Let r = 1. Then A r = A and a ij = # edges between v i and v j, which is the number of length 1 paths from v i to v j Induction step: Assume result is true for some r 1. Note that A r+1 = BA where B = A r. Thus n (A r+1 ) ij = (BA) ij = b ik a kj k=1

Majority and Friendship Paradoxes

Majority Paradox Example: Small town is considering a bond initiative in an upcoming election. Some residents are in favor, some are against. Consider a poll asking the following two questions: Are you for or against the initiative? Do you think the initiative will pass? Note that Answer to the first question depends on the opinion of the resident only. Answer to the second question depends on the opinion of the residents friends (and social/mainstream media they follow) Upshot: Answers to the second question may be misleading/inaccurate

Social Network (from Wash. Post): Blue = For, Orange = Against In this case, most residents are opposed to the initiative, but the majority of residents think the initiative will pass.

Friendship Paradox Informal: On average, individuals in a social network have fewer friends than their friends do. Formal: Let G = (V, E) be an undirected graph. Define A 1(G) = average degree of vertices in G A 2(G) = average degree of the neighbors of vertices in G Then A 1(G) A 2(G). If G is a social network, then A 1(G) = average number of friends of individuals in network A 2(G) = average number of friends of friends in network

Proof of Friendship Paradox Recall: N(u) = neighbors of u in G, and d(u) = N(u) = degree of u in G. Let V = n. Then we can write A 1(G) = 1 d(u) and A 2(G) = n u V u V ( v N(u) d(v) ) u V N(u) Fact: The average A 2(G) = u V d2 (u) / u V d(u) Rearranging, we find that A 1(G) A 2(G) ( ) 2 1 d(u) 1 d 2 (u) n n u V u V

Basic Lemma To complete the proof, we appeal to a simple inequality. Lemma: If a 1,..., a n are real numbers then Proof: Homework. ( 1 n ) 2 n a i 1 n i=1 n i=1 a 2 i In statistical terms this is a special case of the inequality (EX) 2 EX 2 for a random variable X

Euler Paths

Euler Paths and Circuits Definition: Let G = (V, E) be a simple graph. An Euler path in G is a simple path that contains every edge in E. An Euler circuit in G is a simple circuit that contains every edge in E. Example: Let G represent the map of a small town vertices = intersections edges = streets Can postal worker deliver mail to residents of the town without walking any street twice?

Euler Paths and Circuits, cont. Goal: Necessary and sufficient conditions for Euler paths in G Euler circuits in G Punch line: There are simple conditions involving only the degree of the vertices in G

Euler Circuits and Even Degree Theorem: Let G = (V, E) be connected with V 2. Then G has an Euler circuit iff every vertex has even degree. Proof sketch ( ): Fix u 0 V and let k = 0. Proceed as follows. (A) If no edge e E contains u k then stop. Otherwise Select an edge e k = {u k, v} E Let u k+1 = v be the other endpoint of e k Remove e k from E Increase k by one and return to (A) Let e r = {u r, u r+1} be the last edge selected. Define the path p = u 0, u 1,..., u r+1

Fact 2, cont. Claim: Path p is a circuit from u 0 to u 0, i.e., u r+1 = u 0. Note: If p contains every edge in E, it is the desired Euler circuit. Otherwise, Find a circuit p in the subgraph G 1 of G generated by the edges E 1 = E \ {edges in p}. Splice p and p together into a single circuit. Continue until all edges in E are used.

Euler Paths Theorem: A connected graph G = (V, E) has an Euler path, but not an Euler circuit, iff G has exactly two vertices of odd degree.