Vertices and Edges Introduction to Graphs and Networks Mills College Spring 2012.

Slides:



Advertisements
Similar presentations
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Connectivity Lecture _13.
Advertisements

22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
CS 206 Introduction to Computer Science II 03 / 27 / 2009 Instructor: Michael Eckmann.
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.
CS 206 Introduction to Computer Science II 11 / 11 / Veterans Day Instructor: Michael Eckmann.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Introduction to Graphs
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Wednesday, 9/26/01 Graph Basics.
CS 206 Introduction to Computer Science II 11 / 03 / 2008 Instructor: Michael Eckmann.
Interconnection Networks  Lecture 5 : January 29 th 2007 Prof. Chung-Kuan Cheng University of California San Diego Transcribed by: Jason Thurkettle.
CS 206 Introduction to Computer Science II 03 / 25 / 2009 Instructor: Michael Eckmann.
CSE 321 Discrete Structures Winter 2008 Lecture 25 Graph Theory.
1 Introduction to Graphs Graph definition / applications Graph terminology –Undirected graphs –Directed graphs –Networks Implementing graphs Reading: L&C.
CS/ENGRD 2110 Object-Oriented Programming and Data Structures Fall 2014 Doug James Lecture 17: Graphs.
Chapter 9: Graphs Basic Concepts
Graph: Relations There are many kinds of social relations. For example: Role-based : brother of, father of, sister of, etc. : friend of, acquaintance of,
22C:19 Discrete Math Graphs Spring 2014 Sukumar Ghosh.
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,
Chapter 2 Graph Algorithms.
GRAPH THEORY.  A graph is a collection of vertices and edges.  An edge is a connection between two vertices (or nodes).  One can draw a graph by marking.
1 ELEC692 Fall 2004 Lecture 1b ELEC692 Lecture 1a Introduction to graph theory and algorithm.
Chapter 4 sections 1 and 2.  Fig. 1  Not connected  All vertices are even.  Fig. 2  Connected  All vertices are even.
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.
 What is a graph? What is a graph?  Directed vs. undirected graphs Directed vs. undirected graphs  Trees vs graphs Trees vs graphs  Terminology: Degree.
Module #19: Graph Theory: part II Rosen 5 th ed., chs. 8-9.
Basic Notions on Graphs. The House-and-Utilities Problem.
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.
COSC 2007 Data Structures II Chapter 14 Graphs I.
Vocabulary and Representations of Graphs. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships.
An Introduction to Graph Theory
Graph Theory. A branch of math in which graphs are used to solve a problem. It is unlike a Cartesian graph that we used throughout our younger years of.
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.
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.
Graph Terminologies Department of CE/IT M.S.P.V.L.Polytechnic College,
Graphs Upon completion you will be able to:
CHAPTER 11 TREES INTRODUCTION TO TREES ► A tree is a connected undirected graph with no simple circuit. ► An undirected graph is a tree if and only.
Class 2: Graph Theory IST402. Can one walk across the seven bridges and never cross the same bridge twice? Network Science: Graph Theory THE BRIDGES OF.
Chapter 9: Graphs.
Great Theoretical Ideas in Computer Science for Some.
Graph Concepts Illustrated Using The Leda Library Amanuel Lemma CS252 Algorithms.
Graphs and Matrices Spring 2012 Mills College Dan Ryan Lecture Slides by Dan Ryan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike.
1 Data Structures and Algorithms Graphs. 2 Graphs Basic Definitions Paths and Cycles Connectivity Other Properties Representation Examples of Graph Algorithms:
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 Lecture 19 CS2110 – Spring 2013.
Introduction to Graphs
Basic Concepts Graphs For more notes and topics visit:
Introduction to Graphs
Network analysis.
Network Science: A Short Introduction i3 Workshop
Can you draw this picture without lifting up your pen/pencil?
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
What is a Graph? a b c d e V= {a,b,c,d,e} E= {(a,b),(a,c),(a,d),
Graph Theory By Amy C. and John M..
Discrete Mathematics Lecture 12: Graph Theory
Graphs By Rajanikanth B.
Graphs G = (V, E) V are the vertices; E are the edges.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Paths and Connectivity
Paths and Connectivity
Graph Vocabulary.
Chapter 9: Graphs Basic Concepts
Graphs G = (V,E) V is the vertex set.
GRAPHS.
Introduction to Graphs
Presentation transcript:

Vertices and Edges Introduction to Graphs and Networks Mills College Spring 2012

Today’s Topics Introduce concepts and jargon Basics of graph theory Different ways to represent networks/graphs

Graphs, vertices, edges. The math of networks follows from the full matrix format we introduced above. That format is, in fact, what we call the adjacency matrix. Adjacency matrix. Incidence matrix Notation and conventions. Directed and undirected networks. Distance or Path matrix

Network = {vertices}, {edges} A network is an entity containing two sets: – Set of vertices, e.g., {A, B, C} – Set of edges where edges are pairs of vertices e.g., {(A,B), (A,C)} A B C (A,B) (A,C)

Tabular (Matrix) Representation ABC A-11 B-0 C- A B C (A,B) (A,C)

Exercise 1 Sketch the network {a, b, c, d} {(a,b), (a,c), (a,d), (b,d), (c,d)} Express this network in table/matrix form a b c d abcd a-111 b-01 c-1 d

Exercise 2 Express this network in table/matrix form a b c d abcde a-1110 b-011 c-11 d-1 e- e

Self-edges and Multi-Edges An edge that connects a vertex to itself is a self-edge. If there is more than one edge between a pair of vertices we call it a multi-edge

Exercise 3 How do you think this would be represented in matrix form? a b c d abcd a1000 b100 c10 d1

Degree The degree of a vertex is the number of edges connected to it. a b c d e f

Degree Distribution

Directed and Undirected Graphs Edges can have direction – from vertex A to vertex B Edges are then represented as ORDERED pair (a,b) but not (b,a) A directed graph is also called a digraph ba X abcd a-1 b0- c- d-

Exercise 4 Sketch the digraph represented by this matrix abcd a-101 b0-11 c11-1 d000- b c a d

In- and Out-degree in Digraphs For vertices in a digraph we distinguish IN- degree (number of edges coming in) from OUT-degree (number going out) b c a d Degree in = 2 Degree out = 2 Degree in = 1 Degree out = 3 Degree in = 1 Degree out = 2 Degree in = 3 Degree out = 0

Exercise : Density Describe the difference between these three 5 vertex networks

Exercise The network on the left is “maximally connected.” It has a total of 6 edges and each vertex has degree 3. For network on right, calculate (a) ratio of # edges to possible # of edges, (b) for each vertex, ratio of its degree to maximum possible degree. b c a d b c a d

Planar Networks If a network can be drawn on a flat piece of paper without any edges crossing it is called a planar network.

Exercise: Is this network planar? a b c d e a b c d e

Paths If there is an edge between two nodes, A and B, we say there is a path from A to B. If there is a sequence of paths from A to B to C, then we say there is a path from A to C Path length is number of edges on the path.

Geodesic & Diameter Shortest path between 2vertices is a geodesic Longest path in a graph is its diameter. b d a e c Geodesic between a and d is a-c-d of length 2 Diameter of graph is 4

Connected Graphs In a connected graph there is a path from any given vertex to any other given vertex. A directed graph is strongly connected when there is a directed path from any given vertex to any other. It is weakly connected if it is only connected when you treat the edges as undirected.

Fully Connected A fully connected graph is one that has all the possible edges It is also called a clique or k-clique (K n ). bab c ab c a d b c a d a K2K2 K3K3 K4K4 K5K5

Exercise: Label the Cliques

f c a b e d Counting Paths How many paths from a to f ? f c a b e d ONE TWO

Exercise Counting Paths How many paths from a to f ? What is the shortest path from a to f? What is the longest path in this graph? f c a b e d 2 paths A-C times 2 paths D-F = 4 paths A-F FOUR