Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Similar documents
Nondeterministic Automata vs Deterministic Automata

Regular languages refresher

CS 573 Automata Theory and Formal Languages

Finite State Automata and Determinisation

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS

State Complexity of Union and Intersection of Binary Suffix-Free Languages

Chapter 2 Finite Automata

= state, a = reading and q j

Prefix-Free Regular-Expression Matching

Abstraction of Nondeterministic Automata Rong Su

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Unfoldings of Networks of Timed Automata

Fundamentals of Computer Science

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non-Deterministic Finite Automata

Let's start with an example:

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

Chapter 1, Part 1. Regular Languages. CSC527, Chapter 1, Part 1 c 2012 Mitsunori Ogihara 1

Formal Methods for XML: Algorithms & Complexity

Deterministic Finite Automata

CONTROLLABILITY and observability are the central

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

On Persistent Reachability in Petri Nets *

Génération aléatoire uniforme pour les réseaux d automates

On Determinisation of History-Deterministic Automata.

Today s Topics Automata and Languages

Automata and Languages

A Disambiguation Algorithm for Finite Automata and Functional Transducers

On the Maximally-Permissive Range Control Problem in Partially-Observed Discrete Event Systems

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Engr354: Digital Logic Circuits

Alpha Algorithm: Limitations

Theory of Computation Regular Languages

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

2.4 Theoretical Foundations

Software Engineering using Formal Methods

Behavior Composition in the Presence of Failure

Regular expressions, Finite Automata, transition graphs are all the same!!

Behavior Composition in the Presence of Failure

Cyclic Inputs. Surface Generation (Part II) Ambiguity-preserving Generation. Ambiguity-preserving Generation. Ambiguity-preserving Generation

Active Diagnosis. Serge Haddad. Vecos 16. October the 6th 2016

@#? Text Search ] { "!" Nondeterministic Finite Automata. Transformation NFA to DFA and Simulation of NFA. Text Search Using Automata

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Test Generation from Timed Input Output Automata

Compression of Palindromes and Regularity.

Hybrid Control and Switched Systems. Lecture #2 How to describe a hybrid system? Formal models for hybrid system

Formal Languages and Automata

Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem. Kleene s Theorem 2/16/15

Lecture 08: Feb. 08, 2019

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

CHAPTER 1 Regular Languages. Contents

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

General Suffix Automaton Construction Algorithm and Space Bounds

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

Nondeterministic Biautomata and Their Descriptional Complexity

Bottom-Up Parsing. Canonical Collection of LR(0) items. Part II

Complementing Büchi Automata

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Nondeterministic Finite Automata

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

What s so hard about pointers? Reasoning about Pointer-based Data Structures. Traditional Alias Analysis. Language of Pointer Equalities

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSE 401 Compilers. Today s Agenda

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

Introduction to ω-autamata

Worked out examples Finite Automata

Lexical Analysis Finite Automate

Finite-State Automata: Recap

Hybrid Systems Modeling, Analysis and Control

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

Good-for-Games Automata versus Deterministic Automata.

Java II Finite Automata I

1 Nondeterministic Finite Automata

Thoery of Automata CS402

CISC 4090 Theory of Computation

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

In-depth introduction to main models, concepts of theory of computation:

Designing finite automata II

The Value 1 Problem for Probabilistic Automata

CMSC 330: Organization of Programming Languages

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Deterministic Finite-State Automata

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Learning Partially Observable Markov Models from First Passage Times

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Foundations of XML Types: Tree Automata

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

CS241 Week 6 Tutorial Solutions

Subsequence Automata with Default Transitions

Transcription:

Petri Nets Ree Alreht Seminr: Automt Theory Chir of Softwre Engeneering

Overview 1. Motivtion: Why not just using finite utomt for everything? Wht re Petri Nets nd when do we use them? 2. Introdution: How do Petri Nets work? 3. Lnguges: Wht is the generl expressiveness power of Petri Nets? 4. Deidility nd Complexity: Wht is the omplexity of ertin deision prolems? Wht if we ssure ertin onditions? 16.07.2012 Petri Nets 2

Overview 1. Motivtion: Why not just using finite utomt for everything? Wht re Petri Nets nd when do we use them? 2. Introdution: 3. Lnguges: 4. Deidility nd Complexity: 16.07.2012 Petri Nets 3

Motivtion Consider: Two groups of workers produe goods of type A nd type B. Two goods of type A nd type B n e omined into type C. The orresponding lnguge: L = {,,,,, } 16.07.2012 Petri Nets 4

Motivtion The orresponding lnguge: L = {,,,,, } The orresponding finite utomton: A B A A B A B B B B A A C 16.07.2012 Petri Nets 5

Prolem Anlysis The prolem: A nd B re produed onurrently nd synhronous. The prodution hs to e synhronized when produing C. The solution: Automton model whih llows for expressing these properties of system or proess more onise Petri Nets. 16.07.2012 Petri Nets 6

Possile Solution The orresponding lnguge: L = {,,,,, } A Petri Net for the given prolem: 16.07.2012 Petri Nets 7

Overview 1. Motivtion: 2. Introdution: How do Petri Nets work? 3. Lnguges: 4. Deidility nd Complexity: 16.07.2012 Petri Nets 8

Struturl Definitions A Petri Net for the given prolem: N = (P, T, F) 16.07.2012 Petri Nets 9

Struturl Definitions A Petri Net for the given prolem: p0 p1 p2 p6 N = (P, T, F) P = {p 0,, p 6 } p3 p4 p5 16.07.2012 Petri Nets 10

Struturl Definitions A Petri Net for the given prolem: p0 t0 p1 p2 N = (P, T, F) t4 p6 P = p 0,, p 6 T = t 0,, t 4 p3 p4 t3 p5 16.07.2012 Petri Nets 11

Struturl Definitions A Petri Net for the given prolem: p0 t0 p1 p2 N = (P, T, F) t4 p6 P = p 0,, p 6 T = t 0,, t 4 F P T T P p3 p4 t3 p5 16.07.2012 Petri Nets 12

Struturl Definitions A Petri Net for the given prolem: p0 t0 p1 p2 N = (P, T, F) p3 p4 t3 p5 t4 p6 P = p 0,, p 6 T = t 0,, t 4 F P T T P m: P N 16.07.2012 Petri Nets 13

Struturl Definitions A Petri Net for the given prolem: p0 p1 p2 N = (P, T, F) p3 p4 p5 p6 P = p 0,, p 6 T = t 0,, t 4 F P T T P m: P N Σ =,, l: T Σ 16.07.2012 Petri Nets 14

Behvior L = {,,,,, } A Petri Net for the given lnguge: P = (p 0,, p 6 ) p0 p1 p2 M 0 = 1, 0, 0, 1, 0, 0, 0 p6 p3 p4 p5 16.07.2012 Petri Nets 15

Behvior L = {,,,,, } A Petri Net for the given lnguge: P = (p 0,, p 6 ) p0 p1 p2 p6 M 0 = 1, 0, 0, 1, 0, 0, 0 M 1 = 0, 1, 0, 1, 0, 0, 0 p3 p4 p5 16.07.2012 Petri Nets 16

Behvior L = {,,,,, } A Petri Net for the given lnguge: P = (p 0,, p 6 ) p0 p1 p2 p6 M 0 = 1, 0, 0, 1, 0, 0, 0 M 1 = 0, 1, 0, 1, 0, 0, 0 M 2 = 0, 0, 1, 1, 0, 0, 0 p3 p4 p5 16.07.2012 Petri Nets 17

Behvior L = {,,,,, } A Petri Net for the given lnguge: P = (p 0,, p 6 ) p0 p1 p2 p6 M 0 = 1, 0, 0, 1, 0, 0, 0 M 1 = 0, 1, 0, 1, 0, 0, 0 M 2 = 0, 0, 1, 1, 0, 0, 0 M 3 = 0, 0, 1, 0, 1, 0, 0 p3 p4 p5 16.07.2012 Petri Nets 18

Behvior L = {,,,,, } A Petri Net for the given lnguge: P = (p 0,, p 6 ) p0 p1 p2 p3 p4 p5 p6 M 0 = 1, 0, 0, 1, 0, 0, 0 M 1 = 0, 1, 0, 1, 0, 0, 0 M 2 = 0, 0, 1, 1, 0, 0, 0 M 3 = 0, 0, 1, 0, 1, 0, 0 M 4 = 0, 0, 1, 0, 0, 1, 0 16.07.2012 Petri Nets 19

Behvior L = {,,,,, } A Petri Net for the given lnguge: P = (p 0,, p 6 ) p0 p1 p2 p3 p4 p5 p6 M 0 = 1, 0, 0, 1, 0, 0, 0 M 1 = 0, 1, 0, 1, 0, 0, 0 M 2 = 0, 0, 1, 1, 0, 0, 0 M 3 = 0, 0, 1, 0, 1, 0, 0 M 4 = 0, 0, 1, 0, 0, 1, 0 M 5 = 0, 0, 0, 0, 0, 0, 1 16.07.2012 Petri Nets 20

Overview 1. Motivtion: 2. Introdution: 3. Lnguges: Wht is the generl expressiveness power of Petri Nets? 4. Deidility nd Complexity: 16.07.2012 Petri Nets 21

Lnguge Aeptne Definition: N = N, M I, M F, l with, N = P, T, F petri net, l: T Σ leling funtion, Σ non-empty lphet, nd M I, M F finite sets of initil nd finl mrkings respetively, epts word w Σ if there exists firing sequene τ = t 1,, t n from m i M I to m j M F. 16.07.2012 Petri Nets 22

Petri Net Lnguges CSL PNL REG CFL n n n ww ww R Figure tken from [3] 16.07.2012 Petri Nets 23

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 24

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 25

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 26

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 27

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 28

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 29

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 30

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 31

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 32

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 33

Lnguge - Exmple Let Σ =,,, L = n n n n > 0} Consider: Petri Net: p2 p4 p0 p1 p3 p5 Initil mrking: (1,0,0,0,0,0) Finl mrking: (0,0,0,0,0,1) 16.07.2012 Petri Nets 34

Overview 1. Motivtion: 2. Introdution: 3. Lnguges: 4. Deidility nd Complexity: Wht is the omplexity of ertin deision prolems? Wht if we ssure ertin onditions? 16.07.2012 Petri Nets 35

Rehility Prolem Is ertin mrking rehle in Petri Net? I.e. n system reh some d stte? Anlysis: 1. Wht out the rehility prolem for Petri Nets in generl? 2. Are there ertin properties whih llow for deiding the rehility prolem effiiently? Generl nlysis tool: The rehility/overility tree. 16.07.2012 Petri Nets 36

Rehility Tree Petri Net: Rehility Tree: p1 (1, 0, 1, 0) p0 t0 p3 p2 Exmple tken from [2] 16.07.2012 Petri Nets 37

Rehility Tree Petri Net: Rehility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 p2 Exmple tken from [2] 16.07.2012 Petri Nets 38

Rehility Tree Petri Net: Rehility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 (1, 1, 1, 0) p2 Exmple tken from [2] 16.07.2012 Petri Nets 39

Rehility Tree Petri Net: Rehility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 (1, 1, 1, 0) p2 (1, 1, 0, 1) Exmple tken from [2] 16.07.2012 Petri Nets 40

Rehility Tree Petri Net: Rehility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 (1, 1, 1, 0) p2 (1, 1, 0, 1) (1, 2, 1, 0) Exmple tken from [2] 16.07.2012 Petri Nets 41

Coverility Tree Petri Net: Coverility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 (1, ω, 1, 0) p2 (1, ω, 0, 1) (1, ω, 1, 0) Exmple tken from [2] 16.07.2012 Petri Nets 42

Coverility Tree Petri Net: Coverility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 t0 (1, ω, 1, 0) p2 (1, ω, 0, 0) (1, ω, 0, 1) (1, ω, 1, 0) Exmple tken from [2] 16.07.2012 Petri Nets 43

Boundedness Unounded Petri Net: Coverility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 t0 (1, ω, 1, 0) p2 (1, ω, 0, 0) (1, ω, 0, 1) (1, ω, 1, 0) A Petri net ist unounded if nd only if there exists rehle mrking M nd sequene of trnsitions σ suh tht: M σ M + L, where L is non-zero lel 16.07.2012 Petri Nets 44

Boundedness A Petri net ist unounded if nd only if there exists rehle mrking M nd sequene of trnsitions σ suh tht: M σ M + L, where L is non-zero lel Deidle in 2n log n Sulsses of Petri Nets wrt. oundness: 1-ounded (or 1-sfe) k-ounded (or ounded) 16.07.2012 Petri Nets 45

Conflits Petri Net: Coverility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p3 t0 (1, ε, 1, 0) p2 (1, ε, 0, 0) (1, ε, 0, 1) (1, ε, 1, 0) 16.07.2012 Petri Nets 46

Conflits Conflited Petri Net: Coverility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p2 Informl Definition: p3 (1, ε, 1, 0) (1, ε, 0, 0) (1, ε, 0, 1) (1, ε, 1, 0) A Petri hs onfliting onfigurtion if two or more trnsitions re enled nd firing one trnsition disles the other trnsitions. t0 16.07.2012 Petri Nets 47

Conflits Conflited Petri Net: Coverility Tree: p0 t0 p1 (1, 0, 1, 0) (1, 0, 0, 1) p2 p3 t0 (1, ε, 1, 0) (1, ε, 0, 0) (1, ε, 0, 1) (1, ε, 1, 0) Informl Definition: A Petri is onflit free if it hs no onfliting onfigurtions. 16.07.2012 Petri Nets 48

Rehility Prolem Is ertin mrking rehle in Petri Net? I.e. n system reh some d stte? Anlysis: 1. Wht out the rehility prolem for Petri Nets in generl? 2. Are there ertin properties whih llow for deiding the rehility prolem effiiently? Generl nlysis tool: The rehility/overility tree. 16.07.2012 Petri Nets 49

Rehility Prolem Deide whether mrking M n e rehed for Petri Net N. In generl, doule exponentil time. 1-sfe, PSPACE-omplete. Conflit-free, NP-omplete. Bounded nd onflit-free, polynominl. 16.07.2012 Petri Nets 50

Conlusion Petri Nets llow for onise representtion of onurrent proesses. In generl, Petri Nets reognize ll regulr lnguges, some ontext-free lnguges nd some ontext-sensitive lnguges. In generl, ertin deision prolems re hrder thn in other utomt models. The expressiveness power of Petri Nets n e restrited in order to deide ertin deision prolems effiiently. 16.07.2012 Petri Nets 51

Referenes [1] Murt, T. (1989, April). Petri Nets: Properties, Anlysis nd pplitions. In Proeedings of the IEEE (Vol. 77, pp. 541-580). [2] Peterson, J. L. (1977, Septemer). Petri Nets. ACM Computing Surveys, 9 (3), 223-252. [3] Thoms, W. (2005) Applied Automt Theory. Sript ville: http://dron.s.iis.ernet.in/~deepkd/tommon/wolfgng-t.pdf [4] Esprz, J. nd Nielsen, M. (1995) Deidility issues for Petri nets - survey. In Bulletin of the EATCS, 1994. Revised, 1995. 16.07.2012 Petri Nets 52

The End Thnk you for your ttention! 16.07.2012 Petri Nets 53