Basic Notions on Graphs. The House-and-Utilities Problem.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

CSE 211 Discrete Mathematics
Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
1 Slides based on those of Kenneth H. Rosen Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Graphs.
Decision Maths Graphs Wiltshire Graphs A graph is just a diagram made up of “dots” and “lines”. These are all graphs. The dots are called “nodes” or.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
Chapter 4 Graphs.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
Graph Essentials Social Media Mining. 2 Measures and Metrics 2 Social Media Mining Graph Essentials Networks A network is a graph. – Elements of the network.
Social Media Mining Graph Essentials.
GRAPH Learning Outcomes Students should be able to:
Introduction to Network Theory: Basic Concepts
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
1 ELEC692 Fall 2004 Lecture 1b ELEC692 Lecture 1a Introduction to graph theory and algorithm.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
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.
CSE, IIT KGP Graph Theory: Introduction Pallab Dasgupta Dept. of CSE, IIT
1 CS104 : Discrete Structures Chapter V Graph Theory.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Introduction Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
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 10 Graph Theory Eulerian Cycle and the property of graph theory 10.3 The important property of graph theory and its representation 10.4.
CSS106 Introduction to Elementary Algorithms
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
1 Graphs Theory UNIT IV. 2Contents  Basic terminology,  Multi graphs and weighted graphs  Paths and circuits  Shortest path in weighted graph  Hamiltonian.
Unit 5 Graphs & Trees 1 IT Discipline ITD1111 Discrete Mathematics & Statistics STDTLP Unit 5 Discrete Mathematics and Statistics Graphs and Trees.
An Introduction to Graph Theory
Discrete Mathematical Structures: Theory and Applications
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Graph Theory and Applications
Foundations of Discrete Mathematics Chapters 9 and 10 By Dr. Dalia M. Gil, Ph.D.
Graphs and 2-Way Bounding Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 /File:7_bridgesID.png.
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Introduction to Graph Theory
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.
Graph Theory Unit: 4.
CSE, IIT KGP Graph Theory: Introduction Pallab Dasgupta Dept. of CSE, IIT
Chapter 9: Graphs.
CS 261 – Nov. 17 Graph properties – Bipartiteness – Isomorphic to another graph – Pseudograph, multigraph, subgraph Path Cycle – Hamiltonian – Euler.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
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.
An Introduction to Graph Theory
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Chapter 5 Fundamental Concept
Graph theory Definitions Trees, cycles, directed graphs.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Graphs Slides are adopted from “Discrete.
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.
Graph.
CS100: Discrete structures
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.
Decision Maths Graphs.
Graphs G = (V, E) V are the vertices; E are the edges.
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.
Introduction to Graph Theory
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.
Agenda Review Lecture Content: Shortest Path Algorithm
GRAPHS.
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.
Concepts of Computation
Presentation transcript:

Basic Notions on Graphs

The House-and-Utilities Problem

3 A graph G consists of a set V of vertices and a set E of edges which is a subset of V ×V. Order: the number of vertices in the graph Degree: t he number of edges attached to a vertex - in a graph we have maximum degree, minimum degree - if every vertex has the same degree then G is regular.  2 or more edges joining the same pair of vertices are called multiple edges. An edge joining a vertex to itself is called a loop. Terminology

4 Adjacency and incidence Two vertices v and w are adjacent vertices if they are joined by an edge e. The vertices v and w are incident with the edge e, and the edge e is incident with the vertices v and w.

5 G = G(V,E) V = {A,B,C,D}--The vertex set. E = {(A,B), (A,C), (B,C), (B,D)}--The edge set. ABCD A11 B111 C11 D1 A B C D Example

6 Terminology Neighbourhood of a vertex is the set of all its adjacent vertices

7 Terminology Adjacency matrix A

8 The Bridges of Konigsberg

9

The House-and-Utilities Problem

Planar Graphs Consider the previous slide. Is it possible to join the three houses to the three utilities in such a way that none of the connections cross?

Planar Graphs Phrased another way, this question is equivalent to: Given the complete bipartite graph K 3,3, can K 3,3 be drawn in the plane so that no two of its edges cross? K 3,3

Planar Graphs A graph is called planar if it can be drawn in the plane without any edges crossing. A crossing of edges is the intersection of the lines or arcs representing them at a point other than their common endpoint. Such a drawing is called a planar representation of the graph.

Example A graph may be planar even if it is usually drawn with crossings, since it may be possible to draw it in another way without crossings.

Example A graph may be planar even if it represents a 3-dimensional object.

16 Weighted Graphs Problem Find the shortest time taken to drive from Los Angeles to Amarillo, and from San Francisco to Denver.

17 Isomorphism Two graphs are the same if they have the same set of vertices and the same set of edges, even if they are drawn differently.

18 Isomorphism Two graphs G and H are the isomorphic if H can be obtained by relabelling the vertices of G. That is, there is a 1-1 correspondence between the vertices of G and those of H, such that the number of edges joining each pair of vertices in G is equal to the number of edges joining the corresponding pair of vertices in H. Such a 1-1 correspondence is called an isomorphism.

19 Isomorphism Checking if two graphs are isomorphic: number of vertices and edges look for special features such as short cycles degrees of vertices, loops, or multiple edges

20 Isomorphism Problem Are the following two graphs isomorphic? If so, find a suitable 1-1 correspondence between the vertices of the first and those of the second graph; if not, explain why not.

21 Counting graphs How many labelled and unlabelled graphs with the same number of vertices are there? When counting labelled graphs, we distinguish between any two that are not the same.

22 Counting graphs When counting unlabelled graphs, we distinguish between any two that are not isomorphic. How many unlabelled, connected graphs are there on 1, 2, 3, 4, 5 vertices?

23 Subgraphs A subgraph of a graph G is a graph all of whose vertices are vertices of G and all of whose edges are edges of G.

24 Subgraphs of unlabelled graphs Problem Which of the following graphs are subgraphs of the graph H below?

25 Drawing a graph Degree Sequence:

26 Terminology Walk of length t is a non-empty alternating sequence of t edges such that any two consecutive edges share a vertex Diameter is the longest distance between any two vertices in the graph

27 Walks A walk of length k in a graph is a succession of k edges of the form uv, vw, wx, …, yz. This walk is denoted by uvwx…yz, and is referred to as a walk between u and z.

28 Walks Note that in a walk, we do not require the vertices and edges to be all distinct. For example, below uvwxywvzzy is a walk of length 9 between u and y; it includes the edge vw twice and the vertices v,w,y and z each twice.

29 Paths and trails A trail is a walk in G with the property that no edge is repeated. A path is a trail in G with the property that no vertex is repeated.. Problem Complete the following statements: (a) xyzzvy is a…….of length……between….and….; (b) uvyz is a…….of length……between….and…..

30 Paths Problem Write down all the paths between s and y in the following graph:

31 Closed walks, trails and cycles A closed walk is a succession of edges of the form uv,vw,wx,…,yz,zu That starts and ends at the same vertex. A closed trail  a circuit A closed path  a cycle  Eulerian Circuit (degree of every vertex of G is even)  Hamiltonian Cycle (a cycle that contains every vertex of G)

32 Closed walks, trails and cycles Problem For this graph, write down (a) closed walk that is not a closed trail; (b) closed trail that is not a cycle; (c) all the cycles of lengths 1,2,3 and 4.

33 Connected graphs A graph is connected if there is a path between each pair of vertices, and is disconnected otherwise.

34 Components An edge in a connected graph is a bridge if its removal results in a disconnected graph. Every disconnected graph consists of a number of connected subgraphs, called components.

35 Distances in Graphs The distance between two vertices u and v in a graph d(u,v) is the length of the shortest path between the two vertices. That is; the fewest number of edges that need to be traversed when going from u to v. u ab v e d c f The distance from u to v is 4 by the path ubcfv. There are other paths from u to v but none shorter than 4.

36 Distances in Graphs The maximum distance from a vertex u to any other vertex in the graph is called the eccentricity of u  e(u). u ab v e d c f e(u) = 4 e(b) = 3 e(e) = ? e(a) = ?

37 Distances in Graphs The maximum distance from a vertex u to any other vertex in the graph is called the eccentricity of u e(u). The largest eccentricity is called the diameter, the smallest eccentricity is called the radius. u ab v e d c f e(u) = 4 e(b) = 3 e(e) = 4 e(a) = 4 Note: If the graph is disconnected, the radius and diameter are infinity

38 Distances in Graphs The maximum distance from a vertex u to any other vertex in the graph is called the eccentricity of u e(u). The largest eccentricity is called the diameter, the smallest eccentricity is called the radius. u ab v e d c f Diameter = Radius = 4242 Diameter dan radius ? P n, C n, W n, K n