DRAFT - do not circulate

Size: px
Start display at page:

Download "DRAFT - do not circulate"

Transcription

1 An Introduction to Proofs about Concurrent Programs K. V. S. Prasad (for the course TDA383/DIT390) Deartment of Comuter Science Chalmers University Setember 26, 2016 Rough sketch of notes released since it will be too late for this course if we wait till the notes are olished. The lan is roughly this: State diagram based roofs - these are easy to understand in rincile, and are what SPIN does. The text-book does these in enough detail, including in Cha. 3. The remaining issue it how to tell SPIN what we think is true, so it can hunt for counter-examles. We have already seen one way, assertions. These are often enough for safety roerties, but will not do for liveness in general, For that, we need LTL, covered later. Syntactic roofs (i.e., arguing from the rogram text). We do these in arallel with state diagrams, but do them in stages. The first stage uses informal but hoefully rigorous arguments, with a little roositional calculus notation for comactness. Simle theorems of roositional calculus are assumed. Temoral asects (arguing about coming or revious states) are first treated entirely informally. Later sections use LTL notation. It is ossible to formalise the rogramming language semantics, but that is not included here. So our arguments will continue to be held together by informal stes. The goal is first to get you to follow the informal reasoning. Can you make your own arguments? (By the way, no one does formal reasoning before doing the informal thing first). Finally, and only in rincile, the goal is to get you to see how to use a SPIN like model checker. A basic idea we exlore first is INVARIANTS. 1 Chater 3 For the examles here, Cha. 3 of the textbook gives arguments based on the state diagram. Here we give text-basd arguments. 1

2 1.1 Notation Let the boolean 2 mean that rocess is at label 2, etc. Abusing notation, we sometimes also write 2 to mean the label 2 itself. Logical symbols: We use for inclusive or, for and, for not, for imlies, and for imlies and is imlied by. 1.2 Definitions: deadlock, livelock, starvation We interret await B to mean loo ski until B. The latter re-formulation can be called busy-waiting. To kee matters simle, assume also that and run on searate dedicated CPUs. Because of shared variables, this does not ostone issues of scheduling and fairness. Assume weak fairness: a scenario is weakly fair if an always enabled command will be executed at some oint. Since there is no blocking command in the mini-language we are using to rogram, these rocesses do not have a blocked state. So rocesses are either running or terminated. This means in this set-u we cannot have deadlock, which we define as everyone blocked. We can have livelock, which we define as everyone busy-waiting. Note that these definitions differ from those of the textbook (I find those definitions confusing). We agree with the textbook s definition of (individual) starvation: a rocess can get stuck forever (busy)-waiting to enter its critical section. A secial case is that of non-cometitive starvation, or NC-starvation, where starves if loos in its NCS. A working euivalence is that in deadlock and livelock, all rocesses starve together. In individual starvation, a scenario exists where one articular rocess starves. The third attemt below shows a rogram that can livelock even though no rocess NC-starves. 1.3 First attemt, Alg. 3.5,. 53 integer turn := 1 loo forever loo forever 1: await turn=1 1: await turn=2 2: turn:=2 2: turn:=1 We write t for the variable turn, and let t1 mean t = 1 and t2 mean t = 2. Then we have invariants: T 1 =t1 t2 and T 2 = (t1 t2). The first is established by noting what values are assigned to t, and the second follows from the nature of variables they cannot hold two values simultaneously. Then it follows that 2 t1 because has just got ast 1, and any interference from can only result in (re)-setting t to 1. Similarly, 2 t Mutex We have to show that M= (2 2) is invariant. We have 2 t1 t2 2, and similarly 2 2, so M holds. 2

3 1.3.2 Livelock Let L=1 t1 1 t2. Then L contradicts T 1. Thus L is an invariant, and since L defines livelock, we have shown that livelock cannot haen Starvation NC-starvation is ossible. The scenario 1, 2, 1 achieves this if 1 loos, which it may, according to the conditions of the CS roblem. 1.4 Second attemt, Alg. 3.7,. 56 boolean want := false, want := false loo forever loo forever 1: await want = false 1: await want = false 2: want := true 2: want := true 3: want := false 3: want := false We write w for want and w for want. Note that only sets w and only sets w. Let T 1 =(1 2) w, and T 3 =3 w. Then T 1 and T 2 are invariant. Similar invariants hold for. Note that we cannot claim 2 w even though w is needed for to get ast 2, since we do not know where is. It may just have executed Mutex This would reuire that (2 3) (2 3). But to ensure anything about where is, we have to ensure somthing about w. For examle, w 2. The remise for the mutex statement tells us nothing about w. So we cannot rove mutex, and indeed it is easy to write a scenario where it is broken: 1, Livelock Let L=1 w 1 w. Then L defines livelock, and contradicts T 1, so L is invariant. That is, livelock cannot haen Starvation Let S=1 w 1. Then S defines NC-starvation of, where loos in its NCS. But 1 w, so S is self-contradictory. That is, S is invariant, and cannot starve this way. Note that here is looing in its NCS, not in its re-rotocol. Both are notated 1 in the abbreviated rogram. But can starve if it is only scheduled to look at w after 2. Is tis weakly fair? 3

4 1.5 Third attemt, Alg. 3.8,. 57 boolean want := false, want := false loo forever loo forever 1: non-critical section 1: non-critical section 2: want := true 2: want := true 3: await want = false 3: await want = false 4: critical section 4: critical section 5: want := false 5: want := false We write w for want and w for want. Again, only sets w and only sets w. Let T 1 =(1 2) w, and T 2 =(3 4 5) w. Then T 1 and T 2 are invariant. Similar invariants hold for. Note that we cannot claim 4 w even though w is needed for to get ast 3, since we do not know where is. It may just have executed Mutex We have to show that M= (4 4) is invariant. M holds at the start. Can we go from a state where M holds to one where it doesn t? Suose is at 4, and is not already at 4. To get to 4, we need w so that can get ast 3. But this contradicts T 2. So M is invariant: mutex is assured Livelock Let L= 3 w 3 w; then L defines livelock. But L can be true; nothing in the invariants contradicts it, so livelock can haen. A scenario for this is: 1, 1, 2, 2, 3, Starvation Let S=3 w 1. If S can be true, can be NC-starved. But T 1 says 1 w, which contradicts S. So S is invariant; NC-starvation cannot occur. But can 3 w forever, thus starving, in some other scenario? Since w (3 4 5) is invariant, this means (3 4 5). The case 3 is livelock; and has to ass 4, 5 in finite time. So there is no individual starvation. 4

5 1.6 Fourth attemt, Alg. 3.9,. 59 boolean want := false, want := false loo forever loo forever 1: non-critical section 1: non-critical section 2: want := true 2: want := true 3: while want 3: while want 4: want := false 4: want := false 5: want := true 5: want := true 6: critical section 6: critical section 7: want := false 7: want := false Note that this rogram has disensed with the await statement, writing out the busy-waits exlicitly. We write w for want and w for want. Again, only sets w and only sets w. Let T 1 =(1 2 5) w, and T 2 =( ) w. Then T 1 and T 2 are invariant. Similar invariants hold for. Note that we cannot claim 4 w even though w is needed for to get ast 3, since we do not know where is. It may just have executed 2 or Mutex We have to show that M= (6 6) is invariant. M holds at the start. Can we go from a state where M holds to one where it doesn t? Suose is at 6, and is not already at 6. To get to 6, we need w so that can get ast 3. But this contradicts T 2, which says 6 w. So M is invariant: mutex is assured Livelock Let L= 3 w 3 w; then a ath where states reeatedly satisfy L defines extended livelock. But L can be true; nothing in the invariants contradicts it, so livelock can haen. A scenario for this is: 1, 1, 2, 2, 3, 3, followed by the execution of the re-rotocol loos 3, 4, 5 and 3, 4, 5 in arallel Starvation Let S=3 w 1. If S can be true, can be NC-starved. But T 1 says 1 w, which contradicts S. So S is invariant; NC-starvation cannot occur. But can 3 w forever, thus starving, in some other scenario? Since w ( ) is invariant, this means ( ). Suose is in its rerotocol loo. Either is also stuck in its re-rotocol loo, or it escaes. In the latter case, w is false in 1, so is stuck forever only if the scheduler never lets 3 execute when 1. Fair? 5

Model checking, verification of CTL. One must verify or expel... doubts, and convert them into the certainty of YES [Thomas Carlyle]

Model checking, verification of CTL. One must verify or expel... doubts, and convert them into the certainty of YES [Thomas Carlyle] Chater 5 Model checking, verification of CTL One must verify or exel... doubts, and convert them into the certainty of YES or NO. [Thomas Carlyle] 5. The verification setting Page 66 We introduce linear

More information

CTL, the branching-time temporal logic

CTL, the branching-time temporal logic CTL, the branching-time temoral logic Cătălin Dima Université Paris-Est Créteil Cătălin Dima (UPEC) CTL 1 / 29 Temoral roerties CNIL Safety, termination, mutual exclusion LTL. Liveness, reactiveness, resonsiveness,

More information

p,egp AFp EFp ... p,agp

p,egp AFp EFp ... p,agp TUESDAY, Session 2 Temoral logic and model checking, cont 1 Branching time and CTL model checking In a branching time temoral logics, we consider not just a single ath through the Krike model, but all

More information

Topic 7: Using identity types

Topic 7: Using identity types Toic 7: Using identity tyes June 10, 2014 Now we would like to learn how to use identity tyes and how to do some actual mathematics with them. By now we have essentially introduced all inference rules

More information

HENSEL S LEMMA KEITH CONRAD

HENSEL S LEMMA KEITH CONRAD HENSEL S LEMMA KEITH CONRAD 1. Introduction In the -adic integers, congruences are aroximations: for a and b in Z, a b mod n is the same as a b 1/ n. Turning information modulo one ower of into similar

More information

Principles. Model (System Requirements) Answer: Model Checker. Specification (System Property) Yes, if the model satisfies the specification

Principles. Model (System Requirements) Answer: Model Checker. Specification (System Property) Yes, if the model satisfies the specification Model Checking Princiles Model (System Requirements) Secification (System Proerty) Model Checker Answer: Yes, if the model satisfies the secification Counterexamle, otherwise Krike Model Krike Structure

More information

Lecture 9: Cri,cal Sec,ons revisited, and Reasoning about Programs. K. V. S. Prasad Dept of Computer Science Chalmers University Monday 23 Feb 2015

Lecture 9: Cri,cal Sec,ons revisited, and Reasoning about Programs. K. V. S. Prasad Dept of Computer Science Chalmers University Monday 23 Feb 2015 Lecture 9: Cri,cal Sec,ons revisited, and Reasoning about Programs K. V. S. Prasad Dept of Computer Science Chalmers University Monday 23 Feb 2015 Plan for today Chap 2, 3 recap and complete Chap 4 intro

More information

MATH 2710: NOTES FOR ANALYSIS

MATH 2710: NOTES FOR ANALYSIS MATH 270: NOTES FOR ANALYSIS The main ideas we will learn from analysis center around the idea of a limit. Limits occurs in several settings. We will start with finite limits of sequences, then cover infinite

More information

1 Gambler s Ruin Problem

1 Gambler s Ruin Problem Coyright c 2017 by Karl Sigman 1 Gambler s Ruin Problem Let N 2 be an integer and let 1 i N 1. Consider a gambler who starts with an initial fortune of $i and then on each successive gamble either wins

More information

Automata-Theoretic Model Checking of Reactive Systems

Automata-Theoretic Model Checking of Reactive Systems Automata-Theoretic Model Checking of Reactive Systems Radu Iosif Verimag/CNRS (Grenoble, France) Thanks to Tom Henzinger (IST, Austria), Barbara Jobstmann (CNRS, Grenoble) and Doron Peled (Bar-Ilan University,

More information

Sets of Real Numbers

Sets of Real Numbers Chater 4 Sets of Real Numbers 4. The Integers Z and their Proerties In our revious discussions about sets and functions the set of integers Z served as a key examle. Its ubiquitousness comes from the fact

More information

Outline. CS21 Decidability and Tractability. Regular expressions and FA. Regular expressions and FA. Regular expressions and FA

Outline. CS21 Decidability and Tractability. Regular expressions and FA. Regular expressions and FA. Regular expressions and FA Outline CS21 Decidability and Tractability Lecture 4 January 14, 2019 FA and Regular Exressions Non-regular languages: Puming Lemma Pushdown Automata Context-Free Grammars and Languages January 14, 2019

More information

[Ch 3, 4] Logic and Proofs (2) 1. Valid and Invalid Arguments ( 2.3, 3.4) 400 lecture note #2. 1) Basics

[Ch 3, 4] Logic and Proofs (2) 1. Valid and Invalid Arguments ( 2.3, 3.4) 400 lecture note #2. 1) Basics 400 lecture note #2 [Ch 3, 4] Logic and Proofs (2) 1. Valid and Invalid Arguments ( 2.3, 3.4) 1) Basics An argument is a sequence of statements ( s1, s2,, sn). All statements in an argument, excet for

More information

Why Proofs? Proof Techniques. Theorems. Other True Things. Proper Proof Technique. How To Construct A Proof. By Chuck Cusack

Why Proofs? Proof Techniques. Theorems. Other True Things. Proper Proof Technique. How To Construct A Proof. By Chuck Cusack Proof Techniques By Chuck Cusack Why Proofs? Writing roofs is not most student s favorite activity. To make matters worse, most students do not understand why it is imortant to rove things. Here are just

More information

Introduction to Probability and Statistics

Introduction to Probability and Statistics Introduction to Probability and Statistics Chater 8 Ammar M. Sarhan, asarhan@mathstat.dal.ca Deartment of Mathematics and Statistics, Dalhousie University Fall Semester 28 Chater 8 Tests of Hyotheses Based

More information

The Logic of Compound Statements. CSE 2353 Discrete Computational Structures Spring 2018

The Logic of Compound Statements. CSE 2353 Discrete Computational Structures Spring 2018 CSE 2353 Discrete Comutational Structures Sring 2018 The Logic of Comound Statements (Chater 2, E) Note: some course slides adoted from ublisher-rovided material Outline 2.1 Logical Form and Logical Equivalence

More information

Introduction to Model Checking. Debdeep Mukhopadhyay IIT Madras

Introduction to Model Checking. Debdeep Mukhopadhyay IIT Madras Introduction to Model Checking Debdeep Mukhopadhyay IIT Madras How good can you fight bugs? Comprising of three parts Formal Verification techniques consist of three parts: 1. A framework for modeling

More information

Advanced Calculus I. Part A, for both Section 200 and Section 501

Advanced Calculus I. Part A, for both Section 200 and Section 501 Sring 2 Instructions Please write your solutions on your own aer. These roblems should be treated as essay questions. A roblem that says give an examle requires a suorting exlanation. In all roblems, you

More information

Various Proofs for the Decrease Monotonicity of the Schatten s Power Norm, Various Families of R n Norms and Some Open Problems

Various Proofs for the Decrease Monotonicity of the Schatten s Power Norm, Various Families of R n Norms and Some Open Problems Int. J. Oen Problems Comt. Math., Vol. 3, No. 2, June 2010 ISSN 1998-6262; Coyright c ICSRS Publication, 2010 www.i-csrs.org Various Proofs for the Decrease Monotonicity of the Schatten s Power Norm, Various

More information

Feedback-error control

Feedback-error control Chater 4 Feedback-error control 4.1 Introduction This chater exlains the feedback-error (FBE) control scheme originally described by Kawato [, 87, 8]. FBE is a widely used neural network based controller

More information

An Introduction to Information Theory: Notes

An Introduction to Information Theory: Notes An Introduction to Information Theory: Notes Jon Shlens jonshlens@ucsd.edu 03 February 003 Preliminaries. Goals. Define basic set-u of information theory. Derive why entroy is the measure of information

More information

Analysis of some entrance probabilities for killed birth-death processes

Analysis of some entrance probabilities for killed birth-death processes Analysis of some entrance robabilities for killed birth-death rocesses Master s Thesis O.J.G. van der Velde Suervisor: Dr. F.M. Sieksma July 5, 207 Mathematical Institute, Leiden University Contents Introduction

More information

MAZUR S CONSTRUCTION OF THE KUBOTA LEPOLDT p-adic L-FUNCTION. n s = p. (1 p s ) 1.

MAZUR S CONSTRUCTION OF THE KUBOTA LEPOLDT p-adic L-FUNCTION. n s = p. (1 p s ) 1. MAZUR S CONSTRUCTION OF THE KUBOTA LEPOLDT -ADIC L-FUNCTION XEVI GUITART Abstract. We give an overview of Mazur s construction of the Kubota Leooldt -adic L- function as the -adic Mellin transform of a

More information

An Introduction to Temporal Logics

An Introduction to Temporal Logics An Introduction to Temporal Logics c 2001,2004 M. Lawford Outline Motivation: Dining Philosophers Safety, Liveness, Fairness & Justice Kripke structures, LTS, SELTS, and Paths Linear Temporal Logic Branching

More information

Finite State Model Checking

Finite State Model Checking Finite State Model Checking Finite State Model Checking Finite State Systems System Descrition A Requirement F CTL TOOL No! Debugging Information Yes, Prototyes Executable Code Test sequences Tools: visualstate,

More information

Correctness of Concurrent Programs

Correctness of Concurrent Programs Correctness of Concurrent Programs Trifon Ruskov ruskov@tu-varna.acad.bg Technical University of Varna - Bulgaria Correctness of Concurrent Programs Correctness of concurrent programs needs to be formalized:

More information

How to math: an introduction to rigor

How to math: an introduction to rigor How to math: an introduction to rigor Roy Dong July 5, 2017 The urose of this document This document is meant to be a guide for engineering graduate students interested in learning higher-level mathematics.

More information

Economics 101. Lecture 7 - Monopoly and Oligopoly

Economics 101. Lecture 7 - Monopoly and Oligopoly Economics 0 Lecture 7 - Monooly and Oligooly Production Equilibrium After having exlored Walrasian equilibria with roduction in the Robinson Crusoe economy, we will now ste in to a more general setting.

More information

Real Analysis 1 Fall Homework 3. a n.

Real Analysis 1 Fall Homework 3. a n. eal Analysis Fall 06 Homework 3. Let and consider the measure sace N, P, µ, where µ is counting measure. That is, if N, then µ equals the number of elements in if is finite; µ = otherwise. One usually

More information

CSE 599d - Quantum Computing When Quantum Computers Fall Apart

CSE 599d - Quantum Computing When Quantum Computers Fall Apart CSE 599d - Quantum Comuting When Quantum Comuters Fall Aart Dave Bacon Deartment of Comuter Science & Engineering, University of Washington In this lecture we are going to begin discussing what haens to

More information

Computation Tree Logic

Computation Tree Logic Comutation Tree Logic Finite State Model Checking of Branching Time Logic Kim Guldstrand Larsen BRICS@Aalborg 1 Tool Suort Finite State Systems System Descrition A Reuirement F CTL TOOL Course Objectives:

More information

2. PROPOSITIONAL LOGIC

2. PROPOSITIONAL LOGIC 2. PROPOSITIONAL LOGIC Contents 2.1: Informal roositional logic 2.2: Syntax of roositional logic 2.3: Semantics of roositional logic 2.4: Logical equivalence 2.5: An examle 2.6: Adequate sets of connectives

More information

Approximating min-max k-clustering

Approximating min-max k-clustering Aroximating min-max k-clustering Asaf Levin July 24, 2007 Abstract We consider the roblems of set artitioning into k clusters with minimum total cost and minimum of the maximum cost of a cluster. The cost

More information

Outline. Markov Chains and Markov Models. Outline. Markov Chains. Markov Chains Definitions Huizhen Yu

Outline. Markov Chains and Markov Models. Outline. Markov Chains. Markov Chains Definitions Huizhen Yu and Markov Models Huizhen Yu janey.yu@cs.helsinki.fi Det. Comuter Science, Univ. of Helsinki Some Proerties of Probabilistic Models, Sring, 200 Huizhen Yu (U.H.) and Markov Models Jan. 2 / 32 Huizhen Yu

More information

On the Chvatál-Complexity of Knapsack Problems

On the Chvatál-Complexity of Knapsack Problems R u t c o r Research R e o r t On the Chvatál-Comlexity of Knasack Problems Gergely Kovács a Béla Vizvári b RRR 5-08, October 008 RUTCOR Rutgers Center for Oerations Research Rutgers University 640 Bartholomew

More information

Statics and dynamics: some elementary concepts

Statics and dynamics: some elementary concepts 1 Statics and dynamics: some elementary concets Dynamics is the study of the movement through time of variables such as heartbeat, temerature, secies oulation, voltage, roduction, emloyment, rices and

More information

15-451/651: Design & Analysis of Algorithms October 23, 2018 Lecture #17: Prediction from Expert Advice last changed: October 25, 2018

15-451/651: Design & Analysis of Algorithms October 23, 2018 Lecture #17: Prediction from Expert Advice last changed: October 25, 2018 5-45/65: Design & Analysis of Algorithms October 23, 208 Lecture #7: Prediction from Exert Advice last changed: October 25, 208 Prediction with Exert Advice Today we ll study the roblem of making redictions

More information

THE ERDÖS - MORDELL THEOREM IN THE EXTERIOR DOMAIN

THE ERDÖS - MORDELL THEOREM IN THE EXTERIOR DOMAIN INTERNATIONAL JOURNAL OF GEOMETRY Vol. 5 (2016), No. 1, 31-38 THE ERDÖS - MORDELL THEOREM IN THE EXTERIOR DOMAIN PETER WALKER Abstract. We show that in the Erd½os-Mordell theorem, the art of the region

More information

On a Markov Game with Incomplete Information

On a Markov Game with Incomplete Information On a Markov Game with Incomlete Information Johannes Hörner, Dinah Rosenberg y, Eilon Solan z and Nicolas Vieille x{ January 24, 26 Abstract We consider an examle of a Markov game with lack of information

More information

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino Formal Verification Techniques Riccardo Sisto, Politecnico di Torino State exploration State Exploration and Theorem Proving Exhaustive exploration => result is certain (correctness or noncorrectness proof)

More information

Lecture: Condorcet s Theorem

Lecture: Condorcet s Theorem Social Networs and Social Choice Lecture Date: August 3, 00 Lecture: Condorcet s Theorem Lecturer: Elchanan Mossel Scribes: J. Neeman, N. Truong, and S. Troxler Condorcet s theorem, the most basic jury

More information

UPPAAL tutorial What s inside UPPAAL The UPPAAL input languages

UPPAAL tutorial What s inside UPPAAL The UPPAAL input languages UPPAAL tutorial What s inside UPPAAL The UPPAAL inut languages 1 UPPAAL tool Develoed jointly by Usala & Aalborg University >>8,000 downloads since 1999 1 UPPAAL Tool Simulation Modeling Verification 3

More information

Distributed Maximality based CTL Model Checking

Distributed Maximality based CTL Model Checking IJCSI International Journal of Comuter Science Issues Vol 7 Issue No ay ISSN Onlin: 694-784 ISSN Print: 694-84 Distributed aximality based CTL odel Checking Djamel Eddine Saidouni ine EL Abidine Bouneb

More information

6 Stationary Distributions

6 Stationary Distributions 6 Stationary Distributions 6. Definition and Examles Definition 6.. Let {X n } be a Markov chain on S with transition robability matrix P. A distribution π on S is called stationary (or invariant) if π

More information

Elementary Analysis in Q p

Elementary Analysis in Q p Elementary Analysis in Q Hannah Hutter, May Szedlák, Phili Wirth November 17, 2011 This reort follows very closely the book of Svetlana Katok 1. 1 Sequences and Series In this section we will see some

More information

ON FREIMAN S 2.4-THEOREM

ON FREIMAN S 2.4-THEOREM ON FREIMAN S 2.4-THEOREM ØYSTEIN J. RØDSETH Abstract. Gregory Freiman s celebrated 2.4-Theorem says that if A is a set of residue classes modulo a rime satisfying 2A 2.4 A 3 and A < /35, then A is contained

More information

SAT based Abstraction-Refinement using ILP and Machine Learning Techniques

SAT based Abstraction-Refinement using ILP and Machine Learning Techniques SAT based Abstraction-Refinement using ILP and Machine Learning Techniques 1 SAT based Abstraction-Refinement using ILP and Machine Learning Techniques Edmund Clarke James Kukula Anubhav Guta Ofer Strichman

More information

Potential Theory JWR. Monday September 17, 2001, 5:00 PM

Potential Theory JWR. Monday September 17, 2001, 5:00 PM Potential Theory JWR Monday Setember 17, 2001, 5:00 PM Theorem 1 (Green s identity). Let be a bounded oen region in R n with smooth boundary and u, v : R be smooth functions. Then ( ( ) u v v u dv = u

More information

COMP3151/9151 Foundations of Concurrency Lecture 4

COMP3151/9151 Foundations of Concurrency Lecture 4 1 COMP3151/9151 Foundations of Concurrency Lecture 4 and Kai Engelhardt CSE, UNSW (and data61) Revision: 1.5 of Date: 2017/08/14 00:35:24 UTC (Credits: parts may be borrowed from M. Ben-Ari, G Andrews,

More information

Multi-Operation Multi-Machine Scheduling

Multi-Operation Multi-Machine Scheduling Multi-Oeration Multi-Machine Scheduling Weizhen Mao he College of William and Mary, Williamsburg VA 3185, USA Abstract. In the multi-oeration scheduling that arises in industrial engineering, each job

More information

RANDOM WALKS AND PERCOLATION: AN ANALYSIS OF CURRENT RESEARCH ON MODELING NATURAL PROCESSES

RANDOM WALKS AND PERCOLATION: AN ANALYSIS OF CURRENT RESEARCH ON MODELING NATURAL PROCESSES RANDOM WALKS AND PERCOLATION: AN ANALYSIS OF CURRENT RESEARCH ON MODELING NATURAL PROCESSES AARON ZWIEBACH Abstract. In this aer we will analyze research that has been recently done in the field of discrete

More information

x 2 a mod m. has a solution. Theorem 13.2 (Euler s Criterion). Let p be an odd prime. The congruence x 2 1 mod p,

x 2 a mod m. has a solution. Theorem 13.2 (Euler s Criterion). Let p be an odd prime. The congruence x 2 1 mod p, 13. Quadratic Residues We now turn to the question of when a quadratic equation has a solution modulo m. The general quadratic equation looks like ax + bx + c 0 mod m. Assuming that m is odd or that b

More information

Lecture 6. 2 Recurrence/transience, harmonic functions and martingales

Lecture 6. 2 Recurrence/transience, harmonic functions and martingales Lecture 6 Classification of states We have shown that all states of an irreducible countable state Markov chain must of the same tye. This gives rise to the following classification. Definition. [Classification

More information

A Parallel Algorithm for Minimization of Finite Automata

A Parallel Algorithm for Minimization of Finite Automata A Parallel Algorithm for Minimization of Finite Automata B. Ravikumar X. Xiong Deartment of Comuter Science University of Rhode Island Kingston, RI 02881 E-mail: fravi,xiongg@cs.uri.edu Abstract In this

More information

SECTION 5: FIBRATIONS AND HOMOTOPY FIBERS

SECTION 5: FIBRATIONS AND HOMOTOPY FIBERS SECTION 5: FIBRATIONS AND HOMOTOPY FIBERS In this section we will introduce two imortant classes of mas of saces, namely the Hurewicz fibrations and the more general Serre fibrations, which are both obtained

More information

Uniform Law on the Unit Sphere of a Banach Space

Uniform Law on the Unit Sphere of a Banach Space Uniform Law on the Unit Shere of a Banach Sace by Bernard Beauzamy Société de Calcul Mathématique SA Faubourg Saint Honoré 75008 Paris France Setember 008 Abstract We investigate the construction of a

More information

Consider the following propositions: p: lecture has started q: If I have a banana, then I have a pear r: I finished this problem

Consider the following propositions: p: lecture has started q: If I have a banana, then I have a pear r: I finished this problem Pre-Lecture Problem Do it! Do it now! What are you waiting for?! Consider the following roositions: : lecture has started : If I have a banana, then I have a ear r: I finished this roblem (i) Which of

More information

On generalizing happy numbers to fractional base number systems

On generalizing happy numbers to fractional base number systems On generalizing hay numbers to fractional base number systems Enriue Treviño, Mikita Zhylinski October 17, 018 Abstract Let n be a ositive integer and S (n) be the sum of the suares of its digits. It is

More information

Homework Solution 4 for APPM4/5560 Markov Processes

Homework Solution 4 for APPM4/5560 Markov Processes Homework Solution 4 for APPM4/556 Markov Processes 9.Reflecting random walk on the line. Consider the oints,,, 4 to be marked on a straight line. Let X n be a Markov chain that moves to the right with

More information

Network Configuration Control Via Connectivity Graph Processes

Network Configuration Control Via Connectivity Graph Processes Network Configuration Control Via Connectivity Grah Processes Abubakr Muhammad Deartment of Electrical and Systems Engineering University of Pennsylvania Philadelhia, PA 90 abubakr@seas.uenn.edu Magnus

More information

Lecture 21: Quantum Communication

Lecture 21: Quantum Communication CS 880: Quantum Information Processing 0/6/00 Lecture : Quantum Communication Instructor: Dieter van Melkebeek Scribe: Mark Wellons Last lecture, we introduced the EPR airs which we will use in this lecture

More information

By Evan Chen OTIS, Internal Use

By Evan Chen OTIS, Internal Use Solutions Notes for DNY-NTCONSTRUCT Evan Chen January 17, 018 1 Solution Notes to TSTST 015/5 Let ϕ(n) denote the number of ositive integers less than n that are relatively rime to n. Prove that there

More information

MATH 3240Q Introduction to Number Theory Homework 7

MATH 3240Q Introduction to Number Theory Homework 7 As long as algebra and geometry have been searated, their rogress have been slow and their uses limited; but when these two sciences have been united, they have lent each mutual forces, and have marched

More information

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem Safety and Liveness Properties defined over an execution of a program Thread Synchronization: Too Much Milk Safety: nothing bad happens holds in every finite execution prefix Windows never crashes No patient

More information

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics Dynamic Semantics Operational Semantics Denotational Semantic Dynamic Semantics Operational Semantics Operational Semantics Describe meaning by executing program on machine Machine can be actual or simulated

More information

28 Lecture 28: Transfer matrix, Symmetry breaking

28 Lecture 28: Transfer matrix, Symmetry breaking 28. LECTURE 28: TRANSFER MATRIX, SYMMETRY BREAKING 251 28 Lecture 28: Transfer matrix, Symmetry breaking Summary A detailed examle of transfer matrix technique is given. From the roerty of the transfer

More information

Notes on Instrumental Variables Methods

Notes on Instrumental Variables Methods Notes on Instrumental Variables Methods Michele Pellizzari IGIER-Bocconi, IZA and frdb 1 The Instrumental Variable Estimator Instrumental variable estimation is the classical solution to the roblem of

More information

Combinatorics of topmost discs of multi-peg Tower of Hanoi problem

Combinatorics of topmost discs of multi-peg Tower of Hanoi problem Combinatorics of tomost discs of multi-eg Tower of Hanoi roblem Sandi Klavžar Deartment of Mathematics, PEF, Unversity of Maribor Koroška cesta 160, 000 Maribor, Slovenia Uroš Milutinović Deartment of

More information

Truth-Functional Logic

Truth-Functional Logic Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence

More information

Finite-State Verification or Model Checking. Finite State Verification (FSV) or Model Checking

Finite-State Verification or Model Checking. Finite State Verification (FSV) or Model Checking Finite-State Verification or Model Checking Finite State Verification (FSV) or Model Checking Holds the romise of roviding a cost effective way of verifying imortant roerties about a system Not all faults

More information

arxiv: v1 [physics.data-an] 26 Oct 2012

arxiv: v1 [physics.data-an] 26 Oct 2012 Constraints on Yield Parameters in Extended Maximum Likelihood Fits Till Moritz Karbach a, Maximilian Schlu b a TU Dortmund, Germany, moritz.karbach@cern.ch b TU Dortmund, Germany, maximilian.schlu@cern.ch

More information

Elementary theory of L p spaces

Elementary theory of L p spaces CHAPTER 3 Elementary theory of L saces 3.1 Convexity. Jensen, Hölder, Minkowski inequality. We begin with two definitions. A set A R d is said to be convex if, for any x 0, x 1 2 A x = x 0 + (x 1 x 0 )

More information

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning. 3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on

More information

Math 104B: Number Theory II (Winter 2012)

Math 104B: Number Theory II (Winter 2012) Math 104B: Number Theory II (Winter 01) Alina Bucur Contents 1 Review 11 Prime numbers 1 Euclidean algorithm 13 Multilicative functions 14 Linear diohantine equations 3 15 Congruences 3 Primes as sums

More information

19th Bay Area Mathematical Olympiad. Problems and Solutions. February 28, 2017

19th Bay Area Mathematical Olympiad. Problems and Solutions. February 28, 2017 th Bay Area Mathematical Olymiad February, 07 Problems and Solutions BAMO- and BAMO- are each 5-question essay-roof exams, for middle- and high-school students, resectively. The roblems in each exam are

More information

Strong Matching of Points with Geometric Shapes

Strong Matching of Points with Geometric Shapes Strong Matching of Points with Geometric Shaes Ahmad Biniaz Anil Maheshwari Michiel Smid School of Comuter Science, Carleton University, Ottawa, Canada December 9, 05 In memory of Ferran Hurtado. Abstract

More information

Rules of Inference. Agenda. Rules of Inference Dr Patrick Chan. p r. p q. q r. Rules of Inference for Quantifiers. Hypothetical Syllogism

Rules of Inference. Agenda. Rules of Inference Dr Patrick Chan. p r. p q. q r. Rules of Inference for Quantifiers. Hypothetical Syllogism Discr ete Mathem atic Chater 1: Logic and Proof 1.5 Rules of Inference Dr Patrick Chan School of Comuter Science and Engineering South China University of echnology Recall John is a co. John knows first

More information

STA 250: Statistics. Notes 7. Bayesian Approach to Statistics. Book chapters: 7.2

STA 250: Statistics. Notes 7. Bayesian Approach to Statistics. Book chapters: 7.2 STA 25: Statistics Notes 7. Bayesian Aroach to Statistics Book chaters: 7.2 1 From calibrating a rocedure to quantifying uncertainty We saw that the central idea of classical testing is to rovide a rigorous

More information

Game Specification in the Trias Politica

Game Specification in the Trias Politica Game Secification in the Trias Politica Guido Boella a Leendert van der Torre b a Diartimento di Informatica - Università di Torino - Italy b CWI - Amsterdam - The Netherlands Abstract In this aer we formalize

More information

CHAPTER 3: TANGENT SPACE

CHAPTER 3: TANGENT SPACE CHAPTER 3: TANGENT SPACE DAVID GLICKENSTEIN 1. Tangent sace We shall de ne the tangent sace in several ways. We rst try gluing them together. We know vectors in a Euclidean sace require a baseoint x 2

More information

Modal and Temporal Logics

Modal and Temporal Logics Modal and Temporal Logics Colin Stirling School of Informatics University of Edinburgh July 23, 2003 Why modal and temporal logics? 1 Computational System Modal and temporal logics Operational semantics

More information

INF 4140: Models of Concurrency Series 3

INF 4140: Models of Concurrency Series 3 Universitetet i Oslo Institutt for Informatikk PMA Olaf Owe, Martin Steffen, Toktam Ramezani INF 4140: Models of Concurrency Høst 2016 Series 3 14. 9. 2016 Topic: Semaphores (Exercises with hints for solution)

More information

CSE 311 Lecture 02: Logic, Equivalence, and Circuits. Emina Torlak and Kevin Zatloukal

CSE 311 Lecture 02: Logic, Equivalence, and Circuits. Emina Torlak and Kevin Zatloukal CSE 311 Lecture 02: Logic, Equivalence, and Circuits Emina Torlak and Kevin Zatloukal 1 Toics Proositional logic A brief review of Lecture 01. Classifying comound roositions Converse, contraositive, and

More information

1 Riesz Potential and Enbeddings Theorems

1 Riesz Potential and Enbeddings Theorems Riesz Potential and Enbeddings Theorems Given 0 < < and a function u L loc R, the Riesz otential of u is defined by u y I u x := R x y dy, x R We begin by finding an exonent such that I u L R c u L R for

More information

MAS 4203 Number Theory. M. Yotov

MAS 4203 Number Theory. M. Yotov MAS 4203 Number Theory M. Yotov June 15, 2017 These Notes were comiled by the author with the intent to be used by his students as a main text for the course MAS 4203 Number Theory taught at the Deartment

More information

f(r) = a d n) d + + a0 = 0

f(r) = a d n) d + + a0 = 0 Math 400-00/Foundations of Algebra/Fall 07 Polynomials at the Foundations: Roots Next, we turn to the notion of a root of a olynomial in Q[x]. Definition 8.. r Q is a rational root of fx) Q[x] if fr) 0.

More information

MATH 361: NUMBER THEORY EIGHTH LECTURE

MATH 361: NUMBER THEORY EIGHTH LECTURE MATH 361: NUMBER THEORY EIGHTH LECTURE 1. Quadratic Recirocity: Introduction Quadratic recirocity is the first result of modern number theory. Lagrange conjectured it in the late 1700 s, but it was first

More information

Applications to stochastic PDE

Applications to stochastic PDE 15 Alications to stochastic PE In this final lecture we resent some alications of the theory develoed in this course to stochastic artial differential equations. We concentrate on two secific examles:

More information

Proving Liveness Properties of Concurrent Programs

Proving Liveness Properties of Concurrent Programs Proving Liveness Properties of Concurrent Programs SUSAN OWlCKI Stanford University and LESLIE LAMPORT SRI International A liveness property asserts that program execution eventually reaches some desirable

More information

Using BDDs to Decide CTL

Using BDDs to Decide CTL Using BDDs to Decide CTL Will Marrero DePaul University, Chicago, IL 60604, USA wmarrero@cs.deaul.edu Abstract. Comutation Tree Logic (CTL) has been used uite extensively and successfully to reason about

More information

THE LOGIC OF COMPOUND STATEMENTS

THE LOGIC OF COMPOUND STATEMENTS CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 2.1 Logical Form and Logical Equivalence Copyright Cengage Learning. All rights reserved. Logical Form

More information

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 15 Propositional Calculus (PC)

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 15 Propositional Calculus (PC) Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 15 Propositional Calculus (PC) So, now if you look back, you can see that there are three

More information

OXFORD UNIVERSITY. MATHEMATICS, JOINT SCHOOLS AND COMPUTER SCIENCE WEDNESDAY 4 NOVEMBER 2009 Time allowed: hours

OXFORD UNIVERSITY. MATHEMATICS, JOINT SCHOOLS AND COMPUTER SCIENCE WEDNESDAY 4 NOVEMBER 2009 Time allowed: hours OXFORD UNIVERSITY MATHEMATICS, JOINT SCHOOLS AND COMPUTER SCIENCE WEDNESDAY 4 NOVEMBER 2009 Time allowed: 2 1 2 hours For candidates alying for Mathematics, Mathematics & Statistics, Comuter Science, Mathematics

More information

Math 5330 Spring Notes Prime Numbers

Math 5330 Spring Notes Prime Numbers Math 5330 Sring 208 Notes Prime Numbers The study of rime numbers is as old as mathematics itself. This set of notes has a bunch of facts about rimes, or related to rimes. Much of this stuff is old dating

More information

ABSTRACT MODEL REPAIR

ABSTRACT MODEL REPAIR ABSTRACT MODEL REPAIR GEORGE CHATZIELEFTHERIOU a, BORZOO BONAKDARPOUR b, PANAGIOTIS KATSAROS c, AND SCOTT A. SMOLKA d a Deartment of Informatics, Aristotle University of Thessaloniki, 54124 Thessaloniki,

More information

ABSTRACT MODEL REPAIR

ABSTRACT MODEL REPAIR Logical Methods in Comuter Science Vol. 11(3:11)2015,. 1 43 www.lmcs-online.org Submitted Jul. 2, 2014 Published Se. 17, 2015 ABSTRACT MODEL REPAIR GEORGE CHATZIELEFTHERIOU a, BORZOO BONAKDARPOUR b, PANAGIOTIS

More information

RECIPROCITY LAWS JEREMY BOOHER

RECIPROCITY LAWS JEREMY BOOHER RECIPROCITY LAWS JEREMY BOOHER 1 Introduction The law of uadratic recirocity gives a beautiful descrition of which rimes are suares modulo Secial cases of this law going back to Fermat, and Euler and Legendre

More information

Universal Finite Memory Coding of Binary Sequences

Universal Finite Memory Coding of Binary Sequences Deartment of Electrical Engineering Systems Universal Finite Memory Coding of Binary Sequences Thesis submitted towards the degree of Master of Science in Electrical and Electronic Engineering in Tel-Aviv

More information

9 The Theory of Special Relativity

9 The Theory of Special Relativity 9 The Theory of Secial Relativity Assign: Read Chater 4 of Carrol and Ostlie (2006) Newtonian hysics is a quantitative descrition of Nature excet under three circumstances: 1. In the realm of the very

More information

Math 751 Lecture Notes Week 3

Math 751 Lecture Notes Week 3 Math 751 Lecture Notes Week 3 Setember 25, 2014 1 Fundamental grou of a circle Theorem 1. Let φ : Z π 1 (S 1 ) be given by n [ω n ], where ω n : I S 1 R 2 is the loo ω n (s) = (cos(2πns), sin(2πns)). Then

More information