# Automata and Languages

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn

2 Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive Lnguges Lnguges 2

3 Content Regulr Lnguges Euivlence between Regulr Grmmrs nd Regulr Lnguges Pumping Lemm (PL) Exmples 3

4 Regulr Lnguges L is Regulr Lnguge if nd only if there exist finite utomton M = (Q, Σ, δ,, F ) such tht: L = L(M) = { w Σ* : δ (,w) F} 4

5 Euivlence between Regulr Grmmrs nd Regulr Lnguges Theorem If L is regulr lnguge then there is right-liner grmmr G =(V,T,S,P ) such tht L=L(G). Proof. L is regulr implies (by def.) there exist finite utomton M = (Q, Σ, δ,, F ) such tht L(M)=L. Now we construct the euivlent grmmr G s follows: Vribles re the sttes: V = Q Strt symbol is strt stte: S = Sme lphbet of terminls T=Σ A trnsition δ(,)= 2 becomes the rule à 2 Accept sttes F define the λ-productions à λ Accepted pths give rise to terminting derivtions nd vice vers. L(G)=L(M). 5

6 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x y z The DFA bove cn be simulted by the grmmr x à x y y à x z z à x z λ 6

7 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x x à x y y à x z z à x z λ x y z 7

8 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x à x y y à x z z à x z λ x y x y z 8

9 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x à x y y à x z z à x z λ x y x x y z 9

10 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x à x y y à x z z à x z λ x y x x x y z

11 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x à x y y à x z z à x z λ x y z x y x x y

12 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x à x y y à x z z à x z λ x y x x y z x y z 2

13 Euivlence between Regulr Grmmrs nd Regulr Lnguges Exmple x à x y y à x z z à x z λ x y x x y z x y z ACCEPT! 3

14 Euivlence between Regulr Grmmrs nd Regulr Lnguges Theorem 2 If G =(V,T,S,P) is right-liner grmmr then L(G) is regulr lnguge. Proof. : Define FA M = (Q, Σ, δ,, F ) s follows Strt stte correspond to strt symbol S A non-finl stte i corresponds to vrible symbol V i Sme lphbet of terminls Σ = Τ For every rule V i à m V j, define trnsition δ( i, m )= j For every rule V i à m, define trnsition δ( i, m )= f finl stte Terminting derivtions give rise to ccepted pths nd vice vers. So L(M)=L(G). Hence (by def.) L(G) is regulr lnguge. 4

15 Euivlence between Regulr Grmmrs nd Regulr Lnguges Theorem 2 Construct n FA tht is euivlent to the right-liner grmmr: S à A A à bs Aà b Answer: S A f b b 5

16 Euivlence between Regulr Grmmrs nd Regulr Lnguges Comments THEOREM nd THEOREM 2 show tht right-liner grmmrs nd regulr lnguges re euivlent. Similrly we cn show tht left-liner grmmrs nd regulr lnguges re euivlent. Hence we conclude tht Regulr Grmmrs nd Regulr Lnguges re euivlent. 6

17 Q: Regulr Lnguges Cn every CFG be converted into right liner grmmr? A: NO! This would men tht ll context free lnguges re regulr. For exmple: S à λ Sb cnnot be converted becuse { n b n } is not regulr. 7

18 Regulr Lnguges Q: How we cn identify non-regulr lnguges? A: By using techniue clled Pumping Lemm 8

19 Pumping Lemm (PL) Motivtion Consider the lnguge L = * = {,,,, } The string is sid to be pumpble in L becuse cn tke the underlined portion, nd pump it up (i.e. repet) s much s desired while lwys getting elements in L. 9

20 Pumping Lemm (PL) Motivtion Consider the lnguge Q: L = * = {,,,, } Which of the following re pumpble? A:. Pumpble:,,,, etc. 2. Pumpble: 3. not pumpble becuse most of * not in L 2

21 Pumping Lemm (PL) Motivtion Q: Define L 2 by the following utomton: Is pumpble? A: Pumpble:,. Underlined substrings correspond to cycles in the FA! Cycles in the FA cn be repeted rbitrrily often, hence pumpble. 2

22 Pumping Lemm (PL) Motivtion Let L3 = {,,, λ} Q: Which strings re pumpble? A: None! When pumping ny string non-trivilly, lwys result in infinitely mny possible strings. So no pumping cn go on inside finite set. Pumping Lemm give criterion for when strings cn be pumped. 22

23 Pumping Lemm (PL) Motivtion b 2 b,b 3 b We hve: bbbb L(M ) Becuse: b b b b 23

24 b b b b Note, bbb L(M ) So, bb L(M ) b b b b ) ( ) ( ) ( :, M L b bb b j i j i Ν Also, So, We note tht: Pumping Lemm (PL) Motivtion

25 Pumping Lemm (PL) Theorem Given n (infinite) regulr lnguge L, there is number p (clled the pumping number) such tht ny string in L of length p is pumpble within its first p letters. In other words, for ll u L with u p we cn write: u = xyz (x is prefix, z is suffix) y (mid-portion y is non-empty) xy p (pumping occurs in first p letters) xy i z L for ll i (cn pump y-portion) To prove the Pumping Lemm we need to know the Pigeonhole Principle 25

26 Pumping Lemm (PL) Pigeonhole principle This Box hs more thn one object The pigeonhole principle is very simple, yet powerful method for identifying nonregulr lnguges. It sttes tht: given n objects nd m boxes, if n>m then t lest one box must hve more thn one object. n objects: n > m m boxes: 26

27 Pumping Lemm (PL) Pigeonhole principle fundmentl observtion Given sufficiently long string, the sttes of DFA must repet in n ccepting computtion. These cycles cn then be used to predict (generte) infinitely mny other strings in (of) the lnguge. Pigeon-Hole Principle 27

28 Pumping Lemm (PL) Proof Now consider n ccepted string u. By ssumption L is regulr so let M be the FA ccepting it. Let p = Q = no. of sttes in M. Suppose u p. The pth lbeled by u visits p+ sttes in its first p letters. Thus (by pigeonhole principle) u must visit some stte twice. The sub-pth of u connecting the first nd second visit of the vertex is loop, nd gives the climed string y tht cn be pumped within the first p letters. 28

29 Pumping Lemm (PL) Notes: It is necessry condition. Every regulr lnguge stisfies it. If lnguge violtes it, it is not regulr. RL => PL not PL => not RL It is not sufficient condition. Not every non-regulr lnguge violtes it. not RL =>? PL or not PL (no conclusion) 29

30 Notes: Pumping Lemm (PL) For ll sufficiently long strings (u) There exists non-null prefix (xy) nd substring (y) For ll repetitions of the substring (y), we get strings in the lnguge. u L : x,y,z u k : ( xyz = u) ( xy p) ( y ) ( i : i xy i z L) 3

31 Proving non-regulrity Pumping Lemm (PL) If there exists n rbitrrily long string u L, nd for ech decomposition u = xyz, there exists n i such tht xy i z L, then L is non-regulr. Negtion of the necessry condition: u L : x,y,z u p : ( xyz = u) ( xy p) ( y ) ( i : i xy i z L) 3

32 Pumping Lemm (PL) Proving non-regulrity In generl, to prove tht L isn t regulr:. Assume L were regulr 2. Therefore it hs pumping no. p 3. Find string pttern involving the length p in some clever wy, nd which cnnot be pumped. This is the hrd prt. 4. (2)àß(3) <contrdiction> Therefore our ssumption () ws wrong nd conclude tht L is not regulr lnguge 32

33 Pumping Lemm (PL) Exmple Show tht L={ n b n n =,,2, } is not regulr.. Assume L were regulr 2. Therefore it hs pumping no. p, sy p=2 3. But consider the string u= 2 b 2. we hve u =4 > p=2, let x=, y=, nd z=bb è u=xyz, y, nd xy p(=2). PLè xy i z L for ll i Tking i=è xz L è bb L 4. <contrdiction> Therefore our ssumption () ws wrong nd conclude tht L is not regulr lnguge 33

34 Pumping Lemm (PL) Exercise Show tht the following lnguges re not regulr: L p = p { p is prime number} L c = c { c is composite number} L = { ω {, b}* # ' s inω = # b's inω} L pl ={x * x =x R } 34

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

5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

### 1.3 Regular Expressions

56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

### CHAPTER 1 Regular Languages. Contents

Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

### Harvard University Computer Science 121 Midterm October 23, 2012

Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

### Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 4 1. UsetheproceduredescriedinLemm1.55toconverttheregulrexpression(((00) (11)) 01) into n NFA. Answer: 0 0 1 1 00 0 0 11 1 1 01 0 1 (00)

### Regular Language. Nonregular Languages The Pumping Lemma. The pumping lemma. Regular Language. The pumping lemma. Infinitely long words 3/17/15

Regulr Lnguge Nonregulr Lnguges The Pumping Lemm Models of Comput=on Chpter 10 Recll, tht ny lnguge tht cn e descried y regulr expression is clled regulr lnguge In this lecture we will prove tht not ll

### Recursively Enumerable and Recursive. Languages

Recursively Enumerble nd Recursive nguges 1 Recll Definition (clss 19.pdf) Definition 10.4, inz, 6 th, pge 279 et S be set of strings. An enumertion procedure for Turing Mchine tht genertes ll strings

### Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

### 5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton

### Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

### CS375: Logic and Theory of Computing

CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

### 1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

### CSCI FOUNDATIONS OF COMPUTER SCIENCE

1 CSCI- 2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 My 7, 2015 2 Announcements Homework 9 is due now. Some finl exm review problems will be posted on the web site tody. These re prcqce problems not

### Homework Solution - Set 5 Due: Friday 10/03/08

CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

### Chapter 4 Regular Grammar and Regular Sets. (Solutions / Hints)

C K Ngpl Forml Lnguges nd utomt Theory Chpter 4 Regulr Grmmr nd Regulr ets (olutions / Hints) ol. (),,,,,,,,,,,,,,,,,,,,,,,,,, (),, (c) c c, c c, c, c, c c, c, c, c, c, c, c, c c,c, c, c, c, c, c, c, c,

### CS 330 Formal Methods and Models

CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

### Formal languages, automata, and theory of computation

Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

### Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

### Lexical Analysis Finite Automate

Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

### Chapter 2 Finite Automata

Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

### 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

CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

### Normal Forms for Context-free Grammars

Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

### Homework 3 Solutions

CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

### State Minimization for DFAs

Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

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

Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

### CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

### This lecture covers Chapter 8 of HMU: Properties of CFLs

This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU. Turing Mchine: Informl Definition B

### Name Ima Sample ASU ID

Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

### 1 From NFA to regular expression

Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

### Formal Methods in Software Engineering

Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt

### CS 330 Formal Methods and Models

CS 0 Forml Methods nd Models Dn Richrds, George Mson University, Fll 2016 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 8 1. Prove q (q p) p q p () (4pts) with truth tle. p q p q p (q p) p q

### Non-deterministic Finite Automata

Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

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

Chpter 1, Prt 1 Regulr Lnguges CSC527, Chpter 1, Prt 1 c 2012 Mitsunori Ogihr 1 Finite Automt A finite utomton is system for processing ny finite sequence of symols, where the symols re chosen from finite

### Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Probbilistic Model Checking Michelms Term 2011 Dr. Dve Prker Deprtment of Computer Science University of Oxford Long-run properties Lst lecture: regulr sfety properties e.g. messge filure never occurs

### Lecture 9: LTL and Büchi Automata

Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

### Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch.

Overview H9 Vertlerouw H 9: Prsing: op-down & LL(1) do 3 mei 2001 56 heo Ruys h. 8 - Prsing 8.1 ontext-free Grmmrs 8.2 op-down Prsing 8.3 LL(1) Grmmrs See lso [ho, Sethi & Ullmn 1986] for more thorough

### i 1 i 2 i 3... i p o 1 o 2 AUTOMATON q 1, q 2,,q n ... o q Model of a automaton Characteristics of automaton:

Definition of n Automton:-An Automton is defined s system tht preforms certin functions without humn intervention. it ccepts rw mteril nd energy s input nd converts them into the finl product under the

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

Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

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

CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

### Context-Free Grammars and Languages

Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

### CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

### CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

### Good-for-Games Automata versus Deterministic Automata.

Good-for-Gmes Automt versus Deterministic Automt. Denis Kuperberg 1,2 Mich l Skrzypczk 1 1 University of Wrsw 2 IRIT/ONERA (Toulouse) Séminire MoVe 12/02/2015 LIF, Luminy Introduction Deterministic utomt

### Handout: Natural deduction for first order logic

MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes

### 7 Automata and formal languages. 7.1 Formal languages

7 Automt nd forml lnguges This exposition ws developed by Clemens Gröpl nd Knut Reinert. It is bsed on the following references, ll of which re recommended reding: 1. Uwe Schöning: Theoretische Informtik

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

CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

### FORMAL LANGAUGES & AUTOMATA

FORMAL LANGAUGES & AUTOMATA VICKY G We re going to study the reltionship between specil kind of mchine (utomt), lnguges nd specil kind of lgebr (monoids). Automt Regulr Lnguges Monoids 1. Monoids nd Lnguges

### On Determinisation of History-Deterministic Automata.

On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

### MORE FUNCTION GRAPHING; OPTIMIZATION. (Last edited October 28, 2013 at 11:09pm.)

MORE FUNCTION GRAPHING; OPTIMIZATION FRI, OCT 25, 203 (Lst edited October 28, 203 t :09pm.) Exercise. Let n be n rbitrry positive integer. Give n exmple of function with exctly n verticl symptotes. Give

### Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Section: Other Models of Turing Mchines Definition: Two utomt re equivlent if they ccept the sme lnguge. Turing Mchines with Sty Option Modify δ, Theorem Clss of stndrd TM s is equivlent to clss of TM

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

Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

### Lecture 1. Functional series. Pointwise and uniform convergence.

1 Introduction. Lecture 1. Functionl series. Pointwise nd uniform convergence. In this course we study mongst other things Fourier series. The Fourier series for periodic function f(x) with period 2π is

### SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 2014

SOLUTIONS FOR ADMISSIONS TEST IN MATHEMATICS, COMPUTER SCIENCE AND JOINT SCHOOLS WEDNESDAY 5 NOVEMBER 014 Mrk Scheme: Ech prt of Question 1 is worth four mrks which re wrded solely for the correct nswer.

### set is not closed under matrix [ multiplication, ] and does not form a group.

Prolem 2.3: Which of the following collections of 2 2 mtrices with rel entries form groups under [ mtrix ] multipliction? i) Those of the form for which c d 2 Answer: The set of such mtrices is not closed

### Formal Languages and Automata Theory. D. Goswami and K. V. Krishna

Forml Lnguges nd Automt Theory D. Goswmi nd K. V. Krishn Novemer 5, 2010 Contents 1 Mthemticl Preliminries 3 2 Forml Lnguges 4 2.1 Strings............................... 5 2.2 Lnguges.............................

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

CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

### Nondeterministic Biautomata and Their Descriptional Complexity

Nondeterministic Biutomt nd Their Descriptionl Complexity Mrkus Holzer nd Sestin Jkoi Institut für Informtik Justus-Lieig-Universität Arndtstr. 2, 35392 Gießen, Germny 23. Theorietg Automten und Formle

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

CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

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

CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

### Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re

### MATH34032: Green s Functions, Integral Equations and the Calculus of Variations 1

MATH34032: Green s Functions, Integrl Equtions nd the Clculus of Vritions 1 Section 1 Function spces nd opertors Here we gives some brief detils nd definitions, prticulrly relting to opertors. For further

### Agenda. Agenda. Regular Expressions. Examples of Regular Expressions. Regular Expressions (crash course) Computational Linguistics 1

Agend CMSC/LING 723, LBSC 744 Kristy Hollingshed Seitz Institute for Advnced Computer Studies University of Mrylnd HW0 questions? Due Thursdy before clss! When in doubt, keep it simple... Lecture 2: 6

### NON-DETERMINISTIC FSA

Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

### Prefix-Free Regular-Expression Matching

Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

### USA Mathematical Talent Search Round 1 Solutions Year 21 Academic Year

1/1/21. Fill in the circles in the picture t right with the digits 1-8, one digit in ech circle with no digit repeted, so tht no two circles tht re connected by line segment contin consecutive digits.

### CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power

CS411-2015S-12 Turing Mchine Modifictions 1 12-0: Extending Turing Mchines When we dded stck to NFA to get PDA, we incresed computtionl power Cn we do the sme thing for Turing Mchines? Tht is, cn we dd

### Software Engineering using Formal Methods

Softwre Engineering using Forml Methods Propositionl nd (Liner) Temporl Logic Wolfgng Ahrendt 13th Septemer 2016 SEFM: Liner Temporl Logic /GU 160913 1 / 60 Recpitultion: FormlistionFormlistion: Syntx,

### 20 MATHEMATICS POLYNOMIALS

0 MATHEMATICS POLYNOMIALS.1 Introduction In Clss IX, you hve studied polynomils in one vrible nd their degrees. Recll tht if p(x) is polynomil in x, the highest power of x in p(x) is clled the degree of

### MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35

MATH 101A: ALGEBRA I PART B: RINGS AND MODULES 35 9. Modules over PID This week we re proving the fundmentl theorem for finitely generted modules over PID, nmely tht they re ll direct sums of cyclic modules.

### Section 6.1 INTRO to LAPLACE TRANSFORMS

Section 6. INTRO to LAPLACE TRANSFORMS Key terms: Improper Integrl; diverge, converge A A f(t)dt lim f(t)dt Piecewise Continuous Function; jump discontinuity Function of Exponentil Order Lplce Trnsform

### MATH 409 Advanced Calculus I Lecture 19: Riemann sums. Properties of integrals.

MATH 409 Advnced Clculus I Lecture 19: Riemnn sums. Properties of integrls. Drboux sums Let P = {x 0,x 1,...,x n } be prtition of n intervl [,b], where x 0 = < x 1 < < x n = b. Let f : [,b] R be bounded

### Solutions Problem Set 2. Problem (a) Let M denote the DFA constructed by swapping the accept and non-accepting state in M.

Solution Prolem Set 2 Prolem.4 () Let M denote the DFA contructed y wpping the ccept nd non-ccepting tte in M. For ny tring w B, w will e ccepted y M, tht i, fter conuming the tring w, M will e in n ccepting

### Where did dynamic programming come from?

Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf

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

Stte Complexity of Union nd Intersetion of Binry Suffix-Free Lnguges Glin Jirásková nd Pvol Olejár Slovk Ademy of Sienes nd Šfárik University, Košie 0000 1111 0000 1111 Glin Jirásková nd Pvol Olejár Binry

### input tape head moves current state

CPS 140 - Mthemticl Foundtions of CS Dr. Susn Rodger Section: Finite Automt (Ch. 2) (lecture notes) Things to do in clss tody (Jn. 13, 2004): ffl questions on homework 1 ffl finish chpter 1 ffl Red Chpter

### Continuous Random Variables

STAT/MATH 395 A - PROBABILITY II UW Winter Qurter 217 Néhémy Lim Continuous Rndom Vribles Nottion. The indictor function of set S is rel-vlued function defined by : { 1 if x S 1 S (x) if x S Suppose tht

### Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

### The University of Nottingham

The University of Nottinghm SCHOOL OF COMPUTR SCINC AND INFORMATION TCHNOLOGY A LVL 1 MODUL, SPRING SMSTR 2004-2005 MACHINS AND THIR LANGUAGS Time llowed TWO hours Cndidtes must NOT strt writing their

### Convex Sets and Functions

B Convex Sets nd Functions Definition B1 Let L, +, ) be rel liner spce nd let C be subset of L The set C is convex if, for ll x,y C nd ll [, 1], we hve 1 )x+y C In other words, every point on the line

### UniversitaireWiskundeCompetitie. Problem 2005/4-A We have k=1. Show that for every q Q satisfying 0 < q < 1, there exists a finite subset K N so that

Problemen/UWC NAW 5/7 nr juni 006 47 Problemen/UWC UniversitireWiskundeCompetitie Edition 005/4 For Session 005/4 we received submissions from Peter Vndendriessche, Vldislv Frnk, Arne Smeets, Jn vn de

### The Wave Equation I. MA 436 Kurt Bryan

1 Introduction The Wve Eqution I MA 436 Kurt Bryn Consider string stretching long the x xis, of indeterminte (or even infinite!) length. We wnt to derive n eqution which models the motion of the string

### 63. Representation of functions as power series Consider a power series. ( 1) n x 2n for all 1 < x < 1

3 9. SEQUENCES AND SERIES 63. Representtion of functions s power series Consider power series x 2 + x 4 x 6 + x 8 + = ( ) n x 2n It is geometric series with q = x 2 nd therefore it converges for ll q =

### For a continuous function f : [a; b]! R we wish to define the Riemann integral

Supplementry Notes for MM509 Topology II 2. The Riemnn Integrl Andrew Swnn For continuous function f : [; b]! R we wish to define the Riemnn integrl R b f (x) dx nd estblish some of its properties. This

### Prefix-Free Subsets of Regular Languages and Descriptional Complexity

Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek Jurj Šeej DCFS 2015 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 1/22 Outline Mximl

### 13.3 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS

33 CLASSICAL STRAIGHTEDGE AND COMPASS CONSTRUCTIONS As simple ppliction of the results we hve obtined on lgebric extensions, nd in prticulr on the multiplictivity of extension degrees, we cn nswer (in

### Global Types for Dynamic Checking of Protocol Conformance of Multi-Agent Systems

Globl Types for Dynmic Checking of Protocol Conformnce of Multi-Agent Systems (Extended Abstrct) Dvide Ancon, Mtteo Brbieri, nd Vivin Mscrdi DIBRIS, University of Genov, Itly emil: dvide@disi.unige.it,

### Homework 4. (1) If f R[a, b], show that f 3 R[a, b]. If f + (x) = max{f(x), 0}, is f + R[a, b]? Justify your answer.

Homework 4 (1) If f R[, b], show tht f 3 R[, b]. If f + (x) = mx{f(x), 0}, is f + R[, b]? Justify your nswer. (2) Let f be continuous function on [, b] tht is strictly positive except finitely mny points

### Pre-Session Review. Part 1: Basic Algebra; Linear Functions and Graphs

Pre-Session Review Prt 1: Bsic Algebr; Liner Functions nd Grphs A. Generl Review nd Introduction to Algebr Hierrchy of Arithmetic Opertions Opertions in ny expression re performed in the following order:

### Chapter 7. Kleene s Theorem. 7.1 Kleene s Theorem. The following theorem is the most important and fundamental result in the theory of FA s:

Chpte 7 Kleene s Theoem 7.1 Kleene s Theoem The following theoem is the most impotnt nd fundmentl esult in the theoy of FA s: Theoem 6 Any lnguge tht cn e defined y eithe egul expession, o finite utomt,

### Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

### The Magic Number Problem for Subregular Language Families

The Mgic Number Problem for Subregulr Lnguge Fmilies Mrkus Holzer Sebstin Jkobi Mrtin Kutrib Institut für Informtik, Universität Giessen, Arndtstr. 2, 35392 Giessen, Germny emil: {holzer,jkobi,kutrib}@informtik.uni-giessen.de

### CS241 Week 6 Tutorial Solutions

241 Week 6 Tutoril olutions Lnguges: nning & ontext-free Grmmrs Winter 2018 1 nning Exerises 1. 0x0x0xd HEXINT 0x0 I x0xd 2. 0xend--- HEXINT 0xe I nd ER -- MINU - 3. 1234-120x INT 1234 INT -120 I x 4.

### Finite Nondeterministic Automata: Simulation and Minimality

Finite Nondeterministic Automt: Simultion nd Minimlity Cristin S. Clude, Elen Clude, Bkhdyr Khoussinov Abstrct Motivted by recent pplictions of finite utomt to theoreticl physics, we study the minimiztion

### approaches as n becomes larger and larger. Since e > 1, the graph of the natural exponential function is as below

. Eponentil nd rithmic functions.1 Eponentil Functions A function of the form f() =, > 0, 1 is clled n eponentil function. Its domin is the set of ll rel f ( 1) numbers. For n eponentil function f we hve.

### Mapping the delta function and other Radon measures

Mpping the delt function nd other Rdon mesures Notes for Mth583A, Fll 2008 November 25, 2008 Rdon mesures Consider continuous function f on the rel line with sclr vlues. It is sid to hve bounded support

### Linear Systems with Constant Coefficients

Liner Systems with Constnt Coefficients 4-3-05 Here is system of n differentil equtions in n unknowns: x x + + n x n, x x + + n x n, x n n x + + nn x n This is constnt coefficient liner homogeneous system

PRIMES AND QUADRATIC RECIPROCITY ANGELICA WONG Abstrct We discuss number theory with the ultimte gol of understnding udrtic recirocity We begin by discussing Fermt s Little Theorem, the Chinese Reminder

### Orthogonal Polynomials and Least-Squares Approximations to Functions

Chpter Orthogonl Polynomils nd Lest-Squres Approximtions to Functions **4/5/3 ET. Discrete Lest-Squres Approximtions Given set of dt points (x,y ), (x,y ),..., (x m,y m ), norml nd useful prctice in mny