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.

Slides:



Advertisements
Similar presentations
Cpt S 223 – Advanced Data Structures Graph Algorithms: Introduction
Advertisements

Graph A graph, G = (V, E), is a data structure where: V is a set of vertices (aka nodes) E is a set of edges We use graphs to represent relationships among.
1 Section 8.2 Graph Terminology. 2 Terms related to undirected graphs Adjacent: 2 vertices u & v in an undirected graph G are adjacent (neighbors) in.
Introduction to Graph  A graph consists of a set of vertices, and a set of edges that link together the vertices.  A graph can be: Directed: Edges are.
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.
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
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.
The Euler-tour technique
Balanced Binary Search Trees height is O(log n), where n is the number of elements in the tree AVL (Adelson-Velsky and Landis) trees red-black trees get,
Graph Operations And Representation. Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
Graphs Rosen 8.1, 8.2. There Are Many Uses for Graphs! Networks Data organizations Scene graphs Geometric simplification Program structure and processes.
ALG0183 Algorithms & Data Structures Lecture 18 The basics of graphs. 8/25/20091 ALG0183 Algorithms & Data Structures by Dr Andy Brooks.
Graphs Algorithm Design and Analysis Week 4 Bibliography: [CLRS]- Subchap 22.1 – Representation of Graphs.
Graph. Data Structures Linear data structures: –Array, linked list, stack, queue Non linear data structures: –Tree, binary tree, graph and digraph.
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.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 1): Graphs  Introduction to Graphs (9.1)
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,
GRAPHS CSE, POSTECH. Chapter 16 covers the following topics Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component,
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.
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.
Social Network Analysis (1) LING 575 Fei Xia 01/04/2011.
1 CS104 : Discrete Structures Chapter V Graph Theory.
Data Structures & Algorithms Graphs
9 Graphs. 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.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 9 (Part 1): Graphs  Introduction to Graphs (9.1)
Graphs 9.1 Graphs and Graph Models أ. زينب آل كاظم 1.
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
Homework #5 Due: October 31, 2000 Christine Kang Graph Concepts and Algorithms.
Data Structures & Algorithms Graphs Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
Graphs 황승원 Fall 2010 CSE, POSTECH. 2 2 Graphs G = (V,E) V is the vertex set. Vertices are also called nodes and points. E is the edge set. Each edge connects.
GRAPHS. Graph Graph terminology: vertex, edge, adjacent, incident, degree, cycle, path, connected component, spanning tree Types of graphs: undirected,
Graph. 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.
Chapter 6 Graphs. 2 Outline Definitions, Terminologies and Applications Graph Representation Elementary graph operations Famous Graph Problems.
Graph Terminologies Department of CE/IT M.S.P.V.L.Polytechnic College,
Graphs Basic properties.
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 and Paths : Chapter 15 Saurav Karmakar
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.
Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph.
1 CSE 332: Graphs Richard Anderson Spring Announcements This week and next week – Graph Algorithms Reading, Monday and Wednesday, Weiss
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Balanced Binary Search Trees
Basic Concepts Graphs For more notes and topics visit:
Minimum Spanning Tree Chapter 13.6.
Graphs and Graph Models
Balanced Binary Search Trees
Graph Algorithm.
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.
Graph Operations And Representation
Graphs.
10.1 Graphs and Graph Models
CC 215 Data Structures Graph Terminology
CSE 373 Data Structures Lecture 17
CSCI2100 Data Structures Tutorial
Graphs By Rajanikanth B.
Graphs Chapter 7 Visit for more Learning Resources.
Graphs G = (V, E) V are the vertices; E are the edges.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Graph Terminology CSE 373 Data Structures.
Graphs: An Introduction
CSE 373 Data Structures Lecture 13
Graphs G = (V,E) V is the vertex set.
Presentation transcript:

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 also called arcs and lines. Directed edge has an orientation (u,v). uv

Graphs Undirected edge has no orientation (u,v). uv Undirected graph => no oriented edge. Directed graph => every edge has an orientation.

Undirected Graph

Directed Graph (Digraph)

Applications—Communication Network Vertex = city, edge = communication link

Driving Distance/Time Map Vertex = city, edge weight = driving distance/time

Street Map Some streets are one way

Complete Undirected Graph Has all possible edges. n = 1 n = 2 n = 3 n = 4

Number Of Edges—Undirected Graph Each edge is of the form (u,v), u != v. Number of such pairs in an n vertex graph is n(n-1). Since edge (u,v) is the same as edge (v,u), the number of edges in a complete undirected graph is n(n-1)/2. Number of edges in an undirected graph is <= n(n-1)/2.

Number Of Edges--Directed Graph Each edge is of the form (u,v), u != v. Number of such pairs in an n vertex graph is n(n-1). Since edge (u,v) is not the same as edge (v,u), the number of edges in a complete directed graph is n(n-1). Number of edges in a directed graph is <= n(n-1).

Vertex Degree Number of edges incident to vertex. degree(2) = 2, degree(5) = 3, degree(3) =

Sum Of Vertex Degrees Sum of degrees = 2e (e is number of edges)

In-Degree Of A Vertex in-degree is number of incoming edges indegree(2) = 1, indegree(8) =

Out-Degree Of A Vertex out-degree is number of outbound edges outdegree(2) = 1, outdegree(8) =

Sum Of In- And Out-Degrees each edge contributes 1 to the in-degree of some vertex and 1 to the out-degree of some other vertex sum of in-degrees = sum of out-degrees = e, where e is the number of edges in the digraph