Playing with Graphs Alex Andreotti.

Slides:



Advertisements
Similar presentations
9.7 Planar Graphs. Intro problem- 3 houses and 3 utilities K 3,3 problem: Can 3 houses be connected to 3 utilities so that no 2 lines cross? Similarly,
Advertisements

Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
1 Representing Graphs. 2 Adjacency Matrix Suppose we have a graph G with n nodes. The adjacency matrix is the n x n matrix A=[a ij ] with: a ij = 1 if.
Applied Combinatorics, 4th Ed. Alan Tucker
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
DAST 2005 Tirgul 11 (and more) sample questions. DAST 2005 Q.Let G = (V,E) be an undirected, connected graph with an edge weight function w : E→R. Let.
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Drawing of G. Planar Embedding of G Proposition Proof. 1. Consider a drawing of K 5 or K 3,3 in the plane. Let C be a spanning cycle. 2. If the.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Matthew Bowling Euler’s Theorem Mathfest Spring ‘15.
Graph Theory Ch6 Planar Graphs. Basic Definitions  curve, polygon curve, drawing  crossing, planar, planar embedding, and plane graph  open set  region,
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Planar Graphs Graph Coloring
Introduction to Graph Theory
Aim: What is an Euler Path and Circuit?
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
Graph Theory. A branch of math in which graphs are used to solve a problem. It is unlike a Cartesian graph that we used throughout our younger years of.
Vertex-Edge Graphs Euler Paths Euler Circuits. The Seven Bridges of Konigsberg.
AND.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Aim: Graph Theory – Paths & Circuits Course: Math Literacy Do Now: Aim: What are Circuits and Paths? Can you draw this figure without retracing any of.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Chapter 9.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 6th ed., by Kenneth H.
Chapter 11 - Graph CSNB 143 Discrete Mathematical Structures.
1) Find and label the degree of each vertex in the graph.
COMPSCI 102 Introduction to Discrete Mathematics.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Planarity Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering, IIT.
Great Theoretical Ideas In Computer Science
Planar Graphs Hubert Chan (Chapter 9.7) [O2 Proof Techniques]
Discrete Mathematics Graph: Planar Graph Yuan Luo
CSNB 143 Discrete Mathematical Structures
Applied Combinatorics, 4th Ed. Alan Tucker
Graph theory Definitions Trees, cycles, directed graphs.
Konigsberg’s Seven Bridges
Can you draw this picture without lifting up your pen/pencil?
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Planarity and Euler’s Formula
Euler Paths and Circuits
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Lecture 15: Graph Theory II
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Konigsberg- in days past.
Applied Combinatorics, 4th Ed. Alan Tucker
Warm Up – Wednesday.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
MAT 2720 Discrete Mathematics
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Planarity.
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 8th ed., by Kenneth H.
N(S) ={vV|uS,{u,v}E(G)}
Gaph Theory Planar Graphs
Discrete Mathematics for Computer Science
Warm Up – Tuesday Find the critical times for each vertex.
CHAPTER 15 Graph Theory.
Warm Up – 3/19 - Wednesday Give the vertex set. Give the edge set.
Hamilton Paths and Circuits
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Planarity.
Concepts of Computation
5 The Mathematics of Getting Around
Chapter 10.7 Planar Graphs These class notes are based on material from our textbook, Discrete Mathematics and Its Applications, 7th ed., by Kenneth H.
Presentation transcript:

Playing with Graphs Alex Andreotti

Countries of Bug World

Countries of Bug World

Countries of Bug World Bugs are stupid: can’t measure length, curving. Tunnels are dark, and bugs can’t see much anyway.

Countries of Bug World Country

Countries of Bug World City

Countries of Bug World City City City City

Countries of Bug World Tunnels

Bug An lives in this country Countries of Bug World Bug An lives in this country

Bug Adam lives in this one Countries of Bug World Bug Adam lives in this one

Can they figure out they live in different countries? Countries of Bug World Can they figure out they live in different countries?

Countries of Bug World An’s Country Jeremy’s Country

Same or Different?

Same or Different?

Same or Different?

Same or Different?

Same or Different?

Same or Different?

Same or Different?

Same or Different?

Countries of Bug World Task 1:Devise a precise description of what it means for two countries to be “the same” as far as the bugs are concerned.

Countries of Bug World Task 2:Julie-Bug says “My country has seven cities and nine tunnels. One city has just one tunnel connected to it, one city has five tunnels connected to it, two cities have three tunnels connected to them, and the other three cities have two connecting tunnels” How many different countries can you draw that fit this description? How can you tell them apart?

Countries of Bug World Graph Theory

Graph Theory Countries Graphs

Graph Theory Countries Cities Graphs Points/Vertices

Graph Theory Countries Cities Tunnels Graphs Points/Vertices Lines/Edges

Graph Theory Graph

Graph Theory Vertex

Graph Theory Vertices

Note: One Vertex, Many Vertices Graph Theory Vertex Vertices Note: One Vertex, Many Vertices

Graph Theory Edges

Graph Theory One Graph…

Graph Theory One Graph…

Graph Theory One Graph…

Graph Theory One Graph…

Graph Theory One Graph…

Graph Theory One Graph…

Graph Theory One Graph…

One Graph, Many Graph Diagrams Graph Theory One Graph, Many Graph Diagrams

Here’s another graph diagram of the same graph Graph Theory Here’s another graph diagram of the same graph

Graph Theory Connected Graph

Graph Theory Disconnected Graph

Disconnected graph is just a collection of connected components Graph Theory Disconnected Graph Component Component Disconnected graph is just a collection of connected components

Diagrams are just one way to represent (some) graphs. Graph Theory Diagrams are just one way to represent (some) graphs.

Graph Theory Other examples: People (vertices), know each other (edges)

Graph Theory Other examples: Tennis players (vertices), played against (edges)

Graph Theory Other examples: Countries (vertices), share a border (edges)

Graph Theory New Rules

Graph Theory New Rules 1. No Loops

Graph Theory New Rules 1. No Loops 2. No multiple edges

Draw all the graphs with 4 vertices. Task 3 Draw all the graphs with 4 vertices.

Task 3 Draw all the graphs with 4 vertices. • • • • Here’s one with no edges

Draw all the graphs with 4 vertices. Task 3 Draw all the graphs with 4 vertices. • • • • • • • • Is there a different graph (not a graph diagram, but a graph), with only one edge?

Draw all the graphs with 4 vertices. Task 3 Draw all the graphs with 4 vertices. • • • • • • • • Same or different?

Task 3 Draw all the graphs with 4 vertices. • • • • • • • • Find all the other graphs in our catalog.

Task 4 Draw all the graphs with 5 vertices. (Hint: there are between 30 and 40. Look for patterns.)

Task 5 Explain the patterns that we find while counting graphs with 1, 2, 3, etc. edges in graphs with n vertices.

Task 6 Device a simplest way to communicate a graph (not a graph diagram, just a graph) over the telephone.

Paths a b g c f e d

Paths a b g c f e d (d, c, …)

Paths a b g c f e d (d, c, b, …)

Paths a b g c f e d (d, c, b, d)

Paths a b g c f e d (f, e, d, b, c)

Paths a • b g • c f e d (e, g, b, a, b, g)

Paths • • • • • • • closed not closed not closed

Paths • • f closed simple not closed simple not closed not simple

Paths not closed not closed closed+simple simple not simple circuit ll g not closed simple not closed not simple closed+simple ll circuit

Trees

Trees Not a Tree Tree

Trees Draw a bunch of trees

Task 7 What is the relationship between the number of vertices and the number of edges in a tree? Why does this relationship hold?

Task 8 Draw all the trees with 5 vertices. Then all the ones with 6. There are between 20 and 30 with 8 vertices. Find them.

Task 9 Which algorithm/method would you use if you had to find all trees with a given number of vertices (say, 12)?

Task 10 Revisit the method we had to communicate a graph over the phone. Do you have a better, simpler one that would work just for trees?

Trees in Graphs

Trees in Graphs A Spanning Tree

Trees in Graphs Can you find another one? How can we count how many there are in a given graph?

Regions in Graphs

Regions in Graphs 1

Regions in Graphs 1 2

Regions in Graphs 1 2 4 3

Regions in Graphs 1 5 2 4 3 The Outside region

(Regions are aka Faces) Regions in Graphs 1 5 2 4 3 (Regions are aka Faces)

Draw several graphs and record the following: Task 11 Draw several graphs and record the following: Number of vertices (v) Number of edges (e) Number of faces (f) Number of vertices in Spanning Tree (A) Number of edges in Spanning Tree (B) Number of edges not in Sp. Tree (C)

Task 11

Task 11 • • • • • v=8 • • •

Task 11 3 1 2 4 5 v=8 e=11 11 6 9 8 10 7

Task 11 5 1 v=8 e=11 f=5 2 4 3

Task 11 • • • v=8 e=11 f=5 A=8 • • • • •

Task 11 7 v=8 e=11 f=5 A=8 B=7 1 2 3 6 4 5

Task 11 v=8 e=11 f=5 A=8 B=7 C=4

Task 11 Draw several graphs and record the following: Number of vertices (v) Number of edges (e) Number of faces (f) Number of vertices in Spanning Tree (A) Number of edges in Spanning Tree (B) Number of edges not in Sp. Tree (C) Do only connected graphs w/o crossing edges

What patterns did you find? Explain why they work. Task 12 What patterns did you find? Explain why they work.

Use your findings to show Task 13 Use your findings to show v – e + f = 2

Euler’s Formula v – e + f = 2

Euler’s Formula “Oiler’s” v – e + f = 2

A graph has 7 vertices and 9 edges. How many faces should it have? Task 13 A graph has 7 vertices and 9 edges. How many faces should it have? Try to draw a graph with 7 v’s and 9 e’s without the requisite number of faces.

Euler’s Formula? • • • •

Euler’s Formula? • • v=4 e=6 f=5 • •

Euler’s Formula? • • v=4 e=6 f=5 • • 4 – 6 + 5 ≠ 2 ???

Euler’s Formula? • • v=4 e=6 f=5 • • “Fake” regions

Euler’s Formula? 4 • • • • v=4 e=6 f=4 3 1 2 • • • • “Fake” regions

Euler’s Formula? v=4 e=6 f=4 4 – 6 + 4 = 2 “Fake” regions • • • • • • 3 1 2 • • • • 4 – 6 + 4 = 2 “Fake” regions

Planar version of same graph Euler’s Formula? • • • • • • • • Non-planar graph Planar version of same graph

Euler’s Formula Non-planar graph Planar version of same graph • • • • • • • • Non-planar graph Planar version of same graph Euler’s only works on planar graphs

Do all graphs have a planar version? Important Question Do all graphs have a planar version? If not, which ones do? • • • • • • • •

Task 14 What happens with Euler’s Formula when a graph is NOT connected? Can you fix it?

n vertices - all connected to each other K Graphs n vertices - all connected to each other

K Graphs • • • • K4

How many edges does K5, K6, Kn have? Task 15 How many edges does K5, K6, Kn have?

Draw K5, both in non-planar, and in planar versions. Task 16 Draw K5, both in non-planar, and in planar versions.

Task 16 Draw K5, both in non-planar, and in planar versions. You are failing at this, aren’t you?

Task 16 Draw K5, both in non-planar, and in planar versions. Let’s see if you can prove it’s not possible

Let’s focus on this face Orders of Faces Let’s focus on this face

Orders of Faces It has 4 edges as boundary we call this the order of the face

Orders of Faces o(f)=4

Orders of Faces o(f)=3

Task 17 Claim 1: Sum of all orders of all faces = 2 x number of edges Draw a bunch of graphs and see if true. Why is it true?

Task 18 Claim 2: 3 x number of faces ≤ 2 x number of edges is true for all (planar) graphs. Try to prove me wrong, find which graphs have 3f=2e, and see if you can understand why my claim is true.

Task 18 Claim 2: 3 x number of faces ≤ 2 x number of edges is true for all (planar) graphs. aka, Every face is at least a triangle

Task 18 Claim 2: 3 x number of faces ≤ 2 x number of edges is true for all (planar) graphs. aka, Every face is at least a triangle (and each edge has two faces - so it’s counted twice)

Task 19 Proving that K5 is not planar: Use Euler’s Formula and 3f≤2e to prove it. (Hint: What do we know about K5?)

Task 20 Draw a planar version of the following graphs, or prove that it’s not possible to do so: v=7, e=17 v=8, e=12 v=7, e=15