Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming

Size: px
Start display at page:

Download "Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming"

Transcription

1 Höllische Programmiersprachen Hauptseminar im Wintersemester 2014/2015 Determinism and reliability in the context of parallel programming Raphael Arias Technische Universität München Abstract Parallel computation is an essential concept in modern programming. As microprocessor clock frequencies have almost ceased to become faster, currently performance improvements are made mostly by parallelizing algorithms or programs to run on multiple cores, processors, or machines. Common parallelization models provide means such as semaphores or monitors to synchronize different parallel threads or processes of the same application, but parallel programming using these models is extremely easy to get wrong, and subtle errors are bound to emerge. In a deterministic-by-construction model of parallel programming, non-determinisms caused by scheduling differences or race conditions are guaranteed to not exist. However, previous models using singleassignment variables limit the variety of programs that can be written. This paper describes a recent approach of multiple-assignment variables that use so-called monotonic writes and threshold reads. 1 Introduction Parallel computation is an essential concept in modern programming. As microprocessor clock frequencies have almost ceased to become faster, currently performance improvements are made mostly by parallelizing algorithms or programs to run on multiple cores, processors, or machines. Common parallelization models provide means such as semaphores or monitors to synchronize different parallel threads or processes of the same application, but parallel programming using these models is extremely easy to get wrong, and subtle errors are bound to emerge. This difficulty provides a strong motivation for deterministic-by-construction models. In these models, valid programs are deterministic and thus guaranteed to not produce race conditions or dead-locks, which are otherwise very common. 1

2 A common model for deterministic-by-construction parallelism is that of I- variables (IVars) or I-structures, as proposed by Arvind et al. [1]. I-structures are single-assignment variables, that serve to communicate between different parallel processes or threads and have two fundamental states: uninitialized and initialized. While uninitialized, I-structures will block when being read, until a different process fills them with content. Once initialized, they can never be assigned a new value again. While I-structures are doubtlessly useful, they have a rather narrow application range and some algorithms or programs cannot make use of them. For instance, Kuper and Newton present a graph problem [3] that cannot be efficiently solved using I-structures. They introduce a more generalized model of LVars, which are lattice-based data structures. In this model, multiple assignments to the same variable are allowed, as long as the variable changes monotonically with respect to a specific lattice. Throughout the remainder of this paper, LVars will be presented in further detail. For this, some basic concepts will be introduced first. Section 2 will elaborate on I-structures, section 3 defines the concept of a lattice. In section 4, LVars will be examined in more detail. Section 4.3 provides some examples of commonly used data structures and how they fit into the LVar paradigm. Finally, section 5 summarizes the most important points and some conclusions are drawn. 2 A closer look at I-structures As was mentioned above, I-structures or IVars are single-assignment variables, meaning they are assigned a value only once and can thereafter never be changed. When an uninitialized IVar is accessed to be read, it blocks the reading process or thread until another process or thread initializes th IVar. This prevents that different executions of the same program lead to different values being read if processes or threads access the variables in varying order. An I- structure will always have the same value, independent of time or thread/process of access. I-structures are useful to model parallel computations where intermediary results can be shared between threads or processes, but are never changed. A simple example is that of a matrix computation, where each value in the matrix depends on the elements north, northwest and west of it [1]. Arvind et al. call this a wavefront as an analogy to the way the computation progresses over the matrix, as can be seen in fig. 1. The computation instructions are: A[1, j] = 1 A[i, 1] = 1 A[i, j] = A[i 1, j] + A[i 1, j 1] + A[i, j 1] 2

3 Figure 1: An illustration that shows the wavefront characteristic of the computation [1]. This scenario is perfectly suited for IVars, as each entry in the matrix is computed exactly once and will never need to be changed again. In contrast, each entry will be needed for various computations of the elements east, southeast and south of it. The order in which it is accessed does not matter and if it is accessed for reading before being populated with a value, the read will block. In the following section, a case where such a direct correspondence of IVar concept and algorithm is not possible will be examined. This will serve as a motivation for the generalization to LVars. 2.1 An imperfect scenario for IVars This scenario is presented by Kuper and Newton [3] and shows some limitations of the IVar model. The concrete problem they examine is a graph algorithm for finding connected components in directed graphs. Specifically, they phrase the problem as follows [3]: In a directed graph, find the connected component containing a vertex v, and compute a (possibly expensive) function f over all vertices in that component, making the set of results available asynchronously to other computations. Note that the arguably most important requirement is not specifically mentioned in that problem statement: computation needs to be deterministic. According to the authors most existing parallel approaches to the problem use a nondeterministic traversal of the graph. This does not really negatively influence the outcome of these approaches (that is still deterministic), but it is not an admissible solution when working in a deterministic-by-construction model. It is unclear how I-structures could be used to help solve this problem. They are not useful for accumulating intermediate results or to mark already visited nodes [3]. 3

4 The problem itself can be solved without too much difficulty, when ignoring the requirement of asynchronously making the set of results accessible to others. When this requirement is taken into account, purely functional (and thus deterministic) attempts to solve the problem don t provide acceptable solutions. LVars present an elegant solution to this problem. Before they are introduced in section 4, some basic terminology and definitions regarding lattices will be presented. 3 Lattices To properly understand the inner workings of LVars it is necessary to examine lattices first. In this section we give a introduction to this concept. There are two ways to define lattices and both of them are used, depending on the context. Lattices can be defined in an algebraic and in a relational way. Both definitions can be proven equivalent [2]. Here, we start with the relational characterization of lattices, as it seems slightly more intuitive. 3.1 A relational characterization of lattices When defining lattices according to their relational characteristics, the relation observed is always a partial order of some sorts Definition: Semilattice A join-semilattice is a set with a partial order, such that every subset of elements (in particular any subset of size two) have a least upper bound, or join, also represented by. In contrast, a meet-semilattice is a set with a partial order, such that every subset of elements have a greatest lower bound, or meet, also sometimes represented as Definition: Lattice A set with a partial order that makes it both a join- and a meet-semilattice (each subset of elements have both a least upper and greatest lower bound) is called a lattice. 3.2 An algebraic characterization of lattices Here it is assumed that the reader has some preliminary knowledge of algebraic terminology. We again define semilattices first, as lattices are easiest defined along the lines of semilattices. 4

5 3.2.1 Definition: Semilattice A semilattice is an algebraic structure E, (consisting of a set E and an operation ) in which the binary operation is associative (meaning a (b c) = (a b) c, for all a, b, c E), commutative (a b = b a), for all a, b E), and idempotent (a a = a, for all a E). Depending on the choice of operation and the partial order it induces on the set, one can speak of join- or meet-semilattices. For instance, substituting for, where induces the partial order such that a b a b = b, we obtain a join-semilattice Definition: Lattice According to the algebraic definition, a lattice is an algebraic structure E,,, such that E, is a join-semilattice and E, is a meet-semilattice. 3.3 Boundedness of semilattices A semilattice E, is called bounded if E contains the identity element 1 such that a E.a 1 = a. Intuitively this means that a bounded join-semilattice contains a minimal and a bounded meet-semilattice contains a maximal element. This notion is important, since LVars are defined on top of bounded joinsemilattices, as will be discussed in section Some intuitive examples In this section, some intuitive examples of lattice-like structures will be presented. 1. Boolean lattice B,,. Note that and here refer to the actual logical operators. Obviously the operations fulfill the (semi)lattice axioms defined in section 3.2: both and are associative, commutative and idempotent. The semilattices are also bounded; Let B = {T, F }; then the join-semilattice B, has a minimal element F such that b B. b F = b. This holds dually for B, and its maximal element T. 2. Power set lattice 2 X,,. 2 X denotes the power set of X and and are set union and intersection, respectively. As above, the axioms hold trivially and the minimal and maximal elements can be easily identified as and X, with respect to the set inclusion as ordering. In this example, the relational definition and the correspondence with the algebraic one 5

6 shines through quite clearly. For instance, let X = {1, 2, 3}. Then, in 2 X,, the least upper bound with respect to the -relation of the elements {1} and {3} is obtained by taking the union of both. 4 The LVar, a lattice-based data structure So far this paper has introduced the basis for LVars by first examining I- structures in section 2 and then lattices in section 3. In this section LVars will be formally defined and explained. Kuper and Newton define λ LVar, a parallel call-by-value λ-calculus extended by a store and put- and get-operations. This store is shared among threads or processes and can be written to or read from using the put- and get-operations, respectively. As the store only contains LVars, the determinism is preserved. LVars are Kuper and Newton s generalization of IVars, with the important difference that LVars can be overwritten multiple times, as long as the value grows monotonically with respect to a specific ordering, that is, the value written to the LVar and the current value of the LVar have a valid least upper bound. 4.1 LVars and lattices The λ LVar definition actually depends on D, a bounded join-semilattice augmented with a greatest element (recall that bounded join-semilattices are only guaranteed to have a minimal, not a maximal element). The axioms for the semilattice D are defined by the authors as follows: D has a least element, corresponding to the LVar s empty, uninitialized state. D has a greatest element, corresponding to an error state, when conflicting updates to an LVar are made. Conflicting updates means that a value is being written to an initialized LVars which is incompatible with its current value. There exists a partial ordering for D such that d D. d There is a join or least upper bound for every pair of elements in D. Two processes or threads that independently compute an update for an LVar will cause it to contain the least upper bound or join of the two updates. Using the least upper bound guarantees that updates put) to an LVar always have a deterministic outcome, regardless of the order they are performed in. This becomes obvious, if recalling that not only every pair of states has a least upper bound, but every finite subset of states has one. Thus performing all the updates in an arbitrary order will lead to exactly this least upper bound. Now that updates have been discussed, the mechanism for accessing LVars for reading should be examined in more detail. 6

7 Figure 2: A visualization of some lattices. (a) is the visualization of the lattice corresponding to an LVar that simulates IVar behavior. (b) corresponds to the visualization of pairs of binary-valued IVars. Note the getsnd call (basically a wrapper for get on the second tuple component) will block until the state of the LVar crosses the tripwire (so until the second component is assigned). (c) represents a lattice corresponding to a natural-number-valued LVar [3]. 4.2 Threshold reads LVars use a concept called threshold reads for accessing the value of an LVar. This is probably the only thing that requires some getting used to. Recall that IVars, the single-assignment variables, block when being read, as long as they have not yet been initialized. With LVars, there is a similar blocking mechanism. However, LVars might need to block on different initialized states, as well, depending on the actual content of the LVar and the form of the content the developer is interested in. The developers of LVars solve this using threshold reads. The programmer of the LVar structure specifies a threshold set Q, corresponding to a nonempty, pairwise incompatible (meaning that the least upper bound for any pair of elements in the set is ) subset of D. This set contains thresholds for reading the LVar. Performing a get operation on an LVar will block, as long as the value of the LVar is below (with respect to the lattice) every element in Q. Once it is at or above such an element d, get unblocks and returns that {d }. Note that this means that get always returns an element of the threshold set. 4.3 Commonly used data structures examined in the context of LVars In this section, we will examine some commonly used data structures and point out how they can function as LVars. One of the simplest such structures is a natural-number-valued IVar. Recall that an IVar only allows the assignment of one value, thus any update (put) to another value should be considered conflicting and should result in the error 7

8 state. The semilattice D must then look as follows: D = {, } N,, where d D. d and d D. d d. It is also possible to phrase pairs of such IVars as LVars. This means that at the beginning both elements or the pair as a whole are uninitialized or. Then, either component can be updated independently. A repeated update of the same component, however, will lead to an error state. The semilattice must look as follows: D = {, } N 2,, where (a, b), (c, d) D. (a, b) (c, d) (a = c b = d) (b = d a = c) The approach for tuples can be generalized to arbitrary-size arrays, and, consequently to arbitrary matrices. Another very intuitive structure are sets. If an update to a set-valued LVar is made, the store will take the least upper bound or join of the current state and the update. Recall from the example in section 3.4 that lattices on sets work well with set union as join operation. The ordering is the usual set inclusion. Thus the semilattice for an LVar of Integer sets looks like this: D = {, } 2 Z,. Note that, other than in the IVar case above, there are no conflicting updates to an LVar of this type. The state is unreachable, as all elements have a least upper bound in 2 Z. 5 Conclusion This paper presented a introduction into deterministic parallel programming. After its importance was motivated, the ideas and features of LVars were discussed. In order to achieve that, some basic concepts of lattices were introduced, and the idea of IVars (of which LVars are a generalization) was presented. Then, some examples were examined, to show the practical applicability of LVars to very common data structures. It is quite clear that LVars are a very interesting concept. They seem to be of more use than IVars or I-structures in general. The monotonic writes are a very useful addition. It remains to be seen, whether LVars will find great acceptance throughout the developer community. That will obviously also depend on whether the λ LVar calculus will be made available to developers in other programming languages. 8

9 References [1] Arvind, Rishiyur S. Nikhil, and Keshav K. Pingali. I-structures: Data structures for parallel computing. ACM Trans. Program. Lang. Syst., 11(4): , October [2] Rudolf Berghammer. Ordnungen, Verbände und Relationen mit Anwendungen. Springer Vieweg, Wiesbaden, [3] Lindsey Kuper and Ryan R. Newton. Lvars: Lattice-based data structures for deterministic parallelism. In Proceedings of the 2Nd ACM SIGPLAN Workshop on Functional High-performance Computing, FHPC 13, pages 71 84, New York, NY, USA, ACM. 9

LVars: Lattice-based Data Structures for Deterministic Parallelism. FHPC 13, Boston, MA, USA September 23, 2013

LVars: Lattice-based Data Structures for Deterministic Parallelism. FHPC 13, Boston, MA, USA September 23, 2013 LVars: Lattice-based Data Structures for Deterministic Parallelism Lindsey Kuper and Ryan Newton Indiana University FHPC 13, Boston, MA, USA September 23, 2013 What does this program evaluate to? p = do

More information

The Encoding Complexity of Network Coding

The Encoding Complexity of Network Coding The Encoding Complexity of Network Coding Michael Langberg Alexander Sprintson Jehoshua Bruck California Institute of Technology Email: mikel,spalex,bruck @caltech.edu Abstract In the multicast network

More information

(Pre-)Algebras for Linguistics

(Pre-)Algebras for Linguistics 2. Introducing Preordered Algebras Linguistics 680: Formal Foundations Autumn 2010 Algebras A (one-sorted) algebra is a set with one or more operations (where special elements are thought of as nullary

More information

Lattice Tutorial Version 1.0

Lattice Tutorial Version 1.0 Lattice Tutorial Version 1.0 Nenad Jovanovic Secure Systems Lab www.seclab.tuwien.ac.at enji@infosys.tuwien.ac.at November 3, 2005 1 Introduction This tutorial gives an introduction to a number of concepts

More information

Byzantine Consensus in Directed Graphs

Byzantine Consensus in Directed Graphs Byzantine Consensus in Directed Graphs Lewis Tseng 1,3, and Nitin Vaidya 2,3 1 Department of Computer Science, 2 Department of Electrical and Computer Engineering, and 3 Coordinated Science Laboratory

More information

A Concurrency Control for Transactional Mobile Agents

A Concurrency Control for Transactional Mobile Agents A Concurrency Control for Transactional Mobile Agents Jeong-Joon Yoo and Dong-Ik Lee Department of Information and Communications, Kwang-Ju Institute of Science and Technology (K-JIST) Puk-Gu Oryong-Dong

More information

LVars: Lattice-based Data Structures for Deterministic Parallelism

LVars: Lattice-based Data Structures for Deterministic Parallelism LVars: Lattice-based Data Structures for Deterministic Parallelism Lindsey Kuper Ryan R. Newton Indiana University {lkuper, rrnewton}@cs.indiana.edu Abstract Programs written using a deterministic-by-construction

More information

1 Linear programming relaxation

1 Linear programming relaxation Cornell University, Fall 2010 CS 6820: Algorithms Lecture notes: Primal-dual min-cost bipartite matching August 27 30 1 Linear programming relaxation Recall that in the bipartite minimum-cost perfect matching

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Dataflow Lecture: SDF, Kahn Process Networks Stavros Tripakis University of California, Berkeley Stavros Tripakis: EECS

More information

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret

Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely

More information

Joint Entity Resolution

Joint Entity Resolution Joint Entity Resolution Steven Euijong Whang, Hector Garcia-Molina Computer Science Department, Stanford University 353 Serra Mall, Stanford, CA 94305, USA {swhang, hector}@cs.stanford.edu No Institute

More information

XI International PhD Workshop OWD 2009, October Fuzzy Sets as Metasets

XI International PhD Workshop OWD 2009, October Fuzzy Sets as Metasets XI International PhD Workshop OWD 2009, 17 20 October 2009 Fuzzy Sets as Metasets Bartłomiej Starosta, Polsko-Japońska WyŜsza Szkoła Technik Komputerowych (24.01.2008, prof. Witold Kosiński, Polsko-Japońska

More information

6. Relational Algebra (Part II)

6. Relational Algebra (Part II) 6. Relational Algebra (Part II) 6.1. Introduction In the previous chapter, we introduced relational algebra as a fundamental model of relational database manipulation. In particular, we defined and discussed

More information

Monotone Paths in Geometric Triangulations

Monotone Paths in Geometric Triangulations Monotone Paths in Geometric Triangulations Adrian Dumitrescu Ritankar Mandal Csaba D. Tóth November 19, 2017 Abstract (I) We prove that the (maximum) number of monotone paths in a geometric triangulation

More information

The Structure of Bull-Free Perfect Graphs

The Structure of Bull-Free Perfect Graphs The Structure of Bull-Free Perfect Graphs Maria Chudnovsky and Irena Penev Columbia University, New York, NY 10027 USA May 18, 2012 Abstract The bull is a graph consisting of a triangle and two vertex-disjoint

More information

Consistency and Set Intersection

Consistency and Set Intersection Consistency and Set Intersection Yuanlin Zhang and Roland H.C. Yap National University of Singapore 3 Science Drive 2, Singapore {zhangyl,ryap}@comp.nus.edu.sg Abstract We propose a new framework to study

More information

A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY

A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY A GRAPH FROM THE VIEWPOINT OF ALGEBRAIC TOPOLOGY KARL L. STRATOS Abstract. The conventional method of describing a graph as a pair (V, E), where V and E repectively denote the sets of vertices and edges,

More information

The Geodesic Integral on Medial Graphs

The Geodesic Integral on Medial Graphs The Geodesic Integral on Medial Graphs Kolya Malkin August 013 We define the geodesic integral defined on paths in the duals of medial graphs on surfaces and use it to study lens elimination and connection

More information

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs Advanced Operations Research Techniques IE316 Quiz 1 Review Dr. Ted Ralphs IE316 Quiz 1 Review 1 Reading for The Quiz Material covered in detail in lecture. 1.1, 1.4, 2.1-2.6, 3.1-3.3, 3.5 Background material

More information

A NOTE ON THE NUMBER OF DOMINATING SETS OF A GRAPH

A NOTE ON THE NUMBER OF DOMINATING SETS OF A GRAPH A NOTE ON THE NUMBER OF DOMINATING SETS OF A GRAPH STEPHAN WAGNER Abstract. In a recent article by Bród and Skupień, sharp upper and lower bounds for the number of dominating sets in a tree were determined.

More information

Linearizable Iterators

Linearizable Iterators Linearizable Iterators Supervised by Maurice Herlihy Abstract Petrank et. al. [5] provide a construction of lock-free, linearizable iterators for lock-free linked lists. We consider the problem of extending

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16 600.463 Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16 11.1 Introduction Dynamic programming can be very confusing until you ve used it a

More information

1 Non greedy algorithms (which we should have covered

1 Non greedy algorithms (which we should have covered 1 Non greedy algorithms (which we should have covered earlier) 1.1 Floyd Warshall algorithm This algorithm solves the all-pairs shortest paths problem, which is a problem where we want to find the shortest

More information

Core Membership Computation for Succinct Representations of Coalitional Games

Core Membership Computation for Succinct Representations of Coalitional Games Core Membership Computation for Succinct Representations of Coalitional Games Xi Alice Gao May 11, 2009 Abstract In this paper, I compare and contrast two formal results on the computational complexity

More information

The Geometry of Carpentry and Joinery

The Geometry of Carpentry and Joinery The Geometry of Carpentry and Joinery Pat Morin and Jason Morrison School of Computer Science, Carleton University, 115 Colonel By Drive Ottawa, Ontario, CANADA K1S 5B6 Abstract In this paper we propose

More information

Lecture 5: The Halting Problem. Michael Beeson

Lecture 5: The Halting Problem. Michael Beeson Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it

More information

Lecture Notes on Liveness Analysis

Lecture Notes on Liveness Analysis Lecture Notes on Liveness Analysis 15-411: Compiler Design Frank Pfenning André Platzer Lecture 4 1 Introduction We will see different kinds of program analyses in the course, most of them for the purpose

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

CSC Discrete Math I, Spring Sets

CSC Discrete Math I, Spring Sets CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its

More information

Concurrency. Glossary

Concurrency. Glossary Glossary atomic Executing as a single unit or block of computation. An atomic section of code is said to have transactional semantics. No intermediate state for the code unit is visible outside of the

More information

MA651 Topology. Lecture 4. Topological spaces 2

MA651 Topology. Lecture 4. Topological spaces 2 MA651 Topology. Lecture 4. Topological spaces 2 This text is based on the following books: Linear Algebra and Analysis by Marc Zamansky Topology by James Dugundgji Fundamental concepts of topology by Peter

More information

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np Chapter 1: Introduction Introduction Purpose of the Theory of Computation: Develop formal mathematical models of computation that reflect real-world computers. Nowadays, the Theory of Computation can be

More information

Throughout this course, we use the terms vertex and node interchangeably.

Throughout this course, we use the terms vertex and node interchangeably. Chapter Vertex Coloring. Introduction Vertex coloring is an infamous graph theory problem. It is also a useful toy example to see the style of this course already in the first lecture. Vertex coloring

More information

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems Some Applications of Graph Bandwidth to Constraint Satisfaction Problems Ramin Zabih Computer Science Department Stanford University Stanford, California 94305 Abstract Bandwidth is a fundamental concept

More information

Abstract algorithms. Claus Diem. September 17, 2014

Abstract algorithms. Claus Diem. September 17, 2014 Abstract algorithms Claus Diem September 17, 2014 Abstract We give a framework to argue formally about algorithms with arbitrary data types. The framework is based on category theory, and types are based

More information

Optimization I : Brute force and Greedy strategy

Optimization I : Brute force and Greedy strategy Chapter 3 Optimization I : Brute force and Greedy strategy A generic definition of an optimization problem involves a set of constraints that defines a subset in some underlying space (like the Euclidean

More information

arxiv: v5 [cs.dm] 9 May 2016

arxiv: v5 [cs.dm] 9 May 2016 Tree spanners of bounded degree graphs Ioannis Papoutsakis Kastelli Pediados, Heraklion, Crete, reece, 700 06 October 21, 2018 arxiv:1503.06822v5 [cs.dm] 9 May 2016 Abstract A tree t-spanner of a graph

More information

Topology - I. Michael Shulman WOMP 2004

Topology - I. Michael Shulman WOMP 2004 Topology - I Michael Shulman WOMP 2004 1 Topological Spaces There are many different ways to define a topological space; the most common one is as follows: Definition 1.1 A topological space (often just

More information

3 No-Wait Job Shops with Variable Processing Times

3 No-Wait Job Shops with Variable Processing Times 3 No-Wait Job Shops with Variable Processing Times In this chapter we assume that, on top of the classical no-wait job shop setting, we are given a set of processing times for each operation. We may select

More information

EULER S FORMULA AND THE FIVE COLOR THEOREM

EULER S FORMULA AND THE FIVE COLOR THEOREM EULER S FORMULA AND THE FIVE COLOR THEOREM MIN JAE SONG Abstract. In this paper, we will define the necessary concepts to formulate map coloring problems. Then, we will prove Euler s formula and apply

More information

However, this is not always true! For example, this fails if both A and B are closed and unbounded (find an example).

However, this is not always true! For example, this fails if both A and B are closed and unbounded (find an example). 98 CHAPTER 3. PROPERTIES OF CONVEX SETS: A GLIMPSE 3.2 Separation Theorems It seems intuitively rather obvious that if A and B are two nonempty disjoint convex sets in A 2, then there is a line, H, separating

More information

Dynamic Programming Algorithms

Dynamic Programming Algorithms Based on the notes for the U of Toronto course CSC 364 Dynamic Programming Algorithms The setting is as follows. We wish to find a solution to a given problem which optimizes some quantity Q of interest;

More information

What is a Graphon? Daniel Glasscock, June 2013

What is a Graphon? Daniel Glasscock, June 2013 What is a Graphon? Daniel Glasscock, June 2013 These notes complement a talk given for the What is...? seminar at the Ohio State University. The block images in this PDF should be sharp; if they appear

More information

Monitoring Interfaces for Faults

Monitoring Interfaces for Faults Monitoring Interfaces for Faults Aleksandr Zaks RV 05 - Fifth Workshop on Runtime Verification Joint work with: Amir Pnueli, Lenore Zuck Motivation Motivation Consider two components interacting with each

More information

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1

Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 CME 305: Discrete Mathematics and Algorithms Instructor: Professor Aaron Sidford (sidford@stanford.edu) January 11, 2018 Lecture 2 - Graph Theory Fundamentals - Reachability and Exploration 1 In this lecture

More information

Characterization of Boolean Topological Logics

Characterization of Boolean Topological Logics Characterization of Boolean Topological Logics Short Form: Boolean Topological Logics Anthony R. Fressola Denison University Granville, OH 43023 University of Illinois Urbana-Champaign, IL USA 61801-61802

More information

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic 3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

Concurrent Reading and Writing of Clocks

Concurrent Reading and Writing of Clocks Concurrent Reading and Writing of Clocks LESLIE LAMPORT Digital Equipment Corporation As an exercise in synchronization without mutual exclusion, algorithms are developed to implement both a monotonic

More information

An Evolution of Mathematical Tools

An Evolution of Mathematical Tools An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.

More information

Vertical decomposition of a lattice using clique separators

Vertical decomposition of a lattice using clique separators Vertical decomposition of a lattice using clique separators Anne Berry, Romain Pogorelcnik, Alain Sigayret LIMOS UMR CNRS 6158 Ensemble Scientifique des Cézeaux Université Blaise Pascal, F-63 173 Aubière,

More information

A Model of Machine Learning Based on User Preference of Attributes

A Model of Machine Learning Based on User Preference of Attributes 1 A Model of Machine Learning Based on User Preference of Attributes Yiyu Yao 1, Yan Zhao 1, Jue Wang 2 and Suqing Han 2 1 Department of Computer Science, University of Regina, Regina, Saskatchewan, Canada

More information

Orientation of manifolds - definition*

Orientation of manifolds - definition* Bulletin of the Manifold Atlas - definition (2013) Orientation of manifolds - definition* MATTHIAS KRECK 1. Zero dimensional manifolds For zero dimensional manifolds an orientation is a map from the manifold

More information

Topological Invariance under Line Graph Transformations

Topological Invariance under Line Graph Transformations Symmetry 2012, 4, 329-335; doi:103390/sym4020329 Article OPEN ACCESS symmetry ISSN 2073-8994 wwwmdpicom/journal/symmetry Topological Invariance under Line Graph Transformations Allen D Parks Electromagnetic

More information

A Connection between Network Coding and. Convolutional Codes

A Connection between Network Coding and. Convolutional Codes A Connection between Network Coding and 1 Convolutional Codes Christina Fragouli, Emina Soljanin christina.fragouli@epfl.ch, emina@lucent.com Abstract The min-cut, max-flow theorem states that a source

More information

REPRESENTATION OF DISTRIBUTIVE LATTICES BY MEANS OF ORDERED STONE SPACES

REPRESENTATION OF DISTRIBUTIVE LATTICES BY MEANS OF ORDERED STONE SPACES REPRESENTATION OF DISTRIBUTIVE LATTICES BY MEANS OF ORDERED STONE SPACES H. A. PRIESTLEY 1. Introduction Stone, in [8], developed for distributive lattices a representation theory generalizing that for

More information

Nano-Lisp The Tutorial Handbook

Nano-Lisp The Tutorial Handbook Nano-Lisp The Tutorial Handbook Francis Sergeraert March 4, 2006 1 Various types of Nano-Lisp objects. There are several type notions and in this documentation only the notion of implementation type (itype

More information

Structured System Theory

Structured System Theory Appendix C Structured System Theory Linear systems are often studied from an algebraic perspective, based on the rank of certain matrices. While such tests are easy to derive from the mathematical model,

More information

Lecture 3: Linear Classification

Lecture 3: Linear Classification Lecture 3: Linear Classification Roger Grosse 1 Introduction Last week, we saw an example of a learning task called regression. There, the goal was to predict a scalar-valued target from a set of features.

More information

Graph Theory for Modelling a Survey Questionnaire Pierpaolo Massoli, ISTAT via Adolfo Ravà 150, Roma, Italy

Graph Theory for Modelling a Survey Questionnaire Pierpaolo Massoli, ISTAT via Adolfo Ravà 150, Roma, Italy Graph Theory for Modelling a Survey Questionnaire Pierpaolo Massoli, ISTAT via Adolfo Ravà 150, 00142 Roma, Italy e-mail: pimassol@istat.it 1. Introduction Questions can be usually asked following specific

More information

(Refer Slide Time: 0:19)

(Refer Slide Time: 0:19) Theory of Computation. Professor somenath Biswas. Department of Computer Science & Engineering. Indian Institute of Technology, Kanpur. Lecture-15. Decision Problems for Regular Languages. (Refer Slide

More information

Exact Algorithms Lecture 7: FPT Hardness and the ETH

Exact Algorithms Lecture 7: FPT Hardness and the ETH Exact Algorithms Lecture 7: FPT Hardness and the ETH February 12, 2016 Lecturer: Michael Lampis 1 Reminder: FPT algorithms Definition 1. A parameterized problem is a function from (χ, k) {0, 1} N to {0,

More information

Fundamental Algorithms for System Modeling, Analysis, and Optimization

Fundamental Algorithms for System Modeling, Analysis, and Optimization Fundamental Algorithms for System Modeling, Analysis, and Optimization Stavros Tripakis, Edward A. Lee UC Berkeley EECS 144/244 Fall 2014 Copyright 2014, E. A. Lee, J. Roydhowdhury, S. A. Seshia, S. Tripakis

More information

FACES OF CONVEX SETS

FACES OF CONVEX SETS FACES OF CONVEX SETS VERA ROSHCHINA Abstract. We remind the basic definitions of faces of convex sets and their basic properties. For more details see the classic references [1, 2] and [4] for polytopes.

More information

On partial order semantics for SAT/SMT-based symbolic encodings of weak memory concurrency

On partial order semantics for SAT/SMT-based symbolic encodings of weak memory concurrency On partial order semantics for SAT/SMT-based symbolic encodings of weak memory concurrency Alex Horn and Daniel Kroening University of Oxford April 30, 2015 Outline What s Our Problem? Motivation and Example

More information

Principles of AI Planning. Principles of AI Planning. 7.1 How to obtain a heuristic. 7.2 Relaxed planning tasks. 7.1 How to obtain a heuristic

Principles of AI Planning. Principles of AI Planning. 7.1 How to obtain a heuristic. 7.2 Relaxed planning tasks. 7.1 How to obtain a heuristic Principles of AI Planning June 8th, 2010 7. Planning as search: relaxed planning tasks Principles of AI Planning 7. Planning as search: relaxed planning tasks Malte Helmert and Bernhard Nebel 7.1 How to

More information

Distributed Objects with Sense of Direction

Distributed Objects with Sense of Direction Distributed Objects with Sense of Direction G. V. BOCHMANN University of Ottawa P. FLOCCHINI Université de Montréal D. RAMAZANI Université de Montréal Introduction An object system consists of a collection

More information

1 Informal Motivation

1 Informal Motivation CHAPTER SEVEN: (PRE)SEMILATTICES AND TREES 1 Informal Motivation As we will illustrate presently, given a CFG T,N,D,P, a nonterminal A N, and a T-string s C A, we can use the CFG to guide us in constructing

More information

5 MST and Greedy Algorithms

5 MST and Greedy Algorithms 5 MST and Greedy Algorithms One of the traditional and practically motivated problems of discrete optimization asks for a minimal interconnection of a given set of terminals (meaning that every pair will

More information

Recognizing regular tree languages with static information

Recognizing regular tree languages with static information Recognizing regular tree languages with static information Alain Frisch (ENS Paris) PLAN-X 2004 p.1/22 Motivation Efficient compilation of patterns in XDuce/CDuce/... E.g.: type A = [ A* ] type B =

More information

Multi Domain Logic and its Applications to SAT

Multi Domain Logic and its Applications to SAT Multi Domain Logic and its Applications to SAT Tudor Jebelean RISC Linz, Austria Tudor.Jebelean@risc.uni-linz.ac.at Gábor Kusper Eszterházy Károly College gkusper@aries.ektf.hu Abstract We describe a new

More information

A CSP Search Algorithm with Reduced Branching Factor

A CSP Search Algorithm with Reduced Branching Factor A CSP Search Algorithm with Reduced Branching Factor Igor Razgon and Amnon Meisels Department of Computer Science, Ben-Gurion University of the Negev, Beer-Sheva, 84-105, Israel {irazgon,am}@cs.bgu.ac.il

More information

Rigidity, connectivity and graph decompositions

Rigidity, connectivity and graph decompositions First Prev Next Last Rigidity, connectivity and graph decompositions Brigitte Servatius Herman Servatius Worcester Polytechnic Institute Page 1 of 100 First Prev Next Last Page 2 of 100 We say that a framework

More information

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013

Principles of Program Analysis. Lecture 1 Harry Xu Spring 2013 Principles of Program Analysis Lecture 1 Harry Xu Spring 2013 An Imperfect World Software has bugs The northeast blackout of 2003, affected 10 million people in Ontario and 45 million in eight U.S. states

More information

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS 1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

More information

On Generalization of Fuzzy Concept Lattices Based on Change of Underlying Fuzzy Order

On Generalization of Fuzzy Concept Lattices Based on Change of Underlying Fuzzy Order On Generalization of Fuzzy Concept Lattices Based on Change of Underlying Fuzzy Order Pavel Martinek Department of Computer Science, Palacky University, Olomouc Tomkova 40, CZ-779 00 Olomouc, Czech Republic

More information

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings

On the Relationships between Zero Forcing Numbers and Certain Graph Coverings On the Relationships between Zero Forcing Numbers and Certain Graph Coverings Fatemeh Alinaghipour Taklimi, Shaun Fallat 1,, Karen Meagher 2 Department of Mathematics and Statistics, University of Regina,

More information

Enhancing Datalog with Epistemic Operators to Reason About Systems Knowledge in

Enhancing Datalog with Epistemic Operators to Reason About Systems Knowledge in Enhancing Datalog with Epistemic Operators to Enhancing ReasonDatalog About Knowledge with Epistemic in Distributed Operators to Reason About Systems Knowledge in Distributed (Extended abstract) Systems

More information

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA A taxonomy of race conditions. D. P. Helmbold, C. E. McDowell UCSC-CRL-94-34 September 28, 1994 Board of Studies in Computer and Information Sciences University of California, Santa Cruz Santa Cruz, CA

More information

Power Set of a set and Relations

Power Set of a set and Relations Power Set of a set and Relations 1 Power Set (1) Definition: The power set of a set S, denoted P(S), is the set of all subsets of S. Examples Let A={a,b,c}, P(A)={,{a},{b},{c},{a,b},{b,c},{a,c},{a,b,c}}

More information

Discrete Optimization. Lecture Notes 2

Discrete Optimization. Lecture Notes 2 Discrete Optimization. Lecture Notes 2 Disjunctive Constraints Defining variables and formulating linear constraints can be straightforward or more sophisticated, depending on the problem structure. The

More information

5 MST and Greedy Algorithms

5 MST and Greedy Algorithms 5 MST and Greedy Algorithms One of the traditional and practically motivated problems of discrete optimization asks for a minimal interconnection of a given set of terminals (meaning that every pair will

More information

Introduction II. Sets. Terminology III. Definition. Definition. Definition. Example

Introduction II. Sets. Terminology III. Definition. Definition. Definition. Example Sets Slides by Christopher M. ourke Instructor: erthe Y. Choueiry Spring 2006 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.6 1.7 of Rosen cse235@cse.unl.edu Introduction

More information

Introduction III. Graphs. Motivations I. Introduction IV

Introduction III. Graphs. Motivations I. Introduction IV Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg

More information

Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa, Ling Lu, Wen Jiao

Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa, Ling Lu, Wen Jiao 6th International Conference on Information Engineering for Mechanics and Materials (ICIMM 2016) Research on the Static Analysis Method of the Localization Embedded Platform Software Code Zhijie Gaoa,

More information

REDUCING GRAPH COLORING TO CLIQUE SEARCH

REDUCING GRAPH COLORING TO CLIQUE SEARCH Asia Pacific Journal of Mathematics, Vol. 3, No. 1 (2016), 64-85 ISSN 2357-2205 REDUCING GRAPH COLORING TO CLIQUE SEARCH SÁNDOR SZABÓ AND BOGDÁN ZAVÁLNIJ Institute of Mathematics and Informatics, University

More information

Lecture notes on the simplex method September We will present an algorithm to solve linear programs of the form. maximize.

Lecture notes on the simplex method September We will present an algorithm to solve linear programs of the form. maximize. Cornell University, Fall 2017 CS 6820: Algorithms Lecture notes on the simplex method September 2017 1 The Simplex Method We will present an algorithm to solve linear programs of the form maximize subject

More information

GraphBLAS Mathematics - Provisional Release 1.0 -

GraphBLAS Mathematics - Provisional Release 1.0 - GraphBLAS Mathematics - Provisional Release 1.0 - Jeremy Kepner Generated on April 26, 2017 Contents 1 Introduction: Graphs as Matrices........................... 1 1.1 Adjacency Matrix: Undirected Graphs,

More information

AXIOMS FOR THE INTEGERS

AXIOMS FOR THE INTEGERS AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,

More information

Technische Universität München Zentrum Mathematik

Technische Universität München Zentrum Mathematik Technische Universität München Zentrum Mathematik Prof. Dr. Dr. Jürgen Richter-Gebert, Bernhard Werner Projective Geometry SS 208 https://www-m0.ma.tum.de/bin/view/lehre/ss8/pgss8/webhome Solutions for

More information

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2 2.2 Set Operations 127 2.2 Set Operations Introduction Two, or more, sets can be combined in many different ways. For instance, starting with the set of mathematics majors at your school and the set of

More information

Control Flow Analysis with SAT Solvers

Control Flow Analysis with SAT Solvers Control Flow Analysis with SAT Solvers Steven Lyde, Matthew Might University of Utah, Salt Lake City, Utah, USA Abstract. Control flow analyses statically determine the control flow of programs. This is

More information

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19 CSE34T/CSE549T /05/04 Lecture 9 Treaps Binary Search Trees (BSTs) Search trees are tree-based data structures that can be used to store and search for items that satisfy a total order. There are many types

More information

Managing test suites for services

Managing test suites for services Managing test suites for services Kathrin Kaschner Universität Rostock, Institut für Informatik, 18051 Rostock, Germany kathrin.kaschner@uni-rostock.de Abstract. When developing an existing service further,

More information

Writing Parallel Programs; Cost Model.

Writing Parallel Programs; Cost Model. CSE341T 08/30/2017 Lecture 2 Writing Parallel Programs; Cost Model. Due to physical and economical constraints, a typical machine we can buy now has 4 to 8 computing cores, and soon this number will be

More information

Evaluating Classifiers

Evaluating Classifiers Evaluating Classifiers Charles Elkan elkan@cs.ucsd.edu January 18, 2011 In a real-world application of supervised learning, we have a training set of examples with labels, and a test set of examples with

More information

Formal Model. Figure 1: The target concept T is a subset of the concept S = [0, 1]. The search agent needs to search S for a point in T.

Formal Model. Figure 1: The target concept T is a subset of the concept S = [0, 1]. The search agent needs to search S for a point in T. Although this paper analyzes shaping with respect to its benefits on search problems, the reader should recognize that shaping is often intimately related to reinforcement learning. The objective in reinforcement

More information

Category Theory in Ontology Research: Concrete Gain from an Abstract Approach

Category Theory in Ontology Research: Concrete Gain from an Abstract Approach Category Theory in Ontology Research: Concrete Gain from an Abstract Approach Markus Krötzsch Pascal Hitzler Marc Ehrig York Sure Institute AIFB, University of Karlsruhe, Germany; {mak,hitzler,ehrig,sure}@aifb.uni-karlsruhe.de

More information

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition. 18.433 Combinatorial Optimization Matching Algorithms September 9,14,16 Lecturer: Santosh Vempala Given a graph G = (V, E), a matching M is a set of edges with the property that no two of the edges have

More information