CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms


 Shanon Cook
 1 years ago
 Views:
Transcription
1 CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms Professor Henry Carter Fall 2016
2 Recap Spacetime tradeoffs allow for faster algorithms at the cost of space complexity overhead Dynamic programming achieves this by saving the result of overlapping subproblems Can be executed bottomup or topdown (using memory functions) 2
3 Digraphs Revisited Recall: directed graphs New feature: edge weights Applications: scheduling, process flow, revision history 3
4 Transitive Closure Is node b reachable from node a? Consider all pairs (a,b) Store results in an n x n matrix of {0,1} 4
5 Example Graph A B a a b b C D c d c d
6 BFS/DFS Approach The transitive closure from a to any other node can be found through graph traversal Repeating for all nodes yields the complete closure matrix How could we apply dynamic programming? 6
7 Warshall s Algorithm Construct transitive closure using a series of matrices Matrix k considers paths through G traversing nodes 1,,k If a path exists from i to k and from k to j, mark a path from i to j R 0 is the paths between each vertex with no intermediate vertices (i.e., the adjacency matrix) 7
8 Rule for Changing 0 to 1 k j k 1 i 1 0 8
9 Example Application a b c d
10 Example Application a b c d
11 Example Application a b c d
12 Example Application a b c d
13 Example Application a b c d
14 Example Application a b c d
15 Algorithm Warshall(A[1,...,n,1,...,n]) input : The adjacency matrix A with n vertices. output: The transitive closure of the digraph. R (0) A for k 1 to n do for i 1 to n do for j 1 to n do R (k) [i, j] R (k 1) [i, j] or (R (k 1) [i, k] and R (k 1) [k, j]) end end end return R (n) 15
16 Speeding Things Up More efficient inner loop Treat rows as bit strings and apply boolean operations simultaneously Combine matrices into one 16
17 AllPairs Shortest Paths Given a weighted digraph, find the shortest path from a to b Solve for all pairs (a,b) Stored in an n x n integer distance matrix 17
18 Example Graph A 2 B a 0 3 a C D b 2 0 c d 6 0 b c d
19 Floyd s Algorithm Construct the distance matrix using a series of matrices Matrix k considers paths through G that traverse any vertex numbered 1,,k If there is a path from i to k and from k to j, we compare it to the current shortest path and (possibly) update the distance R0 is the distance between each node with no intermediate vertices (i.e., the edge weight matrix) 19
20 Rule for Updating Distance k j k 3 i 2 20
21 Example Application a 0 3 b 2 0 c d
22 Example Application a 0 3 b 2 0 c d
23 Example Application a 0 3 b c d
24 Example Application a 0 3 b c d
25 Example Application a b c d
26 Example Application a b c d
27 Algorithm Floyd(W [1,...,n,1,...,n]) input : The weight matrix W. output: The distance matrix of the shortest paths lengths. D W for k 1 to n do for i 1 to n do for j 1 to n do D[i, j] min(d[i, j],d[i, k]+d[k, j]) end end end return D 27
28 Practice Apply Warshall s algorithm to the following adjacency matrix:
29 Recap Transitive closure and allpairs shortest paths problems Warshall s and Floyd s algorithms use dynamic programming to store intermediate results in a series of matrices We will revisit shortestpaths in the next chapter 29
30 Next Time... Levitin Chapter Remember, you need to read it BEFORE you come to class! Homework: 8.4: 1, 2, 3, 6, 7 30
Chapter 8 Dynamic Programming
Chapter 8 Dynamic Programming Copyright 2007 Pearson AddisonWesley. All rights reserved. Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by
More informationDesign and Analysis of Algorithms
Design and Analysis of Algorithms CSE 5311 Lecture 22 AllPairs Shortest Paths Junzhou Huang, Ph.D. Department of Computer Science and Engineering CSE5311 Design and Analysis of Algorithms 1 All Pairs
More informationChapter 8 Dynamic Programming
Chapter 8 Dynamic Programming Copyright 007 Pearson AddisonWesley. All rights reserved. Dynamic Programming Dynamic Programming is a general algorithm design technique for solving problems defined by
More informationAnalysis of Algorithms I: AllPairs Shortest Paths
Analysis of Algorithms I: AllPairs Shortest Paths Xi Chen Columbia University The AllPairs Shortest Paths Problem. Input: A directed weighted graph G = (V, E) with an edgeweight function w : E R. Output:
More informationSingle Source Shortest Paths
CMPS 00 Fall 017 Single Source Shortest Paths Carola Wenk Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk Paths in graphs Consider a digraph G = (V, E) with an edgeweight
More informationModule 1: Analyzing the Efficiency of Algorithms
Module 1: Analyzing the Efficiency of Algorithms Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University Jackson, MS 39217 Email: natarajan.meghanathan@jsums.edu Based
More informationDynamic Programming. p. 1/43
Dynamic Programming Formalized by Richard Bellman Programming relates to planning/use of tables, rather than computer programming. Solve smaller problems first, record solutions in a table; use solutions
More informationCS 410/584, Algorithm Design & Analysis, Lecture Notes 4
CS 0/58,, Biconnectivity Let G = (N,E) be a connected A node a N is an articulation point if there are v and w different from a such that every path from 0 9 8 3 5 7 6 David Maier Biconnected Component
More informationModule 1: Analyzing the Efficiency of Algorithms
Module 1: Analyzing the Efficiency of Algorithms Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 39217 Email: natarajan.meghanathan@jsums.edu What is an Algorithm?
More informationDynamic Programming. Prof. S.J. Soni
Dynamic Programming Prof. S.J. Soni Idea is Very Simple.. Introduction void calculating the same thing twice, usually by keeping a table of known results that fills up as subinstances are solved. Dynamic
More informationDetermine the size of an instance of the minimum spanning tree problem.
3.1 Algorithm complexity Consider two alternative algorithms A and B for solving a given problem. Suppose A is O(n 2 ) and B is O(2 n ), where n is the size of the instance. Let n A 0 be the size of the
More informationMathematics for Decision Making: An Introduction. Lecture 8
Mathematics for Decision Making: An Introduction Lecture 8 Matthias Köppe UC Davis, Mathematics January 29, 2009 8 1 Shortest Paths and Feasible Potentials Feasible Potentials Suppose for all v V, there
More informationLecture 7: Shortest Paths in Graphs with Negative Arc Lengths. Reading: AM&O Chapter 5
Lecture 7: Shortest Paths in Graphs with Negative Arc Lengths Reading: AM&O Chapter Label Correcting Methods Assume the network G is allowed to have negative arc lengths but no directed negativelyweighted
More informationInformatique Fondamentale IMA S8
Informatique Fondamentale IMA S8 Cours 4 : graphs, problems and algorithms on graphs, (notions of) NP completeness Laure Gonnord http://laure.gonnord.org/pro/teaching/ Laure.Gonnord@polytechlille.fr Université
More informationCHAPTER 1. Relations. 1. Relations and Their Properties. Discussion
CHAPTER 1 Relations 1. Relations and Their Properties 1.1. Definition of a Relation. Definition 1.1.1. A binary relation from a set A to a set B is a subset R A B. If (a, b) R we say a is Related to b
More informationOn the Exponent of the All Pairs Shortest Path Problem
On the Exponent of the All Pairs Shortest Path Problem Noga Alon Department of Mathematics Sackler Faculty of Exact Sciences Tel Aviv University Zvi Galil Department of Computer Science Sackler Faculty
More informationAn Introduction to the Concept of Relations
An Introduction to the Concept of Relations Think of your family tree. It consists of your brothers, sisters, cousins, second cousins, aunts uncles, parents grandparents, great grandparents etc. On this
More informationDynamic Programming. Data Structures and Algorithms Andrei Bulatov
Dynamic Programming Data Structures and Algorithms Andrei Bulatov Algorithms Dynamic Programming 182 Weighted Interval Scheduling Weighted interval scheduling problem. Instance A set of n jobs. Job j
More informationC241 Homework Assignment 7
C24 Homework Assignment 7. Prove that for all whole numbers n, n i 2 = n(n + (2n + The proof is by induction on k with hypothesis H(k i 2 = k(k + (2k + base case: To prove H(, i 2 = = = 2 3 = ( + (2 +
More informationDynamic Programming( Weighted Interval Scheduling)
Dynamic Programming( Weighted Interval Scheduling) 17 November, 2016 Dynamic Programming 1 Dynamic programming algorithms are used for optimization (for example, finding the shortest path between two points,
More informationCS 6301 PROGRAMMING AND DATA STRUCTURE II Dept of CSE/IT UNIT V GRAPHS
UNIT V GRAPHS Representation of Graphs Breadthfirst search Depthfirst search Topological sort Minimum Spanning Trees Kruskal and Prim algorithm Shortest path algorithm Dijkstra s algorithm BellmanFord
More informationAn Introduction to Algebraic Graph Theory
An Introduction to Algebraic Graph Theory Rob Beezer beezer@ups.edu Department of Mathematics and Computer Science University of Puget Sound Mathematics Department Seminar Pacific University October 9,
More informationMaximum Flow. Jie Wang. University of Massachusetts Lowell Department of Computer Science. J. Wang (UMass Lowell) Maximum Flow 1 / 27
Maximum Flow Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) Maximum Flow 1 / 27 Flow Networks A flow network is a weighted digraph G = (V, E), where the
More informationDepartment of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)
Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007) Problem 1: Specify two different predicates P (x) and
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata Theorem: Every regular language is accepted by some finite automaton. Proof: We proceed by induction on the (length of/structure of) the description of the regular
More informationDynamic Programming ACM Seminar in Algorithmics
Dynamic Programming ACM Seminar in Algorithmics Marko GenykBerezovskyj berezovs@fel.cvut.cz Tomáš Tunys tunystom@fel.cvut.cz CVUT FEL, K13133 February 27, 2013 Problem: Longest Increasing Subsequence
More informationQuantum Algorithms for Graph Traversals and Related Problems
Quantum Algorithms for Graph Traversals and Related Problems Sebastian Dörn Institut für Theoretische Informatik, Universität Ulm, 89069 Ulm, Germany sebastian.doern@uniulm.de Abstract. We study the complexity
More informationMTAT Complexity Theory October 13th14th, Lecture 6
MTAT.07.004 Complexity Theory October 13th14th, 2011 Lecturer: Peeter Laud Lecture 6 Scribe(s): Riivo Talviste 1 Logarithmic memory Turing machines working in logarithmic space become interesting when
More informationInteger Programming. Wolfram Wiesemann. December 6, 2007
Integer Programming Wolfram Wiesemann December 6, 2007 Contents of this Lecture Revision: Mixed Integer Programming Problems Branch & Bound Algorithms: The Big Picture Solving MIP s: Complete Enumeration
More informationAutomata Theory CS Complexity Theory I: Polynomial Time
Automata Theory CS411201517 Complexity Theory I: Polynomial Time David Galles Department of Computer Science University of San Francisco 170: Tractable vs. Intractable If a problem is recursive, then
More informationHomework Assignment 4 Solutions
MTAT.03.86: Advanced Methods in Algorithms Homework Assignment 4 Solutions University of Tartu 1 Probabilistic algorithm Let S = {x 1, x,, x n } be a set of binary variables of size n 1, x i {0, 1}. Consider
More informationPolynomialTime Reductions
Reductions 1 PolynomialTime Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. [von Neumann 1953, Godel
More informationMin/MaxPoly Weighting Schemes and the NL vs UL Problem
Min/MaxPoly Weighting Schemes and the NL vs UL Problem Anant Dhayal Jayalal Sarma Saurabh Sawlani May 3, 2016 Abstract For a graph G(V, E) ( V = n) and a vertex s V, a weighting scheme (w : E N) is called
More informationDoublebase scalar multiplication revisited
Doublebase scalar multiplication revisited Daniel J. Bernstein 1,2, Chitchanok Chuengsatiansup 1, and Tanja Lange 1 1 Department of Mathematics and Computer Science Technische Universiteit Eindhoven P.O.
More informationProblem set 1. (c) Is the FordFulkerson algorithm guaranteed to produce an acyclic maximum flow?
CS261, Winter 2017. Instructor: Ashish Goel. Problem set 1 Electronic submission to Gradescope due 11:59pm Thursday 2/2. Form a group of 23 students that is, submit one homework with all of your names.
More informationSequential Circuit Analysis
Sequential Circuit Analysis Last time we started talking about latches and flipflops, which are basic onebit memory units. Today we ll talk about sequential circuit analysis and design. First, we ll
More information1.10 Matrix Representation of Graphs
42 Basic Concepts of Graphs 1.10 Matrix Representation of Graphs Definitions: In this section, we introduce two kinds of matrix representations of a graph, that is, the adjacency matrix and incidence matrix
More informationMinimum cost transportation problem
Minimum cost transportation problem Complements of Operations Research Giovanni Righini Università degli Studi di Milano Definitions The minimum cost transportation problem is a special case of the minimum
More informationCSE 4502/5717 Big Data Analytics Spring 2018; Homework 1 Solutions
CSE 502/5717 Big Data Analytics Spring 2018; Homework 1 Solutions 1. Consider the following algorithm: for i := 1 to α n log e n do Pick a random j [1, n]; If a[j] = a[j + 1] or a[j] = a[j 1] then output:
More informationBoolean circuits. Lecture Definitions
Lecture 20 Boolean circuits In this lecture we will discuss the Boolean circuit model of computation and its connection to the Turing machine model. Although the Boolean circuit model is fundamentally
More informationMath 443/543 Graph Theory Notes 5: Graphs as matrices, spectral graph theory, and PageRank
Math 443/543 Graph Theory Notes 5: Graphs as matrices, spectral graph theory, and PageRank David Glickenstein November 3, 4 Representing graphs as matrices It will sometimes be useful to represent graphs
More informationECOM Discrete Mathematics
ECOM 2311 Discrete Mathematics Chapter # 3 : Algorithms Fall, 2013/2014 ECOM 2311 Discrete Mathematics  Ch.3 Dr. Musbah Shaat 1 / 41 Outline 1 Algorithms 2 The Growth of Functions 3 Complexity of Algorithms
More informationSpace is a computation resource. Unlike time it can be reused. Computational Complexity, by Fu Yuxi Space Complexity 1 / 44
Space Complexity Space is a computation resource. Unlike time it can be reused. Computational Complexity, by Fu Yuxi Space Complexity 1 / 44 Synopsis 1. Space Bounded Computation 2. Logspace Reduction
More informationTradeoffs between synchronization, communication, and work in parallel linear algebra computations
Tradeoffs between synchronization, communication, and work in parallel linear algebra computations Edgar Solomonik Erin Carson Nicholas Knight James Demmel Electrical Engineering and Computer Sciences
More informationMathematical Induction
Mathematical Induction MAT231 Transition to Higher Mathematics Fall 2014 MAT231 (Transition to Higher Math) Mathematical Induction Fall 2014 1 / 21 Outline 1 Mathematical Induction 2 Strong Mathematical
More informationIn other words, we are interested in what is happening to the y values as we get really large x values and as we get really small x values.
Polynomial functions: End behavior Solutions NAME: In this lab, we are looking at the end behavior of polynomial graphs, i.e. what is happening to the y values at the (left and right) ends of the graph.
More informationNATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours
NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: 2017 2018 Time Allowed 2 Hours INSTRUCTIONS TO STUDENTS 1. This assessment consists of Eight (8) questions and comprises
More informationExam 2. Is g onetoone? Is g onto? Why? Solution: g is not onetoone, since for c A, g(b) = g(c) = c. g is not onto, since a / g(a).
Discrete Structures: Exam 2 Solutions to Sample Questions, 1. Let A = B = {a, b, c}. Consider the relation g = {(a, b), (b, c), (c, c)}. Is g onetoone? Is g onto? Why? Solution: g is not onetoone,
More informationShortest Paths. CS 320, Fall Dr. Geri Georg, Instructor 320 ShortestPaths 3
Shortest Paths CS 320, Fall 2017 Dr. Geri Georg, Instructor georg@colostate.edu 320 ShortestPaths 3 Preliminaries Weighted, directed graphs Weight function: maps edges to real numbers Shortest path weight:
More informationIntroduction to Algorithms
Introduction to Algorithms, Lecture 5 // Introduction to Algorithms 6.46J/.4J LECTURE Shortest Paths I Properties o shortest paths Dijkstra s Correctness Analysis Breadthirst Pro. Manolis Kellis March,
More information11 The MaxProduct Algorithm
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.438 Algorithms for Inference Fall 2014 11 The MaxProduct Algorithm In the previous lecture, we introduced
More informationGraph fundamentals. Matrices associated with a graph
Graph fundamentals Matrices associated with a graph Drawing a picture of a graph is one way to represent it. Another type of representation is via a matrix. Let G be a graph with V (G) ={v 1,v,...,v n
More informationWeek 45: Binary Relations
1 Binary Relations Week 45: Binary Relations The concept of relation is common in daily life and seems intuitively clear. For instance, let X be the set of all living human females and Y the set of all
More informationALU A functional unit
ALU A functional unit that performs arithmetic operations such as ADD, SUB, MPY logical operations such as AND, OR, XOR, NOT on given data types: 8,16,32, or 64bit values A n1 A n2... A 1 A 0 B n1
More information6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3
6.841/18.405J: Advanced Complexity Wednesday, February 12, 2003 Lecture Lecture 3 Instructor: Madhu Sudan Scribe: Bobby Kleinberg 1 The language MinDNF At the end of the last lecture, we introduced the
More informationA Complexity Theory for Parallel Computation
A Complexity Theory for Parallel Computation The questions: What is the computing power of reasonable parallel computation models? Is it possible to make technology independent statements? Is it possible
More informationData Structures and Algorithms (CSCI 340)
University of Wisconsin Parkside Fall Semester 2008 Department of Computer Science Prof. Dr. F. Seutter Data Structures and Algorithms (CSCI 340) Homework Assignments The numbering of the problems refers
More informationDirected Graphs (Digraphs) and Graphs
Directed Graphs (Digraphs) and Graphs Definitions Graph ADT Traversal algorithms DFS Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 74 1 Basic definitions 2 Digraph Representation
More informationDesigning Information Devices and Systems I Fall 2017 Homework 3
EECS 6A Designing Information Devices and Systems I Fall 07 Homework 3 This homework is due September 8, 07, at 3:9. Selfgrades are due September, 07, at 3:9. Submission Format Your homework submission
More informationRouting Algorithms. CS60002: Distributed Systems. Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur
Routing Algorithms CS60002: Distributed Systems Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Main Features Table Computation The routing tables must be computed
More informationAAA616: Program Analysis. Lecture 7 The Octagon Abstract Domain
AAA616: Program Analysis Lecture 7 The Octagon Abstract Domain Hakjoo Oh 2016 Fall Hakjoo Oh AAA616 2016 Fall, Lecture 7 November 3, 2016 1 / 30 Reference Antoine Miné. The Octagon Abstract Domain. HigherOrder
More information6.045 Final Exam Solutions
6.045J/18.400J: Automata, Computability and Complexity Prof. Nancy Lynch, Nati Srebro 6.045 Final Exam Solutions May 18, 2004 Susan Hohenberger Name: Please write your name on each page. This exam is open
More informationDynamic Programming: Matrix chain multiplication (CLRS 15.2)
Dynamic Programming: Matrix chain multiplication (CLRS.) The problem Given a sequence of matrices A, A, A,..., A n, find the best way (using the minimal number of multiplications) to compute their product.
More information8. INTRACTABILITY I. Lecture slides by Kevin Wayne Copyright 2005 PearsonAddison Wesley. Last updated on 2/6/18 2:16 AM
8. INTRACTABILITY I polytime reductions packing and covering problems constraint satisfaction problems sequencing problems partitioning problems graph coloring numerical problems Lecture slides by Kevin
More informationFurther discussion of Turing machines
Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turingrecognizable languages that were not mentioned in previous lectures. In particular, we will
More informationMath 98  Introduction to MATLAB Programming. Spring Lecture 3
Reminders Instructor: Chris Policastro Class Website: https://math.berkeley.edu/~cpoli/math98/fall2016.html Assignment Submission: https://bcourses.berkeley.edu Homework 2 1 Due September 8th by 11:59pm
More informationWeighted Activity Selection
Weighted Activity Selection Problem This problem is a generalization of the activity selection problem that we solvd with a greedy algorithm. Given a set of activities A = {[l, r ], [l, r ],..., [l n,
More informationLecture 9: SVD, Low Rank Approximation
CSE 521: Design and Analysis of Algorithms I Spring 2016 Lecture 9: SVD, Low Rank Approimation Lecturer: Shayan Oveis Gharan April 25th Scribe: Koosha Khalvati Disclaimer: hese notes have not been subjected
More informationPowerful tool for sampling from complicated distributions. Many use Markov chains to model events that arise in nature.
Markov Chains Markov chains: 2SAT: Powerful tool for sampling from complicated distributions rely only on local moves to explore state space. Many use Markov chains to model events that arise in nature.
More informationCS 350 Algorithms and Complexity
1 CS 350 Algorithms and Complexity Fall 2015 Lecture 15: Limitations of Algorithmic Power Introduction to complexity theory Andrew P. Black Department of Computer Science Portland State University Lower
More informationSingle Source Shortest Paths
CMPS 00 Fall 015 Single Source Shortest Paths Carola Wenk Slides courtesy of Charles Leiserson with changes and additions by Carola Wenk 1 Paths in graphs Consider a digraph G = (V, E) with an edgeweight
More informationLecture 3: Special Matrices
Lecture 3: Special Matrices Feedback of assignment1 Random matrices The magic matrix commend magic() doesn t give us random matrix. Random matrix means we will get different matrices each time when we
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION IDENTIFYING NONREGULAR LANGUAGES PUMPING LEMMA Carnegie Mellon University in Qatar (CARNEGIE MELLON UNIVERSITY IN QATAR) SLIDES FOR 15453 LECTURE 5 SPRING 2011
More informationName: Chapter 7: Exponents and Polynomials
Name: Chapter 7: Exponents and Polynomials 71: Integer Exponents Objectives: Evaluate expressions containing zero and integer exponents. Simplify expressions containing zero and integer exponents. You
More informationU.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 9/6/2004. Notes for Lecture 3
U.C. Berkeley CS278: Computational Complexity Handout N3 Professor Luca Trevisan 9/6/2004 Notes for Lecture 3 Revised 10/6/04 1 SpaceBounded Complexity Classes A machine solves a problem using space s(
More informationTesting Newton s 2nd Law
Testing Newton s 2nd Law Goal: To test Newton s 2nd law (ΣF = ma) and investigate the relationship between force, mass, and acceleration for objects. Lab Preparation To prepare for this lab you will want
More informationMath Homework 5 Solutions
Math 45  Homework 5 Solutions. Exercise.3., textbook. The stochastic matrix for the gambler problem has the following form, where the states are ordered as (,, 4, 6, 8, ): P = The corresponding diagram
More informationFinish KComplexity, Start Time Complexity
6.045 Finish KComplexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts
More informationOptimized LUdecomposition with Full Pivot for Small Batched Matrices S3069
Optimized LUdecomposition with Full Pivot for Small Batched Matrices S369 Ian Wainwright High Performance Consulting Sweden ian.wainwright@hpcsweden.se Based on work for GTC 212: 1x speedup vs multithreaded
More informationRandomized Algorithms III Min Cut
Chapter 11 Randomized Algorithms III Min Cut CS 57: Algorithms, Fall 01 October 1, 01 11.1 Min Cut 11.1.1 Problem Definition 11. Min cut 11..0.1 Min cut G = V, E): undirected graph, n vertices, m edges.
More informationGeneric ǫremoval and Input ǫnormalization Algorithms for Weighted Transducers
International Journal of Foundations of Computer Science c World Scientific Publishing Company Generic ǫremoval and Input ǫnormalization Algorithms for Weighted Transducers Mehryar Mohri mohri@research.att.com
More informationComplexity Theory of PolynomialTime Problems
Complexity Theory of PolynomialTime Problems Lecture 8: (Boolean) Matrix Multiplication Karl Bringmann Recall: Boolean Matrix Multiplication given n n matrices A, B with entries in {0,1} compute matrix
More informationVIII. NPcompleteness
VIII. NPcompleteness 1 / 15 NPCompleteness Overview 1. Introduction 2. P and NP 3. NPcomplete (NPC): formal definition 4. How to prove a problem is NPC 5. How to solve a NPC problem: approximate algorithms
More informationRandom Redundant SoftIn SoftOut Decoding of Linear Block Codes
Random Redundant SoftIn SoftOut Decoding of Linear Block Codes Thomas R. Halford and Keith M. Chugg Communication Sciences Institute University of Southern California Los Angeles, CA 900892565 Abstract
More informationLecture 23 : Nondeterministic Finite Automata DRAFT Connection between Regular Expressions and Finite Automata
CS/Math 24: Introduction to Discrete Mathematics 4/2/2 Lecture 23 : Nondeterministic Finite Automata Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we designed finite state automata
More informationCSE 202 Homework 4 Matthias Springer, A
CSE 202 Homework 4 Matthias Springer, A99500782 1 Problem 2 Basic Idea PERFECT ASSEMBLY N P: a permutation P of s i S is a certificate that can be checked in polynomial time by ensuring that P = S, and
More informationParallel Scientific Computing
IV1 Parallel Scientific Computing Matrixvector multiplication. Matrixmatrix multiplication. Direct method for solving a linear equation. Gaussian Elimination. Iterative method for solving a linear equation.
More informationAlgorithm Efficiency. Algorithmic Thinking Luay Nakhleh Department of Computer Science Rice University
Algorithm Efficiency Algorithmic Thinking Luay Nakhleh Department of Computer Science Rice University 1 All Correct Algorithms Are Not Created Equal When presented with a set of correct algorithms for
More information/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17
601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Dynamic Programming II Date: 10/12/17 12.1 Introduction Today we re going to do a couple more examples of dynamic programming. While
More informationCOMP 382. Unit 10: NPCompleteness
COMP 382 Unit 10: NPCompleteness Time complexity 1 log n n n 2 n 3 2 n n n Space complexity 1 log n n n 2 n 3 2 n n n Complexity theory Focus on decidability (yes/no) problems What is P? Deterministic,
More informationKleene Algebras and Algebraic Path Problems
Kleene Algebras and Algebraic Path Problems Davis Foote May 8, 015 1 Regular Languages 1.1 Deterministic Finite Automata A deterministic finite automaton (DFA) is a model of computation that can simulate
More informationFundamental Algorithms for System Modeling, Analysis, and Optimization
Fundamental Algorithms for System Modeling, Analysis, and Optimization Edward A. Lee, Jaijeet Roychowdhury, Sanjit A. Seshia UC Berkeley EECS 144/244 Fall 2010 Copyright 2010, E. A. Lee, J. Roydhowdhury,
More informationLecture 13 Spectral Graph Algorithms
COMS 9953: Advanced Algorithms March 6, 7 Lecture 3 Spectral Graph Algorithms Instructor: Alex Andoni Scribe: Srikar Varadaraj Introduction Today s topics: Finish proof from last lecture Example of random
More informationJust the Factors, Ma am HAROLD B. REITER.
Just the Factors, Ma am HAROLD B REITER UNIVERSITY OF NORTH CAROLINA CHARLOTTE http://wwwmathunccedu/~hbreiter The purpose of this note is to find and study a method for determining and counting all the
More informationIntroduction. How can we say that one algorithm performs better than another? Quantify the resources required to execute:
Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Section 2.3 of Rosen cse235@cse.unl.edu Introduction How can we say that one algorithm
More informationGRAPH ALGORITHMS Week 3 (1621 October 2017)
GRAPH ALGORITHMS Week 3 (1621 October 2017) C. Croitoru croitoru@info.uaic.ro FII October 15, 2017 1 / 63 OUTLINE Graph Theory Vocabulary 1 Definition of a Graph 2 Variations in the Definition of a Graph
More informationAn Õ m 2 n Randomized Algorithm to compute a Minimum Cycle Basis of a Directed Graph
An Õ m 2 n Randomized Algorithm to compute a Minimum Cycle Basis of a Directed Graph T Kavitha Indian Institute of Science Bangalore, India kavitha@csaiiscernetin Abstract We consider the problem of computing
More informationError Detection and Correction: Hamming Code; ReedMuller Code
Error Detection and Correction: Hamming Code; ReedMuller Code Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Hamming Code: Motivation
More informationLecture 3: graph theory
CONTENTS 1 BASIC NOTIONS Lecture 3: graph theory Sonia Martínez October 15, 2014 Abstract The notion of graph is at the core of cooperative control. Essentially, it allows us to model the interaction topology
More informationQuiz 1 Solutions. (a) f 1 (n) = 8 n, f 2 (n) = , f 3 (n) = ( 3) lg n. f 2 (n), f 1 (n), f 3 (n) Solution: (b)
Introduction to Algorithms October 14, 2009 Massachusetts Institute of Technology 6.006 Spring 2009 Professors Srini Devadas and Constantinos (Costis) Daskalakis Quiz 1 Solutions Quiz 1 Solutions Problem
More information