Tight Timing Estimation With the Newton-Gregory Formulae

Size: px
Start display at page:

Download "Tight Timing Estimation With the Newton-Gregory Formulae"

Transcription

1 CPC 2003 p.1/30 Tight Timing Estimation With the Newton-Gregory Formulae Robert van Engelen Kyle Gallivan Burt Walsh Florida State University

2 CPC 2003 p.2/30 Introduction Worst-case execution time (WCET) estimation has important applications in scheduling and real-time embedded systems (ms) Task WCET The WCET bound is obtained by static (compiler) analysis of a task and is used to determine if the task will finish within a given time frame.

3 CPC 2003 p.3/30 Parameterized WCET Parametric timing analysis produces formulae, where the unknown values affecting the execution are parameterized (ms) Task WCET Input Size W CET = N where N is the task input size.

4 CPC 2003 p.4/30 Related Work Presburger formulas [Pugh, 1994] Summations over τ functions [Haghighat, 1995] Ehrhart polynomials [Clauss, 1996] Guarded sums [Sakellariou, 1997] Parametric timing analysis [Vivancos et al., 2001]

5 CPC 2003 p.5/30 Experiences We incorporated Sakellariou s guarded sums into a WCET estimation framework which required linking a small computer algebra system with the VPO compiler [Healy, 2000] The timing estimation can be very loose for loops with slightly more complicated control flow for i = 0 to 9 do if a[i] > 0 then for j = 1 to i do else b[j] = b[i] + a[i] b[i] = a[i]

6 CPC 2003 p.6/30 Motivation WCET analysis focus on loops, because most of the execution time of a task is typically spent in loops. Loops may have symbolic bounds and exhibit complicated control flow. for i = 0 to N do if... then for j = 0 to i do else... for j = 0 to i do for k = 0 to j do...

7 CPC 2003 p.7/30 Motivation (cont d) Existing methods... are computationally expensive and require extensive (symbolic) manipulation. can lead to an over estimation of the WCET of loops with complicated control flow due to the decoupling of the WCET of the loop body and the iteration count WCET = WCET (loopheader) + WCET (loopbody) itercount

8 CPC 2003 p.8/30 Loop Execution Time Loops are assumed to have been normalized for i = a to b step s do S b a for i = 0 to s do S The unknown loop execution time functions are ω(h(i)) = Loop header execution time ω(s (i)) = Loop body execution time The (unknown) real loop execution time ω is ω = ω(h(0)) + b a s i=0 ω(s (i)) + ω(h(i + 1))

9 CPC 2003 p.9/30 Loop Execution Time Bound First we recursively determine (parameterized) WCET bounds on the unknowns ω(h(0)) c 0 ω(s (i)) + ω(h(i + 1)) p(i) Then, the WCET bound on ω is ω WCET = c 0 + n 1 i=0 p(i) provided that the number of loop iterations n = b a s + 1 > 0.

10 CPC 2003 p.10/30 Newton-Gregory Let p(i) = p 0 + p 1 i + + p k i k be a polynomial. There exist Newton series coefficients Φ(i) = φ 0, φ 1,..., φ k i such that p(i) = k φ j ( i j ) j=0

11 CPC 2003 p.11/30 Newton-Gregory WCET Lemma. To determine the WCET of a loop, we can replace the WCET iteration summation with a constant summation WCET = c 0 + n 1 i=0 for all (symbolic) n > 0. p(i) = k j=0 ( ) n φ j j + 1

12 Newton Series Conversions Given coefficients [p 0, p 1,..., p k ] i of polynomial p(i) = p 0 + p 1 i + + p k i k, then the Newton series is Φ(i) = N k p(i) where N k is the constant integer (k + 1) (k + 1) Newton triangle matrix. Given Newton series coefficients Φ(i) = φ 0, φ 1,..., φ k i, then p(i) = N 1 k Φ(i) where N 1 k is the constant rational (k + 1) (k + 1) inverse Newton triangle matrix. CPC 2003 p.12/30

13 CPC 2003 p.13/30 WCET of a Loop Let Φ(i) = φ 0,..., φ k i denote the Newton series of a polynomial in i over i = 0,..., n 1, n 0. We define σ(φ(i), n) def = k j=0 ( ) n φ j j + 1 The WCET of a (possibly zero trip) loop i = a,..., b, stride s, and iteration WCET polynomial p(i) with Newton series Φ(i) is WCET = c 0 + σ(φ(i), max(0, b a s + 1))

14 CPC 2003 p.14/30 A Useful Property Lemma. The coefficients s 0,..., s k+1 of the polynomial s(n) = σ(φ(i), n) are given by the matrix-vector product s(n) = [s 0,..., s k+1 ] n = N 1 k+1 0, φ 0,..., φ k i where Φ(i) = φ 0, φ 1,..., φ k i.

15 CPC 2003 p.15/30 Application Hence, the WCET of a loop is WCET = c 0 + σ(φ(i), max(0, b a s + 1))) = c 0 + s(max(0, b a s + 1))) where s(n) = N 1 k+1 0, φ 0,..., φ k i.

16 CPC 2003 p.16/30 An Example for I = 1 to N do /* header H 1 */ for J = I to I I 2 step 2 do /* header H 2 */ S The normalized iteration space is i = 0,..., N 1 j = 0,..., i+i2 2 1 The (recursively determined) execution time bounds ω(h 1 (0)) c 0 ω(h 2 (i, 0)) c 1 ω(s (i, j)) + ω(h 2(i, j + 1)) c 2

17 CPC 2003 p.17/30 An Example (cont d) WCET 1 = c 0 + σ(n 1 (c 1 + σ(n 0 c 2, max(0, i+i2 2 (i + i 2 0, so replace max(0, i+i2 2 = c 0 + σ(n 1 (c 1 + σ(n 0 c 2, i+i2 2 = c 0 + σ(n 1 (c 1 + σ(c 2, i+i2 2 ))), max(0, N)) i+i2 ) by 2 ) )), max(0, N)) )), max(0, N)) = c 0 + σ(n 1 (c c 2(i + i 2 )), max(0, N)) = c 0 + σ( c 1, c 2, c 2 i, max(0, N)) = c 0 + (c c 2) max(0, N) c 2 max(0, N) 3

18 CPC 2003 p.18/30 An Example (cont d) For c 0 = 1, c 1 = 1, and c 2 = 2 we have WCET 2 WCET where the conventional WCET estimation of the example fragment gives the over estimation WCET 2 = c 0 + c 1 N + c 2 N N 2 N 2

19 CPC 2003 p.19/30 Loop Bounds Analysis If the loop iteration space size is non-negative (n = b a s + 1 0), the max operation can be eliminated from the WCET expression W CET = c 0 + σ(φ(i), max(0, b a s + 1)). Otherwise, splitting with guards is used. Use symbolic range propagation [Blume, 1995]. Or we can use Newton series representations directly.

20 CPC 2003 p.20/30 Monotonicity If the values of a (symbolic) expression are monotonic in a loop, its extreme values can be easily determined (symbolically). Most array index and loop bound expressions are monotonic (in one loop dimension). But how can we determine monotonicity without too much effort?

21 CPC 2003 p.21/30 Monotonic Polynomials Let Φ(i) = φ 0, φ 1,..., φ k i denote the Newton series of a polynomial p(i) in i. If h(i) = N 1 k 1 φ 1,..., φ k i 0 for all i = 0,..., n 2, n 0, then p(i) is monotonically increasing on the interval [0, n 1]. Similarly, if h(i) 0 for all i = 0,..., n 2, then p(i) is monotonically decreasing on the interval [0, n 1].

22 CPC 2003 p.22/30 Monotonicity Example p(i) = i2 i 2 with coefficients [0, 1 2, 1 2 ] i has Newton series Φ(i) = N 2 [0, 1 2, 1 2 ] i = 0, 0, 1 i. Because h(i) = N 1 1 0, 1 i = i 0 for all i 0, p(i) is monotonically increasing with i. The value range of p(i) on i = 0,..., N is [p(0), p(n)] = [0, N 2 N 2 ]. While conventional value range analysis gives 1 2 [0, N]2 1 2 [0, N] = [ 1 2 N, 1 2 N 2 ].

23 CPC 2003 p.23/30 Value Range Analysis Value range of expression E = [L(E), U(E)] Rewrite rules:l(e 1 + E 2 ) = L(E 1 ) + L(E 2 ) L(Φ(i)) = U(Φ(i)) = L(φ 0 ) if L( φ 1,..., φ k i ) 0 L(N 1 k Φ(n 1)) if U( φ 1,..., φ k i ) 0 L(N 1 k Φ(i)) otherwise U(φ 0 ) if U( φ 1,..., φ k i ) 0 U(N 1 k Φ(n 1)) if L( φ 1,..., φ k i ) 0 U(N 1 k Φ(i)) otherwise

24 CPC 2003 p.24/30 Finding Critical Paths The objective is to find the critical path for i = 0 to n do if C then S 1 /* path with parametric WCET cost p(i) */ else S 2 /* path with parametric WCET cost q(i) */

25 CPC 2003 p.25/30 Comparing WCET Polynomials Let Φ(i) and Ψ(i) be Newton series of polynomials p(i) and q(i). If L(Φ(i) Ψ(i)) 0 then p(i) q(i). If U(Φ(i) Ψ(i)) 0 then p(i) q(i) (ms) i p(i) q(i)

26 CPC 2003 p.26/30 Example for i = 0 to N do if a[i] > 0 then for j = 0 to i do S 4 else for j = 0 to i do for k = 0 to j do S 8 ω(h 1 (0)) 1 ω(c 2 (i)) 1 ω(h 3 (i, 0)) 1 ω(s 4 (i, j)) + ω(h 3 (i, j + 1)) 2 ω(h 6 (i, 0)) 1 ω(h 7 (i, 0)) 1 ω(s 8 (i, j)) + ω(h 7 (i, j + 1)) 2

27 CPC 2003 p.27/30 Example (cont d) WCET 1 = N N N 3 WCET 2 = 1 + (N + 1) max(5 + 2N, 6 + 4N + N 2 ) WCET 3 = 1 + (N + 1) max(5 + 2N, 6 + 5N + 2N 2 ) WCET 3 WCET 2 WCET

28 CPC 2003 p.28/30 Bounding WCET Polynomials When one of the WCET polynomials does not dominate, we need to split the iteration space (root finding!) or derive an overall bounding polynomial p(i) q(i) bound

29 Iteration Reversal When one of the WCET polynomials does not dominate and the paths are loop invariant, the iteration direction can be reversed (ms) (ms) i p(i) q(i) p(i) q(i) CPC 2003 p.29/30

30 CPC 2003 p.30/30 Conclusions Parametric WCET has important applications. Timing of loops with complicated control flow is difficult. Relatively simple numeric/symbolic method. Approach also contributes to value range analysis. Implementation is work in progress.

Parametric timing estimation with Newton Gregory formulae

Parametric timing estimation with Newton Gregory formulae CONCURRENCY AND COMPUTATION: PRACTICE AND EXPERIENCE Published online in Wiley InterScience (www.interscience.wiley.com). DOI: 10.1002/cpe.1015 Parametric timing estimation with Newton Gregory formulae

More information

Tight Timing Estimation With the Newton-Gregory Formulae

Tight Timing Estimation With the Newton-Gregory Formulae Tight Timing Etimation With the Newton-Gregory Formulae Robert van Engelen, Kyle Gallivan, and Burt Walh Department of Computer Science and School of Computational Science and Information Technology Florida

More information

CSE20: Discrete Mathematics

CSE20: Discrete Mathematics Spring 2018 Summary Today: Induction, Program Correctness Reading: Chap. 5 Division Theorem Theorem: For every integer a and positive integer d 1, there exist integers q, r such that a = qd + r and 0 r

More information

Loop Parallelization Techniques and dependence analysis

Loop Parallelization Techniques and dependence analysis Loop Parallelization Techniques and dependence analysis Data-Dependence Analysis Dependence-Removing Techniques Parallelizing Transformations Performance-enchancing Techniques 1 When can we run code in

More information

Lecture: Workload Models (Advanced Topic)

Lecture: Workload Models (Advanced Topic) Lecture: Workload Models (Advanced Topic) Real-Time Systems, HT11 Martin Stigge 28. September 2011 Martin Stigge Workload Models 28. September 2011 1 System

More information

COMP 515: Advanced Compilation for Vector and Parallel Processors. Vivek Sarkar Department of Computer Science Rice University

COMP 515: Advanced Compilation for Vector and Parallel Processors. Vivek Sarkar Department of Computer Science Rice University COMP 515: Advanced Compilation for Vector and Parallel Processors Vivek Sarkar Department of Computer Science Rice University vsarkar@rice.edu COMP 515 Lecture 3 13 January 2009 Acknowledgments Slides

More information

Solutions. Problem 1: Suppose a polynomial in n of degree d has the form

Solutions. Problem 1: Suppose a polynomial in n of degree d has the form Assignment 1 1. Problem 3-1 on p. 57 2. Problem 3-2 on p. 58 3. Problem 4-5 on p. 86 4. Problem 6-1 on p. 142 5. Problem 7-4 on p. 162 6. Prove correctness (including halting) of SelectionSort (use loop

More information

Schedulability and Optimization Analysis for Non-Preemptive Static Priority Scheduling Based on Task Utilization and Blocking Factors

Schedulability and Optimization Analysis for Non-Preemptive Static Priority Scheduling Based on Task Utilization and Blocking Factors Schedulability and Optimization Analysis for Non-Preemptive Static Priority Scheduling Based on Task Utilization and Blocking Factors Georg von der Brüggen, Jian-Jia Chen, Wen-Hung Huang Department of

More information

Saturday, April 23, Dependence Analysis

Saturday, April 23, Dependence Analysis Dependence Analysis Motivating question Can the loops on the right be run in parallel? i.e., can different processors run different iterations in parallel? What needs to be true for a loop to be parallelizable?

More information

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

More information

CS Data Structures and Algorithm Analysis

CS Data Structures and Algorithm Analysis CS 483 - Data Structures and Algorithm Analysis Lecture II: Chapter 2 R. Paul Wiegand George Mason University, Department of Computer Science February 1, 2006 Outline 1 Analysis Framework 2 Asymptotic

More information

What s Decidable About Arrays?

What s Decidable About Arrays? What s Decidable About Arrays? Aaron R. Bradley Zohar Manna Henny B. Sipma Computer Science Department Stanford University 1 Outline 0. Motivation 1. Theories of Arrays 2. SAT A 4. Undecidable Problems

More information

Algorithms Design & Analysis. Analysis of Algorithm

Algorithms Design & Analysis. Analysis of Algorithm Algorithms Design & Analysis Analysis of Algorithm Review Internship Stable Matching Algorithm 2 Outline Time complexity Computation model Asymptotic notions Recurrence Master theorem 3 The problem of

More information

A PRACTICAL ALGORITHM FOR EXACT ARRAY DEPENDENCE ANALYSIS

A PRACTICAL ALGORITHM FOR EXACT ARRAY DEPENDENCE ANALYSIS A PRACTICAL ALGORITHM FOR EXACT ARRAY DEPENDENCE ANALYSIS 10/11/05 Slide 1 Introduction We describe the Omega Test which is a new method for dependence analysis. It combines new methods from integer programming

More information

Given a sequence a 1, a 2,...of numbers, the finite sum a 1 + a 2 + +a n,wheren is an nonnegative integer, can be written

Given a sequence a 1, a 2,...of numbers, the finite sum a 1 + a 2 + +a n,wheren is an nonnegative integer, can be written A Summations When an algorithm contains an iterative control construct such as a while or for loop, its running time can be expressed as the sum of the times spent on each execution of the body of the

More information

Dynamic Programming. Reading: CLRS Chapter 15 & Section CSE 6331: Algorithms Steve Lai

Dynamic Programming. Reading: CLRS Chapter 15 & Section CSE 6331: Algorithms Steve Lai Dynamic Programming Reading: CLRS Chapter 5 & Section 25.2 CSE 633: Algorithms Steve Lai Optimization Problems Problems that can be solved by dynamic programming are typically optimization problems. Optimization

More information

Math 471 (Numerical methods) Chapter 3 (second half). System of equations

Math 471 (Numerical methods) Chapter 3 (second half). System of equations Math 47 (Numerical methods) Chapter 3 (second half). System of equations Overlap 3.5 3.8 of Bradie 3.5 LU factorization w/o pivoting. Motivation: ( ) A I Gaussian Elimination (U L ) where U is upper triangular

More information

The Reachability-Bound Problem. Gulwani and Zuleger PLDI 10

The Reachability-Bound Problem. Gulwani and Zuleger PLDI 10 The Reachability-Bound Problem Gulwani and Zuleger PLDI 10 CS252r Spring 2011 The Reachability-Bound problem Find a symbolic worst case bound on the number of times a program point is reached Intra-procedural:

More information

CS 161 Summer 2009 Homework #2 Sample Solutions

CS 161 Summer 2009 Homework #2 Sample Solutions CS 161 Summer 2009 Homework #2 Sample Solutions Regrade Policy: If you believe an error has been made in the grading of your homework, you may resubmit it for a regrade. If the error consists of more than

More information

Multibody simulation

Multibody simulation Multibody simulation Dynamics of a multibody system (Newton-Euler formulation) Dimitar Dimitrov Örebro University June 8, 2012 Main points covered Newton-Euler formulation forward dynamics inverse dynamics

More information

Data Dependences and Parallelization. Stanford University CS243 Winter 2006 Wei Li 1

Data Dependences and Parallelization. Stanford University CS243 Winter 2006 Wei Li 1 Data Dependences and Parallelization Wei Li 1 Agenda Introduction Single Loop Nested Loops Data Dependence Analysis 2 Motivation DOALL loops: loops whose iterations can execute in parallel for i = 11,

More information

Introduction to Gröbner Bases for Geometric Modeling. Geometric & Solid Modeling 1989 Christoph M. Hoffmann

Introduction to Gröbner Bases for Geometric Modeling. Geometric & Solid Modeling 1989 Christoph M. Hoffmann Introduction to Gröbner Bases for Geometric Modeling Geometric & Solid Modeling 1989 Christoph M. Hoffmann Algebraic Geometry Branch of mathematics. Express geometric facts in algebraic terms in order

More information

Lecture 2. Fundamentals of the Analysis of Algorithm Efficiency

Lecture 2. Fundamentals of the Analysis of Algorithm Efficiency Lecture 2 Fundamentals of the Analysis of Algorithm Efficiency 1 Lecture Contents 1. Analysis Framework 2. Asymptotic Notations and Basic Efficiency Classes 3. Mathematical Analysis of Nonrecursive Algorithms

More information

Dependence Analysis. Dependence Examples. Last Time: Brief introduction to interprocedural analysis. do I = 2, 100 A(I) = A(I-1) + 1 enddo

Dependence Analysis. Dependence Examples. Last Time: Brief introduction to interprocedural analysis. do I = 2, 100 A(I) = A(I-1) + 1 enddo Dependence Analysis Dependence Examples Last Time: Brief introduction to interprocedural analysis Today: Optimization for parallel machines and memory hierarchies Dependence analysis Loop transformations

More information

Classes of data dependence. Dependence analysis. Flow dependence (True dependence)

Classes of data dependence. Dependence analysis. Flow dependence (True dependence) Dependence analysis Classes of data dependence Pattern matching and replacement is all that is needed to apply many source-to-source transformations. For example, pattern matching can be used to determine

More information

Dependence analysis. However, it is often necessary to gather additional information to determine the correctness of a particular transformation.

Dependence analysis. However, it is often necessary to gather additional information to determine the correctness of a particular transformation. Dependence analysis Pattern matching and replacement is all that is needed to apply many source-to-source transformations. For example, pattern matching can be used to determine that the recursion removal

More information

Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions

Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions Mitra Nasri Chair of Real-time Systems, Technische Universität Kaiserslautern, Germany nasri@eit.uni-kl.de

More information

Advanced Restructuring Compilers. Advanced Topics Spring 2009 Prof. Robert van Engelen

Advanced Restructuring Compilers. Advanced Topics Spring 2009 Prof. Robert van Engelen Advanced Restructuring Compilers Advanced Topics Spring 2009 Prof. Robert van Engelen Overview Data and control dependences The theory and practice of data dependence analysis K-level loop-carried dependences

More information

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants

Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants Extended Superposed Quantum State Initialization Using Disjoint Prime Implicants David Rosenbaum, Marek Perkowski Portland State University, Department of Computer Science Portland State University, Department

More information

Lecture 6 September 21, 2016

Lecture 6 September 21, 2016 ICS 643: Advanced Parallel Algorithms Fall 2016 Lecture 6 September 21, 2016 Prof. Nodari Sitchinava Scribe: Tiffany Eulalio 1 Overview In the last lecture, we wrote a non-recursive summation program and

More information

Partial Fraction Decompositions

Partial Fraction Decompositions Partial Fraction Rational Functions Partial Fraction Finding Partial Fractions Integrating Partial Fraction Eamples Rational Functions Definition Eample A function of the type P/Q, where both P and Q are

More information

Optimizing Intra-Task Voltage Scheduling Using Data Flow Analysis Λ

Optimizing Intra-Task Voltage Scheduling Using Data Flow Analysis Λ Optimizing Intra-Task Voltage Scheduling Using Data Flow Analysis Λ Dongkun Shin Jihong Kim School of CSE School of CSE Seoul National University Seoul National University Seoul, Korea 151-742 Seoul, Korea

More information

Section 11.1 Sequences

Section 11.1 Sequences Math 152 c Lynch 1 of 8 Section 11.1 Sequences A sequence is a list of numbers written in a definite order: a 1, a 2, a 3,..., a n,... Notation. The sequence {a 1, a 2, a 3,...} can also be written {a

More information

COMP 382: Reasoning about algorithms

COMP 382: Reasoning about algorithms Fall 2014 Unit 4: Basics of complexity analysis Correctness and efficiency So far, we have talked about correctness and termination of algorithms What about efficiency? Running time of an algorithm For

More information

Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3

Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3 Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3 Lecture Outline The rate monotonic algorithm (cont d) Maximum utilisation test The deadline monotonic algorithm The earliest

More information

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)?

Mathematical Induction. How does discrete math help us. How does discrete math help (CS160)? How does discrete math help (CS161)? How does discrete math help us Helps create a solution (program) Helps analyze a program How does discrete math help (CS160)? Helps create a solution (program) q Logic helps you understand conditionals

More information

Compiler Optimisation

Compiler Optimisation Compiler Optimisation 8 Dependence Analysis Hugh Leather IF 1.18a hleather@inf.ed.ac.uk Institute for Computing Systems Architecture School of Informatics University of Edinburgh 2018 Introduction This

More information

Algorithmic Approach to Counting of Certain Types m-ary Partitions

Algorithmic Approach to Counting of Certain Types m-ary Partitions Algorithmic Approach to Counting of Certain Types m-ary Partitions Valentin P. Bakoev Abstract Partitions of integers of the type m n as a sum of powers of m (the so called m-ary partitions) and their

More information

Analysis of Algorithm Efficiency. Dr. Yingwu Zhu

Analysis of Algorithm Efficiency. Dr. Yingwu Zhu Analysis of Algorithm Efficiency Dr. Yingwu Zhu Measure Algorithm Efficiency Time efficiency How fast the algorithm runs; amount of time required to accomplish the task Our focus! Space efficiency Amount

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Jan Stelovsky based on slides by Dr. Baek and Dr. Still Originals by Dr. M. P. Frank and Dr. J.L. Gross Provided by

More information

Determining the Galois group of a rational polynomial

Determining the Galois group of a rational polynomial JAH 1 Determining the Galois group of a rational polynomial Alexander Hulpke Department of Mathematics Colorado State University Fort Collins, CO, 80523 hulpke@math.colostate.edu http://www.math.colostate.edu/

More information

Real-Time Workload Models with Efficient Analysis

Real-Time Workload Models with Efficient Analysis Real-Time Workload Models with Efficient Analysis Advanced Course, 3 Lectures, September 2014 Martin Stigge Uppsala University, Sweden Fahrplan 1 DRT Tasks in the Model Hierarchy Liu and Layland and Sporadic

More information

CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms

CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms CS 4407 Algorithms Lecture 3: Iterative and Divide and Conquer Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline CS 4407, Algorithms Growth Functions

More information

CS483 Design and Analysis of Algorithms

CS483 Design and Analysis of Algorithms CS483 Design and Analysis of Algorithms Chapter 2 Divide and Conquer Algorithms Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: Room 5326, Engineering Building, Thursday 4:30pm -

More information

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations Sparse Linear Systems Iterative Methods for Sparse Linear Systems Matrix Computations and Applications, Lecture C11 Fredrik Bengzon, Robert Söderlund We consider the problem of solving the linear system

More information

CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms

CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms CS 4407 Algorithms Lecture 2: Iterative and Divide and Conquer Algorithms Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline CS 4407, Algorithms Growth Functions

More information

i=1 i B[i] B[i] + A[i, j]; c n for j n downto i + 1 do c n i=1 (n i) C[i] C[i] + A[i, j]; c n

i=1 i B[i] B[i] + A[i, j]; c n for j n downto i + 1 do c n i=1 (n i) C[i] C[i] + A[i, j]; c n Fundamental Algorithms Homework #1 Set on June 25, 2009 Due on July 2, 2009 Problem 1. [15 pts] Analyze the worst-case time complexity of the following algorithms,and give tight bounds using the Theta

More information

The geometry of polynomial diagrams

The geometry of polynomial diagrams Theoretical Mathematics & Applications, vol.4, no.1, 014, 71-76 ISSN: 179-9687 (print), 179-9709 (online) Scienpress Ltd, 014 The geometry of polynomial diagrams Alennikov A. Maksim 1 Abstract In this

More information

Lecture 12: Algorithm Analysis

Lecture 12: Algorithm Analysis Lecture 12: Algorithm Analysis CS6507 Python Programming and Data Science Applications Dr Kieran T. Herley Department of Computer Science University College Cork 2017-2018 KH (26/02/18) Lecture 12: Algorithm

More information

Character Polynomials

Character Polynomials Character Polynomials Problem From Stanley s Positivity Problems in Algebraic Combinatorics Problem : Give a combinatorial interpretation of the row sums of the character table for S n (combinatorial proof

More information

Introduction to Algorithms and Asymptotic analysis

Introduction to Algorithms and Asymptotic analysis Indian Institute of Information Technology Design and Manufacturing, Kancheepuram Chennai 600 127, India An Autonomous Institute under MHRD, Govt of India An Institute of National Importance COM 501 Advanced

More information

Fast Matrix Product Algorithms: From Theory To Practice

Fast Matrix Product Algorithms: From Theory To Practice Introduction and Definitions The τ-theorem Pan s aggregation tables and the τ-theorem Software Implementation Conclusion Fast Matrix Product Algorithms: From Theory To Practice Thomas Sibut-Pinote Inria,

More information

CS483 Design and Analysis of Algorithms

CS483 Design and Analysis of Algorithms CS483 Design and Analysis of Algorithms Lecture 6-8 Divide and Conquer Algorithms Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: STII, Room 443, Friday 4:00pm - 6:00pm or by appointments

More information

Applying block intersection polynomials to study graphs and designs

Applying block intersection polynomials to study graphs and designs Applying block intersection polynomials to study graphs and designs Leonard Soicher Queen Mary University of London CoCoA15, Colorado State University, Fort Collins, July 2015 Leonard Soicher (QMUL) Block

More information

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation Knowledge Bases and Databases Part 1: First-Order Queries Diego Calvanese Faculty of Computer Science Master of Science in Computer Science A.Y. 2007/2008 Overview of Part 1: First-order queries 1 First-order

More information

Problem Set 1. MIT students: This problem set is due in lecture on Wednesday, September 19.

Problem Set 1. MIT students: This problem set is due in lecture on Wednesday, September 19. Introduction to Algorithms September 7, 2001 Massachusetts Institute of Technology 6.046J/18.410J Singapore-MIT Alliance SMA5503 Professors Erik Demaine, Lee Wee Sun, and Charles E. Leiserson Handout 7

More information

CISC 235: Topic 1. Complexity of Iterative Algorithms

CISC 235: Topic 1. Complexity of Iterative Algorithms CISC 235: Topic 1 Complexity of Iterative Algorithms Outline Complexity Basics Big-Oh Notation Big-Ω and Big-θ Notation Summations Limitations of Big-Oh Analysis 2 Complexity Complexity is the study of

More information

Computing Square Roots using the Babylonian Method

Computing Square Roots using the Babylonian Method Computing Square Roots using the Babylonian Method René Thiemann February 16, 2013 Abstract We implement the Babylonian method [1] to compute square roots of numbers. We provide precise algorithms for

More information

Lecture 5: Loop Invariants and Insertion-sort

Lecture 5: Loop Invariants and Insertion-sort Lecture 5: Loop Invariants and Insertion-sort COMS10007 - Algorithms Dr. Christian Konrad 11.01.2019 Dr. Christian Konrad Lecture 5: Loop Invariants and Insertion-sort 1 / 12 Proofs by Induction Structure

More information

MATH 1111 Section P.1 Bland. Algebraic Expressions - An algebraic expression is a combination of variables and numbers using operations.

MATH 1111 Section P.1 Bland. Algebraic Expressions - An algebraic expression is a combination of variables and numbers using operations. MATH 1111 Section P.1 Bland Variable A letter or symbol used to represent a number. Algebraic Expressions - An algebraic expression is a combination of variables and numbers using operations. Coefficient

More information

Top Down Design. Gunnar Gotshalks 03-1

Top Down Design. Gunnar Gotshalks 03-1 Top Down Design 03-1 Top Down Description Top down is also known as step wise refinement and functional decomposition Given an operation, there are only the following three choices for refinement» Sequence

More information

1 Sequences and Summation

1 Sequences and Summation 1 Sequences and Summation A sequence is a function whose domain is either all the integers between two given integers or all the integers greater than or equal to a given integer. For example, a m, a m+1,...,

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

MULTISECTION METHOD AND FURTHER FORMULAE FOR π. De-Yin Zheng

MULTISECTION METHOD AND FURTHER FORMULAE FOR π. De-Yin Zheng Indian J. pure appl. Math., 39(: 37-55, April 008 c Printed in India. MULTISECTION METHOD AND FURTHER FORMULAE FOR π De-Yin Zheng Department of Mathematics, Hangzhou Normal University, Hangzhou 30036,

More information

Module 1: Analyzing the Efficiency of Algorithms

Module 1: Analyzing the Efficiency of Algorithms Module 1: Analyzing the Efficiency of Algorithms Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 39217 E-mail: natarajan.meghanathan@jsums.edu What is an Algorithm?

More information

DO i 1 = L 1, U 1 DO i 2 = L 2, U 2... DO i n = L n, U n. S 1 A(f 1 (i 1,...,i, n ),...,f, m (i 1,...,i, n )) =...

DO i 1 = L 1, U 1 DO i 2 = L 2, U 2... DO i n = L n, U n. S 1 A(f 1 (i 1,...,i, n ),...,f, m (i 1,...,i, n )) =... 15-745 Lecture 7 Data Dependence in Loops 2 Complex spaces Delta Test Merging vectors Copyright Seth Goldstein, 2008-9 Based on slides from Allen&Kennedy 1 The General Problem S 1 A(f 1 (i 1,,i n ),,f

More information

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 2 Luca Trevisan August 29, 2017

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 2 Luca Trevisan August 29, 2017 U.C. Berkeley CS94: Beyond Worst-Case Analysis Handout Luca Trevisan August 9, 07 Scribe: Mahshid Montazer Lecture In this lecture, we study the Max Cut problem in random graphs. We compute the probable

More information

Ch 9/10/11/12 Exam Review

Ch 9/10/11/12 Exam Review Ch 9/0// Exam Review The vector v has initial position P and terminal point Q. Write v in the form ai + bj; that is, find its position vector. ) P = (4, 6); Q = (-6, -) Find the vertex, focus, and directrix

More information

Notations. For any hypergraph H 2 V we have. H + H = and H + H = 2 V.

Notations. For any hypergraph H 2 V we have. H + H = and H + H = 2 V. Notations For any hypergraph H 2 V we have H + H = and H + H = 2 V. Notations For any hypergraph H 2 V we have H + H = and H + H = 2 V. Given a Sperner hypergraph H, we can view it as the family of minimal

More information

CSCE 222 Discrete Structures for Computing

CSCE 222 Discrete Structures for Computing CSCE 222 Discrete Structures for Computing Algorithms Dr. Philip C. Ritchey Introduction An algorithm is a finite sequence of precise instructions for performing a computation or for solving a problem.

More information

Algorithms in Braid Groups

Algorithms in Braid Groups Algorithms in Braid Groups Matthew J. Campagna matthew.campagna@pb.com Secure Systems Pitney Bowes, Inc. Abstract Braid Groups have recently been considered for use in Public-Key Cryptographic Systems.

More information

A. Incorrect! Apply the rational root test to determine if any rational roots exist.

A. Incorrect! Apply the rational root test to determine if any rational roots exist. College Algebra - Problem Drill 13: Zeros of Polynomial Functions No. 1 of 10 1. Determine which statement is true given f() = 3 + 4. A. f() is irreducible. B. f() has no real roots. C. There is a root

More information

A 2-Approximation Algorithm for Scheduling Parallel and Time-Sensitive Applications to Maximize Total Accrued Utility Value

A 2-Approximation Algorithm for Scheduling Parallel and Time-Sensitive Applications to Maximize Total Accrued Utility Value A -Approximation Algorithm for Scheduling Parallel and Time-Sensitive Applications to Maximize Total Accrued Utility Value Shuhui Li, Miao Song, Peng-Jun Wan, Shangping Ren Department of Engineering Mechanics,

More information

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

Computer Science & Engineering 423/823 Design and Analysis of Algorithms Computer Science & Engineering 423/823 Design and Analysis of s Lecture 09 Dynamic Programming (Chapter 15) Stephen Scott (Adapted from Vinodchandran N. Variyam) 1 / 41 Spring 2010 Dynamic programming

More information

Fundamental Algorithms

Fundamental Algorithms Chapter 2: Sorting, Winter 2018/19 1 Fundamental Algorithms Chapter 2: Sorting Jan Křetínský Winter 2018/19 Chapter 2: Sorting, Winter 2018/19 2 Part I Simple Sorts Chapter 2: Sorting, Winter 2018/19 3

More information

MA008/MIIZ01 Design and Analysis of Algorithms Lecture Notes 3

MA008/MIIZ01 Design and Analysis of Algorithms Lecture Notes 3 MA008 p.1/37 MA008/MIIZ01 Design and Analysis of Algorithms Lecture Notes 3 Dr. Markus Hagenbuchner markus@uow.edu.au. MA008 p.2/37 Exercise 1 (from LN 2) Asymptotic Notation When constants appear in exponents

More information

Fundamental Algorithms

Fundamental Algorithms Fundamental Algorithms Chapter 2: Sorting Harald Räcke Winter 2015/16 Chapter 2: Sorting, Winter 2015/16 1 Part I Simple Sorts Chapter 2: Sorting, Winter 2015/16 2 The Sorting Problem Definition Sorting

More information

Hoare Logic (I): Axiomatic Semantics and Program Correctness

Hoare Logic (I): Axiomatic Semantics and Program Correctness Hoare Logic (I): Axiomatic Semantics and Program Correctness (Based on [Apt and Olderog 1991; Gries 1981; Hoare 1969; Kleymann 1999; Sethi 199]) Yih-Kuen Tsay Dept. of Information Management National Taiwan

More information

Mathematics for Decision Making: An Introduction. Lecture 8

Mathematics for Decision Making: An Introduction. Lecture 8 Mathematics for Decision Making: An Introduction Lecture 8 Matthias Köppe UC Davis, Mathematics January 29, 2009 8 1 Shortest Paths and Feasible Potentials Feasible Potentials Suppose for all v V, there

More information

V. Adamchik 1. Recurrences. Victor Adamchik Fall of 2005

V. Adamchik 1. Recurrences. Victor Adamchik Fall of 2005 V. Adamchi Recurrences Victor Adamchi Fall of 00 Plan Multiple roots. More on multiple roots. Inhomogeneous equations 3. Divide-and-conquer recurrences In the previous lecture we have showed that if the

More information

Proofs Not Based On POMI

Proofs Not Based On POMI s Not Based On POMI James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University February 1, 018 Outline Non POMI Based s Some Contradiction s Triangle

More information

Localization. Introduction. Markus Lange-Hegermann

Localization. Introduction. Markus Lange-Hegermann Localization Markus Lange-Hegermann Introduction This talk deals with localisation of holonomic Weyl algebra modules and their localisation. Consider left modules an d left ideals for this talk. Instead

More information

Embedded Systems Development

Embedded Systems Development Embedded Systems Development Lecture 3 Real-Time Scheduling Dr. Daniel Kästner AbsInt Angewandte Informatik GmbH kaestner@absint.com Model-based Software Development Generator Lustre programs Esterel programs

More information

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

Computer Science & Engineering 423/823 Design and Analysis of Algorithms Computer Science & Engineering 423/823 Design and Analysis of Algorithms Lecture 03 Dynamic Programming (Chapter 15) Stephen Scott and Vinodchandran N. Variyam sscott@cse.unl.edu 1/44 Introduction Dynamic

More information

Improved Priority Assignment for the Abort-and-Restart (AR) Model

Improved Priority Assignment for the Abort-and-Restart (AR) Model Improved Priority Assignment for the Abort-and-Restart (AR) Model H.C. Wong and A. Burns Department of Computer Science, University of York, UK. February 1, 2013 Abstract This paper addresses the scheduling

More information

Unit 1. Revisiting Parent Functions and Graphing

Unit 1. Revisiting Parent Functions and Graphing Unit 1 Revisiting Parent Functions and Graphing Precalculus Analysis Pacing Guide First Nine Weeks Understand how the algebraic properties of an equation transform the geometric properties of its graph.

More information

Automatic Differentiation Equipped Variable Elimination for Sensitivity Analysis on Probabilistic Inference Queries

Automatic Differentiation Equipped Variable Elimination for Sensitivity Analysis on Probabilistic Inference Queries Automatic Differentiation Equipped Variable Elimination for Sensitivity Analysis on Probabilistic Inference Queries Anonymous Author(s) Affiliation Address email Abstract 1 2 3 4 5 6 7 8 9 10 11 12 Probabilistic

More information

Exact Arithmetic on a Computer

Exact Arithmetic on a Computer Exact Arithmetic on a Computer Symbolic Computation and Computer Algebra William J. Turner Department of Mathematics & Computer Science Wabash College Crawfordsville, IN 47933 Tuesday 21 September 2010

More information

CS Non-recursive and Recursive Algorithm Analysis

CS Non-recursive and Recursive Algorithm Analysis CS483-04 Non-recursive and Recursive Algorithm Analysis Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 4:30pm - 5:30pm or by appointments lifei@cs.gmu.edu with subject: CS483 http://www.cs.gmu.edu/

More information

Review Of Topics. Review: Induction

Review Of Topics. Review: Induction Review Of Topics Asymptotic notation Solving recurrences Sorting algorithms Insertion sort Merge sort Heap sort Quick sort Counting sort Radix sort Medians/order statistics Randomized algorithm Worst-case

More information

Copyright 2000, Kevin Wayne 1

Copyright 2000, Kevin Wayne 1 Algorithm runtime analysis and computational tractability Time Complexity of an Algorithm How do we measure the complexity (time, space requirements) of an algorithm. 1 microsecond? Units of time As soon

More information

Advanced Higher Grade

Advanced Higher Grade Practice Eamination A (Assessing Units & ) MATHEMATICS Advanced Higher Grade Time allowed - hours 0 minutes Read Carefully. Full credit will be given only where the solution contains appropriate working..

More information

A point p is said to be dominated by point q if p.x=q.x&p.y=q.y 2 true. In RAM computation model, RAM stands for Random Access Model.

A point p is said to be dominated by point q if p.x=q.x&p.y=q.y 2 true. In RAM computation model, RAM stands for Random Access Model. In analysis the upper bound means the function grows asymptotically no faster than its largest term. 1 true A point p is said to be dominated by point q if p.x=q.x&p.y=q.y 2 true In RAM computation model,

More information

Analysis of Algorithms

Analysis of Algorithms October 1, 2015 Analysis of Algorithms CS 141, Fall 2015 1 Analysis of Algorithms: Issues Correctness/Optimality Running time ( time complexity ) Memory requirements ( space complexity ) Power I/O utilization

More information

Lecture 10. Sublinear Time Algorithms (contd) CSC2420 Allan Borodin & Nisarg Shah 1

Lecture 10. Sublinear Time Algorithms (contd) CSC2420 Allan Borodin & Nisarg Shah 1 Lecture 10 Sublinear Time Algorithms (contd) CSC2420 Allan Borodin & Nisarg Shah 1 Recap Sublinear time algorithms Deterministic + exact: binary search Deterministic + inexact: estimating diameter in a

More information

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

5 + 9(10) + 3(100) + 0(1000) + 2(10000) = Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,

More information

Dynamic Programming( Weighted Interval Scheduling)

Dynamic Programming( Weighted Interval Scheduling) Dynamic Programming( Weighted Interval Scheduling) 17 November, 2016 Dynamic Programming 1 Dynamic programming algorithms are used for optimization (for example, finding the shortest path between two points,

More information

Worst-case Throughput Analysis for Parametric Rate and Parametric Actor Execution Time Scenario-Aware Dataflow Graphs. Mladen Skelin.

Worst-case Throughput Analysis for Parametric Rate and Parametric Actor Execution Time Scenario-Aware Dataflow Graphs. Mladen Skelin. Worst-case Throughput Analysis for Parametric Rate and Parametric Actor Execution Time Scenario-Aware Dataflow Graphs Norwegian University of Science and Technology Department of Engineering Cybernetics

More information

On rational numbers associated with arithmetic functions evaluated at factorials

On rational numbers associated with arithmetic functions evaluated at factorials On rational numbers associated with arithmetic functions evaluated at factorials Dan Baczkowski (joint work with M. Filaseta, F. Luca, and O. Trifonov) (F. Luca) Fix r Q, there are a finite number of positive

More information

Termination Analysis of Loops

Termination Analysis of Loops Termination Analysis of Loops Zohar Manna with Aaron R. Bradley Computer Science Department Stanford University 1 Example: GCD Algorithm gcd(y 1, y 2 ) = gcd(y 1 y 2, y 2 ) if y 1 > y 2 gcd(y 1, y 2 y

More information