Array Dependence Analysis as Integer Constraints. Array Dependence Analysis Example. Array Dependence Analysis as Integer Constraints, cont

Size: px
Start display at page:

Download "Array Dependence Analysis as Integer Constraints. Array Dependence Analysis Example. Array Dependence Analysis as Integer Constraints, cont"

Transcription

1 Theory of Integers CS389L: Automated Logical Reasoning Omega Test Işıl Dillig Earlier, we talked aout the theory of integers T Z Signature of T Z : Σ Z : {..., 2, 1, 0, 1, 2,..., 3, 2, 2, 3,..., +,, =, >} This theory also called linear arithmetic over integers Since equal in expressive power to Presurger arithmetic, people also refer to it as Presurger arithmetic Today and next lecture: Look at algorithms for deciding satisfiaility in quantifier-free fragment of T Z Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 1/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 2/35 Prolem Description As in previous two lectures, we ll consider T Z formulas without disjunctions Prolem we want to solve: Given an m n matrix A with only integer coefficients and a vector in Z n, does have any integer solutions? A x Prolem very similar to that from last lecture, ut this time we only accept integer solutions; rational solutions not ok! This requirement actually makes prolem much harder Finding solution over rationals is poly-time, ut integer prolem is NP-complete even without disjunctions Geometric Description As efore the system A x defines a polytope Last time we asked the question: Is the polytope empty? This time, we want to know if polytope contains integer points While the polytope is convex, the space formed y all integer points in polytope is not convex Unfortunately, non-convexity makes prolem much harder to solve Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 3/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 4/35 Overview of Techniques Two different techniques for solving linear integer inequalities 1. Elimination-ased techniques: Omega Test, Cooper s method 2. Relaxation-ased techniques: Branch-and-ound, Gomory cuts, Cuts-from-Proofs Elimination-ased techniques eliminate variales one y one until system ecomes trivially solvale Relaxation-ased techniques first drop the integrality requirement and look for a real valued solution Then, they iteratively introduce additional constraints to guide search for integer solution The Omega Test: Historical Perspective Omega Test: invented in early 1990 s for compiler optimizations Particular application: array dependence analysis Array dependence analysis: Can two expressions a[i] and a[j] refer to same element? Can use this information to reorder read and writes from the array and perform operations in parallel Called relaxation-ased ecause they first solve LP-relaxation Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 5/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 6/35 1

2 Array Dependence Analysis Example Array Dependence Analysis as Integer Constraints Consider the following code snippet: for(i=1; i<= 100; i++) { for(j=i; j<= 100; j++) a[i, j+1] = a[100, j] } Can the expressions a[i, j+1] and a[100,j] ever refer to same element (not necessarily in same iteration)? No! Thus, no array element is oth read and written to in the loop Hence, we can optimize code y performing assignments in parallel! for(i=1; i<= 100; i++) { for(j=i; j<= 100; j++) a[i, j+1] = a[100, j] } Can express dependence analysis as linear integer constraints Variales w i and w j denote array indices when write is performed Variales r i and r j denote array indices when read is performed How do we express that same element is oth read and written to? w i = r i w j = r j Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 7/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 8/35 Array Dependence Analysis as Integer Constraints, cont for(i=1; i<= 100; i++) { for(j=i; j<= 100; j++) a[i, j+1] = a[100, j] } Based on loop start/end conditions, what are constraints on w i? 1 w i 100 What are constraints on w j? w i < w j 101 What are constraints on r i? r i = 100 What are constraints on r j? w i r j 100 r j = w j 1 Array Dependence Analysis as Integer Constraints, cont Thus, an array element may e oth read and written in the loop if the conjunction of these constraints is satisfiale: w i = r i w j = r j 1 w i 100 w i < w j 101 r i = 100 w i r j 100 r j = w j 1 Since array indices can t e real numers, only interested in integer solution Since this constraint has no integer solutions, there is no dependence etween array reads and writes Thus, all writes can e done in parallel Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 9/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 10/35 Applications of Theory of Integers Omega Test: Main Idea Array dependence analysis one application of decision procedure for theory of integers Omega Test was initially invented to do etter jo with array dependence analysis Many other applications in software verification, compiler optimizations, operations research,... Main idea: Eliminate variales one y one from the initial system A x Geometrically, eliminating a variale corresponds to computing a projection of a polytope in n-dimensional space to an n 1-dimensional space Since the polytope has one less dimension at each step, resulting prolem is easier to solve than the previous one Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 11/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 12/35 2

3 Projections in Omega Test Omega test computes three kind of projections, called shadows: 1. Real Shadow Overapproximates satisfiaility over integers Omega Test Work Flow If real shadow has no solutions, neither does original prolem 2. Dark Shadow Underapproximates satisfiaility over integers If dark shadow has solution, original prolem has solution 3. Gray Shadows These correspond to areas etween real and dark shadow that might contain integer points Omega test constructs multiple gray shadows Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 13/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 14/35 The Real Shadow When constructing the real shadow, we ignore requirement that solution must e integer Thus, resulting projection overapproximates satisfiaility of original prolem To construct real shadow, we use the Fourier-Motzkin variale elimination technique Fourier-Motzkin Variale Elimination Suppose we want to eliminate variale x n from A x Consider an inequality n i This can e rewritten as x n i n1 If is positive, this yields an upper ound on x n : x n i n1 If is negative, this yields lower ound on x n : x n i n1 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 15/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 16/35 Fourier-Motzkin Variale Elimination, cont. Thus, if we have A x has two rows i and k with positive and negative coefficients for x n, this yields the inequality: n1 k a kj x n i n1 We eliminate x n y removing it from the middle of inequality: n1 k a kj i n1 If we do this for every pair of inequalities with positive and negative coefficients for x n, this yields the real shadow Fourier-Motzkin Example Consider the set of inequalities: x y + 10 y 15 x + 20 y Let s compute real shadow on x-axis using Fourier-Motzkin Isolate y on one side: (1) x 10 y (2) y 15 (3) x + 20 y From (1) and (2), we get x 10 15, i.e., x 25 From (2) and (3), we get x , i.e. x 5 Thus, real shadow on x-axis is 5 x 25 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 17/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 18/35 3

4 Dark Shadow The second projection Omega test constructs is dark shadow Dark shadow underapproximates satisfiaility Math Behind the Dark Shadow As in real shadow, consider a pair of inequalities corresponding to lower and upper ounds on x: Suppose we want to eliminate variale x from A x L ax x U Dark shadow only projects those parts of polytope that are at least one unit thick in the x-dimension If dark shadow has integer solution, original polytope must also have integer solution. Why? Since polytope is at least one unit thick aove the dark shadow in x-dimension, we are guaranteed to have an integer solution for x as well! These imply: L a x U Now, suppose there is no integer etween L a and U Consider first integer i smaller than L a Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 19/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 20/35 Math Behind the Dark Shadow, cont. Math Behind Dark Shadow, cont If we rearrange this equation, we get: I L au + a a I I I I I I I I I I I I I Finally, multiplying oth sides y 1: Thus, we have the following inequalities: au L a a ( ) If we sum these up, we get: L a i 1 a i + 1 U 1 L a U a + 1 Recall: We derived this equation y assuming that there is no integer solution for x That is, we showed If there is no integer solution for x, then (*) must hold Thus, negation of (*) guarantees there exists integer solution for x! Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 21/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 22/35 Math Behind Dark Shadow, cont Dark Shadow Example Thus, negation of (*) au L > a a ( ) guarantees there is an integer value for x! Thus, to construct dark shadow, we remove inequalities containing x and add inequality ( ) Resulting projection is underapproximation ecause only projects those parts that are at least one unit thick, ut there might e an integer solution for x even if it s not unit thick Using (1), (3), we have a = 4, L = x, and = 3, U = 7 x: 4(7 x) 3x > x < 23 7 Using (2), (3), a = 2, L = 6 3x, and = 3, U = 7 x: 2(7 x) 3(6 3x) > x > 5 7 Since 5 7 < x < 23 7 has integer solutions, system is satisfiale Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 23/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 24/35 4

5 Dark Shadow Example, cont. Gray Shadows Recall: Real shadow overapproximates the prolem, and dark shadow underapproximates it. Geometrically: If real shadow has integer solutions, ut dark shadow does not, we still don t know if original prolem has integer solutions. In this case, Omega test constructs projections called gray shadows Gray shadows look for integer solutions outside the dark shadow, ut inside the real shadow. Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 25/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 26/35 Constructing the Gray Shadow Consider again the pair of inequalities: L ax x U By construction, any point in the real shadow satisfies: L ax au (1) Also, y construction, any point outside dark shadow satisfies: au L a a We can rewrite aove as: au L + a a (2) Comining (1) and (2), we have: L ax L + a a Constructing Gray Shadow, cont. Thus, any point inside real shadow ut outside dark shadow must satisfy: L ax a + L a Dividing y, points in the gray shadow must satisfy: L ax L + a a Oserve: If x is an integer, ax must also e integer Furthermore, ax must e equal to L + i for some i in the range [0, aa ] Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 27/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 28/35 Constructing Gray Shadow, cont. Remark aout Gray Shadows Thus, we construct each gray shadow y adding the equality: ax = L + i for each integer i in the range [0, aa ] If any suprolem has integer solution, then so does original prolem If no suprolem has integer solution, original prolem unsatisfiale Oserve: If there are n integers etween 0 and aa, Omega test constructs n gray shadows Thus, Omega test is very sensitive to coefficients in formula The larger a is, the more gray shadows we must consider Nightmare for Omega test: Real shadow has solution, dark shadow has no solution, and coefficient a is very large, and prolem is unsatisfiale In this case, Omega test must solve a very large numer of suprolems Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 29/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 30/35 5

6 Gray Shadow Example Example, cont. Derive gray shadow using constraints (1) and (3): 5y 3x + 3 (LB) 4y 3 (UB) Here, L = 3, a = 4, U = 3x + 3, = 5 Try 4x = 3 + i for i [0, ] (i.e., i [0, 2]) Real shadow has solutions, ut dark shadow does not; so, need to explore gray shadows... Satisfiale for i = 1 Has integer solutions Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 31/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 32/35 Example, cont. Geometrically: An Optimization Omega test uses important optimization to handle equality constraints Equality constraints can e expressed as pair of inequalities, ut handling equalities directly much more efficient Thus, Omega test has special preliminary step where it gets rid of all equality constraints Uses interesting coefficient-reducing technique ased on symmetric modulo Details are in paper posted on class wepage - strongly encouraged to read! Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 33/35 Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 34/35 Omega Test Summary Omega test is an elimination-ased technique for solving linear inequalities over integers Constructs three kinds of projections: real shadow, dark shadow, gray shadow Prolem has no solution if real shadow has no solution Prolem has solution if dark shadow has solution Otherwise, prolem has solution iff one of the dark shadows has solution Omega test handles equalities specially using the symmetric modulo technique Işıl Dillig, CS389L: Automated Logical Reasoning Omega Test 35/35 6

Theory of Integers. CS389L: Automated Logical Reasoning. Lecture 13: The Omega Test. Overview of Techniques. Geometric Description

Theory of Integers. CS389L: Automated Logical Reasoning. Lecture 13: The Omega Test. Overview of Techniques. Geometric Description Theory of ntegers This lecture: Decision procedure for qff theory of integers CS389L: Automated Logical Reasoning Lecture 13: The Omega Test şıl Dillig As in previous two lectures, we ll consider T Z formulas

More information

4 Integer Linear Programming (ILP)

4 Integer Linear Programming (ILP) TDA6/DIT37 DISCRETE OPTIMIZATION 17 PERIOD 3 WEEK III 4 Integer Linear Programg (ILP) 14 An integer linear program, ILP for short, has the same form as a linear program (LP). The only difference is that

More information

Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers

Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers Isil Dillig, Thomas Dillig, and Alex Aiken Computer Science Department Stanford University Linear Arithmetic

More information

Announcements. CS243: Discrete Structures. Strong Induction and Recursively Defined Structures. Review. Example (review) Example (review), cont.

Announcements. CS243: Discrete Structures. Strong Induction and Recursively Defined Structures. Review. Example (review) Example (review), cont. Announcements CS43: Discrete Structures Strong Induction and Recursively Defined Structures Işıl Dillig Homework 4 is due today Homework 5 is out today Covers induction (last lecture, this lecture, and

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

Hot X: Algebra Exposed

Hot X: Algebra Exposed Hot X: Algera Exposed Solution Guide for Chapter 5 Here are the solutions for the Doing the Math exercises in Hot X: Algera Exposed! (assume that all denominators 0) DTM from p.59 2. Since they have the

More information

Chap5 The Theory of the Simplex Method

Chap5 The Theory of the Simplex Method College of Management, NCTU Operation Research I Fall, Chap The Theory of the Simplex Method Terminology Constraint oundary equation For any constraint (functional and nonnegativity), replace its,, sign

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 5: Binary Decision Diagrams. Historical Context. Binary Decision Trees

Motivation. CS389L: Automated Logical Reasoning. Lecture 5: Binary Decision Diagrams. Historical Context. Binary Decision Trees Motivation CS389L: Automated Logical Reasoning Lecture 5: Binary Decision Diagrams Işıl Dillig Previous lectures: How to determine satisfiability of propositional formulas Sometimes need to efficiently

More information

CS671 Parallel Programming in the Many-Core Era

CS671 Parallel Programming in the Many-Core Era 1 CS671 Parallel Programming in the Many-Core Era Polyhedral Framework for Compilation: Polyhedral Model Representation, Data Dependence Analysis, Scheduling and Data Locality Optimizations December 3,

More information

Solving Linear Constraints over Real. German Vitaliy Jr. Researcher Glushkov Institute of Cybernetic NAS Ukraine

Solving Linear Constraints over Real. German Vitaliy Jr. Researcher Glushkov Institute of Cybernetic NAS Ukraine Solving Linear Constraints over Real German Vitaliy Jr. Researcher Glushkov Institute of Cybernetic NAS Ukraine Email: novaua@ukr.net Talk outline Introduction Fourier-Motzkin elimination The main algorithm

More information

Lecture 3. Corner Polyhedron, Intersection Cuts, Maximal Lattice-Free Convex Sets. Tepper School of Business Carnegie Mellon University, Pittsburgh

Lecture 3. Corner Polyhedron, Intersection Cuts, Maximal Lattice-Free Convex Sets. Tepper School of Business Carnegie Mellon University, Pittsburgh Lecture 3 Corner Polyhedron, Intersection Cuts, Maximal Lattice-Free Convex Sets Gérard Cornuéjols Tepper School of Business Carnegie Mellon University, Pittsburgh January 2016 Mixed Integer Linear Programming

More information

Integer Programming as Projection

Integer Programming as Projection Integer Programming as Projection H. P. Williams London School of Economics John Hooker Carnegie Mellon University INFORMS 2015, Philadelphia USA A Different Perspective on IP Projection of an IP onto

More information

Some Advanced Topics in Linear Programming

Some Advanced Topics in Linear Programming Some Advanced Topics in Linear Programming Matthew J. Saltzman July 2, 995 Connections with Algebra and Geometry In this section, we will explore how some of the ideas in linear programming, duality theory,

More information

Binary Decision Diagrams (BDDs) Pingqiang Zhou ShanghaiTech University

Binary Decision Diagrams (BDDs) Pingqiang Zhou ShanghaiTech University Binary Decision Diagrams (BDDs) Pingqiang Zhou ShanghaiTech University Computational Boolean Algera Representations Applying unate recursive paradigm (URP) in solving tautology is a great warm up example.

More information

Systems of Inequalities

Systems of Inequalities Systems of Inequalities 1 Goals: Given system of inequalities of the form Ax b determine if system has an integer solution enumerate all integer solutions 2 Running example: Upper bounds for x: (2)and

More information

15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018

15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018 15-451/651: Design & Analysis of Algorithms October 11, 2018 Lecture #13: Linear Programming I last changed: October 9, 2018 In this lecture, we describe a very general problem called linear programming

More information

Introduction to Machine Learning Spring 2018 Note Sparsity and LASSO. 1.1 Sparsity for SVMs

Introduction to Machine Learning Spring 2018 Note Sparsity and LASSO. 1.1 Sparsity for SVMs CS 189 Introduction to Machine Learning Spring 2018 Note 21 1 Sparsity and LASSO 1.1 Sparsity for SVMs Recall the oective function of the soft-margin SVM prolem: w,ξ 1 2 w 2 + C Note that if a point x

More information

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008 LP-Modelling dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven January 30, 2008 1 Linear and Integer Programming After a brief check with the backgrounds of the participants it seems that the following

More information

[Draft. Please do not distribute] Online Proof-Producing Decision Procedure for Mixed-Integer Linear Arithmetic

[Draft. Please do not distribute] Online Proof-Producing Decision Procedure for Mixed-Integer Linear Arithmetic [Draft Please do not distribute] Online Proof-Producing Decision Procedure for Mixed-Integer Linear Arithmetic Sergey Berezin, Vijay Ganesh, and David L Dill Stanford University {berezin,vganesh,dill}@stanfordedu

More information

Linear Programming. Readings: Read text section 11.6, and sections 1 and 2 of Tom Ferguson s notes (see course homepage).

Linear Programming. Readings: Read text section 11.6, and sections 1 and 2 of Tom Ferguson s notes (see course homepage). Linear Programming Learning Goals. Introduce Linear Programming Problems. Widget Example, Graphical Solution. Basic Theory: Feasible Set, Vertices, Existence of Solutions. Equivalent formulations. Outline

More information

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued. Linear Programming Widget Factory Example Learning Goals. Introduce Linear Programming Problems. Widget Example, Graphical Solution. Basic Theory:, Vertices, Existence of Solutions. Equivalent formulations.

More information

Introduction. CS243: Discrete Structures. Combinatorics. Product Rule. Basic Counting Rules. Example 2. Example 1

Introduction. CS243: Discrete Structures. Combinatorics. Product Rule. Basic Counting Rules. Example 2. Example 1 Introduction CS243: Discrete Structures Combinatorics Işıl Dillig Consider a set of objects and a property of interest Often, we want to know how many of these objects have the desired property Example:

More information

Integer Programming Theory

Integer Programming Theory Integer Programming Theory Laura Galli October 24, 2016 In the following we assume all functions are linear, hence we often drop the term linear. In discrete optimization, we seek to find a solution x

More information

Vertex 3-colorability of claw-free graphs

Vertex 3-colorability of claw-free graphs R u t c o r Research R e p o r t Vertex 3-coloraility of claw-free graphs M. Kamiński a V. Lozin RRR 8 2007, Feruary 2007 RUTCOR Rutgers Center for Operations Research Rutgers University 640 Bartholomew

More information

Prelim 1. CS 2110, 14 March 2017, 7:30 PM Total Question Name Short answer. OO Recursion Loop invariants Max Score Grader

Prelim 1. CS 2110, 14 March 2017, 7:30 PM Total Question Name Short answer. OO Recursion Loop invariants Max Score Grader Prelim 1 CS 2110, 14 March 2017, 7:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader The exam is closed ook and closed notes. Do not egin

More information

Recent Results from Analyzing the Performance of Heuristic Search

Recent Results from Analyzing the Performance of Heuristic Search Recent Results from Analyzing the Performance of Heuristic Search Teresa M. Breyer and Richard E. Korf Computer Science Department University of California, Los Angeles Los Angeles, CA 90095 {treyer,korf}@cs.ucla.edu

More information

1 Model checking and equivalence checking

1 Model checking and equivalence checking 978--52-85972- - Practical Design Verification Model checking and equivalence checking Masahiro Fujita. Introduction Owing to the advances in semiconductor technology, a large and complex system that has

More information

- Introduction P. Danziger. Linear Algebra. Algebra Manipulation, Solution or Transformation

- Introduction P. Danziger. Linear Algebra. Algebra Manipulation, Solution or Transformation Linear Algera Linear of line or line like Algera Manipulation, Solution or Transformation Thus Linear Algera is aout the Manipulation, Solution and Transformation of line like ojects. We will also investigate

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

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36 CS 473: Algorithms Ruta Mehta University of Illinois, Urbana-Champaign Spring 2018 Ruta (UIUC) CS473 1 Spring 2018 1 / 36 CS 473: Algorithms, Spring 2018 LP Duality Lecture 20 April 3, 2018 Some of the

More information

Linear programming and duality theory

Linear programming and duality theory Linear programming and duality theory Complements of Operations Research Giovanni Righini Linear Programming (LP) A linear program is defined by linear constraints, a linear objective function. Its variables

More information

Data Dependences and Parallelization

Data Dependences and Parallelization Data Dependences and Parallelization 1 Agenda Introduction Single Loop Nested Loops Data Dependence Analysis 2 Motivation DOALL loops: loops whose iterations can execute in parallel for i = 11, 20 a[i]

More information

12.1 Formulation of General Perfect Matching

12.1 Formulation of General Perfect Matching CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: Perfect Matching Polytope Date: 22/02/2008 Lecturer: Lap Chi Lau Scribe: Yuk Hei Chan, Ling Ding and Xiaobing Wu In this lecture,

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 17: SMT Solvers and the DPPL(T ) Framework. SMT solvers. The Basic Idea.

Motivation. CS389L: Automated Logical Reasoning. Lecture 17: SMT Solvers and the DPPL(T ) Framework. SMT solvers. The Basic Idea. Motivation Lecture 17: SMT rs and the DPPL(T ) Framework şıl Dillig n previous lectures, we looked at decision procedures for conjunctive formulas in various first-order theories This lecture: How to handle

More information

C&O 355 Lecture 16. N. Harvey

C&O 355 Lecture 16. N. Harvey C&O 355 Lecture 16 N. Harvey Topics Review of Fourier-Motzkin Elimination Linear Transformations of Polyhedra Convex Combinations Convex Hulls Polytopes & Convex Hulls Fourier-Motzkin Elimination Joseph

More information

9.5 Equivalence Relations

9.5 Equivalence Relations 9.5 Equivalence Relations You know from your early study of fractions that each fraction has many equivalent forms. For example, 2, 2 4, 3 6, 2, 3 6, 5 30,... are all different ways to represent the same

More information

Integer Programming for Array Subscript Analysis

Integer Programming for Array Subscript Analysis Appears in the IEEE Transactions on Parallel and Distributed Systems, June 95 Integer Programming for Array Subscript Analysis Jaspal Subhlok School of Computer Science, Carnegie Mellon University, Pittsburgh

More information

Combinatorial Optimization

Combinatorial Optimization Combinatorial Optimization Problem set 7: solutions. Formulate and solve an integer program for the following scenario. A trader of unusual objects is traveling with a caravan that begins in city A, proceeds

More information

MATH 890 HOMEWORK 2 DAVID MEREDITH

MATH 890 HOMEWORK 2 DAVID MEREDITH MATH 890 HOMEWORK 2 DAVID MEREDITH (1) Suppose P and Q are polyhedra. Then P Q is a polyhedron. Moreover if P and Q are polytopes then P Q is a polytope. The facets of P Q are either F Q where F is a facet

More information

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D.

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D. 1. CONVEX POLYGONS Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D. Convex 6 gon Another convex 6 gon Not convex Question. Why is the third

More information

Linear Programming: Introduction

Linear Programming: Introduction CSC 373 - Algorithm Design, Analysis, and Complexity Summer 2016 Lalla Mouatadid Linear Programming: Introduction A bit of a historical background about linear programming, that I stole from Jeff Erickson

More information

Optimization Methods in Management Science

Optimization Methods in Management Science Problem Set Rules: Optimization Methods in Management Science MIT 15.053, Spring 2013 Problem Set 6, Due: Thursday April 11th, 2013 1. Each student should hand in an individual problem set. 2. Discussing

More information

Solving LP in polynomial time

Solving LP in polynomial time Combinatorial Optimization 1 Solving LP in polynomial time Guy Kortsarz Combinatorial Optimization 2 Sketch of the ideas in the Ellipsoid algorithm If we use LP we need to show how to solve it in polynomial

More information

Lecture 9 Basic Parallelization

Lecture 9 Basic Parallelization Lecture 9 Basic Parallelization I. Introduction II. Data Dependence Analysis III. Loop Nests + Locality IV. Interprocedural Parallelization Chapter 11.1-11.1.4 CS243: Parallelization 1 Machine Learning

More information

Lecture 9 Basic Parallelization

Lecture 9 Basic Parallelization Lecture 9 Basic Parallelization I. Introduction II. Data Dependence Analysis III. Loop Nests + Locality IV. Interprocedural Parallelization Chapter 11.1-11.1.4 CS243: Parallelization 1 Machine Learning

More information

Integer Programming Explained Through Gomory s Cutting Plane Algorithm and Column Generation

Integer Programming Explained Through Gomory s Cutting Plane Algorithm and Column Generation Integer Programming Explained Through Gomory s Cutting Plane Algorithm and Column Generation Banhirup Sengupta, Dipankar Mondal, Prajjal Kumar De, Souvik Ash Proposal Description : ILP [integer linear

More information

Name Class Date. Quadratic Functions and Transformations

Name Class Date. Quadratic Functions and Transformations 4-1 Reteaching Parent Quadratic Function The parent quadratic function is y = x. Sustitute 0 for x in the function to get y = 0. The vertex of the parent quadratic function is (0, 0). A few points near

More information

Lagrangean relaxation - exercises

Lagrangean relaxation - exercises Lagrangean relaxation - exercises Giovanni Righini Set covering We start from the following Set Covering Problem instance: min z = x + 2x 2 + x + 2x 4 + x 5 x + x 2 + x 4 x 2 + x x 2 + x 4 + x 5 x + x

More information

SECTION 8.2 the hyperbola Wake created from shock wave. Portion of a hyperbola

SECTION 8.2 the hyperbola Wake created from shock wave. Portion of a hyperbola SECTION 8. the hperola 6 9 7 learning OjeCTIveS In this section, ou will: Locate a hperola s vertices and foci. Write equations of hperolas in standard form. Graph hperolas centered at the origin. Graph

More information

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms 1. Computability, Complexity and Algorithms Given a simple directed graph G = (V, E), a cycle cover is a set of vertex-disjoint directed cycles that cover all vertices of the graph. 1. Show that there

More information

CSc 545 Lecture topic: The Criss-Cross method of Linear Programming

CSc 545 Lecture topic: The Criss-Cross method of Linear Programming CSc 545 Lecture topic: The Criss-Cross method of Linear Programming Wanda B. Boyer University of Victoria November 21, 2012 Presentation Outline 1 Outline 2 3 4 Please note: I would be extremely grateful

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

G Force Tolerance Sample Solution

G Force Tolerance Sample Solution G Force Tolerance Sample Solution Introduction When different forces are applied to an oject, G-Force is a term used to descrie the resulting acceleration, and is in relation to acceleration due to gravity(g).

More information

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Finite Math - J-term Homework. Section Inverse of a Square Matrix Section.5-77, 78, 79, 80 Finite Math - J-term 017 Lecture Notes - 1/19/017 Homework Section.6-9, 1, 1, 15, 17, 18, 1, 6, 9, 3, 37, 39, 1,, 5, 6, 55 Section 5.1-9, 11, 1, 13, 1, 17, 9, 30 Section.5 - Inverse

More information

Math 414 Lecture 2 Everyone have a laptop?

Math 414 Lecture 2 Everyone have a laptop? Math 44 Lecture 2 Everyone have a laptop? THEOREM. Let v,...,v k be k vectors in an n-dimensional space and A = [v ;...; v k ] v,..., v k independent v,..., v k span the space v,..., v k a basis v,...,

More information

In this lecture, we ll look at applications of duality to three problems:

In this lecture, we ll look at applications of duality to three problems: Lecture 7 Duality Applications (Part II) In this lecture, we ll look at applications of duality to three problems: 1. Finding maximum spanning trees (MST). We know that Kruskal s algorithm finds this,

More information

SEARCHING, SORTING, AND ASYMPTOTIC COMPLEXITY

SEARCHING, SORTING, AND ASYMPTOTIC COMPLEXITY 1 A3 and Prelim 2 SEARCHING, SORTING, AND ASYMPTOTIC COMPLEXITY Lecture 11 CS2110 Fall 2016 Deadline for A3: tonight. Only two late days allowed (Wed-Thur) Prelim: Thursday evening. 74 conflicts! If you

More information

A Gentle Introduction to Program Analysis

A Gentle Introduction to Program Analysis A Gentle Introduction to Program Analysis Işıl Dillig University of Texas, Austin January 21, 2014 Programming Languages Mentoring Workshop 1 / 24 What is Program Analysis? Very broad topic, but generally

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic. Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

More information

4.3 Quadratic functions and their properties

4.3 Quadratic functions and their properties 4.3 Quadratic functions and their properties A quadratic function is a function defined as f(x) = ax + x + c, a 0 Domain: the set of all real numers x-intercepts: Solutions of ax + x + c = 0 y-intercept:

More information

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture - 35 Quadratic Programming In this lecture, we continue our discussion on

More information

Dependence Analysis. Hwansoo Han

Dependence Analysis. Hwansoo Han Dependence Analysis Hwansoo Han Dependence analysis Dependence Control dependence Data dependence Dependence graph Usage The way to represent dependences Dependence types, latencies Instruction scheduling

More information

MAT 003 Brian Killough s Instructor Notes Saint Leo University

MAT 003 Brian Killough s Instructor Notes Saint Leo University MAT 003 Brian Killough s Instructor Notes Saint Leo University Success in online courses requires self-motivation and discipline. It is anticipated that students will read the textbook and complete sample

More information

Outline. Column Generation: Cutting Stock A very applied method. Introduction to Column Generation. Given an LP problem

Outline. Column Generation: Cutting Stock A very applied method. Introduction to Column Generation. Given an LP problem Column Generation: Cutting Stock A very applied method thst@man.dtu.dk Outline History The Simplex algorithm (re-visited) Column Generation as an extension of the Simplex algorithm A simple example! DTU-Management

More information

Introduction to Digital Image Processing

Introduction to Digital Image Processing Fall 2005 Image Enhancement in the Spatial Domain: Histograms, Arithmetic/Logic Operators, Basics of Spatial Filtering, Smoothing Spatial Filters Tuesday, February 7 2006, Overview (1): Before We Begin

More information

Column Generation: Cutting Stock

Column Generation: Cutting Stock Column Generation: Cutting Stock A very applied method thst@man.dtu.dk DTU-Management Technical University of Denmark 1 Outline History The Simplex algorithm (re-visited) Column Generation as an extension

More information

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF CHAPTER 4 ELEMENTARY NUMBER THEORY AND METHODS OF PROOF Copyright Cengage Learning. All rights reserved. SECTION 4.3 Direct Proof and Counterexample III: Divisibility Copyright Cengage Learning. All rights

More information

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

CSE 417 Network Flows (pt 3) Modeling with Min Cuts CSE 417 Network Flows (pt 3) Modeling with Min Cuts Reminders > HW6 is due on Friday start early bug fixed on line 33 of OptimalLineup.java: > change true to false Review of last two lectures > Defined

More information

Integer Programming ISE 418. Lecture 1. Dr. Ted Ralphs

Integer Programming ISE 418. Lecture 1. Dr. Ted Ralphs Integer Programming ISE 418 Lecture 1 Dr. Ted Ralphs ISE 418 Lecture 1 1 Reading for This Lecture N&W Sections I.1.1-I.1.4 Wolsey Chapter 1 CCZ Chapter 2 ISE 418 Lecture 1 2 Mathematical Optimization Problems

More information

CSE 417 Network Flows (pt 4) Min Cost Flows

CSE 417 Network Flows (pt 4) Min Cost Flows CSE 417 Network Flows (pt 4) Min Cost Flows Reminders > HW6 is due Monday Review of last three lectures > Defined the maximum flow problem find the feasible flow of maximum value flow is feasible if it

More information

Investigating Mixed-Integer Hulls using a MIP-Solver

Investigating Mixed-Integer Hulls using a MIP-Solver Investigating Mixed-Integer Hulls using a MIP-Solver Matthias Walter Otto-von-Guericke Universität Magdeburg Joint work with Volker Kaibel (OvGU) Aussois Combinatorial Optimization Workshop 2015 Outline

More information

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture 16 Cutting Plane Algorithm We shall continue the discussion on integer programming,

More information

The Simplex Algorithm

The Simplex Algorithm The Simplex Algorithm Uri Feige November 2011 1 The simplex algorithm The simplex algorithm was designed by Danzig in 1947. This write-up presents the main ideas involved. It is a slight update (mostly

More information

11.1 Facility Location

11.1 Facility Location CS787: Advanced Algorithms Scribe: Amanda Burton, Leah Kluegel Lecturer: Shuchi Chawla Topic: Facility Location ctd., Linear Programming Date: October 8, 2007 Today we conclude the discussion of local

More information

Lecture Notes for Chapter 2: Getting Started

Lecture Notes for Chapter 2: Getting Started Instant download and all chapters Instructor's Manual Introduction To Algorithms 2nd Edition Thomas H. Cormen, Clara Lee, Erica Lin https://testbankdata.com/download/instructors-manual-introduction-algorithms-2ndedition-thomas-h-cormen-clara-lee-erica-lin/

More information

Minimum Satisfying Assignments for SMT. Işıl Dillig, Tom Dillig Ken McMillan Alex Aiken College of William & Mary Microsoft Research Stanford U.

Minimum Satisfying Assignments for SMT. Işıl Dillig, Tom Dillig Ken McMillan Alex Aiken College of William & Mary Microsoft Research Stanford U. Minimum Satisfying Assignments for SMT Işıl Dillig, Tom Dillig Ken McMillan Alex Aiken College of William & Mary Microsoft Research Stanford U. 1 / 20 Satisfiability Modulo Theories (SMT) Today, SMT solvers

More information

Lecture 4: Rational IPs, Polyhedron, Decomposition Theorem

Lecture 4: Rational IPs, Polyhedron, Decomposition Theorem IE 5: Integer Programming, Spring 29 24 Jan, 29 Lecture 4: Rational IPs, Polyhedron, Decomposition Theorem Lecturer: Karthik Chandrasekaran Scribe: Setareh Taki Disclaimer: These notes have not been subjected

More information

Algorithmic Game Theory and Applications. Lecture 6: The Simplex Algorithm

Algorithmic Game Theory and Applications. Lecture 6: The Simplex Algorithm Algorithmic Game Theory and Applications Lecture 6: The Simplex Algorithm Kousha Etessami Recall our example 1 x + y

More information

UNIT 10 Trigonometry UNIT OBJECTIVES 287

UNIT 10 Trigonometry UNIT OBJECTIVES 287 UNIT 10 Trigonometry Literally translated, the word trigonometry means triangle measurement. Right triangle trigonometry is the study of the relationships etween the side lengths and angle measures of

More information

CSE 417 Dynamic Programming (pt 6) Parsing Algorithms

CSE 417 Dynamic Programming (pt 6) Parsing Algorithms CSE 417 Dynamic Programming (pt 6) Parsing Algorithms Reminders > HW9 due on Friday start early program will be slow, so debugging will be slow... should run in 2-4 minutes > Please fill out course evaluations

More information

NP-Complete Reductions 2

NP-Complete Reductions 2 x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete

More information

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis

Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Small Formulas for Large Programs: On-line Constraint Simplification In Scalable Static Analysis Isil Dillig, Thomas Dillig, Alex Aiken Stanford University Scalability and Formula Size Many program analysis

More information

11 Linear Programming

11 Linear Programming 11 Linear Programming 11.1 Definition and Importance The final topic in this course is Linear Programming. We say that a problem is an instance of linear programming when it can be effectively expressed

More information

THEORY OF LINEAR AND INTEGER PROGRAMMING

THEORY OF LINEAR AND INTEGER PROGRAMMING THEORY OF LINEAR AND INTEGER PROGRAMMING ALEXANDER SCHRIJVER Centrum voor Wiskunde en Informatica, Amsterdam A Wiley-Inter science Publication JOHN WILEY & SONS^ Chichester New York Weinheim Brisbane Singapore

More information

CSE 460. Today we will look at" Classes of Optimization Problems" Linear Programming" The Simplex Algorithm"

CSE 460. Today we will look at Classes of Optimization Problems Linear Programming The Simplex Algorithm CSE 460 Linear Programming" Today we will look at" Classes of Optimization Problems" Linear Programming" The Simplex Algorithm" Classes of Optimization Problems" Optimization" unconstrained"..." linear"

More information

Sorting. There exist sorting algorithms which have shown to be more efficient in practice.

Sorting. There exist sorting algorithms which have shown to be more efficient in practice. Sorting Next to storing and retrieving data, sorting of data is one of the more common algorithmic tasks, with many different ways to perform it. Whenever we perform a web search and/or view statistics

More information

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Mathematical and Algorithmic Foundations Linear Programming and Matchings Adavnced Algorithms Lectures Mathematical and Algorithmic Foundations Linear Programming and Matchings Paul G. Spirakis Department of Computer Science University of Patras and Liverpool Paul G. Spirakis

More information

Loop Transformations, Dependences, and Parallelization

Loop Transformations, Dependences, and Parallelization Loop Transformations, Dependences, and Parallelization Announcements HW3 is due Wednesday February 15th Today HW3 intro Unimodular framework rehash with edits Skewing Smith-Waterman (the fix is in!), composing

More information

Prelim 1. CS 2110, 14 March 2017, 5:30 PM Total Question Name Short answer. OO Recursion Loop invariants Max Score Grader

Prelim 1. CS 2110, 14 March 2017, 5:30 PM Total Question Name Short answer. OO Recursion Loop invariants Max Score Grader Prelim 1 CS 2110, 14 March 2017, 5:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader The exam is closed ook and closed notes. Do not egin

More information

arxiv: v1 [math.co] 27 Feb 2015

arxiv: v1 [math.co] 27 Feb 2015 Mode Poset Probability Polytopes Guido Montúfar 1 and Johannes Rauh 2 arxiv:1503.00572v1 [math.co] 27 Feb 2015 1 Max Planck Institute for Mathematics in the Sciences, Inselstraße 22, 04103 Leipzig, Germany,

More information

6 Randomized rounding of semidefinite programs

6 Randomized rounding of semidefinite programs 6 Randomized rounding of semidefinite programs We now turn to a new tool which gives substantially improved performance guarantees for some problems We now show how nonlinear programming relaxations can

More information

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007 College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007 CS G399: Algorithmic Power Tools I Scribe: Eric Robinson Lecture Outline: Linear Programming: Vertex Definitions

More information

Prelim 1. Solution. CS 2110, 14 March 2017, 7:30 PM Total Question Name Short answer

Prelim 1. Solution. CS 2110, 14 March 2017, 7:30 PM Total Question Name Short answer Prelim 1. Solution CS 2110, 14 March 2017, 7:30 PM 1 2 3 4 5 Total Question Name Short answer OO Recursion Loop invariants Max 1 36 33 15 15 100 Score Grader 1. Name (1 point) Write your name and NetID

More information

Framework for Design of Dynamic Programming Algorithms

Framework for Design of Dynamic Programming Algorithms CSE 441T/541T Advanced Algorithms September 22, 2010 Framework for Design of Dynamic Programming Algorithms Dynamic programming algorithms for combinatorial optimization generalize the strategy we studied

More information

Pedestrian Detection Using Structured SVM

Pedestrian Detection Using Structured SVM Pedestrian Detection Using Structured SVM Wonhui Kim Stanford University Department of Electrical Engineering wonhui@stanford.edu Seungmin Lee Stanford University Department of Electrical Engineering smlee729@stanford.edu.

More information

CMPSCI611: The Simplex Algorithm Lecture 24

CMPSCI611: The Simplex Algorithm Lecture 24 CMPSCI611: The Simplex Algorithm Lecture 24 Let s first review the general situation for linear programming problems. Our problem in standard form is to choose a vector x R n, such that x 0 and Ax = b,

More information

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs Introduction to Mathematical Programming IE496 Final Review Dr. Ted Ralphs IE496 Final Review 1 Course Wrap-up: Chapter 2 In the introduction, we discussed the general framework of mathematical modeling

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 19 Tuesday, April 3, 2018 1 Introduction to axiomatic semantics The idea in axiomatic semantics is to give specifications

More information

COLUMN GENERATION IN LINEAR PROGRAMMING

COLUMN GENERATION IN LINEAR PROGRAMMING COLUMN GENERATION IN LINEAR PROGRAMMING EXAMPLE: THE CUTTING STOCK PROBLEM A certain material (e.g. lumber) is stocked in lengths of 9, 4, and 6 feet, with respective costs of $5, $9, and $. An order for

More information

MATHEMATICAL METHODS UNITS 3 AND Sketching Polynomial Graphs

MATHEMATICAL METHODS UNITS 3 AND Sketching Polynomial Graphs Maths Methods 1 MATHEMATICAL METHODS UNITS 3 AND 4.3 Sketching Polnomial Graphs ou are required to e ale to sketch the following graphs. 1. Linear functions. Eg. = ax + These graphs when drawn will form

More information