Unit-5: ω-regular properties

Similar documents
FABER Formal Languages, Automata. Lecture 2. Mälardalen University

In English, there are at least three different types of entities: letters, words, sentences.

1 Alphabets and Languages

Nondeterministic Finite Automata and Regular Expressions

Theory of Computer Science

Author: Vivek Kulkarni ( )

Chapter 4. Regular Expressions. 4.1 Some Definitions

C1.1 Introduction. Theory of Computer Science. Theory of Computer Science. C1.1 Introduction. C1.2 Alphabets and Formal Languages. C1.

Regular Expressions [1] Regular Expressions. Regular expressions can be seen as a system of notations for denoting ɛ-nfa

Closure Properties of Context-Free Languages. Foundations of Computer Science Theory

CS Automata, Computability and Formal Languages

CSCI 340: Computational Models. Regular Expressions. Department of Computer Science

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

CS 133 : Automata Theory and Computability

COSE212: Programming Languages. Lecture 1 Inductive Definitions (1)

Problem Session 5 (CFGs) Talk about the building blocks of CFGs: S 0S 1S ε - everything. S 0S0 1S1 A - waw R. S 0S0 0S1 1S0 1S1 A - xay, where x = y.

60-354, Theory of Computation Fall Asish Mukhopadhyay School of Computer Science University of Windsor

Special Factors and Suffix and Factor Automata

One-relation languages and ω-code generators

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

Automata: a short introduction

Topics in Timed Automata

CS311 Computational Structures Regular Languages and Regular Expressions. Lecture 4. Andrew P. Black Andrew Tolmach

Computational Learning Theory Learning Patterns (Monomials)

Automata Theory CS F-04 Non-Determinisitic Finite Automata

Formal Languages, Automata and Models of Computation

CS 121, Section 2. Week of September 16, 2013

Theory of Computation

Automata Theory CS F-08 Context-Free Grammars

CFG Simplification. (simplify) 1. Eliminate useless symbols 2. Eliminate -productions 3. Eliminate unit productions

Section 1.3 Ordered Structures

Theory of Computation

Semigroup presentations via boundaries in Cayley graphs 1

Recap from Last Time

CSE 105 Homework 1 Due: Monday October 9, Instructions. should be on each page of the submission.

Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. Pushdown Automata. The stack

Theory of Computation - Module 3

SFWR ENG 2FA3. Solution to the Assignment #4

CS375 Midterm Exam Solution Set (Fall 2017)

The Binomial Theorem.

Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries

Homework 4 Solutions. 2. Find context-free grammars for the language L = {a n b m c k : k n + m}. (with n 0,

1. (a) Explain the procedure to convert Context Free Grammar to Push Down Automata.

Lecture 4: More on Regexps, Non-Regular Languages

Finite-State Machines (Automata) lecture 12

CMSC 330: Organization of Programming Languages

CS A Term 2009: Foundations of Computer Science. Homework 2. By Li Feng, Shweta Srivastava, and Carolina Ruiz.

TAFL 1 (ECS-403) Unit- IV. 4.1 Push Down Automata. 4.2 The Formal Definition of Pushdown Automata. EXAMPLES for PDA. 4.3 The languages of PDA

Chapter 6. Properties of Regular Languages

Text Search and Closure Properties

Text Search and Closure Properties

1. Draw a parse tree for the following derivation: S C A C C A b b b b A b b b b B b b b b a A a a b b b b a b a a b b 2. Show on your parse tree u,

(b) If G=({S}, {a}, {S SS}, S) find the language generated by G. [8+8] 2. Convert the following grammar to Greibach Normal Form G = ({A1, A2, A3},

Intro to Theory of Computation

Context Free Languages. Automata Theory and Formal Grammars: Lecture 6. Languages That Are Not Regular. Non-Regular Languages

Parsing. Context-Free Grammars (CFG) Laura Kallmeyer. Winter 2017/18. Heinrich-Heine-Universität Düsseldorf 1 / 26

CS6902 Theory of Computation and Algorithms

Talen en Compilers. Johan Jeuring , period 2. October 29, Department of Information and Computing Sciences Utrecht University

Closure Properties of Regular Languages

Definition: A grammar G = (V, T, P,S) is a context free grammar (cfg) if all productions in P have the form A x where

Theory of Computation (Classroom Practice Booklet Solutions)

Sample Midterm. Understanding the questions is part of the exam; you are not allowed to ask questions during the exam.

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

HW 3 Solutions. Tommy November 27, 2012

CS 154, Lecture 3: DFA NFA, Regular Expressions

TAFL 1 (ECS-403) Unit- II. 2.1 Regular Expression: The Operators of Regular Expressions: Building Regular Expressions

INSTITUTE OF AERONAUTICAL ENGINEERING

Question Bank UNIT I

More Properties of Regular Languages

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

Sturmian Words, Sturmian Trees and Sturmian Graphs

Introduction to computability Tutorial 7

A canonical semi-deterministic transducer

Exam 1 CSU 390 Theory of Computation Fall 2007

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Outline. Theorem 1. For every regular expression E, there exists an ε-nfa A such that L(E)=L(A).

CSci 311, Models of Computation Chapter 4 Properties of Regular Languages

Linear conjunctive languages are closed under complement

download instant at Assume that (w R ) R = w for all strings w Σ of length n or less.

Computability and Complexity

Theory Of Computation UNIT-II

Chapter 1. Formal Definition and View. Lecture Formal Pushdown Automata on the 28th April 2009

Safety and Liveness Properties

CMSC 330: Organization of Programming Languages. Regular Expressions and Finite Automata

Instructor s Solutions Manual for Introduction to the Theory of Computation third edition Michael Sipser Mathematics Department MIT

AC68 FINITE AUTOMATA & FORMULA LANGUAGES JUNE 2014

CMSC 330: Organization of Programming Languages

Lecture Notes On THEORY OF COMPUTATION MODULE -1 UNIT - 2

Sri vidya college of engineering and technology

Lecture 7 Properties of regular languages

front pad rear pad door

On Parsing Expression Grammars A recognition-based system for deterministic languages

VTU QUESTION BANK. Unit 1. Introduction to Finite Automata. 1. Obtain DFAs to accept strings of a s and b s having exactly one a.

False. They are the same language.

AC68 FINITE AUTOMATA & FORMULA LANGUAGES DEC 2013

Simplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University

Simplification of CFG and Normal Forms. Wen-Guey Tzeng Computer Science Department National Chiao Tung University

CMSC 330: Organization of Programming Languages. Theory of Regular Expressions Finite Automata

Classes and conversions

A Universal Turing Machine

Transcription:

1/14 Unit-5: ω-regular properties B. Srivathsan Chennai Mathematical Institute NPTEL-course July - November 2015

2/14 Module 2: ω-regular expressions

3/14 Languages over finite words Σ : finite alphabet Σ = set of all words over Σ Language: A set of finite words { ab, abab, ababab,...} finite words starting with an a finite words starting with a b { ε, b, bb, bbb,...} { ε, ab, abab, ababab,...} { ε, bbb, bbbbbb, (bbb) 3,...} words starting and ending with an a { ε, ab, aabb, aaabbb,a 4 b 4...}

4/14 Regular expressions Σ : finite alphabet Σ = set of all words over Σ Language: A set of finite words ab(ab) { ab, abab, ababab,...} aσ bσ finite words starting with an a finite words starting with a b b (ab) (bbb) { ε, b, bb, bbb,...} { ε, ab, abab, ababab,...} { ε, bbb, bbbbbb, (bbb) 3,...} aσ a words starting and ending with an a { ε, ab, aabb, aaabbb,a 4 b 4...}

5/14 Alphabet Σ = { a, b } Σ Σ = { a, b } { a, b } = { aa, ab, ba, bb } aba ε ε bbb w ε ε w = aba = bbb = w = w Σ 0 = { ε } (empty word, with length 0) Σ 1 = words of length 1 Σ 2 = words of length 2 Σ 3 = words of length 3. Σ k = words of length k. Σ = i 0 Σi = set of all finite length words

Regular expressions 6/14

6/14 Regular expressions ε

6/14 Regular expressions ε a b

6/14 Regular expressions ε a b r 1 r 2

6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2

6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2 r

6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2 r where r 1,r 2,r are regular expressions themselves

6/14 Regular expressions ε a b r 1 r 2 r 1 + r 2 r where r 1,r 2,r are regular expressions themselves a + b ab + bb + baa (a + b) ab(ba + bb) (ab + bb).

7/14 Theorem 1. Every regular expression can be converted to an NFA accepting the language of the expression 2. Every NFA can be converted to a regular expression describing the language of the NFA

Coming next: Languages over infinite words 8/14

Σ = { a, b } 9/14

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } Example 3: a word in aaσ aa followed by only b-s { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Example 3: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a word in aaσ aa followed by only b-s a ω + b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a ω + b ω Example 3: a word in aaσ aa followed by only b-s aaσ aa b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a ω + b ω Example 3: a word in aaσ aa followed by only b-s aaσ aa b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often(a + b) b ω { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }

9/14 Σ = { a, b } Example 1: Infinite word consisting only of a { aaaaaaaaaaaaaaaa... } a ω Example 2: Infinite words containing only a or only b { aaaaaaaaaaaaaaa..., bbbbbbbbbbbb... } a ω + b ω Example 3: a word in aaσ aa followed by only b-s aaσ aa b ω { aaaabbbbbbb..., aababaabbbbbb..., aabbbbaabbbbbbb...,... } Example 4: Infinite words where b occurs only finitely often(a + b) b ω { aaaaaaaaaaaaaaaa..., baaaaaaaaaa..., babbaaaaaaaaaaaa...,... } Example 5: Infinite words where b occurs infinitely often (a b) ω { abababababab..., bbbabbbabbbabbba..., bbbbbbbbbbbbb...,... }

10/14 ω-regular expressions G = E 1 F ω 1 + E 2 F ω 2 + + E n F ω n E 1,...,E n, F 1,...,F n are regular expressions and ε / L(F i ) for all 1 i n

10/14 ω-regular expressions G = E 1 F ω 1 + E 2 F ω 2 + + E n F ω n E 1,...,E n, F 1,...,F n are regular expressions and ε / L(F i ) for all 1 i n L(F ω ) = { w 1 w 2 w 3... each w i L(F)}

More examples 11/14

11/14 More examples (a + b) ω set of all infinite words

11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a

11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a (a + bc + c) ω words where every b is immediately followed by c

11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a (a + bc + c) ω words where every b is immediately followed by c (a + b) c(a + b) ω words with a single occurrence of c

11/14 More examples (a + b) ω set of all infinite words a(a + b) ω infinite words starting with an a (a + bc + c) ω words where every b is immediately followed by c (a + b) c(a + b) ω words with a single occurrence of c ((a + b) c) ω words where c occurs infinitely often

12/14 AP = { p 1,p 2,...,p k } Σ = PowerSet(AP) = { { }, {p 1 },..., {p k }, { p 1,p 2 }, { p 1,p 3 },..., { p k 1,p k },... { p 1,p 2,..., p k } } A property is a language of infinite words over alphabet Σ

12/14 AP = { p 1,p 2,...,p k } Σ = PowerSet(AP) = { { }, {p 1 },..., {p k }, { p 1,p 2 }, { p 1,p 3 },..., { p k 1,p k },... { p 1,p 2,..., p k } } A property is a language of infinite words over alphabet Σ The property is ω-regular if it can be described by an ω-regular expression

13/14 AP = { wait, crit } Σ = PowerSet(AP) = { { }, {wait}, {crit}, {wait, crit} }

13/14 AP = { wait, crit } Σ = PowerSet(AP) = { { }, {wait}, {crit}, {wait, crit} } Property: Process enters critical section infinitely often

13/14 AP = { wait, crit } Σ = PowerSet(AP) = { { }, {wait}, {crit}, {wait, crit} } Property: Process enters critical section infinitely often ( ({ } + {wait}) ({crit} + {wait, crit}) ) ω

14/14 ω-regular properties ω-regular expressions Next goal: Find algorithms to model-check ω-regular properties