Graphs context: functions context: graphs and networks.

Slides:



Advertisements
Similar presentations
Simple Graph Warmup. Cycles in Simple Graphs A cycle in a simple graph is a sequence of vertices v 0, …, v n for some n>0, where v 0, ….v n-1 are distinct,
Advertisements

Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
13 May 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
9.3: Representing Graphs and Graph Isomorphism. Graphs, Edge tables, and adjacency matrices a bababab cdcdcdc edge lists Vertex adjacency vertexinitial.
GOLOMB RULERS AND GRACEFUL GRAPHS
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 Discrete Mathematics Week 12: Trees
SE561 Math Foundations Week 11 Graphs I
Introduction to Graphs Lecture 18: Nov 16. Seven Bridges of Königsberg Is it possible to walk with a route that crosses each bridge exactly once?
Graph Theory in CS Route Search in Online Map Services
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
CSE 321 Discrete Structures Winter 2008 Lecture 25 Graph Theory.
W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 Graph theory and routing (initial background) E E Lecture 4.
Chapter 9: Graphs Basic Concepts
Degree A F H G B E D C. Adjacent A F H G B E D C.
9.3 Representing Graphs and Graph Isomorphism
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
GRAPH Learning Outcomes Students should be able to:
Graphs CS /02/05 Graphs Slide 2 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved Definition.
Graphs Chapter 10.
Summing degree sequences work out degree sequence, and sum.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Graphs. What is a graph? A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each other The set of.
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.
 What is a graph? What is a graph?  Directed vs. undirected graphs Directed vs. undirected graphs  Trees vs graphs Trees vs graphs  Terminology: Degree.
CSNB143 – Discrete Structure Topic 9 – Graph. Learning Outcomes Student should be able to identify graphs and its components. Students should know how.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Based on slides by Y. Peng University of Maryland
Module #19: Graph Theory: part II Rosen 5 th ed., chs. 8-9.
Spring 2007Graphs1 ORD DFW SFO LAX
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.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Chapter 1 Fundamental Concepts Introduction to Graph Theory Douglas B. West July 11, 2002.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
Graph Theory and Applications
Introduction to Graphs. This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer.
Basic properties Continuation
Graphs Basic properties.
Introduction to Graph Theory
CS 261 – Nov. 17 Graph properties – Bipartiteness – Isomorphic to another graph – Pseudograph, multigraph, subgraph Path Cycle – Hamiltonian – Euler.
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Paths and circuits.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Fundamental Graph Theory (Lecture 1) Lectured by Hung-Lin Fu 傅 恆 霖 Department of Applied Mathematics National Chiao Tung University.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Graphs.
Applied Discrete Mathematics Week 14: Trees
Graphs: Definitions and Basic Properties
Basic Concepts Graphs For more notes and topics visit:
Special Graphs By: Sandeep Tuli Astt. Prof. CSE.
Grade 11 AP Mathematics Graph Theory
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
Introduction to Graph Theory
Based on slides by Y. Peng University of Maryland
Can you draw this picture without lifting up your pen/pencil?
Graphs, Trees and Algorithms 1
Chapter 9: Graphs Basic Concepts
Graph Operations And Representation
Walks, Paths, and Circuits
Graph Theory What is a graph?.
Representing Graphs Wade Trappe.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Graphs G = (V, E) V are the vertices; E are the edges.
9.4 Connectivity.
Applied Discrete Mathematics Week 13: Graphs
Based on slides by Y. Peng University of Maryland
Chapter 9: Graphs Basic Concepts
GRAPHS.
Presentation transcript:

Graphs context: functions context: graphs and networks

Varieties of graphs directed graphs multiple edges self-loops The graph of a relation is a directed graph with multiple edges and self-loops allowed

Simple graphs non-directed graphs ban multiple edges ban self-loops finite number of vertices (implies finite number of edges)

Abstract example A graph G has a set of vertices V(G) = {A, B, C} and a set of edges E(G) = {{A, B}, {A, C }} now draw a picture! NB language:one vertex, many vertices likeone matrix, many matrices

Abstract definition A graph G is a set of vertices and a set of edges

Varieties of graphs disconnectedconnected A graph is connected if, for any two vertices, there is a path in the graph from one to the other. A graph is disconnected if there are vertices v 1 and v 2 without a path from v 1 to v 2.

When are two graphs equal? Let G 1 be a graph with vertices {A, B, C} and edges {{A,B}, {A,C}}. Let G 2 be a graph with vertices {P, Q, R} and edges {{P,Q}, {P,R}}. Are these equal?

When are two graphs equal? Two graphs are equal iff they have equal vertex setsandequal edge sets so G 1 and G 2 are not equal: {A, B, C} is not equal to {P, Q, R}

When are two graphs “the same”? Are these graphs “the same”? what about these two:

Isomorphism Isomorphism is a well-defined concept which sums up the vague intuitive idea of “the same” All unequal, but isomorphic to each other

Isomorphism One graph is isomorphic to another if there is a continuous change from one to the other show this as a filmstrip/cartoon DGP?

Alphabet examples

Definition of isomorphism G 1 is isomorphic to G 2 if there is a bijective function (bijection) which is “edge-preserving”: ie. (pronounce this?)

A proof of isomorphism Task: Show that these are isomorphic: problem: to define a vertex function we need to be able to refer to the vertices of the graphs

A proof of isomorphism Task: Show that these are isomorphic: A B C D E P Q R S T f (A) = f (B) = f (C) = f (D) = f (E) =

A proof of isomorphism Task: Show that these are isomorphic: There is more than one possibility for the edge-preserving vertex function f (how many?) A B C D E P Q R S T

A proof of isomorphism show the “edge-preserving property” using adjacency tables (or matrices) G1 G1 A B C D E A B C D E G2 G2 R S P T Q R S P T Q f

The adjacency matrix game 1. Draw a graph (limit it to four vertices to start with) 2. Work out its adjacency matrix 3. Challenge someone else to draw your graph by showing them the adjacency matrix Your graphs are isomorphic.

Isomorphism Show informally by gradually changing a picture (“morphing”?) Show formally by setting up a bijection on the vertices and drawing up adjacency matrices which show edge-preservation (equal entries in the matrices).

Non-isomorphism Examples from alphabet there can’t be a bijection between the vertex sets because the vertex sets are different sizes. 3.1.

Vertex set size under IM If G 1 and G 2 are isomorphic then V(G 1 ) and V(G 2 ) have equal size If V(G 1 ) and V(G 2 ) are different sizes then G 1 and G 2 are not isomorphic

Vertex set size conjecture If V(G 1 ) and V(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! counterexample?

Vertex set size conjecture If V(G 1 ) and V(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! 2.1. same sized vertex sets but not isomorphic

Grouping by vertex set size Group the graphs by vertex-set size. Isomorphism is possible within groups but not between groups.

Grouping by vertex set size Group the graphs by vertex-set size. Isomorphism is possible within groups but not between groups.

Non-isomorphism II There are bijections between the vertex sets of these graphs (the sets are the same size) There aren’t any edge-preserving node bijections because the edge-sets have different sizes (the incidence matrices have different numbers of 1’s in them - so the matrices can’t be the same) 1.11.

Edge set size under IM If G 1 and G 2 are isomorphic then E(G 1 ) and E(G 2 ) have equal size If E(G 1 ) and E(G 2 ) are different sizes then G 1 and G 2 are not isomorphic

Edge set size conjecture If E(G 1 ) and E(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! counterexample?

Edge set size conjecture If E(G 1 ) and E(G 2 ) have equal size then G 1 and G 2 are isomorphic BEWARE - this is false!! 4.5. same sized edge sets but not isomorphic

Grouping by edge set size Group the graphs by edge-set size. Isomorphim is possible within groups but not between groups.

Grouping by edge set size Group the graphs by edge-set size. Isomorphim is possible within groups but not between groups.

Grouping by node/edge set size Group the graphs by node-set and edge-set size. Isomorphim is possible within but not between groups.

Grouping by node/edge set size Group the graphs by node-set and edge-set size. Isomorphim is possible within but not between groups.

Conjecture If two graphs have the same number of vertices and the same number of edges then the graphs are isomorphic BEWARE - this is false!! counterexample?

Conjecture If two graphs have the same number of vertices and the same number of edges then the graphs are isomorphic BEWARE - this is false!! same sized vertex sets and edge sets but not isomorphic

The degree of a vertex The degree of a vertex in a graph is the number of edges which meet that vertex You can work out the degree from an adjacency matrix - how?

The degree sequence of a graph The degree sequence of a graph is an ordered list of the degrees of its vertices You can work out the degree sequence from an adjacency matrix - how?

Grouping by degree sequence {1, 1} {2, 2, 2} {1, 1,1,3} {1, 1, 2, 3, 3} {2, 2, 2, 2, 4} {1, 1, 1, 1, 3, 3} {1, 1, 1, 1, 4}

Degree sequence under IM If G 1 and G 2 are isomorphic then they have equal degree sequences If G 1 and G 2 have different degree sequences then they are not isomorphic

The degree sequence game 1. Draw a graph (limit it to six vertices to start with) 2. Work out its degree sequence. 3. Challenge someone else to draw your graph by telling them the degree sequence. Are your graphs isomorphic?

Degree sequence conjecture If G 1 and G 2 have equal degree sequences then G 1 and G 2 are isomorphic BEWARE - this is false!! counterexample?

Degree sequence conjecture If G 1 and G 2 have equal degree sequences then G 1 and G 2 are isomorphic BEWARE - this is false!! same sized vertex sets, edge sets and same degree sequence but not isomorphic

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in a graph is a sequence of edges which “follow on from each other” and “end where they start”. Don’t allow use of the same edge twice.

Cycles and trees A cycle in graph G is a sequence of edges where the edges are distinct

Cycles and trees Connected graphs which have no cycles are called trees. disconnected graphs without cycles are called forests!

A surprisingly hard question: How many trees can you draw with n vertices? Write this as a function of n. N. B. whenever anyone says “how many?” referring to graphs, they mean “how many, treating isomorphic graphs as the same?” try it for n = 3? n = 4?

Electronic resource for graphs (and any dynamic geometry…) Download Euklidfree from (type Euklid in the search box to get started)