CS 557 Lecture IX. Drexel University Dept. of Computer Science

Size: px
Start display at page:

Download "CS 557 Lecture IX. Drexel University Dept. of Computer Science"

Transcription

1 CS 7 Lectre IX Dreel Uniersity Dept. of Compter Science Fall 00 Shortest Paths Finding the Shortest Paths in a graph arises in many different application: Transportation Problems: Finding the cheapest way to trael between two locations. Motion Planning: What is the most natral way to trael a robot in an enironment. Commnication Problems: The shortest set of hbs to get a message between two nodes in a network. Which two locations are farthest apart, i.e., what is the diameter of a network.

2 The Single Sorce Shortest Path We are gien a graph G(V,E) and a real weight fnction w from E to R, define the weight of a path p< 0,,, k > as the sm of weight of its edges: k w( p) i w(, i i ). We define the shortest-path weigh between and by: d (, ) min{ w( p) : p if there is a otherwise path between and The Single Sorce Shortest Path Gien a graph G(V,E), we want to find a shortest path from a sorce s to eery erte in V. Variants: Single destination shortest path. Single pair shortest path. All-pairs shortest path. We will make different assmptions abot edge weights!

3 Uniqeness s 7 y s 9 s y y Sb-optimality Gien a weighted graph G(V,E) and weight fnction w on edges. Let P<,,, k > be a shortest path from to k and for any i and j sch that i j k let P ij < i, i+,, j > be the sb path of P from i to j. Then, P ij is the shortest path from i to j. P ij i j k

4 Sb-optimality Let G(V,E) be a weighted, directed graph with weight fnction w. Sppose that a shortest path P from sorce s to a erte can be decomposed into a path P and an edge (,) as follows: s P Then the weight of shortest path from s to is d( s, ) d( s, ) + w(, ) Triangle Ineqality Let G(V,E) be a weighted, directed graph with weight fnction w. Then for all edges (,), we hae d( s, ) d( s, ) + w(, ) s d( s, ) d( s, ) w(, )

5 Relaation Techniqes For a erte in V, we maintain an attribte ], which is an pper bond on the shortest path from s to. We call ] a shortest path estimate. Initially, all the shortest path estimates are infinity. As algorithms proceeds this ales gets closer and closer to actal ale d( s, ) of shortest path between s and. Relaation The process of relaing an edge (,) consists of testing whether we can improe the shortest path fond so far to, by etending it to. A relaation step may decrease the of shortest path estimate ] sing the triangle ineqality: Rela(,,w) End if ]> ]+w(,) the ] ]+ w(,)

6 The Effect of relaation 9 Rela(,) Rela(,) 7 Properties of Relaation Let G(V,E) be a weighted graph with weight fnction w. Then Immediately after relaing (,), we hae d [ ] ] + w(, ) For for eery erte in G: ] d( s,) If there in no path in G between s and : d [ ] d( s, ) Let p<s,,,> be the shortest path between s and. If after the relaation. at any time prior to relaation of (,) then d [ ] d( s, ) d [ ] d( s, )

7 Bellman-Ford Algorithm This is the most basic single-sorce shortest path algorithm: The algorithm finds the shortest path from sorce s to eery erte in the graph. The actal shortest path can be constrcted easily. Starts with an estimate of shortest distance and eentally conerges to shortest weight paths. Algorithm SSSP(G) for each V ] do Initialize ] to infinity, which will conerge to shortest-path ale. s] for i 0 to V do Relaation: will rela each edge V - times. for each edge(, ) E do if ] > ] + w(, ) then ] ] + w(, ) for each edge(, ) E do if ] > ] + w(, ) then At the end, test to see if a soltion is fond (gets soltion if no negatieweight cycles eits. Otpt " NoSoltion!" 7

8 Well-definedness If the graph contains a negatie cycle then some shortest path may not eist. Consider the following eample, as we go arond the cycle we always get shorter path. <0 k i Eample Initialization: A] 0 st Relaation: Process edges in order (A,B), (A,C), (B,C), (B,D), (D,C), (E,D), (B,E). B] C] D] E] B B A E 0 A E - - C D C D 8

9 Eample st Relaation: Same order of process for edges, i.e. (A,B), (A,C), (B,C), (B,D), (D,C), (E,D), (B,E). (there are more relations bt the ] ales will not change). B - 0 A E - C D Rnning time and Correctness Rnning time: O(nm), where n V and m E. After V - iteration the ] represent the shortest path between s and each erte : Initially: s]0 Let s k denote the shortest path between s and k then: After st path ] is correct, since ] s]+w(s, ). After nd path ] is correct, since ] ]+w(, ). After k th path k ] is correct, since k ] k- ]+w( k-, k ). This holds for all ertices, since the longest path in the graph has length V -. 9

10 Dijkstra s Algorithm This algorithm works only for the graphs with non-negatie edge weights The reslt of this algorithm is similar to BFS if the graph is nweighted. Like Prim s algorithm ses a priority qee. Has better rnning time than Bellman-Ford. Algorithm SSSP(G) Initialize of ] is similar to for each V do Bellman-Ford. ] s] 0 Relaation: each erte can be S sbject to relaation as many Q V times as its in-degree. while Q do The changes de to relaation Etract - Min( Q) will be handled by Decrease- S S { } Key algorithm. for each Adj[ ] do if ] > ] + w(, ) then ] ] + w(, ) 0

11 Eample A 0 B 0 D Q: (A,0) ( B, ) ( C, ) C ( D, ) A 0 0 B C 0 D Etract-Min: A Decrease-Key: B,C Q: (C,) ( D, ) (B,0) Eample 9 A 0 B C 0 D Etract-Min: C Decrease-Key: B,D Q: (B,9) (D,) 8 A 0 B 0 D Etract-Min: D Decrease-Key: B Q: (B,9) C

12 Eample B Etract-Min: B A D Q: EMPTY C Rnning Time Etract-Min: will be eected V times. Decrease-Key: will be eected E times. T ( n, m) O( nlog n + m log n)

13 Correctness At the termination of algorithm ] d( s,). Assme not, i.e. ] d( s,). Right before is added to S. Let p be the shortest path between bewteen s and. Let y be the first erte on p otside S and let be the erte on p right before y.clearly when is inserted to S, y] d( s,y). Bt this will reslt in a contradiction. s P y] d( s,y) S d( s,) P y ] Shortest Path in DAGs SSSP is well defined for DAGs, since DAGs can not hae negatie cycles. We are looking for a fast algorithm (as opposed to Dijkstra's and Bellman-Ford). Obsere that, if there is a path from to, then precedes in topological sort. Which means to find the SSSP we can jst pass once oer the ertices in the topologically sorted ordered.

14 Algorithm DAG-Shortest-Path(G,w,s) Topologically Sort the ertices of G Initialize the ] for all the ertices. For each erte taken in topologically sorted order do For each erte in Adj[] do Rela(,,w) Eample r s t r s t

15 Eample r s t r s t Eample r s t r s t

16 Eample r s t Rnning Time Since eery erte will DAG-Shortest-Path(G,w,s) Topologically Sort the ertices of G Initialize the ] for all the ertices. For each erte taken in topologically sorted order do For each erte in Adj[] do Rela(,,w) be looked at at most once, the oter loop will be eected O( V ) times. The inner loop will be eected only O( E ) times. The oer all rnning time is O( V + E ).

ECE250: Algorithms and Data Structures Single Source Shortest Paths Dijkstra s Algorithm

ECE250: Algorithms and Data Structures Single Source Shortest Paths Dijkstra s Algorithm ECE0: Algorithms and Data Strctres Single Sorce Shortest Paths Dijkstra s Algorithm Ladan Tahildari, PEng, SMIEEE Associate Professor Software Technologies Applied Research (STAR) Grop Dept. of Elect.

More information

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. Greedy Algorithms and Graph Optimization Problems

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. Greedy Algorithms and Graph Optimization Problems CSCE J Data Strctres & Algorithms Greedy Algorithms and Graph Optimization Problems Dr. Steve Goddard goddard@cse.nl.ed http://www.cse.nl.ed/~goddard/corses/cscej CSCE J Data Strctres & Algorithms Giving

More information

Chapter 5 Network Layer

Chapter 5 Network Layer Chapter Network Layer Network layer Physical layer: moe bit seqence between two adjacent nodes Data link: reliable transmission between two adjacent nodes Network: gides packets from the sorce to destination,

More information

Chapter 4: Network Layer

Chapter 4: Network Layer Chapter 4: Introdction (forarding and roting) Reie of qeeing theor Roting algorithms Link state, Distance Vector Roter design and operation IP: Internet Protocol IP4 (datagram format, addressing, ICMP,

More information

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code:

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code: EE8 Winter 25 Homework #2 Soltions De Thrsday, Feb 2, 5 P. ( points) Consider the following fragment of Java code: for (i=; i

More information

Review. A single-cycle MIPS processor

Review. A single-cycle MIPS processor Review If three instrctions have opcodes, 7 and 5 are they all of the same type? If we were to add an instrction to IPS of the form OD $t, $t2, $t3, which performs $t = $t2 OD $t3, what wold be its opcode?

More information

Maximal Cliques in Unit Disk Graphs: Polynomial Approximation

Maximal Cliques in Unit Disk Graphs: Polynomial Approximation Maximal Cliqes in Unit Disk Graphs: Polynomial Approximation Rajarshi Gpta, Jean Walrand, Oliier Goldschmidt 2 Department of Electrical Engineering and Compter Science Uniersity of California, Berkeley,

More information

Minimum Spanning Trees Outline: MST

Minimum Spanning Trees Outline: MST Minimm Spanning Trees Otline: MST Minimm Spanning Tree Generic MST Algorithm Krskal s Algorithm (Edge Based) Prim s Algorithm (Vertex Based) Spanning Tree A spanning tree of G is a sbgraph which is tree

More information

4/8/11. Single-Source Shortest Path. Shortest Paths. Shortest Paths. Chapter 24

4/8/11. Single-Source Shortest Path. Shortest Paths. Shortest Paths. Chapter 24 /8/11 Single-Source Shortest Path Chapter 1 Shortest Paths Finding the shortest path between two nodes comes up in many applications o Transportation problems o Motion planning o Communication problems

More information

Path Planning in Partially-Known Environments. Prof. Brian Williams (help from Ihsiang Shu) /6.834 Cognitive Robotics February 17 th, 2004

Path Planning in Partially-Known Environments. Prof. Brian Williams (help from Ihsiang Shu) /6.834 Cognitive Robotics February 17 th, 2004 Path Planning in Partially-Known Enironments Prof. Brian Williams (help from Ihsiang Sh) 16.41/6.834 Cognitie Robotics Febrary 17 th, 004 Otline Path Planning in Partially Known Enironments. Finding the

More information

COMP251: Single source shortest paths

COMP251: Single source shortest paths COMP51: Single source shortest paths Jérôme Waldispühl School of Computer Science McGill University Based on (Cormen et al., 00) Problem What is the shortest road to go from one city to another? Eample:

More information

Assignments. Computer Networks LECTURE 7 Network Layer: Routing and Addressing. Network Layer Function. Internet Architecture

Assignments. Computer Networks LECTURE 7 Network Layer: Routing and Addressing. Network Layer Function. Internet Architecture ompter Netorks LETURE Netork Laer: Roting and ddressing ssignments Project : Web Pro Serer DUE OT Sandha Darkadas Department of ompter Science Uniersit of Rochester Internet rchitectre Bottom-p: phsical:

More information

Queries. Inf 2B: Ranking Queries on the WWW. Suppose we have an Inverted Index for a set of webpages. Disclaimer. Kyriakos Kalorkoti

Queries. Inf 2B: Ranking Queries on the WWW. Suppose we have an Inverted Index for a set of webpages. Disclaimer. Kyriakos Kalorkoti Qeries Inf B: Ranking Qeries on the WWW Kyriakos Kalorkoti School of Informatics Uniersity of Edinbrgh Sppose e hae an Inerted Index for a set of ebpages. Disclaimer I Not really the scenario of Lectre.

More information

Lemma 1 Let the components of, Suppose. Trees. A tree is a graph which is. (a) Connected and. (b) has no cycles (acyclic). (b)

Lemma 1 Let the components of, Suppose. Trees. A tree is a graph which is. (a) Connected and. (b) has no cycles (acyclic). (b) Trees Lemma Let the components of ppose "! be (a) $&%('*)+ - )+ / A tree is a graph which is (b) 0 %(')+ - 3)+ / 6 (a) (a) Connected and (b) has no cycles (acyclic) (b) roof Eery path 8 in which is not

More information

On Plane Constrained Bounded-Degree Spanners

On Plane Constrained Bounded-Degree Spanners Algorithmica manscript No. (ill be inserted by the editor) 1 On Plane Constrained Bonded-Degree Spanners 2 3 Prosenjit Bose Rolf Fagerberg André an Renssen Sander Verdonschot 4 5 Receied: date / Accepted:

More information

Chapter 4: Network Layer. TDTS06 Computer networks. Chapter 4: Network Layer. Network layer. Two Key Network-Layer Functions

Chapter 4: Network Layer. TDTS06 Computer networks. Chapter 4: Network Layer. Network layer. Two Key Network-Layer Functions Chapter : Netork Laer TDTS06 Compter s Lectre : Netork laer II Roting algorithms Jose M. Peña, jospe@ida.li.se ID/DIT, LiU 009-09- Chapter goals: nderstand principles behind laer serices: laer serice models

More information

On Plane Constrained Bounded-Degree Spanners

On Plane Constrained Bounded-Degree Spanners On Plane Constrained Bonded-Degree Spanners Prosenjit Bose 1, Rolf Fagerberg 2, André an Renssen 1, Sander Verdonschot 1 1 School of Compter Science, Carleton Uniersity, Ottaa, Canada. Email: jit@scs.carleton.ca,

More information

More Graph Algorithms: Topological Sort and Shortest Distance

More Graph Algorithms: Topological Sort and Shortest Distance More Graph Algorithms: Topological Sort and Shortest Distance Topological Sort The goal of a topological sort is given a list of items with dependencies, (ie. item 5 must be completed before item 3, etc.)

More information

Network layer. Two Key Network-Layer Functions. Datagram Forwarding table. IP datagram format. IP Addressing: introduction

Network layer. Two Key Network-Layer Functions. Datagram Forwarding table. IP datagram format. IP Addressing: introduction Netork laer transport segment sending to receiing host on sending side encapslates segments into grams on rcing side, deliers segments to transport laer laer protocols in eer host, roter roter eamines

More information

Image Restoration Image Degradation and Restoration

Image Restoration Image Degradation and Restoration Image Degradation and Restoration hxy Image Degradation Model: Spatial domain representation can be modeled by: g x y h x y f x y x y Freqency domain representation can be modeled by: G F N Prepared By:

More information

Topological Sort. Here a topological sort would label A with 1, B and C with 2 and 3, and D with 4.

Topological Sort. Here a topological sort would label A with 1, B and C with 2 and 3, and D with 4. Topological Sort The goal of a topological sort is given a list of items with dependencies, (ie. item 5 must be completed before item 3, etc.) to produce an ordering of the items that satisfies the given

More information

Stereopsis Raul Queiroz Feitosa

Stereopsis Raul Queiroz Feitosa Stereopsis Ral Qeiroz Feitosa 5/24/2017 Stereopsis 1 Objetie This chapter introdces the basic techniqes for a 3 dimensional scene reconstrction based on a set of projections of indiidal points on two calibrated

More information

Computer Science & Engineering 423/823 Design and Analysis of Algorithms

Computer Science & Engineering 423/823 Design and Analysis of Algorithms Computer Science & Engineering 423/823 Design and Analysis of Algorithms Lecture 07 Single-Source Shortest Paths (Chapter 24) Stephen Scott and Vinodchandran N. Variyam sscott@cse.unl.edu 1/36 Introduction

More information

[1] Hopcroft, J., D. Joseph and S. Whitesides, Movement problems for twodimensional

[1] Hopcroft, J., D. Joseph and S. Whitesides, Movement problems for twodimensional Acknoledgement. The athors thank Bill Lenhart for interesting discssions on the recongration of rlers. References [1] Hopcroft, J., D. Joseph and S. Whitesides, Moement problems for todimensional linkages,

More information

CS420/520 Algorithm Analysis Spring 2009 Lecture 14

CS420/520 Algorithm Analysis Spring 2009 Lecture 14 CS420/520 Algorithm Analysis Spring 2009 Lecture 14 "A Computational Analysis of Alternative Algorithms for Labeling Techniques for Finding Shortest Path Trees", Dial, Glover, Karney, and Klingman, Networks

More information

Fixed-Parameter Algorithms for Cluster Vertex Deletion

Fixed-Parameter Algorithms for Cluster Vertex Deletion Fixed-Parameter Algorithms for Clster Vertex Deletion Falk Hüffner Christian Komsieicz Hannes Moser Rolf Niedermeier Institt für Informatik, Friedrich-Schiller-Uniersität Jena, Ernst-Abbe-Platz 2, D-07743

More information

Shortest path problems

Shortest path problems Next... Shortest path problems Single-source shortest paths in weighted graphs Shortest-Path Problems Properties of Shortest Paths, Relaxation Dijkstra s Algorithm Bellman-Ford Algorithm Shortest-Paths

More information

10.2 Solving Quadratic Equations by Completing the Square

10.2 Solving Quadratic Equations by Completing the Square . Solving Qadratic Eqations b Completing the Sqare Consider the eqation We can see clearl that the soltions are However, What if the eqation was given to s in standard form, that is 6 How wold we go abot

More information

ABSOLUTE DEFORMATION PROFILE MEASUREMENT IN TUNNELS USING RELATIVE CONVERGENCE MEASUREMENTS

ABSOLUTE DEFORMATION PROFILE MEASUREMENT IN TUNNELS USING RELATIVE CONVERGENCE MEASUREMENTS Proceedings th FIG Symposim on Deformation Measrements Santorini Greece 00. ABSOUTE DEFORMATION PROFIE MEASUREMENT IN TUNNES USING REATIVE CONVERGENCE MEASUREMENTS Mahdi Moosai and Saeid Khazaei Mining

More information

Lecture 18 Solving Shortest Path Problem: Dijkstra s Algorithm. October 23, 2009

Lecture 18 Solving Shortest Path Problem: Dijkstra s Algorithm. October 23, 2009 Solving Shortest Path Problem: Dijkstra s Algorithm October 23, 2009 Outline Lecture 18 Focus on Dijkstra s Algorithm Importance: Where it has been used? Algorithm s general description Algorithm steps

More information

CS6301 Programming and Data Structures II Unit -5 REPRESENTATION OF GRAPHS Graph and its representations Graph is a data structure that consists of following two components: 1. A finite set of vertices

More information

This chapter is based on the following sources, which are all recommended reading:

This chapter is based on the following sources, which are all recommended reading: Bioinformatics I, WS 09-10, D. Hson, December 7, 2009 105 6 Fast String Matching This chapter is based on the following sorces, which are all recommended reading: 1. An earlier version of this chapter

More information

CS 3516: Advanced Computer Networks

CS 3516: Advanced Computer Networks Welcome to CS 56: Adanced Computer Networks Prof. Yanhua Li Time: 9:00am 9:50am M, T, R, and F Location: Fuller 0 Fall 07 A-term Some slides are originall the course materials of the tetbook Computer Networking:

More information

CS 3516: Advanced Computer Networks

CS 3516: Advanced Computer Networks Welcome to CS 56: Adanced Computer Networks Prof. Yanhua Li Time: 9:00am 9:50am M, T, R, and F Location: Fuller 0 Fall 06 A-term Some slides are originall from the course materials of the tetbook Computer

More information

Reconstructing Generalized Staircase Polygons with Uniform Step Length

Reconstructing Generalized Staircase Polygons with Uniform Step Length Jornal of Graph Algorithms and Applications http://jgaa.info/ ol. 22, no. 3, pp. 431 459 (2018) DOI: 10.7155/jgaa.00466 Reconstrcting Generalized Staircase Polygons with Uniform Step Length Nodari Sitchinaa

More information

Introduction. I Given a weighted, directed graph G =(V, E) with weight function

Introduction. I Given a weighted, directed graph G =(V, E) with weight function ntroduction Computer Science & Engineering 2/82 Design and Analysis of Algorithms Lecture 06 Single-Source Shortest Paths (Chapter 2) Stephen Scott (Adapted from Vinodchandran N. Variyam) sscott@cse.unl.edu

More information

Object Pose from a Single Image

Object Pose from a Single Image Object Pose from a Single Image How Do We See Objects in Depth? Stereo Use differences between images in or left and right eye How mch is this difference for a car at 00 m? Moe or head sideways Or, the

More information

Image Warping, Compositing & Morphing

Image Warping, Compositing & Morphing Image Processing Image Warping, Compositing & Morphing Adam Finkelstein Princeton Uniersit COS 426, Spring 2005 Image Processing Qantization Uniform Qantization Random dither Ordered dither Flod-Steinberg

More information

Minimum Spanning Tree

Minimum Spanning Tree Minimum Spanning Tree 1 Minimum Spanning Tree G=(V,E) is an undirected graph, where V is a set of nodes and E is a set of possible interconnections between pairs of nodes. For each edge (u,v) in E, we

More information

Pipelined van Emde Boas Tree: Algorithms, Analysis, and Applications

Pipelined van Emde Boas Tree: Algorithms, Analysis, and Applications This fll text paper was peer reviewed at the direction of IEEE Commnications Society sbject matter experts for pblication in the IEEE INFOCOM 007 proceedings Pipelined van Emde Boas Tree: Algorithms, Analysis,

More information

Enhanced Performance with Pipelining

Enhanced Performance with Pipelining Chapter 6 Enhanced Performance with Pipelining Note: The slides being presented represent a mi. Some are created by ark Franklin, Washington University in St. Lois, Dept. of CSE. any are taken from the

More information

Real-Time Robot Path Planning via a Distance-Propagating Dynamic System with Obstacle Clearance

Real-Time Robot Path Planning via a Distance-Propagating Dynamic System with Obstacle Clearance POSTPRINT OF: IEEE TRANS. SYST., MAN, CYBERN., B, 383), 28, 884 893. 1 Real-Time Robot Path Planning ia a Distance-Propagating Dynamic System with Obstacle Clearance Allan R. Willms, Simon X. Yang Member,

More information

Friend of My Friend: Network Formation with Two-Hop Benefit

Friend of My Friend: Network Formation with Two-Hop Benefit Friend of My Friend: Network Formation with Two-Hop Benefit Elliot Ansheleich, Onkar Bhardwaj, and Michael Usher Rensselaer Polytechnic Institte, Troy NY, USA Abstract. How and why people form ties is

More information

On the Computational Complexity and Effectiveness of N-hub Shortest-Path Routing

On the Computational Complexity and Effectiveness of N-hub Shortest-Path Routing 1 On the Comptational Complexity and Effectiveness of N-hb Shortest-Path Roting Reven Cohen Gabi Nakibli Dept. of Compter Sciences Technion Israel Abstract In this paper we stdy the comptational complexity

More information

Partha Sarathi Mandal

Partha Sarathi Mandal MA 5: Data Strctres and Algorithms Lectre http://www.iitg.ernet.in/psm/indexing_ma5/y1/index.html Partha Sarathi Mandal Dept. of Mathematics, IIT Gwahati Idea of Prim s Algorithm Instead of growing the

More information

Introduction to Algorithms. Minimum Spanning Tree. Chapter 23: Minimum Spanning Trees

Introduction to Algorithms. Minimum Spanning Tree. Chapter 23: Minimum Spanning Trees Introdction to lgorithms oncrete example Imagine: Yo wish to connect all the compters in an office bilding sing the least amont of cable - ach vertex in a graph G represents a compter - ach edge represents

More information

Mathematical model for storing and effective processing of directed graphs in semistructured data management systems

Mathematical model for storing and effective processing of directed graphs in semistructured data management systems Mathematical model for storing and effectie processing of directed graphs in semistrctred data management MALIKOV A, GULEVSKIY Y, PARKHOMENKO D Information Systems and Technologies Department North Cacass

More information

Chapter 6: Pipelining

Chapter 6: Pipelining CSE 322 COPUTER ARCHITECTURE II Chapter 6: Pipelining Chapter 6: Pipelining Febrary 10, 2000 1 Clothes Washing CSE 322 COPUTER ARCHITECTURE II The Assembly Line Accmlate dirty clothes in hamper Place in

More information

C Puzzles The course that gives CMU its Zip! Integer Arithmetic Operations Jan. 25, Unsigned Addition. Visualizing Integer Addition

C Puzzles The course that gives CMU its Zip! Integer Arithmetic Operations Jan. 25, Unsigned Addition. Visualizing Integer Addition 1513 The corse that gies CMU its Zip! Integer Arithmetic Operations Jan. 5, 1 Topics Basic operations Addition, negation, mltiplication Programming Implications Conseqences of oerflow Using shifts to perform

More information

CS 251, Spring 2018, Assignment 3.0 3% of course mark

CS 251, Spring 2018, Assignment 3.0 3% of course mark CS 25, Spring 28, Assignment 3. 3% of corse mark De onday, Jne 25th, 5:3 P. (5 points) Consider the single-cycle compter shown on page 6 of this assignment. Sppose the circit elements take the following

More information

Alliances and Bisection Width for Planar Graphs

Alliances and Bisection Width for Planar Graphs Alliances and Bisection Width for Planar Graphs Martin Olsen 1 and Morten Revsbæk 1 AU Herning Aarhs University, Denmark. martino@hih.a.dk MADAGO, Department of Compter Science Aarhs University, Denmark.

More information

Faster Random Walks By Rewiring Online Social Networks On-The-Fly

Faster Random Walks By Rewiring Online Social Networks On-The-Fly 1 Faster Random Walks By Rewiring Online ocial Networks On-The-Fly Zhojie Zho 1, Nan Zhang 2, Zhigo Gong 3, Gatam Das 4 1,2 Compter cience Department, George Washington Uniersity 1 rexzho@gw.ed 2 nzhang10@gw.ed

More information

Finite Domain Cuts for Minimum Bandwidth

Finite Domain Cuts for Minimum Bandwidth Finite Domain Cts for Minimm Bandwidth J. N. Hooker Carnegie Mellon University, USA Joint work with Alexandre Friere, Cid de Soza State University of Campinas, Brazil INFORMS 2013 Two Related Problems

More information

Vertex Guarding in Weak Visibility Polygons

Vertex Guarding in Weak Visibility Polygons Vertex Garding in Weak Visibility Polygons Pritam Bhattacharya, Sbir Kmar Ghosh*, Bodhayan Roy School of Technology and Compter Science Tata Institte of Fndamental Research Mmbai 400005, India arxi:1409.46212

More information

The extra single-cycle adders

The extra single-cycle adders lticycle Datapath As an added bons, we can eliminate some of the etra hardware from the single-cycle path. We will restrict orselves to sing each fnctional nit once per cycle, jst like before. Bt since

More information

The Shortest Path Problem. The Shortest Path Problem. Mathematical Model. Integer Programming Formulation

The Shortest Path Problem. The Shortest Path Problem. Mathematical Model. Integer Programming Formulation The Shortest Path Problem jla,jc@imm.dtu.dk Department of Management Engineering Technical University of Denmark The Shortest Path Problem Given a directed network G = (V,E,w) for which the underlying

More information

CS 153 Design of Operating Systems Spring 18

CS 153 Design of Operating Systems Spring 18 CS 153 Design of Operating Systems Spring 18 Lectre 15: Virtal Address Space Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian OS Abstractions Applications

More information

Rectangle-of-influence triangulations

Rectangle-of-influence triangulations CCCG 2016, Vancoer, British Colmbia, Ag 3 5, 2016 Rectangle-of-inflence trianglations Therese Biedl Anna Lbi Saeed Mehrabi Sander Verdonschot 1 Backgrond The concept of rectangle-of-inflence (RI) draings

More information

Dr Paolo Guagliardo. Fall 2018

Dr Paolo Guagliardo. Fall 2018 The NULL vale Dr Paolo Gagliardo dbs-lectrer@ed.ac.k Fall 2018 NULL: all-prpose marker to represent incomplete information Main sorce of problems and inconsistencies... this topic cannot be described in

More information

Graphs. Part II: SP and MST. Laura Toma Algorithms (csci2200), Bowdoin College

Graphs. Part II: SP and MST. Laura Toma Algorithms (csci2200), Bowdoin College Laura Toma Algorithms (csci2200), Bowdoin College Topics Weighted graphs each edge (u, v) has a weight denoted w(u, v) or w uv stored in the adjacency list or adjacency matrix The weight of a path p =

More information

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction Review Friday the 2st of October Real world eamples of pipelining? How does pipelining pp inflence instrction latency? How does pipelining inflence instrction throghpt? What are the three types of hazard

More information

Lecture 13: Exceptions and Interrupts

Lecture 13: Exceptions and Interrupts 18 447 Lectre 13: Eceptions and Interrpts S 10 L13 1 James C. Hoe Dept of ECE, CU arch 1, 2010 Annoncements: Handots: Spring break is almost here Check grades on Blackboard idterm 1 graded Handot #9: Lab

More information

Single Source Shortest Paths

Single Source Shortest Paths Single Source Shortest Paths Given a connected weighted directed graph G(V, E), associated with each edge u, v E, there is a weight w(u, v). The single source shortest paths (SSSP) problem is to find a

More information

Localized Delaunay Triangulation with Application in Ad Hoc Wireless Networks

Localized Delaunay Triangulation with Application in Ad Hoc Wireless Networks 1 Localized Delanay Trianglation with Application in Ad Hoc Wireless Networks Xiang-Yang Li Gria Călinesc Peng-Jn Wan Y Wang Department of Compter Science, Illinois Institte of Technology, Chicago, IL

More information

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read. The final path PC 4 Add Reg Shift left 2 Add PCSrc Instrction [3-] Instrction I [25-2] I [2-6] I [5 - ] register register 2 register 2 Registers ALU Zero Reslt ALUOp em Data emtor RegDst ALUSrc em I [5

More information

Review Multicycle: What is Happening. Controlling The Multicycle Design

Review Multicycle: What is Happening. Controlling The Multicycle Design Review lticycle: What is Happening Reslt Zero Op SrcA SrcB Registers Reg Address emory em Data Sign etend Shift left Sorce A B Ot [-6] [5-] [-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em

More information

On shortest-path all-optical networks without wavelength conversion requirements

On shortest-path all-optical networks without wavelength conversion requirements Research Collection Working Paper On shortest-path all-optical networks withot waelength conersion reqirements Athor(s): Erlebach, Thomas; Stefanakos, Stamatis Pblication Date: 2002 Permanent Link: https://doi.org/10.3929/ethz-a-004446054

More information

Faster Random Walks By Rewiring Online Social Networks On-The-Fly

Faster Random Walks By Rewiring Online Social Networks On-The-Fly Faster Random Walks By Rewiring Online ocial Networks On-The-Fly Zhojie Zho 1, Nan Zhang 2, Zhigo Gong 3, Gatam Das 4 1,2 Compter cience Department, George Washington Uniersity 1 rexzho@gw.ed 2 nzhang10@gw.ed

More information

Point Location. The Slab Method. Optimal Schemes. The Slab Method. Preprocess a planar, polygonal subdivision for point location queries.

Point Location. The Slab Method. Optimal Schemes. The Slab Method. Preprocess a planar, polygonal subdivision for point location queries. Point Location The Slab Method Prerocess a lanar, olygonal sbdiision for oint location qeries. = (18, 11) raw a ertical line throgh each ertex. This decomoses the lane into slabs. In each slab, the ertical

More information

An Extended Fault-Tolerant Link-State Routing Protocol in the Internet

An Extended Fault-Tolerant Link-State Routing Protocol in the Internet An Extended Falt-Tolerant Link-State Roting Protocol in the Internet Jie W, Xiaola Lin, Jiannong Cao z, and Weijia Jia x Department of Compter Science and Engineering Florida Atlantic Uniersit Boca Raton,

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 483 Compter Organization Chapter 4.4 A Simple Implementation Scheme Chans Y The Big Pictre The Five Classic Components of a Compter Processor Control emory Inpt path Otpt path & Control 2 path and

More information

Stereo (Part 2) Introduction to Computer Vision CSE 152 Lecture 9

Stereo (Part 2) Introduction to Computer Vision CSE 152 Lecture 9 Stereo (Part 2) CSE 152 Lectre 9 Annoncements Homework 3 is de May 9 11:59 PM Reading: Chapter 7: Stereopsis Stereo Vision Otline Offline: Calibrate cameras & determine B epipolar geometry Online C D A

More information

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP Chapter 4: outline 4. introduction 4. irtual circuit and datagram networks 4. what s inside a router 4.4 IP: Internet Protocol datagram format IP4 addressing ICMP IP6 4.5 routing algorithms link state

More information

Shortest Path Problem

Shortest Path Problem Shortest Path Problem CLRS Chapters 24.1 3, 24.5, 25.2 Shortest path problem Shortest path problem (and variants) Properties of shortest paths Algorithmic framework Bellman-Ford algorithm Shortest paths

More information

Adaptive Influence Maximization in Microblog under the Competitive Independent Cascade Model

Adaptive Influence Maximization in Microblog under the Competitive Independent Cascade Model International Jornal of Knowledge Engineering, Vol. 1, No. 2, September 215 Adaptie Inflence Maximization in Microblog nder the Competitie Independent Cascade Model Zheng Ding, Kai Ni, and Zhiqiang He

More information

Chapter 7 TOPOLOGY CONTROL

Chapter 7 TOPOLOGY CONTROL Chapter TOPOLOGY CONTROL Oeriew Topology Control Gabriel Graph et al. XTC Interference SINR & Schedling Complexity Distribted Compting Grop Mobile Compting Winter 00 / 00 Distribted Compting Grop MOBILE

More information

Graph Representation DFS BFS Dijkstra A* Search Bellman-Ford Floyd-Warshall Iterative? Non-iterative? MST Flow Edmond-Karp

Graph Representation DFS BFS Dijkstra A* Search Bellman-Ford Floyd-Warshall Iterative? Non-iterative? MST Flow Edmond-Karp Charles Lin Graph Representation DFS BFS Dijkstra A* Search Bellman-Ford Floyd-Warshall Iterative? Non-iterative? MST Flow Edmond-Karp Adjacency Matrix bool way[100][100]; cin >> i >> j; way[i][j] = true;

More information

MST & Shortest Path -Prim s -Djikstra s

MST & Shortest Path -Prim s -Djikstra s MST & Shortest Path -Prim s -Djikstra s PRIM s - Minimum Spanning Tree - A spanning tree of a graph is a tree that has all the vertices of the graph connected by some edges. - A graph can have one or more

More information

circuit simulation NP-complete? backward retiming forward retiming f(x)

circuit simulation NP-complete? backward retiming forward retiming f(x) Optimal FPGA Mapping and Retiming with Ecient Initial State Comptation Jason Cong and Chang W Department of Compter Science Uniersity of California, Los Angeles, CA 995 Abstract For seqential circits with

More information

Shortest Path Algorithms

Shortest Path Algorithms Shortest Path Algorithms Andreas Klappenecker [based on slides by Prof. Welch] 1 Single Source Shortest Path Given: a directed or undirected graph G = (V,E) a source node s in V a weight function w: E

More information

Mobility Control and Its Applications in Mobile Ad Hoc Networks

Mobility Control and Its Applications in Mobile Ad Hoc Networks Mobility Control and Its Applications in Mobile Ad Hoc Netorks Jie W and Fei Dai, Florida Atlantic Uniersity Abstract Most eisting localized protocols in mobile ad hoc netorks, sch as data commnication

More information

Multiple Source Shortest Paths in a Genus g Graph

Multiple Source Shortest Paths in a Genus g Graph Mltiple Sorce Shortest Paths in a Gens g Graph Sergio Cabello Erin W. Chambers Abstract We gie an O(g n log n) algorithm to represent the shortest path tree from all the ertices on a single specified face

More information

Lecture 10. Diffraction. incident

Lecture 10. Diffraction. incident 1 Introdction Lectre 1 Diffraction It is qite often the case that no line-of-sight path exists between a cell phone and a basestation. In other words there are no basestations that the cstomer can see

More information

Constrained Routing Between Non-Visible Vertices

Constrained Routing Between Non-Visible Vertices Constrained Roting Between Non-Visible Vertices Prosenjit Bose 1, Matias Korman 2, André van Renssen 3,4, and Sander Verdonschot 1 1 School of Compter Science, Carleton University, Ottawa, Canada. jit@scs.carleton.ca,

More information

Combinatorial and Geometric Properties of Planar Laman Graphs

Combinatorial and Geometric Properties of Planar Laman Graphs Combinatorial and Geometric Properties of Planar Laman Graphs Stephen Koboro 1, Torsten Ueckerdt 2, and Kein Verbeek 3 1 Department of Compter Science, Uniersity of Arizona 2 Department of Applied Mathematics,

More information

Pipelining. Chapter 4

Pipelining. Chapter 4 Pipelining Chapter 4 ake processor rns faster Pipelining is an implementation techniqe in which mltiple instrctions are overlapped in eection Key of making processor fast Pipelining Single cycle path we

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 3.. 3% of corse mark De onday, Febrary 26th, 4:3 P Lates accepted ntil : A, Febrary 27th with a 5% penalty. IEEE 754 Floating Point ( points): (a) (4 points) Complete the following

More information

Augmenting the edge connectivity of planar straight line graphs to three

Augmenting the edge connectivity of planar straight line graphs to three Agmenting the edge connectivity of planar straight line graphs to three Marwan Al-Jbeh Mashhood Ishaqe Kristóf Rédei Diane L. Sovaine Csaba D. Tóth Pavel Valtr Abstract We characterize the planar straight

More information

Introduction. I Given a weighted, directed graph G =(V, E) with weight function

Introduction. I Given a weighted, directed graph G =(V, E) with weight function ntroduction Computer Science & Engineering 2/82 Design and Analysis of Algorithms Lecture 05 Single-Source Shortest Paths (Chapter 2) Stephen Scott (Adapted from Vinodchandran N. Variyam) sscott@cse.unl.edu

More information

More eamples with half half(0) handle Zero => 1000; > val it = 1000 : int half(1) handle Zero => 1000; > ncaght eception Odd half(0) handle Zero => 10

More eamples with half half(0) handle Zero => 1000; > val it = 1000 : int half(1) handle Zero => 1000; > ncaght eception Odd half(0) handle Zero => 10 Lectre 4 0 More eamples with half half(0) handle Zero => 1000; > val it = 1000 : int half(1) handle Zero => 1000; > ncaght eception Odd half(0) handle Zero => 1000 Odd => 1001; > val it = 1000 : int half(3)

More information

Pushing squares around

Pushing squares around Pshing sqares arond Adrian Dmitresc János Pach Ý Abstract We stdy dynamic self-reconfigration of modlar metamorphic systems. We garantee the feasibility of motion planning in a rectanglar model consisting

More information

Complete Information Pursuit Evasion in Polygonal Environments

Complete Information Pursuit Evasion in Polygonal Environments Complete Information Prsit Easion in Polygonal Enironments Kyle Klein and Sbhash Sri Department of Compter Science Uniersity of California Santa Barbara, CA 9306 Abstract Sppose an npredictable eader 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 16. Single source shortest path 11/18/2015 1 Problem definition Problem: given a weighted directed graph G, find the minimum-weight path from a given

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 83 Compter Organization Chapter.6 A Pipelined path Chans Y Pipelined Approach 2 - Cycle time, No. stages - Resorce conflict E E A B C D 3 E E 5 E 2 3 5 2 6 7 8 9 c.y9@csohio.ed Resorces sed in 5 Stages

More information

(2, 4) Tree Example (2, 4) Tree: Insertion

(2, 4) Tree Example (2, 4) Tree: Insertion Presentation for se with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 B-Trees and External Memory (2, 4) Trees Each internal node has 2 to 4 children:

More information

CSE 100 Minimum Spanning Trees Prim s and Kruskal

CSE 100 Minimum Spanning Trees Prim s and Kruskal CSE 100 Minimum Spanning Trees Prim s and Kruskal Your Turn The array of vertices, which include dist, prev, and done fields (initialize dist to INFINITY and done to false ): V0: dist= prev= done= adj:

More information

Flooding. Routing: Outlook. Flooding Algorithms. Spanning Tree. Flooding

Flooding. Routing: Outlook. Flooding Algorithms. Spanning Tree. Flooding Roting: Otlook Flooding Flooding Link-State: complete, global knoledge Distance-Vector: iteratie, distribted calclation Goal: To distribte a packet in the hole netork (i.e. to realie a netork-ide broadcast)

More information

Planarity-Preserving Clustering and Embedding for Large Planar Graphs

Planarity-Preserving Clustering and Embedding for Large Planar Graphs Planarity-Presering Clstering and Embedding for Large Planar Graphs Christian A. Dncan, Michael T. Goodrich, and Stephen G. Koboro Center for Geometric Compting The Johns Hopkins Uniersity Baltimore, MD

More information

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM Lectre (Wed /5/28) Lab # Hardware De Fri Oct 7 HW #2 IPS programming, de Wed Oct 22 idterm Fri Oct 2 IorD The mlticycle path SrcA Today s objectives: icroprogramming Etending the mlti-cycle path lti-cycle

More information

Drawing Outer-Planar Graphs in O(n log n) Area

Drawing Outer-Planar Graphs in O(n log n) Area Draing Oter-Planar Graphs in O(n log n) Area Therese Biedl School of Compter Science, Uniersity of Waterloo, Waterloo, ON N2L 3G1, Canada, biedl@aterloo.ca Abstract. In this paper, e stdy draings of oter-planar

More information