Introduction To Graphs and Networks. Fall 2013 Carola Wenk

Size: px
Start display at page:

Download "Introduction To Graphs and Networks. Fall 2013 Carola Wenk"

Transcription

1 Introduction To Graphs and Networks Fall 2013 Carola Wenk

2 What is a Network? We have thought of a computer as a single entity, but they can also be connected to one another. Internet What are the advantages of connecting computers together? Communication and Computation.

3 Communication and Computation "A network of such [computers], connected to one another by wideband communication lines [which provided] the functions of presentday libraries together with anticipated advances in information storage and retrieval and [other] symbiotic functions." J.C.R. Licklider, 1960, Man-Computer Symbiosis In 2010, there were 107 trillion s sent; there are 1.88 billion users. Communication enables long-distance computation; in fact this is one of the reasons networking was initially studied. Dumb Terminal Mainframe

4 Communication and Computation Communication also enables coordinated computation; if a task can be split up into smaller parts, we can solve each part simultaneously. Input Solve Base Cases Solution

5 Communication and Computation Communication also enables coordinated computation; if a task can be split up into smaller parts, we can solve each part simultaneously. Input Internet... Solution

6 History of the Internet The Internet was initially developed as a military research project in the 1970s. The goal was to connect computers across a wide geographic area with very high availability. Communication on the Internet works by a protocol in which packets of information are transmitted. Each packet is routed from source to destination.

7 Internet Routing IP Address IP Address Each device connected to the Internet has an IP address, which is just a 32-bit number. The route of each transmitted packet is determined as it moves along its path. Due to the ubiquity of connected devices the current protocol for naming devices will run out of addresses soon - IPv6 uses 128-bit addresses.

8 Internet Routing TCP/IP = Transmission Control Protocol over Internet Protocol TCP/IP was designed in the early 1970s to be used in a packet switching network. It was initially tested on a 4-node network and now is used on millions of computers. TCP/IP works at a low level to break up communication tasks into packets, and manages how they propagate from source to destination. Internet routers do most of the work in guiding TCP/IP packets; because of this distribution of work, there are often many paths that can be taken from a source to a destination.

9 Network Abstraction The Internet is modeled as a set of nodes that are connected by links. For the purposes of communication, we only care about how we are able to get from one node to another. How can we determine the best path from point A to point B in a large network? Can this be done efficiently?

10 Bridges of Königsberg Map of Konigsberg The Abstraction In 1735, Leonhard Euler posed the question of whether there was a path that crossed every bridge exactly once. Is there such a path? Abstracting away from the specific city of Königsberg allows us to answer this question for any city. Do you see a rule?

11 Graphs: Abstract Networks A graph G consists of a set of vertices that are connected by edges. We write G=(V,E), where V is the set of vertices and E is the set of edges. What is the maximum number of edges a graph can have (i.e., every pair of vertices has one edge)? Generalizing the Königsberg problem, a graph has an Eulerian path if and only if all but two vertices are involved in an even number of edges. Graphs can represent any abstract relationship between pairs of objects, and are particularly useful in analyzing computer networks.

12 The Internet Graph Nearly every profitable and/or useful application on the Internet must use algorithms on graphs. Example: Google PageRank analyzes the web-graph to determine which pages are most relevant to search queries.

13 Virtual Networks worldwide facebook graph demographic clustering Social networks aren t formed from physical hardware, but by publicly-stated relationships. By analyzing friendships, social networking companies can gather information for targeted advertising.

14 Analyzing Graphs Two fundamental questions on graphs: Can we get from any vertex to any other vertex? What is the shortest path from between a given pair of vertices? In a computer network, these questions give us a basic idea of where communication is possible, and how quickly it can be accomplished. In a social network, these questions tell us how social a particular population is, and how well two individuals know one another.

15 Road networks B A Graph: Vertices are intersections, edges are road segments. What is the shortest path from A to B? Navigation systems answer shortest path queries based on travel times on road segments.

16 Two Networking Questions Connectivity: Given a graph, is any vertex reachable from any other vertex? Shortest Paths: Given a graph and two vertices, what is the shortest path between the two?

17 Two Networking Questions Connectivity: Given a graph, is any vertex reachable from any other vertex? Shortest Paths: Given a graph and two vertices, what is the shortest path between the two?

18 Two Networking Questions Connectivity: Given a graph, is any vertex reachable from any other vertex? Shortest Paths: Given a graph and two vertices, what is the shortest path between the two?

19 Two Networking Questions Connectivity: Given a graph, is any vertex reachable from any other vertex? Shortest Paths: Given a graph and two vertices, what is the shortest path between the two?

20 Graph Connectivity Given a graph as input (vertices and edges), we want to produce as output the number of connected components of the input graph. 2 Connected Components

21 Single-Source Shortest Paths Given a graph as input (vertices and edges) and a vertex, we want to produce as output the shortest paths from to all other vertices

22 Graph Representations Both of these problems require a graph as input. How do we represent the vertices and edges? How can we check if an edge is in the graph?

23 Graph Representations Both of these problems require a graph as input. How do we represent the vertices and edges? How can we check if an edge is in the graph? With an adjacency list, we can store all edges and examine any edge at any vertex.

24 Lists and Dictionaries Both of these problems require a graph as input. How do we represent the vertices and edges? How can we check if an edge is in the graph? Python lists and dictionaries allow random access, and dictionaries can have arbitrary keys.

25 Lists and Dictionaries Both of these problems require a graph as input. How do we represent the vertices and edges? How can we check if an edge is in the graph? Does one of these look like a graph?

26 Graphs as Dictionaries Both of these problems require a graph as input. How do we represent the vertices and edges? How can we check if an edge is in the graph? The dictionary in Python can implement an adjacency list.

27 Breadth-First Search Now that we have a way to actually implement graphs, how do we solve our two basic problems? How can we find out if a graph is connected?

28 Breadth-First Search Now that we have a way to actually implement graphs, how do we solve our two basic problems? How can we find out if a graph is connected?

29 Breadth-First Search Now that we have a way to actually implement graphs, how do we solve our two basic problems? How can we find out if a graph is connected?

30 Breadth-First Search Now that we have a way to actually implement graphs, how do we solve our two basic problems? How can we find out if a graph is connected?

31 Breadth-First Search Now that we have a way to actually implement graphs, how do we solve our two basic problems? How can we find out if a graph is connected?

32 Breadth-First Search Now that we have a way to actually implement graphs, how do we solve our two basic problems? The graph is not connected, because we cannot visit any new vertices, but have not visited all of them.

33 Breadth-First Search This intuitive idea to visit vertices can be made more concrete, but how do we organize our search? How do we keep track of vertices that have been visited? Note that the order of visitation gives us shortest path distances!

34 Breadth-First Search To keep track of the order of visitation, we can use a queue. A queue is just a list, but we only remove items from the front, and add items at the end

35 Breadth-First Search Algorithm: 1. Initialize a queue with the starting vertex 2. While the queue is not empty a. Dequeue the next vertex from the queue b. Enqueue all its neighbors that have not been visited/enqueued before

36 Breadth-First Search Runtime: Each vertex is enqueued at most once, and therefore dequeued at most once We need to examine each edge once to update distances Runtime O(n+m) where n= V is the number of vertices in G, and m= E is the number of edges in G The runtime is linear in the size of the graph

Introduction To Graphs and Networks. Fall 2013 Carola Wenk

Introduction To Graphs and Networks. Fall 2013 Carola Wenk Introduction To Graphs and Networks Fall 203 Carola Wenk On the Internet, links are essentially weighted by factors such as transit time, or cost. The goal is to find the shortest path from one node to

More information

Graph Data Management Systems in New Applications Domains. Mikko Halin

Graph Data Management Systems in New Applications Domains. Mikko Halin Graph Data Management Systems in New Applications Domains Mikko Halin Introduction Presentation is based on two papers Graph Data Management Systems for New Application Domains - Philippe Cudré-Mauroux,

More information

Ma/CS 6a Class 8: Eulerian Cycles

Ma/CS 6a Class 8: Eulerian Cycles Ma/CS 6a Class 8: Eulerian Cycles By Adam Sheffer The Bridges of Königsberg Can we travel the city while crossing every bridge exactly once? 1 How Graph Theory was Born Leonhard Euler 1736 Eulerian Cycle

More information

Chapter 14 Section 3 - Slide 1

Chapter 14 Section 3 - Slide 1 AND Chapter 14 Section 3 - Slide 1 Chapter 14 Graph Theory Chapter 14 Section 3 - Slide WHAT YOU WILL LEARN Graphs, paths and circuits The Königsberg bridge problem Euler paths and Euler circuits Hamilton

More information

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, Introduction to EECS 2 Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Fall Semester, 2006 6.082 Introduction to EECS 2 Lab #9: Link-state Routing Goal: Using a network simulator written

More information

Today s Outline. CSE 326: Data Structures. Topic #15: Cool Graphs n Pretty Pictures. A Great Mathematician. The Bridges of Königsberg

Today s Outline. CSE 326: Data Structures. Topic #15: Cool Graphs n Pretty Pictures. A Great Mathematician. The Bridges of Königsberg CSE 326: Data Structures Topic #15: Cool Graphs n Pretty Pictures Ashish Sabharwal Autumn, 2003 Today s Outline Admin Project 3 in-progress checkin due tonight! Graph Algorithms Representation Applications

More information

CS 220: Discrete Structures and their Applications. graphs zybooks chapter 10

CS 220: Discrete Structures and their Applications. graphs zybooks chapter 10 CS 220: Discrete Structures and their Applications graphs zybooks chapter 10 directed graphs A collection of vertices and directed edges What can this represent? undirected graphs A collection of vertices

More information

Graph Algorithms. Andreas Klappenecker

Graph Algorithms. Andreas Klappenecker Graph Algorithms Andreas Klappenecker Graphs A graph is a set of vertices that are pairwise connected by edges. We distinguish between directed and undirected graphs. Why are we interested in graphs? Graphs

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 An Introduction to Graphs A few centuries ago, residents of the city of Königsberg, Prussia were interested in a certain problem.

More information

Module 11: Additional Topics Graph Theory and Applications

Module 11: Additional Topics Graph Theory and Applications Module 11: Additional Topics Graph Theory and Applications Topics: Introduction to Graph Theory Representing (undirected) graphs Basic graph algorithms 1 Consider the following: Traveling Salesman Problem

More information

Chapter 10. Fundamental Network Algorithms. M. E. J. Newman. May 6, M. E. J. Newman Chapter 10 May 6, / 33

Chapter 10. Fundamental Network Algorithms. M. E. J. Newman. May 6, M. E. J. Newman Chapter 10 May 6, / 33 Chapter 10 Fundamental Network Algorithms M. E. J. Newman May 6, 2015 M. E. J. Newman Chapter 10 May 6, 2015 1 / 33 Table of Contents 1 Algorithms for Degrees and Degree Distributions Degree-Degree Correlation

More information

CSE 373 NOVEMBER 20 TH TOPOLOGICAL SORT

CSE 373 NOVEMBER 20 TH TOPOLOGICAL SORT CSE 373 NOVEMBER 20 TH TOPOLOGICAL SORT PROJECT 3 500 Internal Error problems Hopefully all resolved (or close to) P3P1 grades are up (but muted) Leave canvas comment Emails tomorrow End of quarter GRAPHS

More information

CS 206 Introduction to Computer Science II

CS 206 Introduction to Computer Science II CS 206 Introduction to Computer Science II 04 / 06 / 2018 Instructor: Michael Eckmann Today s Topics Questions? Comments? Graphs Definition Terminology two ways to represent edges in implementation traversals

More information

Shortest Path Routing Communications networks as graphs Graph terminology Breadth-first search in a graph Properties of breadth-first search

Shortest Path Routing Communications networks as graphs Graph terminology Breadth-first search in a graph Properties of breadth-first search Shortest Path Routing Communications networks as graphs Graph terminology Breadth-first search in a graph Properties of breadth-first search 6.082 Fall 2006 Shortest Path Routing, Slide 1 Routing in an

More information

Jessica Su (some parts copied from CLRS / last quarter s notes)

Jessica Su (some parts copied from CLRS / last quarter s notes) 1 Max flow Consider a directed graph G with positive edge weights c that define the capacity of each edge. We can identify two special nodes in G: the source node s and the sink node t. We want to find

More information

EECS 203 Lecture 20. More Graphs

EECS 203 Lecture 20. More Graphs EECS 203 Lecture 20 More Graphs Admin stuffs Last homework due today Office hour changes starting Friday (also in Piazza) Friday 6/17: 2-5 Mark in his office. Sunday 6/19: 2-5 Jasmine in the UGLI. Monday

More information

Network Topology and Graph

Network Topology and Graph Network Topology Network Topology and Graph EEE442 Computer Method in Power System Analysis Any lumped network obeys 3 basic laws KVL KCL linear algebraic constraints Ohm s law Anawach Sangswang Dept.

More information

CS1 Lecture 31 Apr. 3, 2019

CS1 Lecture 31 Apr. 3, 2019 CS Lecture 3 Apr. 3, 209 HW6 due Fri. Q3: think carefully about overlaps draw pictures Think dimension by dimension three D problems if they don t overlap in x, they don t overlap» Express this in terms

More information

Computer Networks. Routing

Computer Networks. Routing Computer Networks Routing Topics Link State Routing (Continued) Hierarchical Routing Broadcast Routing Sending distinct packets Flooding Multi-destination routing Using spanning tree Reverse path forwarding

More information

Graph Algorithms using Map-Reduce. Graphs are ubiquitous in modern society. Some examples: The hyperlink structure of the web

Graph Algorithms using Map-Reduce. Graphs are ubiquitous in modern society. Some examples: The hyperlink structure of the web Graph Algorithms using Map-Reduce Graphs are ubiquitous in modern society. Some examples: The hyperlink structure of the web Graph Algorithms using Map-Reduce Graphs are ubiquitous in modern society. Some

More information

Unicast Routing. Information About Layer 3 Unicast Routing CHAPTER

Unicast Routing. Information About Layer 3 Unicast Routing CHAPTER CHAPTER 1 This chapter introduces the underlying concepts for Layer 3 unicast routing protocols in Cisco 1000 Series Connected Grid Routers (hereafter referred to as the Cisco CG-OS router) and WAN backhaul

More information

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

Some Graph Theory for Network Analysis. CS 249B: Science of Networks Week 01: Thursday, 01/31/08 Daniel Bilar Wellesley College Spring 2008 Some Graph Theory for Network Analysis CS 9B: Science of Networks Week 0: Thursday, 0//08 Daniel Bilar Wellesley College Spring 008 Goals this lecture Introduce you to some jargon what we call things in

More information

Understand graph terminology Implement graphs using

Understand graph terminology Implement graphs using raphs Understand graph terminology Implement graphs using djacency lists and djacency matrices Perform graph searches Depth first search Breadth first search Perform shortest-path algorithms Disjkstra

More information

Some major graph problems

Some major graph problems CS : Graphs and Blobs! Prof. Graeme Bailey http://cs.cs.cornell.edu (notes modified from Noah Snavely, Spring 009) Some major graph problems! Graph colouring Ensuring that radio stations don t clash! Graph

More information

Wedge A New Frontier for Pull-based Graph Processing. Samuel Grossman and Christos Kozyrakis Platform Lab Retreat June 8, 2018

Wedge A New Frontier for Pull-based Graph Processing. Samuel Grossman and Christos Kozyrakis Platform Lab Retreat June 8, 2018 Wedge A New Frontier for Pull-based Graph Processing Samuel Grossman and Christos Kozyrakis Platform Lab Retreat June 8, 2018 Graph Processing Problems modelled as objects (vertices) and connections between

More information

GRAPH THEORY: AN INTRODUCTION

GRAPH THEORY: AN INTRODUCTION GRAPH THEORY: AN INTRODUCTION BEGINNERS 3/4/2018 1. GRAPHS AND THEIR PROPERTIES A graph G consists of two sets: a set of vertices V, and a set of edges E. A vertex is simply a labeled point. An edge is

More information

Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009.

Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009. Math/Stat 2300 Modeling using Graph Theory (March 23/25) from text A First Course in Mathematical Modeling, Giordano, Fox, Horton, Weir, 2009. Describing Graphs (8.2) A graph is a mathematical way of describing

More information

The Human Brain & Graph Theory

The Human Brain & Graph Theory The Human Brain & Graph Theory Graph Theory A graph is a collection of vertices (or points) that are connected by edges (or lines) Edges may overlap Graphs do not need edges Graphs can be directed with

More information

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010 Junior Circle Meeting 3 Circuits and Paths April 18, 2010 We have talked about insect worlds which consist of cities connected by tunnels. Here is an example of an insect world (Antland) which we saw last

More information

Lecture 2. Computer Networks Models. Network Models 1-1

Lecture 2. Computer Networks Models. Network Models 1-1 Lecture 2 Computer Networks Models Network Models 1-1 Agenda Introduction to the Internet Reference Models for Computer Networks The OSI Model The TCP/IP Model Network Models 1-2 Announcements Bonus -

More information

(Re)Introduction to Graphs and Some Algorithms

(Re)Introduction to Graphs and Some Algorithms (Re)Introduction to Graphs and Some Algorithms Graph Terminology (I) A graph is defined by a set of vertices V and a set of edges E. The edge set must work over the defined vertices in the vertex set.

More information

Computer Science 461 Midterm Exam March 14, :00-10:50am

Computer Science 461 Midterm Exam March 14, :00-10:50am NAME: Login name: Computer Science 461 Midterm Exam March 14, 2012 10:00-10:50am This test has seven (7) questions, each worth ten points. Put your name on every page, and write out and sign the Honor

More information

Discrete Mathematics and Probability Theory Spring 2015 Vazirani Note 5

Discrete Mathematics and Probability Theory Spring 2015 Vazirani Note 5 CS 70 Discrete Mathematics and Probability Theory Spring 2015 Vazirani Note 5 1 Graph Theory: An Introduction One of the fundamental ideas in computer science is the notion of abstraction: capturing the

More information

TA: Jade Cheng ICS 241 Recitation Lecture Note #9 October 23, 2009

TA: Jade Cheng ICS 241 Recitation Lecture Note #9 October 23, 2009 TA: Jade Cheng ICS 241 Recitation Lecture Note #9 October 23, 2009 Recitation #9 Question: For each of these problems about a subway system, describe a weighted graph model that can be used to solve the

More information

Chapter 3: Paths and Cycles

Chapter 3: Paths and Cycles Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk

More information

Graph. Vertex. edge. Directed Graph. Undirected Graph

Graph. Vertex. edge. Directed Graph. Undirected Graph Module : Graphs Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS E-mail: natarajan.meghanathan@jsums.edu Graph Graph is a data structure that is a collection

More information

Network Working Group. Category: Informational Bay Networks Inc. September 1997

Network Working Group. Category: Informational Bay Networks Inc. September 1997 Network Working Group Request for Comments: 2185 Category: Informational R. Callon Cascade Communications Co. D. Haskin Bay Networks Inc. September 1997 Routing Aspects Of IPv6 Transition Status of this

More information

1. The Highway Inspector s Problem

1. The Highway Inspector s Problem MATH 100 Survey of Mathematics Fall 2009 1. The Highway Inspector s Problem The Königsberg Bridges over the river Pregel C c d e A g D a B b Figure 1. Bridges f Is there a path that crosses every bridge

More information

Graphs and Algorithms

Graphs and Algorithms Graphs and Algorithms Graphs are a mathematical concept readily adapted into computer programming. Graphs are not just data structures, that is, they are not solutions to simple data storage problems.

More information

Copyright 2000, Kevin Wayne 1

Copyright 2000, Kevin Wayne 1 Chapter 3 - Graphs Undirected Graphs Undirected graph. G = (V, E) V = nodes. E = edges between pairs of nodes. Captures pairwise relationship between objects. Graph size parameters: n = V, m = E. Directed

More information

Configuring CDP. Understanding CDP CHAPTER. This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Catalyst 3560 switch.

Configuring CDP. Understanding CDP CHAPTER. This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Catalyst 3560 switch. 21 CHAPTER This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Catalyst 3560 switch. Note For complete syntax and usage information for the commands used in this chapter, refer

More information

From Routing to Traffic Engineering

From Routing to Traffic Engineering 1 From Routing to Traffic Engineering Robert Soulé Advanced Networking Fall 2016 2 In the beginning B Goal: pair-wise connectivity (get packets from A to B) Approach: configure static rules in routers

More information

G(B)enchmark GraphBench: Towards a Universal Graph Benchmark. Khaled Ammar M. Tamer Özsu

G(B)enchmark GraphBench: Towards a Universal Graph Benchmark. Khaled Ammar M. Tamer Özsu G(B)enchmark GraphBench: Towards a Universal Graph Benchmark Khaled Ammar M. Tamer Özsu Bioinformatics Software Engineering Social Network Gene Co-expression Protein Structure Program Flow Big Graphs o

More information

Graphs. Tessema M. Mengistu Department of Computer Science Southern Illinois University Carbondale Room - Faner 3131

Graphs. Tessema M. Mengistu Department of Computer Science Southern Illinois University Carbondale Room - Faner 3131 Graphs Tessema M. Mengistu Department of Computer Science Southern Illinois University Carbondale tessema.mengistu@siu.edu Room - Faner 3131 1 Outline Introduction to Graphs Graph Traversals Finding a

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Graphs: Introduction Ulf Leser This Course Introduction 2 Abstract Data Types 1 Complexity analysis 1 Styles of algorithms 1 Lists, stacks, queues 2 Sorting (lists) 3 Searching

More information

CSE 100: GRAPH SEARCH

CSE 100: GRAPH SEARCH CSE 100: GRAPH SEARCH Announcements PA3 released Checkpoint due Tuesday, May 5 @10:00pm Final submission due Thursday, May 14 @10:00PM Start early! Start early! Start early! Start early! Start early! I

More information

Guide to TCP/IP Fourth Edition. Chapter 6: Neighbor Discovery in IPv6

Guide to TCP/IP Fourth Edition. Chapter 6: Neighbor Discovery in IPv6 Guide to TCP/IP Fourth Edition Chapter 6: Neighbor Discovery in IPv6 Objectives Describe Neighbor Discovery in IPv6 and how it compares to ARP in IPv4 Explain Neighbor Discovery message interaction between

More information

Figure 1: A directed graph.

Figure 1: A directed graph. 1 Graphs A graph is a data structure that expresses relationships between objects. The objects are called nodes and the relationships are called edges. For example, social networks can be represented as

More information

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

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia) 15-251 Great Ideas in Theoretical Computer Science Lecture 12: Graphs I: The Basics February 22nd, 2018 Crossing bridges Königsberg (Prussia) Now Kaliningrad (Russia) Is there a way to walk through the

More information

Lecture 25 Spanning Trees

Lecture 25 Spanning Trees Lecture 25 Spanning Trees 15-122: Principles of Imperative Computation (Fall 2018) Frank Pfenning, Iliano Cervesato The following is a simple example of a connected, undirected graph with 5 vertices (A,

More information

This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics:

This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics: Appendix C BGP Supplement This appendix contains supplementary Border Gateway Protocol (BGP) information and covers the following topics: BGP Route Summarization Redistribution with IGPs Communities Route

More information

23 DECOMPOSITION OF GRAPHS

23 DECOMPOSITION OF GRAPHS DATA STRUCTURES AND ALGORITHMS 23 DECOMPOSITION OF GRAPHS REPRESENTING & EXPLORING GRAPHS IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD WWW.IMRANIHSAN.COM LECTURES ADAPTED FROM: DANIEL KANE,

More information

Graphs. Terminology. Graphs & Breadth First Search (BFS) Extremely useful tool in modeling problems. Consist of: Vertices Edges

Graphs. Terminology. Graphs & Breadth First Search (BFS) Extremely useful tool in modeling problems. Consist of: Vertices Edges COMP Spring Graphs & BS / Slide Graphs Graphs & Breadth irst Search (BS) Extremely useful tool in modeling problems. Consist of: Vertices Edges Vertex A B D C E Edge Vertices can be considered sites or

More information

- Logic and Algorithms - Graph Algorithms

- Logic and Algorithms - Graph Algorithms Fundamentals of Computer Sience and Digital Communications - Logic and Algorithms - Graph Algorithms Johan Larsson Marco Loh 22..24 Overview What is a Graph? Representations of Graphs Breadth-first Search

More information

An Interactive Introduction to Graph Theory

An Interactive Introduction to Graph Theory An Interactive Introduction to Graph Theory An Interactive Introduction to Graph Theory Chris K. Caldwell 1995 This the first of a series of interactive tutorials introducing the basic concepts of graph

More information

The Shortest Path Problem

The Shortest Path Problem The Shortest Path Problem 1 Shortest-Path Algorithms Find the shortest path from point A to point B Shortest in time, distance, cost, Numerous applications Map navigation Flight itineraries Circuit wiring

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 101, Winter 2018 Design and Analysis of Algorithms Lecture 6: BFS, SPs, Dijkstra Class URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ Distance in a Graph The distance between two nodes is the length

More information

Graph Representations and Traversal

Graph Representations and Traversal COMPSCI 330: Design and Analysis of Algorithms 02/08/2017-02/20/2017 Graph Representations and Traversal Lecturer: Debmalya Panigrahi Scribe: Tianqi Song, Fred Zhang, Tianyu Wang 1 Overview This lecture

More information

Algorithms: Lecture 10. Chalmers University of Technology

Algorithms: Lecture 10. Chalmers University of Technology Algorithms: Lecture 10 Chalmers University of Technology Today s Topics Basic Definitions Path, Cycle, Tree, Connectivity, etc. Graph Traversal Depth First Search Breadth First Search Testing Bipartatiness

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms CSE 101, Winter 2018 Design and Analysis of Algorithms Lecture 6: BFS, SPs, Dijkstra Class URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ Distance in a Graph The distance between two nodes is the length

More information

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?

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? 1 Introduction Graph theory is one of the most in-demand (i.e. profitable) and heavily-studied areas of applied mathematics and theoretical computer science. May graph theory questions are applied in this

More information

Introduction to computer networking

Introduction to computer networking edge core Introduction to computer networking Comp Sci 3600 Security Outline edge core 1 2 edge 3 core 4 5 6 The edge core Outline edge core 1 2 edge 3 core 4 5 6 edge core Billions of connected computing

More information

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck Theory of Computing Lecture 10 MAS 714 Hartmut Klauck Seven Bridges of Königsberg Can one take a walk that crosses each bridge exactly once? Seven Bridges of Königsberg Model as a graph Is there a path

More information

Lecture 3: Graphs and flows

Lecture 3: Graphs and flows Chapter 3 Lecture 3: Graphs and flows Graphs: a useful combinatorial structure. Definitions: graph, directed and undirected graph, edge as ordered pair, path, cycle, connected graph, strongly connected

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 3 Data Structures Graphs Traversals Strongly connected components Sofya Raskhodnikova L3.1 Measuring Running Time Focus on scalability: parameterize the running time

More information

Internet Architecture

Internet Architecture Internet Architecture Lecture 2: How Computer Networks Send Data Across the Internet Assistant Teacher Samraa Adnan Al-Asadi 1 Introduction When you send information across the Internet, the Transmission

More information

Computer Networks. Routing Algorithms

Computer Networks. Routing Algorithms Computer Networks Routing Algorithms Topics Routing Algorithms Shortest Path (Dijkstra Algorithm) Distance Vector Routing Count to infinity problem Solutions for count to infinity problem Link State Routing

More information

CS473-Algorithms I. Lecture 14-A. Graph Searching: Breadth-First Search. Cevdet Aykanat - Bilkent University Computer Engineering Department

CS473-Algorithms I. Lecture 14-A. Graph Searching: Breadth-First Search. Cevdet Aykanat - Bilkent University Computer Engineering Department CS473-Algorithms I Lecture 14-A Graph Searching: Breadth-First Search 1 Graph Searching: Breadth-First Search Graph G =(V, E), directed or undirected with adjacency list repres. GOAL: Systematically explores

More information

L22-23: Graph Algorithms

L22-23: Graph Algorithms Indian Institute of Science Bangalore, India भ रत य व ज ञ न स स थ न ब गल र, भ रत Department of Computational and Data Sciences DS 0--0,0 L-: Graph Algorithms Yogesh Simmhan simmhan@cds.iisc.ac.in Slides

More information

CS 310 Advanced Data Structures and Algorithms

CS 310 Advanced Data Structures and Algorithms CS 31 Advanced Data Structures and Algorithms Graphs July 18, 17 Tong Wang UMass Boston CS 31 July 18, 17 1 / 4 Graph Definitions Graph a mathematical construction that describes objects and relations

More information

Problem Set 8 Solutions

Problem Set 8 Solutions Introduction to Algorithms November 22, 25 Massachusetts Institute of Technology 6.46J/8.4J Professors Erik D. Demaine and Charles E. Leiserson Handout 27 Problem Set 8 Solutions Problem 8-. No left turns

More information

UNDIRECTED GRAPHS BBM 201 DATA STRUCTURES DEPT. OF COMPUTER ENGINEERING

UNDIRECTED GRAPHS BBM 201 DATA STRUCTURES DEPT. OF COMPUTER ENGINEERING Acknowledgement: he course slides are adapted from the slides prepared by R. Sedgewick and K. Wayne of Princeton Uniersity. BBM DAA SRUCURES DEP. O COMPUER ENGINEERING UNDIRECED GRAPHS Undirected Graphs

More information

Outlines: Graphs Part-2

Outlines: Graphs Part-2 Elementary Graph Algorithms PART-2 1 Outlines: Graphs Part-2 Graph Search Methods Breadth-First Search (BFS): BFS Algorithm BFS Example BFS Time Complexity Output of BFS: Shortest Path Breath-First Tree

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 5 Exploring graphs Adam Smith 9/5/2008 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Puzzles Suppose an undirected graph G is connected.

More information

Lecture 26: Graphs: Traversal (Part 1)

Lecture 26: Graphs: Traversal (Part 1) CS8 Integrated Introduction to Computer Science Fisler, Nelson Lecture 6: Graphs: Traversal (Part ) 0:00 AM, Apr, 08 Contents Introduction. Definitions........................................... Representations.......................................

More information

L Modelling and Simulating Social Systems with MATLAB

L Modelling and Simulating Social Systems with MATLAB 851-0585-04L Modelling and Simulating Social Systems with MATLAB Lesson 6 Graphs (Networks) Anders Johansson and Wenjian Yu (with S. Lozano and S. Wehrli) ETH Zürich 2010-03-29 Lesson 6 Contents History:

More information

PATH FINDING AND GRAPH TRAVERSAL

PATH FINDING AND GRAPH TRAVERSAL GRAPH TRAVERSAL PATH FINDING AND GRAPH TRAVERSAL Path finding refers to determining the shortest path between two vertices in a graph. We discussed the Floyd Warshall algorithm previously, but you may

More information

Introduction to Algorithms. Lecture 11. Prof. Patrick Jaillet

Introduction to Algorithms. Lecture 11. Prof. Patrick Jaillet 6.006- Introduction to Algorithms Lecture 11 Prof. Patrick Jaillet Lecture Overview Searching I: Graph Search and Representations Readings: CLRS 22.1-22.3, B.4 Graphs G=(V,E) V a set of vertices usually

More information

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006

Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006 Instant Insanity Instructor s Guide Make-it and Take-it Kit for AMTNYS 2006 THE KIT: This kit contains materials for two Instant Insanity games, a student activity sheet with answer key and this instructor

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Graphs: Introduction and First Algorithms Ulf Leser This Course Introduction 2 Abstract Data Types 1 Complexity analysis 1 Styles of algorithms 1 Lists, stacks, queues 2

More information

Chapter 28. Graphs and Applications. Part1. Non-weighted Graphs

Chapter 28. Graphs and Applications. Part1. Non-weighted Graphs Chapter 28 Graphs and Applications Part1. Non-weighted Graphs CIS265/506 Cleveland State University Prof. Victor Matos Adapted from: Introduction to Java Programming: Comprehensive Version, Eighth Edition

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 4 Graphs Definitions Traversals Adam Smith 9/8/10 Exercise How can you simulate an array with two unbounded stacks and a small amount of memory? (Hint: think of a

More information

CS 106X, Lecture 23 Dijkstra and A* Search

CS 106X, Lecture 23 Dijkstra and A* Search CS 106X, Lecture 23 Dijkstra and A* Search reading: Programming Abstractions in C++, Chapter 18 This document is copyright (C) Stanford Computer Science and Nick Troccoli, licensed under Creative Commons

More information

Fall 2018: Introduction to Data Science GIRI NARASIMHAN, SCIS, FIU

Fall 2018: Introduction to Data Science GIRI NARASIMHAN, SCIS, FIU Fall 2018: Introduction to Data Science GIRI NARASIMHAN, SCIS, FIU !2 MapReduce Overview! Sometimes a single computer cannot process data or takes too long traditional serial programming is not always

More information

CSE 100: GRAPH ALGORITHMS

CSE 100: GRAPH ALGORITHMS CSE 100: GRAPH ALGORITHMS 2 Graphs: Example A directed graph V5 V = { V = E = { E Path: 3 Graphs: Definitions A directed graph V5 V6 A graph G = (V,E) consists of a set of vertices V and a set of edges

More information

Graphs Chapter 24. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013

Graphs Chapter 24. Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 Graphs Chapter 24 Instructor: Scott Kristjanson CMPT 125/125 SFU Burnaby, Fall 2013 2 Scope Graphs: Directed and undirected graphs Weighted graphs (networks) Common graph algorithms Wk12.5 Slide 2 3 Graphs

More information

Ch.6 Mapping Internet Addresses to Physical Addresses (ARP)

Ch.6 Mapping Internet Addresses to Physical Addresses (ARP) CSC521 Communication Protocols 網路通訊協定 Ch.6 Mapping Internet Addresses to Physical Addresses (ARP) 吳俊興國立高雄大學資訊工程學系 Internetworking With TCP/IP, Vol I: Sixth Edition, Douglas E. Comer Outline 1 Introduction

More information

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

Introduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow 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

More information

Trees Algorhyme by Radia Perlman

Trees Algorhyme by Radia Perlman Algorhyme by Radia Perlman I think that I shall never see A graph more lovely than a tree. A tree whose crucial property Is loop-free connectivity. A tree which must be sure to span. So packets can reach

More information

Network Superhighway CSCD 330. Network Programming Winter Lecture 13 Network Layer. Reading: Chapter 4

Network Superhighway CSCD 330. Network Programming Winter Lecture 13 Network Layer. Reading: Chapter 4 CSCD 330 Network Superhighway Network Programming Winter 2015 Lecture 13 Network Layer Reading: Chapter 4 Some slides provided courtesy of J.F Kurose and K.W. Ross, All Rights Reserved, copyright 1996-2007

More information

This course is intended for 3rd and/or 4th year undergraduate majors in Computer Science.

This course is intended for 3rd and/or 4th year undergraduate majors in Computer Science. Lecture 9 Graphs This course is intended for 3rd and/or 4th year undergraduate majors in Computer Science. You need to be familiar with the design and use of basic data structures such as Lists, Stacks,

More information

CSE 332: Data Abstractions Lecture 15: Topological Sort / Graph Traversals. Ruth Anderson Winter 2013

CSE 332: Data Abstractions Lecture 15: Topological Sort / Graph Traversals. Ruth Anderson Winter 2013 CSE 332: Data Abstractions Lecture 15: Topological Sort / Graph Traversals Ruth Anderson Winter 2013 Announcements Homework 4 due Friday Feb 15 th at the BEGINNING of lecture Project 2 Phase B due Tues

More information

Chapter 22 Elementary Graph Algorithms

Chapter 22 Elementary Graph Algorithms Chapter 22 Elementary Graph Algorithms Graph Representations Graph G = (V,E) Directed Undirected Adjacency Lists Adjacency Matrix Graph Representations Adjacency List: Undirected Memory: Adjacency: Graph

More information

Graph Search Methods. Graph Search Methods

Graph Search Methods. Graph Search Methods Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u. 0 Graph Search Methods A search method starts at a given vertex v and visits/labels/marks every vertex that is

More information

CSE 373: Data Structures and Algorithms

CSE 373: Data Structures and Algorithms CSE 373: Data Structures and Algorithms Lecture 15: Graph Data Structures, Topological Sort, and Traversals (DFS, BFS) Instructor: Lilian de Greef Quarter: Summer 2017 Today: Announcements Graph data structures

More information

CS 3410 Ch 14 Graphs and Paths

CS 3410 Ch 14 Graphs and Paths CS 3410 Ch 14 Graphs and Paths Sections 14.1-14.3 Pages 527-552 Exercises 1,2,5,7-9 14.1 Definitions 1. A vertex (node) and an edge are the basic building blocks of a graph. Two vertices, (, ) may be connected

More information

Graph Search Methods. Graph Search Methods

Graph Search Methods. Graph Search Methods Graph Search Methods A vertex u is reachable from vertex v iff there is a path from v to u. 0 Graph Search Methods A search method starts at a given vertex v and visits/labels/marks every vertex that is

More information

COT 6405 Introduction to Theory of Algorithms

COT 6405 Introduction to Theory of Algorithms COT 6405 Introduction to Theory of Algorithms Topic 14. Graph Algorithms 11/7/2016 1 Elementary Graph Algorithms How to represent a graph? Adjacency lists Adjacency matrix How to search a graph? Breadth-first

More information

Quick Review of Graphs

Quick Review of Graphs COMP 102: Excursions in Computer Science Lecture 11: Graphs Instructor: (jpineau@cs.mcgill.ca) Class web page: www.cs.mcgill.ca/~jpineau/comp102 Quick Review of Graphs A graph is an abstract representation

More information

Dijkstra s Algorithm and Priority Queue Implementations. CSE 101: Design and Analysis of Algorithms Lecture 5

Dijkstra s Algorithm and Priority Queue Implementations. CSE 101: Design and Analysis of Algorithms Lecture 5 Dijkstra s Algorithm and Priority Queue Implementations CSE 101: Design and Analysis of Algorithms Lecture 5 CSE 101: Design and analysis of algorithms Dijkstra s algorithm and priority queue implementations

More information