Graphs. Introduction To Graphs: Exercises. Definitions:

Similar documents
DEFINITION OF GRAPH GRAPH THEORY GRAPHS ACCORDING TO THEIR VERTICES AND EDGES EXAMPLE GRAPHS ACCORDING TO THEIR VERTICES AND EDGES

Graphs. Pseudograph: multiple edges and loops allowed

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

CPCS Discrete Structures 1

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

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

Introduction to Graphs

(5.2) 151 Math Exercises. Graph Terminology and Special Types of Graphs. Malek Zein AL-Abidin

Varying Applications (examples)

Introduction III. Graphs. Motivations I. Introduction IV

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

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.

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 good picture is worth a thousand words

CMSC 380. Graph Terminology and Representation

Discrete Structures CISC 2315 FALL Graphs & Trees

Elements of Graph Theory

Foundations of Discrete Mathematics

Section 10.1: Graphs and Graph Models. Introduction to Graphs Definition of a Graph Types of Graphs Examples of Graphs

Basics of Graph Theory

Graphs. The ultimate data structure. graphs 1

CS200: Graphs. Prichard Ch. 14 Rosen Ch. 10. CS200 - Graphs 1

CS 441 Discrete Mathematics for CS Lecture 26. Graphs. CS 441 Discrete mathematics for CS. Final exam

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

MTL 776: Graph Algorithms. B S Panda MZ 194

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

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

Graph Theory. Part of Texas Counties.

Introduction to Graph Theory

Ordinary Differential Equation (ODE)

An Introduction to Graph Theory

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

Outline. Introduction. Representations of Graphs Graph Traversals. Applications. Definitions and Basic Terminologies

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

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

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))

Chapter 1 Graph Theory

March 20/2003 Jayakanth Srinivasan,

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

The vertex set is a finite nonempty set. The edge set may be empty, but otherwise its elements are two-element subsets of the vertex set.

CSC Intro to Intelligent Robotics, Spring Graphs

Math 170- Graph Theory Notes

Compatible circuits in eulerian digraphs

Graph and Digraph Glossary

Ma/CS 6b Class 5: Graph Connectivity

Number Theory and Graph Theory

Algorithms. Graphs. Algorithms

2. CONNECTIVITY Connectivity

Discrete mathematics II. - Graphs

Graph Theory CS/Math231 Discrete Mathematics Spring2015

MATH 363 Final Wednesday, April 28. Final exam. You may use lemmas and theorems that were proven in class and on assignments unless stated otherwise.

Chapter 2 Graphs. 2.1 Definition of Graphs

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

CHAPTER 10 Graphs. 258 Chapter 10 Graphs

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.

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

1 Digraphs. Definition 1

Lecture 5: Graphs & their Representation

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

Combinatorics Summary Sheet for Exam 1 Material 2019

Eulerian circuits with no monochromatic transitions

UNDIRECTED GRAPH: a set of vertices and a set of undirected edges each of which is associated with a set of one or two of these vertices.

Inf 496/596 Topics in Informatics: Analysis of Social Network Data

Graphs. The ultimate data structure. graphs 1

Assignment 4 Solutions of graph problems

Math 776 Graph Theory Lecture Note 1 Basic concepts

CHAPTER 14 GRAPH ALGORITHMS ORD SFO LAX DFW

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

Module 11. Directed Graphs. Contents

V :non-empty vertex ornode set E V V :edge set G (V, E) :directed graph on V, or digraph on V

BACKGROUND: A BRIEF INTRODUCTION TO GRAPH THEORY

PACKING DIGRAPHS WITH DIRECTED CLOSED TRAILS

Graphs V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

BIL694-Lecture 1: Introduction to Graphs

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.

11/26/17. directed graphs. CS 220: Discrete Structures and their Applications. graphs zybooks chapter 10. undirected graphs

CS 441 Discrete Mathematics for CS Lecture 24. Relations IV. CS 441 Discrete mathematics for CS. Equivalence relation

0.0.1 Network Analysis

Compatible circuits in eulerian digraphs

Discrete Math For Computing II

Graphs and Isomorphisms

11.1. Definitions. 11. Domination in Graphs

Graph Theory: Applications and Algorithms

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

Graphs: Definitions Trails, Paths, and Circuits Matrix Representations Isomorphisms. 11. Graphs and Trees 1. Aaron Tan. 30 October 3 November 2017

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

context. (Similarly, we write ν for ν(g), etc. if there is no risk of confusion.) For a subset A V we write N G (A) = {v V ( w A)(v w)} (the set of

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Chapter 9 Graph Algorithms

Graphs and trees come up everywhere. We can view the internet as a graph (in many ways) Web search views web pages as a graph

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Artificial Intelligence

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

Dieter Jungnickel (2008), Graphs, Networks and Algorithms, 3rd edition, which is available online via SpringerLink.

Binary Relations McGraw-Hill Education

Induction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets

CHAPTER 10 GRAPHS AND TREES. Copyright Cengage Learning. All rights reserved.

Chapter 9 Graph Algorithms

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Graph Theory. ICT Theory Excerpt from various sources by Robert Pergl

Transcription:

Graphs Eng.Jehad Aldahdooh Introduction To Graphs: Definitions: A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes) and E, a set of edges. Each edge has either one or two vertices associated with it, called its end points. An edge is said to connect its endpoints. A directed graph (or digraph) (V, E) consists of a nonempty set of vertices V and a set of directed edges (or arcs) E. Each directed edge is associated with an ordered pair of vertices. The directed edge associated with the ordered pair (u, v) is said to start at u and end at v. Exercises 1. Determine whether the graph shown has directed or undirected edges, whether it has multiple edges, and whether it has one or more loops. Use your answers to determine the type of graph in Table 1 this graph is.

Type Comment 3 Simple graph Undirected edges, no parallel edges or loops 4 multigraph Undirected edges, no loops but a parallel edges 5 Pseudograph Undirected edges, with loops and parallel edges 6 multigraph Undirected edges, no loops but a parallel edges 7 directed graph Directed edges, no parallel edges but loops. 8 directed multigraph Directed edges, parallel edges and loops. 9 directed multigraph Directed edges, parallel edges and loops. Graph Terminology Two vertices u and v in an undirected graph G are called adjacent (or neighbors) in G if u and v are endpoints of an edge of G. If e is associated with {u, v}, the edge e is called incident with the vertices u and v. The edge e is also said to connect u and v. The vertices u and v are called endpoints of an edge associated with {u, v}.

The degree of a vertex in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of that vertex. The degree of the vertex v is denoted by deg (v). o A vertex with degree 0 is called isolated. o A vertex of degree 1 is called pendant. THE HANDSHAKING THEOREM Let G = (V, E) be an undirected graph with e edges. Then When (u, v) is an edge of the graph G with directed edges, u is said to be adjacent to v and v is said to be adjacent from u. The vertex u is called the initial vertex of (u, v), and v is called the terminal or end vertex of (u, v). The initial vertex and terminal vertex of a loop are the same. In a graph with directed edges the in-degree of a vertex v, denoted by deg-(v), is the number of edges with v as their terminal vertex. The out-degree of v, denoted by deg+(v), is the number of edges with v as their initial vertex. Let G = (V, E) be a graph with directed edges. Then The complete graph on n vertices, denoted by K n, is the simple graph that contains exactly one edge between each pair of distinct vertices. For any n3, a cycle on n vertices, C n, is a simple graph where V={v 1,v 2,,v n } and E={{v 1,v 2 },{v 2,v 3 },,{v n1,v n },{v n,v 1 }}. For any n3, a wheel W n, is a simple graph obtained by taking the cycle C n and adding one extra vertex v hub and n extra edges {{v hub,v 1 }, {v hub,v 2 },,{v hub,v n }}. N-cubes: for any nn, the hypercube Q n is a simple graph consisting of two copies of Q n-1 connected together at corresponding nodes. Q 0 has 1 node. Bipartite Graphs the graph can be divided into two parts in such a way that all edges go between the two parts. Complete Bipartite Graphs That is, there are m nodes in the left part, n nodes in the right part, and every node in the left part is connected to every node in the right part. A subgraph of a graph G= (V, E) is a graph H= (W, F) where WV and FE. The union G 1 G 2 of two simple graphs G 1 =(V 1, E 1 ) and G 2 =(V 2,E 2 ) is the simple graph (V 1 V 2, E 1 E 2 ).

Exercises 1. Find the number of vertices, the number of edges, and the degree of each vertex in the given undirected graph. Identify all isolated and pendant vertices. 1) Graph 1 number of vertices: 6 the number of edges: 6 Vertex a b c d e f Degree 2 4 1 0 2 3 isolated no no no yes no no pendant no no yes no no no 2) graph 2 number of vertices: 5 the number of edges: 13 Vertex a b c d e Degree 6 6 6 5 3 isolated no no no no no pendant no no no no no 2. Determine the number of vertices and edges and find the in-degree and outdegree of each vertex for the given directed multigraph.

number of vertices: 4 the number of edges: 8 Vertex a b c d In-degree 2 3 2 1 out-degree 2 4 1 1 3. How many vertices and how many edges do these graphs have? a. K n b. C n c. Q n d. W n K n C n Q n W n vertices n n 2 n n Edges n(n-1)/2 n n2 n /2 2n 4. Find the union of the given pair of simple graphs. (Assume edges with the same endpoints are the same.)

5. Determine whether the graph is bipartite. a) 19: the graph is bipartite, make to subset of V {e} and {a, b, c, d} b) 22: the graph is bipartite, make to subset of V {c, f} and {a, b, d, e} Representing Graphs and Graph Isomorphism. The adjacency list of an undirected graph is simply a list of the vertices of the given graph, together with a list of the vertices adjacent to each. To form the adjacency list of a directed graph, we list, for each vertex in the graph, the terminal vertex of each edge that has the given vertex as its initial vertex.

Adjacency Matrices: Matrix A= [a ij ], where a ij is 1 if {v i, v j } is an edge of G, and is 0 otherwise. The simple graphs G 1 = (VI, EI) and G2 = (V2, E2) are isomorphic if there is a one-to-one and onto function f from VI to V2 with the property that a and b are adjacent in G 1 if and only if f(a) and f(b) are adjacent in G 2, for all a and b in VI. Such a function f is called an isomorphism. * Necessary but not sufficient conditions for G 1 = (V 1, E 1 ) to be isomorphic to G 2 = (V 2, E 2 ): o We must have that V1 = V2, and E1 = E2. o The number of vertices with degree n is the same in both graphs. Exercises 1. Use an adjacency list and adjacency matrix to represent the given graph. vertex Adjacent vertices a b, d b a, d, e c e, d d a, b, c e b, c

Initial vertex terminal vertices a b, d b a, c, d, e c b, c d a, e e c, e 2. Determine whether the given pair of graphs is isomorphic. a) Isomorphic, Mapping between vertices: U 1 U 2 U 3 U 4 U 5 V 1 V 2 V 4 V 5 V 3 b) Not isomorphic, the first has 4 vertices with degree 3, but the second has only 3. Connectivity. Informally, a 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. An undirected graph is connected iff there is a path between every pair of distinct vertices in the graph. A connected component of a graph G is a connected subgraph of G that is not a proper subgraph of another connected subgraph of G. A directed graph is strongly connected if there is a path from a to b and from b to a whenever a and b are vertices in the graph. A directed graph is weakly connected if there is a path between every two vertices in the underlying undirected graph.