Generic Traverse. CS 362, Lecture 19. DFS and BFS. Today s Outline
|
|
- Amelia Amanda Gallagher
- 6 years ago
- Views:
Transcription
1 Generic Travere CS 62, Lecture 9 Jared Saia Univerity of New Mexico Travere(){ put (nil,) in bag; while (the bag i not empty){ take ome edge (p,v) from the bag if (v i unmarked) mark v; parent(v) = p; for each edge (v,w) incident to v{ put (v,w) into the bag; 2 Today Outline DFS and BFS BFS and DFS Wrapup Shortet Path If we implement the bag by uing a tack, we have Depth Firt Search If we implement the bag by uing a queue, we have Breadth Firt Search
2 Analyi Final Note Note that if we ue adjacency lit for the graph, the overhead for the for loop i only a contant per edge (no matter how we implement the bag) If we implement the bag uing either tack or queue, each operation on the bag take contant time Hence the overall runtime i O( V + E ) = O( E ) Now aume the edge are weighted If we implement the bag uing a priority queue, alway extracting the minimum weight edge from the bag, then we have a verion of Prim algorithm Each extraction from the bag now take O( E ) time o the total running time i O( V + E log E ) 6 DFS v BFS Example Note that DFS tree tend to be long and kinny while BFS tree are hort and fat In addition, the BFS tree contain hortet path from the tart vertex to every other vertex in it connected component. (here we define the length of a path to be the number of edge in the path) a b c d e f A depth-firt panning tree and a breadth-firt panning tree of one component of the example graph, with tart vertex a. a b c d e f 5
3 Searching Diconnected Graph DFS in Directed Graph If the graph i diconnected, then Travere only viit node in the connected component of the tart vertex. If we want to viit all vertice, we can ue the following wrapper around Travere TravereAll(){ for all vertice v{ if (v i unmarked){ Travere(v); Tree edge are edge that are in the tree itelf Back edge are thoe edge (u, v) connecting a vertex u to an ancetor v in the DFS tree Forward edge are nontree edge (u, v) that connect a vertex u to a decendant in a DFS tree Cro edge are all other edge. They go between two vertice where neither vertex i a decendant of the other 0 DFS and BFS Acyclic graph Note that we can do DFS and BFS equally well on undirected and directed graph If the graph i undirected, there are two type of edge in G: edge that are in the DFS or BFS tree and edge that are not in thi tree If the graph i directed, there are everal type of edge Ueful Fact: A directed graph G i acyclic if and only if a DFS of G yeild no back edge Challenge: Try to prove thi fact. 9
4 Take Away Example BFS and DFS are two ueful algorithm for exploring graph Each of thee algorithm i an intantiation of the Travere algorithm. BFS ue a queue to hold the edge and DFS ue a tack Each of thee algorithm contruct a panning tree of all the node which are reachable from the tart node Imagine we want to find the fatet way to drive from Albuquerque,NM to Seattle,WA We might ue a graph whoe vertice are citie, edge are road, weight are driving time, i Albuquerque and t i Seattle The graph i directed ince driving time along the ame road might be different in different direction (e.g. becaue of contruction, peed trap, etc) Shortet Path Problem SSSP Another intereting problem for graph i that of finding hortet path Aume we are given a weighted directed graph G = (V, E) with two pecial vertice, a ource and a target t We want to find the hortet directed path from to t In other word, we want to find the path p tarting at and ending at t minimizing the function w(p) = e p w(e) Every algorithm known for olving thi problem actually olve the following more general ingle ource hortet path or SSSP problem: Find the hortet path from the ource vertex to every other vertex in the graph Thi problem i uually olved by finding a hortet path tree rooted at that contain all the deired hortet path 5
5 Shortet Path Tree MST v SPT It not hard to ee that if the hortet path are unique, then they form a tree To prove thi, we need only oberve that the ub-path of hortet path are themelve hortet path If there are multiple hotet path to the ame vertex, we can alway chooe jut one of them, o that the union of the path i a tree If there are hortet path to two vertice u and v which diverge, then meet, then diverge again, we can modify one of the path o that the two path diverge once only. Note that the minimum panning tree and hortet path tree can be different For one thing there may be only one MST but there can be multiple hortet path tree (one for every ource vertex) 6 Example Example a b x If a b c d v and a x y d u are both hortet path, then a b c d u i alo a hortet path. c y d u v A minimum panning tree (left) and a hortet path tree rooted at the topmot vertex (right). 9
6 Negative Weight SSSP Algorithm We ll actually allow negative weight on edge The preence of a negative cycle might mean that there i no hortet path A hortet path from to t exit if and only if there i at leat one path from to t but no path from to t that touche a negative cycle In the following example, there i no hortet path from to t 5 2 t Each vertex v in the graph will tore two value which decribe a tentative hortet path from to v dit(v) i the length of the tentative hortet path between and v pred(v) i the predeceor of v in thi tentative hortet path The predeceor pointer automatically define a tentative hortet path tree SSSP Algorithm Defn We ll now go over ome algorithm for SSSP on directed graph. Thee algorithm will work for undirected graph with light modification In particular, we mut pecifically prohibit alternating back and forth acro the ame undirected negative-weight edge Like for graph traveral, all the SSSP algorithm will be pecial cae of a ingle generic algorithm Initially we et: dit() = 0, pred() = NULL For every vertex v, dit(v) = and pred(v) = NULL 2 2
7 Relaxation Correctne We call an edge (u, v) tene if dit(u) + w(u, v) < dit(v) If (u, v) i tene, then the tentative hortet path from to v i incorrect ince the path to u and then (u, v) i horter Our generic algorithm repeatedly find a tene edge in the graph and relaxe it If there are no tene edge, our algorithm i finihed and we have our deired hortet path tree The correctne of the relaxation algorithm follow directly from three imple claim The run time of the algorithm will depend on the way that we make choice about which edge to relax 2 26 Relax Claim Relax(u,v){ dit(v) = dit(u) + w(u,v); pred(v) = u; If dit(v), then dit(v) i the total weight of the predeceor chain ending at v: pred(pred(v)) pred(v) v. Thi i eay to prove by induction on the number of edge in the path from to v. (left a an exercie) 25 2
8 Claim 2 Generic SSSP If the algorithm halt, then dit(v) w( v) for any path v. Thi i eay to prove by induction on the number of edge in the path v. (which you will do in the hw) We haven t yet aid how to detect which edge can be relaxed or what order to relax them in The following Generic SSSP algorithm anwer thee quetion We will maintain a bag of vertice initially containing jut the ource vertex Whenever we take a vertex u out of the bag, we can all of it outgoing edge, looking for omething to relax Whenever we uccefully relax an edge (u, v), we put v in the bag 2 0 Claim InitSSSP The algorithm halt if and only if there i no negative cycle reachable from. The only if direction i eay if there i a reachable negative cycle, then after the firt edge in the cycle i relaxed, the cycle alway ha at leat one tene edge. The if direction follow from the fact that every relaxation tep reduce either the number of vertice with dit(v) = by or reduce the um of the finite hortet path length by ome poitive amount. InitSSSP(){ dit() = 0; pred() = NULL; for all vertice v!= { dit(v) = infinity; pred(v) = NULL; 29
9 GenericSSSP Diktra Algorithm GenericSSSP(){ InitSSSP(); put in the bag; while the bag i not empty{ take u from the bag; for all edge (u,v){ if (u,v) i tene{ Relax(u,v); put v in the bag; If we implement the bag a a heap, where the key of a vertex v i dit(v), we obtain Dijktra algorithm Dijktra algorithm doe particularly well if the graph ha no negative-weight edge In thi cae, it not hard to how (by induction, of coure) that the vertice are canned in increaing order of their hortet-path ditance from It follow that each vertex i canned at mot once, and thu that each edge i relaxed at mot once 2 Generic SSSP Dijktra Algorithm Jut a with graph traveral, uing different data tructure for the bag give u different algorithm Some obviou choice are: a tack, a queue and a heap Unfortunately if we ue a tack, we need to perform Θ(2 E ) relaxation tep in the wort cae (an exercie for the diligent tudent) The other poibilitie are more efficient Since the key of each vertex in the heap i it tentative ditance from, the algorithm perform a DecreaeKey operation every time an edge i relaxed Thu the algorithm perform at mot E DecreaeKey Similarly, there are at mot V Inert and ExtractMin operation Thu if we tore the vertice in a Fibonacci heap, the total running time of Dijktra algorithm i O( E + V log V ) 5
10 Negative Edge Thi analyi aume that no edge ha negative weight The algorithm given here i till correct if there are negative weight edge but the wort-cae run time could be exponential The algorithm in our text book give incorrect reult for graph with negative edge (which they make clear) 6 Example Four phae of Dijktra algorithm run on a graph with no negative edge. At each phae, the haded vertice are in the heap, and the bold vertex ha jut been canned. The bold edge decribe the evolving hortet path tree.
Today s Outline. CS 362, Lecture 19. DFS and BFS. Generic Traverse. BFS and DFS Wrapup Shortest Paths. Jared Saia University of New Mexico
Today Outline CS 362, Lecture 9 Jared Saia Univerity of New Mexico BFS and DFS Wrapup Shortet Path Generic Travere DFS and BFS Travere(){ put (nil,) in bag; while (the bag i not empty){ take ome edge (p,v)
More informationShortest Paths Problem. CS 362, Lecture 20. Today s Outline. Negative Weights
Shortet Path Problem CS 6, Lecture Jared Saia Univerity of New Mexico Another intereting problem for graph i that of finding hortet path Aume we are given a weighted directed graph G = (V, E) with two
More informationToday s Outline. CS 561, Lecture 23. Negative Weights. Shortest Paths Problem. The presence of a negative cycle might mean that there is
Today Outline CS 56, Lecture Jared Saia Univerity of New Mexico The path that can be trodden i not the enduring and unchanging Path. The name that can be named i not the enduring and unchanging Name. -
More informationCS 561, Lecture 10. Jared Saia University of New Mexico
CS 561, Lecture 10 Jared Saia University of New Mexico Today s Outline The path that can be trodden is not the enduring and unchanging Path. The name that can be named is not the enduring and unchanging
More informationCS 561, Lecture 10. Jared Saia University of New Mexico
CS 561, Lecture 10 Jared Saia University of New Mexico Today s Outline The path that can be trodden is not the enduring and unchanging Path. The name that can be named is not the enduring and unchanging
More informationLecture 14: Minimum Spanning Tree I
COMPSCI 0: Deign and Analyi of Algorithm October 4, 07 Lecture 4: Minimum Spanning Tree I Lecturer: Rong Ge Scribe: Fred Zhang Overview Thi lecture we finih our dicuion of the hortet path problem and introduce
More informationRobert Bryan and Marshall Dodge, Bert and I and Other Stories from Down East (1961) Michelle Shocked, Arkansas Traveler (1992)
Well, ya turn left by the fire tation in the village and take the old pot road by the reervoir and...no, that won t do. Bet to continue traight on by the tar road until you reach the choolhoue and then
More informationAlgorithmic Discrete Mathematics 4. Exercise Sheet
Algorithmic Dicrete Mathematic. Exercie Sheet Department of Mathematic SS 0 PD Dr. Ulf Lorenz 0. and. May 0 Dipl.-Math. David Meffert Verion of May, 0 Groupwork Exercie G (Shortet path I) (a) Calculate
More informationContents. shortest paths. Notation. Shortest path problem. Applications. Algorithms and Networks 2010/2011. In the entire course:
Content Shortet path Algorithm and Network 21/211 The hortet path problem: Statement Verion Application Algorithm (for ingle ource p problem) Reminder: relaxation, Dijktra, Variant of Dijktra, Bellman-Ford,
More informationLecture 17: Shortest Paths
Lecture 7: Shortet Path CSE 373: Data Structure and Algorithm CSE 373 9 WI - KASEY CHAMPION Adminitrivia How to Ace the Technical Interview Seion today! - 6-8pm - Sieg 34 No BS CS Career Talk Thurday -
More information8.1 Shortest Path Trees
I tudy my Bible a I gather apple. Firt I hake the whole tree, that the ripet might fall. Then I climb the tree and hake each limb, and then each branch and then each twig, and then I look under each leaf.
More informationDelaunay Triangulation: Incremental Construction
Chapter 6 Delaunay Triangulation: Incremental Contruction In the lat lecture, we have learned about the Lawon ip algorithm that compute a Delaunay triangulation of a given n-point et P R 2 with O(n 2 )
More informationTopics. Lecture 37: Global Optimization. Issues. A Simple Example: Copy Propagation X := 3 B > 0 Y := 0 X := 4 Y := Z + W A := 2 * 3X
Lecture 37: Global Optimization [Adapted from note by R. Bodik and G. Necula] Topic Global optimization refer to program optimization that encompa multiple baic block in a function. (I have ued the term
More informationGraphs: Finding shortest paths
/0/01 Graph: Finding hortet path Tecniche di Programmazione Summary Definition Floyd-Warhall algorithm Bellman-Ford-Moore algorithm Dijktra algorithm 1 /0/01 Definition Graph: Finding hortet path Definition:
More informationCS 151. Graph Algorithms. Wednesday, November 28, 12
CS 151 Graph Algorithm 1 Unweighted Shortet Path Problem input: a graph G=(V,E) and a tart vertex goal: determine the length of the hortet path from to every vertex in V (and while you re at it, compute
More informationLecture 18 Graph-Based Algorithms. CSE373: Design and Analysis of Algorithms
Lecture 18 Graph-Baed Algorithm CSE: Deign and Anali of Algorithm Shortet Path Problem Modeling problem a graph problem: Road map i a weighted graph: vertice = citie edge = road egment between citie edge
More information1 The secretary problem
Thi i new material: if you ee error, pleae email jtyu at tanford dot edu 1 The ecretary problem We will tart by analyzing the expected runtime of an algorithm, a you will be expected to do on your homework.
More informationCS 4349 Lecture October 23rd, 2017
CS 4349 Lecture October 23rd, 2017 Main topics for #lecture include #minimum_spanning_trees and #SSSP. Prelude Homework 7 due Wednesday, October 25th. Don t forget about the extra credit. Minimum Spanning
More informationMinimum congestion spanning trees in bipartite and random graphs
Minimum congetion panning tree in bipartite and random graph M.I. Otrovkii Department of Mathematic and Computer Science St. John Univerity 8000 Utopia Parkway Queen, NY 11439, USA e-mail: otrovm@tjohn.edu
More informationLecture Outline. Global flow analysis. Global Optimization. Global constant propagation. Liveness analysis. Local Optimization. Global Optimization
Lecture Outline Global flow analyi Global Optimization Global contant propagation Livene analyi Adapted from Lecture by Prof. Alex Aiken and George Necula (UCB) CS781(Praad) L27OP 1 CS781(Praad) L27OP
More informationAlgorithms. Algorithms 4.4 S HORTEST P ATHS. APIs shortest-paths properties. Dijkstra's algorithm edge-weighted DAGs negative weights
Algorithm Shortet path in an edge-weighted digraph R OBERT S EDGEWICK K EVIN W AYNE Given an edge-weighted digraph, find the hortet path from to t. edge-weighted digraph ->. ->. ->7.7 ->7.28 7->.28 ->.2
More informationShortest Path Problems
Shortet Path Problem How can we find the hortet route between two point on a road map? Model the problem a a graph problem: Road map i a weighted graph: vertice = citie edge = road egment between citie
More informationRouting Definition 4.1
4 Routing So far, we have only looked at network without dealing with the iue of how to end information in them from one node to another The problem of ending information in a network i known a routing
More informationCERIAS Tech Report EFFICIENT PARALLEL ALGORITHMS FOR PLANAR st-graphs. by Mikhail J. Atallah, Danny Z. Chen, and Ovidiu Daescu
CERIAS Tech Report 2003-15 EFFICIENT PARALLEL ALGORITHMS FOR PLANAR t-graphs by Mikhail J. Atallah, Danny Z. Chen, and Ovidiu Daecu Center for Education and Reearch in Information Aurance and Security,
More informationLaboratory Exercise 6
Laboratory Exercie 6 Adder, Subtractor, and Multiplier The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each type of circuit will be implemented in two
More informationKaren L. Collins. Wesleyan University. Middletown, CT and. Mark Hovey MIT. Cambridge, MA Abstract
Mot Graph are Edge-Cordial Karen L. Collin Dept. of Mathematic Weleyan Univerity Middletown, CT 6457 and Mark Hovey Dept. of Mathematic MIT Cambridge, MA 239 Abtract We extend the definition of edge-cordial
More informationarxiv: v1 [cs.ds] 27 Feb 2018
Incremental Strong Connectivity and 2-Connectivity in Directed Graph Louka Georgiadi 1, Giueppe F. Italiano 2, and Niko Parotidi 2 arxiv:1802.10189v1 [c.ds] 27 Feb 2018 1 Univerity of Ioannina, Greece.
More informationxy-monotone path existence queries in a rectilinear environment
CCCG 2012, Charlottetown, P.E.I., Augut 8 10, 2012 xy-monotone path exitence querie in a rectilinear environment Gregory Bint Anil Mahehwari Michiel Smid Abtract Given a planar environment coniting of
More informationStochastic Search and Graph Techniques for MCM Path Planning Christine D. Piatko, Christopher P. Diehl, Paul McNamee, Cheryl Resch and I-Jeng Wang
Stochatic Search and Graph Technique for MCM Path Planning Chritine D. Piatko, Chritopher P. Diehl, Paul McNamee, Cheryl Rech and I-Jeng Wang The John Hopkin Univerity Applied Phyic Laboratory, Laurel,
More informationA SIMPLE IMPERATIVE LANGUAGE THE STORE FUNCTION NON-TERMINATING COMMANDS
A SIMPLE IMPERATIVE LANGUAGE Eventually we will preent the emantic of a full-blown language, with declaration, type and looping. However, there are many complication, o we will build up lowly. Our firt
More informationCS201: Data Structures and Algorithms. Assignment 2. Version 1d
CS201: Data Structure and Algorithm Aignment 2 Introduction Verion 1d You will compare the performance of green binary earch tree veru red-black tree by reading in a corpu of text, toring the word and
More informationA note on degenerate and spectrally degenerate graphs
A note on degenerate and pectrally degenerate graph Noga Alon Abtract A graph G i called pectrally d-degenerate if the larget eigenvalue of each ubgraph of it with maximum degree D i at mot dd. We prove
More informationLocalized Minimum Spanning Tree Based Multicast Routing with Energy-Efficient Guaranteed Delivery in Ad Hoc and Sensor Networks
Localized Minimum Spanning Tree Baed Multicat Routing with Energy-Efficient Guaranteed Delivery in Ad Hoc and Senor Network Hanne Frey Univerity of Paderborn D-3398 Paderborn hanne.frey@uni-paderborn.de
More informationShortest Paths with Single-Point Visibility Constraint
Shortet Path with Single-Point Viibility Contraint Ramtin Khoravi Mohammad Ghodi Department of Computer Engineering Sharif Univerity of Technology Abtract Thi paper tudie the problem of finding a hortet
More informationShortest Paths. Dijkstra's algorithm implementation negative weights. Google maps. Shortest paths in a weighted digraph. Shortest path versions
Google map Shortet Path Dijktra' algorithm implementation negatie eight Reference: Algorithm in Jaa, Chapter http://.c.princeton.edu/alg/p Algorithm in Jaa, th Edition Robert Sedgeick and Kein Wayne Copyright
More informationBrief Announcement: Distributed 3/2-Approximation of the Diameter
Brief Announcement: Ditributed /2-Approximation of the Diameter Preliminary verion of a brief announcement to appear at DISC 14 Stephan Holzer MIT holzer@mit.edu David Peleg Weizmann Intitute david.peleg@weizmann.ac.il
More informationOperational Semantics Class notes for a lecture given by Mooly Sagiv Tel Aviv University 24/5/2007 By Roy Ganor and Uri Juhasz
Operational emantic Page Operational emantic Cla note for a lecture given by Mooly agiv Tel Aviv Univerity 4/5/7 By Roy Ganor and Uri Juhaz Reference emantic with Application, H. Nielon and F. Nielon,
More informationComputer Arithmetic Homework Solutions. 1 An adder for graphics. 2 Partitioned adder. 3 HDL implementation of a partitioned adder
Computer Arithmetic Homework 3 2016 2017 Solution 1 An adder for graphic In a normal ripple carry addition of two poitive number, the carry i the ignal for a reult exceeding the maximum. We ue thi ignal
More informationTouring a Sequence of Polygons
Touring a Sequence of Polygon Mohe Dror (1) Alon Efrat (1) Anna Lubiw (2) Joe Mitchell (3) (1) Univerity of Arizona (2) Univerity of Waterloo (3) Stony Brook Univerity Problem: Given a equence of k polygon
More informationMidterm 2 March 10, 2014 Name: NetID: # Total Score
CS 3 : Algorithm and Model of Computation, Spring 0 Midterm March 0, 0 Name: NetID: # 3 Total Score Max 0 0 0 0 Grader Don t panic! Pleae print your name and your NetID in the boxe above. Thi i a cloed-book,
More informationChapter S:II (continued)
Chapter S:II (continued) II. Baic Search Algorithm Sytematic Search Graph Theory Baic State Space Search Depth-Firt Search Backtracking Breadth-Firt Search Uniform-Cot Search AND-OR Graph Baic Depth-Firt
More informationAdvanced Encryption Standard and Modes of Operation
Advanced Encryption Standard and Mode of Operation G. Bertoni L. Breveglieri Foundation of Cryptography - AES pp. 1 / 50 AES Advanced Encryption Standard (AES) i a ymmetric cryptographic algorithm AES
More informationShortest Paths in Directed Graphs
Shortet Path in Direted Graph Jonathan Turner January, 0 Thi note i adapted from Data Struture and Network Algorithm y Tarjan. Let G = (V, E) e a direted graph and let length e a real-valued funtion on
More informationAnnouncements. CSE332: Data Abstractions Lecture 19: Parallel Prefix and Sorting. The prefix-sum problem. Outline. Parallel prefix-sum
Announcement Homework 6 due Friday Feb 25 th at the BEGINNING o lecture CSE332: Data Abtraction Lecture 19: Parallel Preix and Sorting Project 3 the lat programming project! Verion 1 & 2 - Tue March 1,
More informationCS 561, Lecture 9. Jared Saia University of New Mexico
CS 561, Lecture 9 Jared Saia University of New Mexico Today s Outline Minimum Spanning Trees Safe Edge Theorem Kruskal and Prim s algorithms Graph Representation 1 Graph Definition A graph is a pair of
More informationAVL Tree. The height of the BST be as small as possible
1 AVL Tree re and Algorithm The height of the BST be a mall a poible The firt balanced BST. Alo called height-balanced tree. Introduced by Adel on-vel kii and Landi in 1962. BST with the following condition:
More informationTouring a Sequence of Polygons
Touring a Sequence of Polygon Mohe Dror (1) Alon Efrat (1) Anna Lubiw (2) Joe Mitchell (3) (1) Univerity of Arizona (2) Univerity of Waterloo (3) Stony Brook Univerity Problem: Given a equence of k polygon
More informationShortest Path Routing in Arbitrary Networks
Journal of Algorithm, Vol 31(1), 1999 Shortet Path Routing in Arbitrary Network Friedhelm Meyer auf der Heide and Berthold Vöcking Department of Mathematic and Computer Science and Heinz Nixdorf Intitute,
More informationCORRECTNESS ISSUES AND LOOP INVARIANTS
The next everal lecture 2 Study algorithm for earching and orting array. Invetigate their complexity how much time and pace they take Formalize the notion of average-cae and wort-cae complexity CORRECTNESS
More informationLecture 8: More Pipelining
Overview Lecture 8: More Pipelining David Black-Schaffer davidbb@tanford.edu EE8 Spring 00 Getting Started with Lab Jut get a ingle pixel calculating at one time Then look into filling your pipeline Multiplier
More informationelse end while End References
621-630. [RM89] [SK76] Roenfeld, A. and Melter, R. A., Digital geometry, The Mathematical Intelligencer, vol. 11, No. 3, 1989, pp. 69-72. Sklanky, J. and Kibler, D. F., A theory of nonuniformly digitized
More informationSize Balanced Tree. Chen Qifeng (Farmer John) Zhongshan Memorial Middle School, Guangdong, China. December 29, 2006.
Size Balanced Tree Chen Qifeng (Farmer John) Zhonghan Memorial Middle School, Guangdong, China Email:44687@QQ.com December 9, 006 Abtract Thi paper preent a unique trategy for maintaining balance in dynamically
More informationUninformed Search Complexity. Informed Search. Search Revisited. Day 2/3 of Search
Informed Search ay 2/3 of Search hap. 4, Ruel & Norvig FS IFS US PFS MEM FS IS Uninformed Search omplexity N = Total number of tate = verage number of ucceor (branching factor) L = Length for tart to goal
More informationCourse Updates. Reminders: 1) Assignment #13 due Monday. 2) Mirrors & Lenses. 3) Review for Final: Wednesday, May 5th
Coure Update http://www.phy.hawaii.edu/~varner/phys272-spr0/phyic272.html Reminder: ) Aignment #3 due Monday 2) Mirror & Lene 3) Review for Final: Wedneday, May 5th h R- R θ θ -R h Spherical Mirror Infinite
More informationA Linear Interpolation-Based Algorithm for Path Planning and Replanning on Girds *
Advance in Linear Algebra & Matrix Theory, 2012, 2, 20-24 http://dx.doi.org/10.4236/alamt.2012.22003 Publihed Online June 2012 (http://www.scirp.org/journal/alamt) A Linear Interpolation-Baed Algorithm
More informationAn Intro to LP and the Simplex Algorithm. Primal Simplex
An Intro to LP and the Simplex Algorithm Primal Simplex Linear programming i contrained minimization of a linear objective over a olution pace defined by linear contraint: min cx Ax b l x u A i an m n
More informationMAT 155: Describing, Exploring, and Comparing Data Page 1 of NotesCh2-3.doc
MAT 155: Decribing, Exploring, and Comparing Data Page 1 of 8 001-oteCh-3.doc ote for Chapter Summarizing and Graphing Data Chapter 3 Decribing, Exploring, and Comparing Data Frequency Ditribution, Graphic
More informationThis article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and
Thi article appeared in a journal publihed by Elevier. The attached copy i furnihed to the author for internal non-commercial reearch and education ue, including for intruction at the author intitution
More informationWeek 12: Minimum Spanning trees and Shortest Paths
Agenda: Week 12: Minimum Spanning trees and Shortest Paths Kruskal s Algorithm Single-source shortest paths Dijkstra s algorithm for non-negatively weighted case Reading: Textbook : 61-7, 80-87, 9-601
More information7. NETWORK FLOW I. Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley Copyright 2013 Kevin Wayne. Last updated on Sep 8, :40 AM
7. NETWORK FLOW I max-flow and min-cut problem Ford-Fulkeron algorithm max-flow min-cut theorem capacity-caling algorithm hortet augmenting path blocking-flow algorithm unit-capacity imple network Lecture
More informationDiffraction I Version 1.0 : March 12, 2019
Diffraction I Interference an Diffraction of Light Through Slit: The Jut Give Me The Formulae Verion! Steve Smith March 12, 2019 Content 1 Introuction 3 1.1 Huygen Principle.............................................
More informationTrading Off Space for Passes in Graph Streaming Problems
Trading Off Space for Pae in Graph Streaming Problem CAMIL DEMETRESCU, IRENE FINOCCHI and ANDREA RIBICHINI Univerità di Roma La Sapienza, Roma, Italy Data tream proceing ha recently received increaing
More informationExploring Simple Grid Polygons
Exploring Simple Grid Polygon Chritian Icking 1, Tom Kamphan 2, Rolf Klein 2, and Elmar Langetepe 2 1 Univerity of Hagen, Praktiche Informatik VI, 58084 Hagen, Germany. 2 Univerity of Bonn, Computer Science
More informationCutting Stock by Iterated Matching. Andreas Fritsch, Oliver Vornberger. University of Osnabruck. D Osnabruck.
Cutting Stock by Iterated Matching Andrea Fritch, Oliver Vornberger Univerity of Onabruck Dept of Math/Computer Science D-4909 Onabruck andy@informatikuni-onabrueckde Abtract The combinatorial optimization
More informationDrawing Lines in 2 Dimensions
Drawing Line in 2 Dimenion Drawing a traight line (or an arc) between two end point when one i limited to dicrete pixel require a bit of thought. Conider the following line uperimpoed on a 2 dimenional
More informationDijkstra s Shortest Path Algorithm
Dijkstra s Shortest Path Algorithm DPV 4.4, CLRS 24.3 Revised, October 23, 2014 Outline of this Lecture Recalling the BFS solution of the shortest path problem for unweighted (di)graphs. The shortest path
More informationShortest-Path Routing in Arbitrary Networks
Ž. Journal of Algorithm 31, 105131 1999 Article ID jagm.1998.0980, available online at http:www.idealibrary.com on Shortet-Path Routing in Arbitrary Network Friedhelm Meyer auf der Heide and Berthold Vocking
More informationThe norm Package. November 15, Title Analysis of multivariate normal datasets with missing values
The norm Package November 15, 2003 Verion 1.0-9 Date 2002/05/06 Title Analyi of multivariate normal dataet with miing value Author Ported to R by Alvaro A. Novo . Original by Joeph
More informationCut Tree Construction from Massive Graphs
Cut Tree Contruction from Maive Graph Takuya Akiba Yoichi Iwata Youke Samehima # Naoto Mizuno Youke Yano # Preferred Network, Inc. National Intitute of Informatic # Recruit Holding Co., Ltd. The Univerity
More informationProgrammazione di sistemi multicore
Programmazione di itemi multicore A.A. 2015-2016 LECTURE 9 IRENE FINOCCHI http://wwwuer.di.uniroma1.it/~inocchi/ More complex parallel pattern PARALLEL PREFIX PARALLEL SORTING PARALLEL MERGESORT PARALLEL
More informationThe Association of System Performance Professionals
The Aociation of Sytem Performance Profeional The Computer Meaurement Group, commonly called CMG, i a not for profit, worldwide organization of data proceing profeional committed to the meaurement and
More informationTheory of Computing. Lecture 7 MAS 714 Hartmut Klauck
Theory of Computing Lecture 7 MAS 714 Hartmut Klauck Shortest paths in weighted graphs We are given a graph G (adjacency list with weights W(u,v)) No edge means W(u,v)=1 We look for shortest paths from
More informationUsing Partial Evaluation in Distributed Query Evaluation
A X x Z z R r y Y B Uing Partial Evaluation in Ditributed Query Evaluation Peter Buneman Gao Cong Univerity of Edinburgh Wenfei Fan Univerity of Edinburgh & Bell Laboratorie Anataio Kementietidi Univerity
More informationThe Euler Tour Technique and Parallel Rooted Spanning Tree
The Euler Tour Technique and Parallel Rooted Spanning Tree Guojing Cong, David A. Bader Department of Electrical and Computer Engineering Univerity of New Mexico, Albuquerque, NM 87131 USA {cong, dbader}@ece.unm.edu
More informationControl Flow Analysis
Control Flow Analyi Efficiency Control Flow Analyi Type an Effect ytem Data Flow Analyi Abtract Interpretation Correctne Control Flow Analyi p.1/35 Control Flow Analyi Flow information i eential for the
More informationShortest 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 informationGray-level histogram. Intensity (grey-level) transformation, or mapping. Use of intensity transformations:
Faculty of Informatic Eötvö Loránd Univerity Budapet, Hungary Lecture : Intenity Tranformation Image enhancement by point proceing Spatial domain and frequency domain method Baic Algorithm for Digital
More informationVariable Resolution Discretization in the Joint Space
Variable Reolution Dicretization in the Joint Space Chritopher K. Monon, David Wingate, and Kevin D. Seppi {c,wingated,keppi}@c.byu.edu Computer Science, Brigham Young Univerity Todd S. Peteron peterto@uvc.edu
More informationWeek 11: Minimum Spanning trees
Week 11: Minimum Spanning trees Agenda: Minimum Spanning Trees Prim s Algorithm Reading: Textbook : 61-7 1 Week 11: Minimum Spanning trees Minimum spanning tree (MST) problem: Input: edge-weighted (simple,
More informationCS 161 Lecture 11 BFS, Dijkstra s algorithm Jessica Su (some parts copied from CLRS) 1 Review
1 Review 1 Something I did not emphasize enough last time is that during the execution of depth-firstsearch, we construct depth-first-search trees. One graph may have multiple depth-firstsearch trees,
More informationNearly Constant Approximation for Data Aggregation Scheduling in Wireless Sensor Networks
Nearly Contant Approximation for Data Aggregation Scheduling in Wirele Senor Network Scott C.-H. Huang, Peng-Jun Wan, Chinh T. Vu, Yinghu Li and France Yao Computer Science Department, City Univerity of
More informationMulticast with Network Coding in Application-Layer Overlay Networks
IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, VOL. 22, NO. 1, JANUARY 2004 1 Multicat with Network Coding in Application-Layer Overlay Network Ying Zhu, Baochun Li, Member, IEEE, and Jiang Guo Abtract
More informationLemma 1. A 3-connected maximal generalized outerplanar graph is a wheel.
122 (1997) MATHEMATICA BOHEMICA No. 3, 225{230 A LINEAR ALGORITHM TO RECOGNIZE MAXIMAL GENERALIZED OUTERPLANAR GRAPHS Jo C cere, Almer a, Alberto M rquez, Sevilla (Received November 16, 1994, revied May
More informationBottom Up parsing. Bottom-up parsing. Steps in a shift-reduce parse. 1. s. 2. np. john. john. john. walks. walks.
Paring Technologie Outline Paring Technologie Outline Bottom Up paring Paring Technologie Paring Technologie Bottom-up paring Step in a hift-reduce pare top-down: try to grow a tree down from a category
More informationSee chapter 8 in the textbook. Dr Muhammad Al Salamah, Industrial Engineering, KFUPM
Goal programming Objective of the topic: Indentify indutrial baed ituation where two or more objective function are required. Write a multi objective function model dla a goal LP Ue weighting um and preemptive
More informationMinimum Energy Reliable Paths Using Unreliable Wireless Links
Minimum Energy Reliable Path Uing Unreliable Wirele Link Qunfeng Dong Department of Computer Science Univerity of Wiconin-Madion Madion, Wiconin 53706 qunfeng@c.wic.edu Micah Adler Department of Computer
More informationEdits in Xylia Validity Preserving Editing of XML Documents
dit in Xylia Validity Preerving diting of XML Document Pouria Shaker, Theodore S. Norvell, and Denni K. Peter Faculty of ngineering and Applied Science, Memorial Univerity of Newfoundland, St. John, NFLD,
More informationLaboratory Exercise 6
Laboratory Exercie 6 Adder, Subtractor, and Multiplier The purpoe of thi exercie i to examine arithmetic circuit that add, ubtract, and multiply number. Each circuit will be decribed in Verilog and implemented
More informationNow consider the following situation after deleting three elements from the queue...
Scheme of valuvation -1I Subject & Code : Data Structure and Application (15CS33) NOTE: ANSWER All FIVE QUESTIONS 1 Explain the diadvantage of linear queue and how it i olved in circular queue. Explain
More informationQuadrilaterals. Learning Objectives. Pre-Activity
Section 3.4 Pre-Activity Preparation Quadrilateral Intereting geometric hape and pattern are all around u when we tart looking for them. Examine a row of fencing or the tiling deign at the wimming pool.
More informationMinimum Spanning Trees My T. UF
Introduction to Algorithms Minimum Spanning Trees @ UF Problem Find a low cost network connecting a set of locations Any pair of locations are connected There is no cycle Some applications: Communication
More informationTutorial. Question There are no forward edges. 4. For each back edge u, v, we have 0 d[v] d[u].
Tutorial Question 1 A depth-first forest classifies the edges of a graph into tree, back, forward, and cross edges. A breadth-first tree can also be used to classify the edges reachable from the source
More informationSolutions to relevant spring 2000 exam problems
Problem 2, exam Here s Prim s algorithm, modified slightly to use C syntax. MSTPrim (G, w, r): Q = V[G]; for (each u Q) { key[u] = ; key[r] = 0; π[r] = 0; while (Q not empty) { u = ExtractMin (Q); for
More informationAN ALGORITHM FOR RESTRICTED NORMAL FORM TO SOLVE DUAL TYPE NON-CANONICAL LINEAR FRACTIONAL PROGRAMMING PROBLEM
RAC Univerity Journal, Vol IV, No, 7, pp 87-9 AN ALGORITHM FOR RESTRICTED NORMAL FORM TO SOLVE DUAL TYPE NON-CANONICAL LINEAR FRACTIONAL PROGRAMMING PROLEM Mozzem Hoain Department of Mathematic Ghior Govt
More informationSingle Source Shortest Path
Single Source Shortest Path A directed graph G = (V, E) and a pair of nodes s, d is given. The edges have a real-valued weight W i. This time we are looking for the weight and the shortest path from s
More informationThe Set Constraint/CFL Reachability Connection in Practice
The Set Contraint/CFL Reachability Connection in Practice John Kodumal EECS Department Univerity of California, Berkeley jkodumal@c.berkeley.edu Alex Aiken Computer Science Department Stanford Univerity
More informationA Multi-objective Genetic Algorithm for Reliability Optimization Problem
International Journal of Performability Engineering, Vol. 5, No. 3, April 2009, pp. 227-234. RAMS Conultant Printed in India A Multi-objective Genetic Algorithm for Reliability Optimization Problem AMAR
More informationOnline Motion Planning
RHEINISCHE FRIEDRICH-WILHELMS-UNIVERSITÄT BONN INSTITUT FÜR INFORMATIK I Elmar Langetepe Online Motion Planning MA INF 1314 Summeremeter 017 Manucript: c Elmar Langetepe CONTENTS Content 1 Labyrinth,
More informationCSE 250B Assignment 4 Report
CSE 250B Aignment 4 Report March 24, 2012 Yuncong Chen yuncong@c.ucd.edu Pengfei Chen pec008@ucd.edu Yang Liu yal060@c.ucd.edu Abtract In thi project, we implemented the recurive autoencoder (RAE) a decribed
More informationA Boyer-Moore Approach for. Two-Dimensional Matching. Jorma Tarhio. University of California. Berkeley, CA Abstract
A Boyer-Moore Approach for Two-Dimenional Matching Jorma Tarhio Computer Science Diviion Univerity of California Berkeley, CA 94720 Abtract An imple ublinear algorithm i preented for two-dimenional tring
More information