Top Banner
Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009
38

Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Dec 17, 2015

Download

Documents

Cleopatra Black
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Graphs – Basic Concepts

William T. Trotter and Mitchel T. KellerMath 3012 Applied Combinatorics

Spring 2009

Page 2: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

What is a Graph?

Page 3: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

What is a Graph?

A graph G is a pair (V, E) where V is a set (almost always finite in this course) and E is a collection of 2-element subsets of V.

Elements of V are called vertices and V is the vertex set.

Elements of E are called edges and E is the edge set

Page 4: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Notation and Terminology

Usually, we write xy is an edge in G, or xy E rather than {x,y} E.

Of course, xy is an edge if and only if yx is an edge. When xy is an edge, we say x and y are adjacent. When x and y are distinct and xy is not an edge, we

say that x and y are non-adjacent.

Page 5: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Data Files for Graphs

graph_data.txt63 24 65 66 17 36 2

Page 6: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Subgraphs – Two kinds

H is a subgraph of G when every vertex of H is a vertex in G, and every edge in H is an edge in G.

NO YES

Page 7: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Induced Subgraphs

H is an induced subgraph of G when every vertex of H is a vertex in G, and every edge in G with both endpoints in H is an edge in H.

NO YES

Page 8: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Isomorphic Graphs

G and H are isomorphic when there is a bijection f : V(G) V(H) between their vertex sets so that x and y are adjacent in G if and only if f(x) and f(y) are adjacent in H.

Page 9: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Paths in Graphs

A path in a graph (from x to y) is a sequence x0, x1, x2, …, xt such that

1. x = x0;

2. y = xt; and

3. xi xi+1 is an edge for every i = 0,1,2,…, t -1.

Page 10: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

A Path from 18 to 12

Page 11: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Connected Graphs

A graph G is connected if there is a path from x to y for every distinct pair of vertices in G.

Page 12: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

A Connected Graph

Page 13: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Components of Disconnected Graphs

When a graph is disconnected (not connected), an induced subgraph H is called a component of G when:

(1) H is connected; and

(2) there is no connected subgraph of G containing the vertex set of H and having more vertices than H.

Page 14: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

A Disconnected Graph with 3 components

Page 15: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Cycles in Graphs

A cycle in a graph G (from x to y) is a sequence x0, x1, x2, …, xt of distinct vertices from G with t ≥ 2 such that

1. x = x0;

2. y = xt; and

3. xi xi+1 is an edge for every i = 0,1,…, t -1;

4. xt x0 is an edge.

Page 16: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Lenth of Paths and Cycles

When (x0, x1, x2, …, xt) is a path, there are t+1 vertices in the sequence, but we say that the length of the path is t. This counts the number of edges.

For a positive integer n, it is customary to denote a path on n vertices as Pn. The length of Pn is then n-1.

When (x0, x1, x2, …, xt) is a cycle, there are t+1 vertices in the sequence, but now we say that the length of the cycle is t+1. This again counts the number of edges since the last vertex is also adjacent to the first.

For a positive integer n, it is customary to denote a cycle on n vertices as Cn. The length of Cn is then n.

Page 17: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

A cycle of length 8

Page 18: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Complete and Independent Graphs

Page 19: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Cliques in Graphs

A set S of vertices in a graph G is called a clique when every distinct pair of vertices in S is adjacent.

A clique in G is just a set of vertices that induces a complete subgraph of G.

The maximum clique size of G is denoted by ω(G).

Page 20: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Triangles in Graphs

A clique of size 3 is called a triangle.

{1,2,8} is a triangle, but ω(G) = 4

Page 21: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

ω(G) = 6

Page 22: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Caution: Are we certain that ω(G) = 6

To show that ω(G) ≥ 6, it is enough to show that G contains a clique of size 6.

But how do we show that G does not contain a clique of size 7 without testing every subset S consisting of 7 vertices of G? If G contains 34824125 vertices, this could take a long time!

Page 23: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Determining ω(G)

Alice claims that ω(G) = 257. How does she verify this claim for a graph G with 10342 vertices?

Can you write C code that will accept a graph data file as input and output a text file, which has ω(G) as an integer on the first line followed by ω(G) integers, one per line, immediately below? If you can do this and have your algorithm run in time which is polynomial in the input size, then you are guaranteed an A++ in this course!! Please share your code with Professor Trotter before going public.

Page 24: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Independent Sets in Graphs

A set S of vertices in a graph G is called an independent set (also a stable set) when no distinct pair of vertices in S is adjacent in G.

The maximum size of an independent set of vertices in G is called the independence number of G and is

denoted α(G).

Page 25: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

α(G) = 12

Page 26: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Are you certain that α(G) = 12

Same caution as before. We have shown only that α(G) ≥ 12. It requires much more work to show that G does not contain an independent set of size 13.

Page 27: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Graph Coloring

A t - coloring of a graph is a function f which assigns to each vertex x an integer f(x) from {1,2,…,t} so that f(x) ≠ f(y) whenever xy is an edge of G.

The chromatic number of G, denoted Χ(G), is the least positive integer t for which G has a t – coloring.

Page 28: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

A 6 - Coloring

This shows that Χ(G) ≤ 6

Page 29: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Χ(G) ≤ 4

Page 30: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

A Trivial Inequality

Χ(G) ≥ ω(G)

The chromatic number of a graph is at least as large as the maximum clique size.

Page 31: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Χ(G) = ω(G) = 4

Page 32: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

How Good is this Inequality?

Χ(G) ≥ ω(G)

Maybe, just maybe, the chromatic number of a graph is always equal to the maximum clique size?!

Page 33: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Not Always Equal

3 = Χ(G) > ω(G) = 2

Page 34: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Very large Χ and small ω

Theorem. For every t ≥ 3, there exists a graph Gt so that

Χ(G) = t and ω(G) = 2

Page 35: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Posets and Cover Graphs

Cover graphs of posets are triangle-free, i.e., ω(G) ≤ 2

Page 36: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Height and Chromatic Number

If G is the cover graph of a poset P with

height (P) = h,

then:

Χ(G) ≤ h

Since any partition of P into h antichains is also a coloring of G using h colors.

Page 37: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

Posets and large Χ, small ω

Theorem. For every t ≥ 3, there exists a poset Pt with height (Pt) = t so that if Gt is the cover graph of Pt, then

Χ(Gt) = t and ω(Gt) = 2

Page 38: Graphs – Basic Concepts William T. Trotter and Mitchel T. Keller Math 3012 Applied Combinatorics Spring 2009.

The First Case

3 = height(P3) = Χ(G3) while ω(G3) = 2

P3