Graph Terminologies Department of CE/IT M.S.P.V.L.Polytechnic College,

Slides:



Advertisements
Similar presentations
Graphs CSCI 2720 Spring 2005.
Advertisements

PSU CS Algorithms Analysis and Design Graphs.
Edited by Malak Abdullah Jordan University of Science and Technology Data Structures Using C++ 2E Chapter 12 Graphs.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
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.
Graphs.
Graphs. Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
1 Graph Introduction Definitions. 2 Definitions I zDirected Graph (or Di-Graph) is an ordered pair G=(V,E) such that yV is a finite, non-empty set (of.
1 Introduction to Graphs Graph definition / applications Graph terminology –Undirected graphs –Directed graphs –Networks Implementing graphs Reading: L&C.
Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects two different vertices. Edges are.
Graphs1 ORD DFW SFO LAX Graphs2 Outline and Reading Graphs (§6.1) Definition Applications Terminology Properties ADT Data structures.
Graphs1 ORD DFW SFO LAX Graphs2 Outline and Reading Graphs (§6.1) Definition Applications Terminology Properties ADT Data structures.
Chapter 9: Graphs Basic Concepts
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
9.2 Graph Terminology and Special Types Graphs
GRAPH Learning Outcomes Students should be able to:
Intro to Graphs CSIT 402 Data Structures II. CSIT 402 Graph Introduction2 Graphs Graphs are composed of ›Nodes (vertices) Can be labeled ›Edges (arcs)
Graphs Chapter 10.
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 Graphs Chapters 9.1 and 9.2 University of Maryland Chapters 9.1 and 9.2 Based on slides by Y. Peng University of Maryland.
Graphs – ADTs and Implementations ORD DFW SFO LAX
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
Graphs Chapter 12.
Introduction to Graphs. Introduction Graphs are a generalization of trees –Nodes or verticies –Edges or arcs Two kinds of graphs –Directed –Undirected.
Lecture 10: Graphs Graph Terminology Special Types of Graphs
 What is a graph? What is a graph?  Directed vs. undirected graphs Directed vs. undirected graphs  Trees vs graphs Trees vs graphs  Terminology: Degree.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Vertices and Edges Introduction to Graphs and Networks Mills College Spring 2012.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Graphs. 2 Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
Graphs CSE 2011 Winter June Graphs A graph is a pair (V, E), where  V is a set of nodes, called vertices  E is a collection of pairs.
Spring 2007Graphs1 ORD DFW SFO LAX
GRAPHS THEROY. 2 –Graphs Graph basics and definitions Vertices/nodes, edges, adjacency, incidence Degree, in-degree, out-degree Subgraphs, unions, isomorphism.
COSC 2007 Data Structures II Chapter 14 Graphs I.
Chapter 5 Graphs  the puzzle of the seven bridge in the Königsberg,  on the Pregel.
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
CSE 373: Data Structures and Algorithms
Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects two different vertices. Edges are.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Graphs Upon completion you will be able to:
1 Graphs Terminology By: Sandeep Tuli Astt. Prof. CSE.
Copyright © Curt Hill Graphs Definitions and Implementations.
Chapter 9: Graphs.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Chapter 05 Introduction to Graph And Search Algorithms.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 10.
Subject Four Graphs Data Structures. What is a graph? A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Graphs.
Basic Concepts Graphs For more notes and topics visit:
Graph Graphs and graph theory can be used to model:
Graphs All tree structures are hierarchical. This means that each node can only have one parent node. Trees can be used to store data which has a definite.
Chapter 9: Graphs Basic Concepts
Graphs.
Graphs.
Decision Maths Graphs.
Graphs By Rajanikanth B.
Graphs G = (V, E) V are the vertices; E are the edges.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Graphs.
Graphs.
Graphs.
Graphs.
Chapter 9: Graphs Basic Concepts
Graphs G = (V,E) V is the vertex set.
GRAPHS.
Heaps Chapter 6 Section 6.9.
Presentation transcript:

Graph Terminologies Department of CE/IT M.S.P.V.L.Polytechnic College, Pavoorchatram.

Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge Bristol Southhampton Dover 60 140 190 150 100 120 110 An undirected graph start fill pan with water take egg from fridge break egg into pan boil water add salt to water A directed graph www.ustudy.in

Graph terminology I A graph is a collection of nodes (or vertices, singular is vertex) and edges (or arcs) Each node contains an element Each edge connects two nodes together (or possibly the same node to itself) and may contain an edge attribute A directed graph is one in which the edges have a direction An undirected graph is one in which the edges do not have a direction Note: Whether a graph is directed or undirected is a logical distinction—it describes how we think about the graph Depending on the implementation, we may or may not be able to follow a directed edge in the “backwards” direction www.ustudy.in

Graph Terminology A graph G = (V, E) In an undirected graph: V = set of vertices E = set of edges In an undirected graph: edge(u, v) = edge(v, u) In a directed graph: edge(u,v) goes from vertex u to vertex v, notated u  v edge(u, v) is not the same as edge(v, u) www.ustudy.in

Graph Terminologies Directed graph: V = {A, B, C, D} E = {(A,B), (A,C), (A,D), (C,B)} A C D B Undirected graph: E = {(A,B), (A,C), (A,D), (C,B), (B,A), (C,A), (D,A), (B,C)} www.ustudy.in

Graph Terminology Adjacent vertices: connected by an edge Vertex v is adjacent to u if and only if (u, v)  E. In an undirected graph with edge (u, v), and hence (v, u), v is adjacent to u and u is adjacent to v. a b d e c Vertex a is adjacent to c and vertex c is adjacent to a Vertex c is adjacent to a, but vertex a is NOT adjacent to c www.ustudy.in

Graph Terminology A Path in a graph from u to v is a sequence of edges between vertices w0, w1, …, wk, such that (wi, wi+1)  E, u = w0 and v = wk, for 0  i  k The length of the path is k, the number of edges on the path a b a b c c d e d e abedce is a path. cdeb is a path. bca is NOT a path. acde is a path. abec is NOT a path. www.ustudy.in

Graph Terminology Loops If the graph contains an edge (v, v) from a vertex to itself, then the path v, v is sometimes referred to as a loop. The graphs we will consider will generally be loopless. A simple path is a path such that all vertices are distinct, except that the first and last could be the same. a b d e c a b abedc is a simple path. cdec is a simple path. abedce is NOT a simple path. c d e www.ustudy.in

Graph Terminology simple path: no repeated vertices www.ustudy.in

Graph Terminology Cycles A cycle in a directed graph is a path of length at least 2 such that the first vertex on the path is the same as the last one; if the path is simple, then the cycle is a simple cycle. A cycle in a undirected graph A path of length at least 3 such that the first vertex on the path is the same as the last one. The edges on the path are distinct. abeda is a simple cycle. abeceda is a cycle, but is NOT a simple cycle. abedc is NOT a cycle. a b d e c a b d e c aba is NOT a cycle. abedceda is NOT a cycle. abedcea is a cycle, but NOT simple. abea is a simple cycle. www.ustudy.in

Graph Terminology If each edge in the graph carries a value, then the graph is called weighted graph. A weighted graph is a graph G = (V, E, W), where each edge, e  E is assigned a real valued weight, W(e). A complete graph is a graph with an edge between every pair of vertices. A graph is called complete graph if every vertex is adjacent to every other vertex.

Graph Terminology n = 2 n = 3 n = 4 n = 1 Complete Undirected Graph has all possible edges n = 2 n = 3 n = 4 n = 1 www.ustudy.in

Graph Terminology connected graph: any two vertices are connected by some path An undirected graph is connected if, for every pair of vertices u and v there is a path from u to v.

Graph Terminology tree - connected graph without cycles forest - collection of trees www.ustudy.in

Graph Terminology www.ustudy.in

Graph Terminology X U V W Z Y a c b e d f g h i j End vertices (or endpoints) of an edge a U and V are the endpoints of a Edges incident on a vertex V a, d, and b are incident on V Adjacent vertices U and V are adjacent Degree of a vertex X X has degree 5 Parallel edges h and i are parallel edges Self-loop j is a self-loop X U V W Z Y a c b e d f g h i j www.ustudy.in

Graph Terminology V a b P1 d U X Z P2 h c e W g f Y Path sequence of alternating vertices and edges begins with a vertex ends with a vertex Simple path path such that all its vertices and edges are distinct. Examples P1 = (V, X, Z) is a simple path. P2 = (U, W, X, Y, W, V) is a path that is not simple. V a b P1 d U X Z P2 h c e W g f Y www.ustudy.in

Graph Terminology V a b d U X Z C2 h e C1 c W g f Y Cycle circular sequence of alternating vertices and edges Simple cycle cycle such that all its vertices and edges are distinct Examples C1 = (V, X, Y, W, U, V) is a simple cycle C2 = (U, W, X, Y, W, V, U) is a cycle that is not simple V a b d U X Z C2 h e C1 c W g f Y www.ustudy.in

Graph Terminology Wheels They are denoted by Wn; they are obtained by adding a vertex to the graphs Cn and connect this vertex to all vertices www.ustudy.in

Graph Terminology W3 W4 W6 W5 The Wheels W3, W4, W5 & W6 www.ustudy.in

In-Degree of a Vertex in-degree is number of incoming edges indegree(2) = 1, indegree(8) = 0 2 3 8 10 1 4 5 9 11 6 7 www.ustudy.in

Out-Degree of a Vertex out-degree is number of outbound edges outdegree(2) = 1, outdegree(8) = 2 2 3 8 10 1 4 5 9 11 6 7 www.ustudy.in

The End Thank U www.ustudy.in