Introduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow

Similar documents
Systems, ESD.00. Networks II. Lecture 8. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Some Graph Theory for Network Analysis. CS 249B: Science of Networks Week 01: Thursday, 01/31/08 Daniel Bilar Wellesley College Spring 2008

Chapter 11: Graphs and Trees. March 23, 2008

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

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

CS6702 GRAPH THEORY AND APPLICATIONS 2 MARKS QUESTIONS AND ANSWERS

Introduction III. Graphs. Motivations I. Introduction IV

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Introduction to Graph Theory

Varying Applications (examples)

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

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

Math 776 Graph Theory Lecture Note 1 Basic concepts

Graph and Digraph Glossary

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 1 Graph Theory

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities?

GRAPH THEORY AND COMBINATORICS ( Common to CSE and ISE ) UNIT 1

6.2. Paths and Cycles

Elements of Graph Theory

Chapter 2 Graphs. 2.1 Definition of Graphs

Introduction to Graphs

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

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

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

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

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

Graphs. Introduction To Graphs: Exercises. Definitions:

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

0.0.1 Network Analysis

Sections 5.2, 5.3. & 5.4

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

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK

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

Chapter 9. Graph Theory

Directed Graph and Binary Trees

Network Basics. CMSC 498J: Social Media Computing. Department of Computer Science University of Maryland Spring Hadi Amiri

Network Topology and Graph

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

WUCT121. Discrete Mathematics. Graphs

3 Euler Tours, Hamilton Cycles, and Their Applications

Material handling and Transportation in Logistics. Paolo Detti Dipartimento di Ingegneria dell Informazione e Scienze Matematiche Università di Siena

Vertex-Edge Graphs. Vertex-Edge Graphs In the Georgia Performance Standards. Sarah Holliday Southern Polytechnic State University

Graphs. The ultimate data structure. graphs 1

Simple graph Complete graph K 7. Non- connected graph

BIL694-Lecture 1: Introduction to Graphs

1 Digraphs. Definition 1

Graph theory: basic concepts

An Introduction to Graph Theory

Graph Theory. Part of Texas Counties.

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8

Chapter 14 Section 3 - Slide 1

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

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

Chapter 2: Graph Theory

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Mathematics of Networks II

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

Street-Routing Problems

Topics Covered. Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm

Euler and Hamilton circuits. Euler paths and circuits

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

Math 110 Graph Theory II: Circuits and Paths

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

MATH 113 Section 9.2: Topology

MATH 682 Notes Combinatorics and Graph Theory II. One interesting class of graphs rather akin to trees and acyclic graphs is the bipartite graph:

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

Discrete Mathematics and Probability Theory Spring 2015 Vazirani Note 5

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

Ordinary Differential Equation (ODE)

GRAPH THEORY AND LOGISTICS

Lecture 1: An Introduction to Graph Theory

Understand graph terminology Implement graphs using

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

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

Assignment 4 Solutions of graph problems

Number Theory and Graph Theory

Fundamentals of Graph Theory MATH Fundamentals of Graph Theory. Benjamin V.C. Collins, James A. Swenson MATH 2730

Introduction to Graphs

Pre-Calculus. Slide 1 / 192. Slide 2 / 192. Slide 3 / 192. Matrices

Pre-Calculus Matrices

CSCI5070 Advanced Topics in Social Computing

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Alessandro Del Ponte, Weijia Ran PAD 637 Week 3 Summary January 31, Wasserman and Faust, Chapter 3: Notation for Social Network Data

Pre-Calculus. Introduction to Matrices. Slide 1 / 192 Slide 2 / 192. Slide 3 / 192. Slide 4 / 192. Slide 6 / 192. Slide 5 / 192. Matrices

Fundamental Properties of Graphs

Lecture 1: Examples, connectedness, paths and cycles

TWO CONTRIBUTIONS OF EULER

Section 3.4 Basic Results of Graph Theory

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Math Summer 2012

Discrete Mathematics

Introduction to Networks

Launch problem: Lining streets

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

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

Transcription:

Introduction to Engineering Systems, ESD.00 Lecture 7 Networks Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow

The Bridges of Königsberg The town of Konigsberg in 18 th century Prussia included two islands and seven bridges over the river Pregel. A C B Residents had often thought about finding a walk such that starting from any of the four places, A,B,C,D, AB one crosses all of the seven bridges only once and then returns to the starting place. No one could find such a walk. Figure: http://www.transtutors.com/homeworkhelp/discrete+mathematics/graph+theory/konisberg -multigraph-bridge.aspx D Image by MIT OpenCourseWare.

Graph Theory Leonhard Euler, in 1736, came up with the realization that this was not a problem of traditional geometry measurements of angles, lengths, orientations do not matter. A C B The only two things that mattered were whether the islands or banks are connected by a bridge, and by how many bridges. C D He modeled each place (island or bank) as a vertex and each bridge as an edge that connected the vertices. A B He mathematically proved that no such walk existed for the Koningsberg problem and founded an entirely new branch of mathematics along the way. Figure: http://www.transtutors.com/homeworkhelp/discrete+mathematics/graph+theory/konisberg -multigraph-bridge.aspx D Images by MIT OpenCourseWare.

Modeling Example I There were six people: A, B, C, D, E, and F in a party and following handshakes among them took place: A shook hands with B, C, D, E and F B, in addition, shook hands with D and E C, in addition, shook hands with F B A C Ref [3] F E D 4

Modeling Example II Consider a job application problem. There are three jobs J 1, J 2, J 3 for which four applicants A 1, A 2, A 3, A 4 have applied. A 1 has applied for J 1 and J 2 A 2 has applied for J 1, J 2 and J 3 A 3 has applied for J 1 A 1 A 2 A 3 A 4 A 4 has applied for J 2 and J 3 This type of graph is called a bi-partite graph. J 1 J 2 J 3 A bi-partite graph has two types of vertices (nodes) and there are no edges between nodes of the same type. Ref [3] 5

Modeling Example III Image by MIT OpenCourseWare. http://cvpr.uni-muenster.de/teaching/ws10/projektseminarws10/ http://www.airlineroutemaps.com/usa/american_airlines_caribbean.shtml 6

Graphs Ref [3] A graph is a finite collection of vertices (or nodes) and edges (or links). To indicate a graph G has vertex set V and edge set E, we write G=(V,E) Each edge {x,y} of G is usually denoted by xy, or yx. c b g G a f d e What is the vertex set V(G) and edge set E(G) of the graph G shown? V(G)={a, b, c, d, e, f, g} E(G)={ab, bc, ad, de, af, fg, fe} 7

Adjacency If xy is an edge of G, the x and y are G Ref [3] adjacent vertices a Two adjacent vertices are referred to as neighbors of each other b f d The set of neighbors of a vertex v is called the open neighborhood (or simply neighborhood) of v and is denoted as N(v) c g e For graph G shown on the right, what is: N(a)? N(f)? N(b)? 8

Order and Size Ref [3] The number of vertices in a graph G is the G order of G The number of edges in G is the size of G The order of G (as shown on the right) is g The size of G (as shown on the right) is c b a f d e A graph of size 0 is called an empty graph no two vertices are adjacent. A graph in which every pair of two vertices are adjacent is called a complete graph 9

Multi Graphs So far we ve considered only zero or one edge between a pair of vertices What if there are more edges? Consider Euler s graph for the Köningsberg gp problem The graph K is a multigraph A multigraph has finite number of edges (including zero) between any two vertices So all graphs are multigraphs but not vice versa No loops are allowed in a multigraph a vertex cannot connect to itself A e 1 e 5 C e 3 e 2 B e 7 e 6 e 4 D Image by MIT OpenCourseWare. 10

Adjacency Matrix In addition to set representation, we can use matrices to represent multigraphs Ref [4] v 1 v 4 We can create an adjacency matrix A such that its each (i,j) (,j) entry is the number of edges that exist between vertex i and vertex j v 2 v 3 0 2 0 1 2 0 1 0 0 1 0 3 For a multigraph G of order n with A = V(G)={v 1, v 2, v 3..v n }, the adjacency matrix of G is n x n 1 0 3 0 A(G) = [a ij ] nxn where a ij, the (i,j) entry in A(G) is there are three edges between the number of edges joining v i and v j v3 and v 4 11

Exercise Draw G when G(A) is: 0 1 0 2 3 1 0 1 2 2 A = 0 1 0 1 1 2 2 1 0 1 3 2 1 1 0 Why are the elements of the diagonal always zero? What is the order (n) of G? What is the size (m) of G? How can you determine m from A? 12

Incidence Matrix The Incidence Matrix, B is a binary, n x m Ref [4] matrix, where b ij = 1 if v i is an endvertex of e 4 edge e j, otherwise it is zero. The incidence matrix contains more information than an adjacency matrix since it distinguishes between edges. e 1 v 1 v 4 e 2 e 5 e 6 e 7 v 2 e 3 v 3 1 1 0 1 0 0 0 B = 1 1 1 0 0 0 0 Each column has two ones if each edge has two distinct vertices (i.e. when there are no 0 0 1 0 1 1 1 loops and the graph is connected). 0 0 0 1 1 1 1 v 4 is an endvertex of e 4, e 5, e 6, and e 7 13

Vertex Degrees Given a vertex v in G, the degree of v in G, denoted by d G (v), is defined as the number of edges incident with v. Which vertex has the highest degree in the Koningsberg problem? What is its degree? In a multigraph, the sum of the degrees of its vertices is twice its size (number of edges). n i=1 dv ()= i 2m This is also known as the Hand-Shaking Theorem A A C B D Image by MIT OpenCourseWare. B C A vertex with the highest degree is called a hub in a graph (or network). F E D

Degrees from A and B Given an adjacency matrix, A, can we determine d(v i )? e 1 v 1 v 4 e 4 e 2 e 5 e 6 e 7 e v 2 e 3 v 3 Can we determine d(v i ) from incidence 0 2 0 1 matrix, B? 2 0 1 0 A = 0 1 0 3 1 0 3 0 1 1 0 1 0 0 0 B = 1 1 1 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 1 1

Complete Graphs What is the total number of edges, m, in a complete graph? For a graph of order n (i.e. n vertices), what is the number of total possible combinations if we pick two vertices at a time? Think Combination out of n objects, how many combinations are possible if we pick k objects at a time? This is given by the Binomial coefficient: n nn 1)L ( ( n k +1) n! = = k k(k 1)L 1 k!(n k)! k n m K 1 : 0 K 2 : 1 K 3 : 3 K 4 : 6 K 5 : 10 K 6 : 15 K 7 : 21 K 8 : 28 For a complete graph with order n, K n, the size m is: n n! nn ( 1) ( n 2)! = = = 2 2!(n 2)! 2!(n 2)! Image by MIT OpenCourseWare. ( ) nn 1 = 22 16

Paths and Cycles Paths and cycles are two classes of graphs. P 1 P 2 For n 1, the path P n is a graph of order n and size n 1 whose vertices are v 1, v 2, v n, and whose edges are v i v i+1 for i=1,, n 1. P 4 P 3 For n 3, the cycle C n is a graph of order n and size n whose vertices can be labeled by v 1, v 2, v n and whose edges are v 1 v n, and v i v i+1 for i=1,2,n 1. The cycle C n is also referred to as an n cycle. C 3 Note every cycle has vertices with the same number of degree: 2, and the number of edges in the cycle = number of vertices C 4 C 5

Walks In a graph, we may wish to know if a route exists from one vertex to another two vertices may not be adjacent, but maybe connected tdth through a sequence of edges. A walk in a graph G is an alternating sequence of vertices and edges : A C e 3 B v 0 e 0 v 1 e 1 v 2 v k 1 e k 1 v k e 5 e 4 D where k 1 and e i is incident with v i and v i+1 for each i = 0, 1, k 1 The vertices and edges need not be distinct The length of the walk W is defined as k which is the number of occurrences of edges in the sequence. C e 3 B e 4 D e 5 A Image by MIT OpenCourseWare. what is the length of this walk?

Trails and Circuits A trail in G is a walk with all of its edges e 1 e 2 e k distinct walks A path is G is a walk with all of its vertices v 0 v 1 v k distinct For vertices u and v in G, a u, v walk (or trail, path etc.) is one with initial vertex u and final vertex v. trails paths circuits i closed walks A walk or trail of length at least 1 is closed if the initial and final vertex are the same. A closed trail is also called a circuit. cycles Ref [4] A cycle is a closed walk with distinct vertices except for the initial and final vertex, which are the same.

Examples The walk t is a trail of length 5: The walk p is a path of length 4: t = (v 1, e 2, v 3, e 3, v 1, e 1,v 2, e 8, v 5, e 7, v 4 ) p = (v 1, e 2, v 3, e 4, v 2, e 8, v 5, e 7, v 4 ) t is not a path since v 1 appears twice e 6 e 6 v e 3 3 e 2 v e 4 5 e 7 e 4 v 5 e 8 v e 4 5 e 7 v 3 e 2 e 4 v 5 e 8 v v 1 v 1 v e 2 e 2 1 1 e 3 e 8 Ref [4] Ref [4]

Examples The walk c is a cycle of length 4: c = (v 3, e 4, v 2, e 8, v 5, e 7,v 4, e 5, v 3 ) e 6 e 3 v 1 e 5 v 4 v 3 e 7 e 2 e 4 e 7 e 8 e 8 v e 2 1 v 5 Ref [4]

Connectivity A graph G is connected if every two vertices in G are joined by a path. A graph is disconnected if it is not connected. A path in G that includes every vertex in G is called a Hamiltonian path of G. A cycle in G that includes every vertex in G is called a Hamiltonian cycle of G. If G contains a Hamiltonian cycle, then G is called a Hamiltonian graph. Image by MIT OpenCourseWare.

Trees A tree, T, is a connected graph that has no cycle as a subgraph A tree is a simple graph on n verticesa tree cannot have any loops or multiple edges between two vertices. T has n 1 edges and is connected. A vertex v of a simple graph is called a leaf if d(v) () = 1. Between every pair of distinct vertices in T there is exactly one path. Trees are useful in modeling applications such as hierarchy in a business, directories in an operating system, computer networks. T 1 T 2 T 3 Image by MIT OpenCourseWare. 23

Directed Graphs A directed graph, or digraph G, consists of directed edges (represented with arrows). In a directed edge uv, the vertex u is called the tail and vertex v is called the head of the edge. The indegree d (v) of a vertex v is number of directed edges having v as head. The outdegree d + (v)of v is number of directed edges having v as tail. For a digraph: n ()= d + ()= v i d v i n i=1 1 i=1 1 m e 3 5 v 3 2 e v 1 v 2 v 1 v 2 v 3 v 4 v 5 e v 6 4 e Ref [4] v 5 e e v 5 1 4 d (v i ) d + (v i )

Weighted Graphs A connected graph G is called a weighted graph if each edge e in G is assigned a number w(e), called the weight of e. Depending on the application, the weight of an edge may be a measure of physical distance, time consumed, cost, capacity, or some other quantity of interest. Given a walk W in a weighted graph, the weight of W, is the sum of the weights of the edges contained in W. Traveling Salesman Problem A traveling salesman wants to make a round trip through n cities, c 1..c i..c n. He starts in c 1, visits each remaining city c i exactly once, and ends in c 1 where he started the trip. If he knows the distances between every pair of cities ci and c j, how should he plan his round trip to make the total round-trip distance as short as possible? The problem of finding the shortest route is that of finding a minimum weight Hamiltonian cycle of the weighted complete graph K n. 25

Application Example: Project Graphs and Critical Paths A project consists of a collection of tasks. Each task has an associated completion time. A task may depend on other tasks to be completed before it can be initiated. A project graph can be constructed, such that the vertices represent tasks, and edges represent task dependencies. The total time of a path is the sum of completion time of each task on that path. The path with longest ttotal t lti time is the critical path The critical path determines project completion time. Job # Immediate Predecessors A 0 Time B A 10 C A 20 D B,C 30 E B,C 20 F E 40 G D,F 20 H G 0 [min] 26

k regular graphs A graph g is called k regular if d(v i ) = k for all v i in G. C 5 The null graph is a 0 regular graph. The cycle C n is a 2 regular graph. 2-Regular 3-Regular A complete graph is an (n 1) regular graph. 4-Regular 6-Regular Image by MIT OpenCourseWare. 27

Distance The distance from vertix v 1 to v 2, d(v 1, v 2 ) in a connected graph G is the smallest length of all v 1 v 2 paths in G. u v t Ref [3] w The shortest path through the network from one vertex to another is also called the geodesic path. There maybe and often is more than one geodesic path between two vertices. x y z x-w path length d(x, w) =

Diameter The greatest distance (longest path) between any two vertices in a graph G is called the diameter of G. The diameter is the longest geodesic path between any two vertices in the network. The diameter of a graph is an indication of how far apart are its vertices. u V Diameter of our World We may model our world as a collection of people p each person is a vertex ( (node) and two people (vertices) are connected if they are acquainted. What will be the diameter of this graph (or social network)? Image by MIT OpenCourseWare.

Small World Networks Small world networks are highly clustered, yet have small characteristic path lengths. Neural networks, power grids, collaboration graphs of film actors, and many other systems form small world networks. In small world networks there are short cuts that shorten the distance between een vertices. Signal propagation speed is enhanced in such systems; rumors can spread quickly, the number of legs in an air or train journey is small, infectious diseases spread more easily in a population etc. Regular Small-world Random Image by MIT OpenCourseWare. Duncan J. Watts & Steven H. Strogatz, Collective dynamics of small world networks, Nature, Vol. 393, 4 June 1998

References [1]M.E.J. Newman, The structure and function of complex networks, SIAM review, 2003 [2] Duncan J. Watts & Steven H. Strogatz, Collective dynamics of small world networks, Nature, Vol. 393, 4 June 1998 [3] Introduction to Graph Theory, Koh Khee Meng et. al [4] Graph Theory: Modeling, Applications, and Algorithms, Geir Agnarsson, Raymond Greenlaw

MIT OpenCourseWare http://ocw.mit.edu ESD.00 Introduction to Engineering Systems Spring 2011 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.