13 views

Uploaded by MELJUN CORTES, MBA,MPA

MELJUN CORTES -- AUTOMATA THEORY LECTURE

save

- Introduction to Logic - H. W. B Joseph
- LearnRuby the Hard Way
- 901440 Lexical An
- Bruce
- ex5
- On a problem related to function S(n)
- 5 Minimize
- BSc Mathematics Major With Finance Minor at Leeds University - Course Description
- Cse-V-Formal Languages and Automata Theory [10cs56]-Solution
- Aspects of Mathematical Logic
- 1.Cmpt260Intro
- Express Learning Automata Theory and Formal Languages PDF
- WS9 No Sequence
- Logic and law
- notes-1
- Hard Puzzles Book 17
- [Logic] on the Logic of Number - Peirce
- Assignments DAA
- Relative Rates of Groth
- Integral Solution
- 05-BDD
- Reasoning Archives - Testbook Blog
- Digi-Notes-02-03-2016-Reasoning.pdf
- Apmo2012 Sol
- Series Completion Test Shortcuts
- Niiniluoto - Imagination and Fiction
- Presentation 2
- KorMOf02
- ParaJumblesFundas for Cat #20qn Only
- Lecture 12 List Arraysv2
- Cica Tris
- TUGAS EPIDEMIOLOGI GIZI.docx
- Book1
- Anunya Yayan
- Daf Df Asdfwef Ad Dsjkfffj4444j
- Τα Απίστευτα Οφέλη Της Διαλειμματικής Νηστείας
- City Code List
- Bodega
- 06.LAS INSTITUCIONES EDUCATIVAS CARA Y CECA.pdf
- 2216-8.pdf
- ARM Information Center
- Lección 12 22018.pdf
- GUÍA El Átomo de Hidrógeno.
- Dintisori-1.docx
- Prosedur Pengkajian Pada Sistem Pernafasan
- Complex Regulation of the ara Operon.pptx
- Trasformador Pt
- filosofos.docx
- EE-1920-03.pdf
- Present Tense
- BLANKKKKKKKK.docx
- Solutions Manual for Services Marketing 7th Edition by Zeithaml IBSN 0078112109
- Resumen anemias
- JAMBAN SEHAT
- Cazadores de Los Rios - 2
- links
- Root Dari Kata Engiectomy
- Abdomen Agudo
- Equipo Fusionador de Fibra 3ptica
- AC-DC Votage Driver
- MELJUN CORTES - MACHINE LEARNING Part 4
- MELJUN CORTES - MACHINE LEARNING Part 6
- MELJUN CORTES - MACHINE LEARNING Part 7
- MELJUN CORTES - MACHINE LEARNING Part 2
- MELJUN CORTES - MACHINE LEARNING Part 13
- MELJUN CORTES - MACHINE LEARNING Part 12
- MELJUN CORTES - MACHINE LEARNING Part 3
- MELJUN CORTES - MACHINE LEARNING Part 5
- MELJUN CORTES - MACHINE LEARNING Part 7
- MELJUN CORTES - MACHINE LEARNING Part 9
- MELJUN CORTES - MACHINE LEARNING Part 1
- MELJUN CORTES - MACHINE LEARNING Part 10
- MELJUN CORTES - MACHINE LEARNING Part 14
- MELJUN CORTES Research Paper 6 Metro South JULY 9 2018
- MELJUN CORTES - MACHINE LEARNING Part 11
- Meljun Cortes - Internet of Thing 7
- Meljun Cortes - Internet of Thing 1
- Meljun Cortes - Internet of Thing 2
- Meljun Cortes - Internet of Thing 3
- MELJUN CORTES TCU Final Exam Computer Application 2
- Meljun Cortes - Internet of Thing 8
- Meljun Cortes - Internet of Thing 4
- MELJUN CORTES TCU Syllabus Cs 3113 Multimedia Animation Syllabus Cortes Obe New Formats New Revisions 2018
- MELJUN CORTES ABSTRACT Research Paper 6 Metro South JULY 9 2018
- MELJUN CORTES - Machine Learning Algorithm 2
- MELJUN CORTES - Machine Learning Algorithm 1
- Meljun Cortes - Internet of Thing 6
- MELJUN CORTES TCU Syllabus Elec 5 Business Intelligence Syllabus Cortes Obe New Formats New Revisions 2018
- Meljun Cortes - Internet of Thing 5
- MELJUN CORTES TCU Syllabus Ds 101 Discrete Structures 1 Syllabus Cortes Obe New Formats New Revisions 2018

You are on page 1of 17

CORTES, MBA,MPA,BSCS,ACS

CSC 3130: Automata theory and formal languages

Limitations of finite automata

Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc 3130

**Many examples of regular languages
**

0 q0 1 0 0, 1 q0 1 q1 0 q2 1 q3 q1 1

((0 + 1)0 + (0 + 1)(0 + 1)(0 + 1))*

all strings not containing pattern 010 followed by 101

Is every language regular?

**Which are regular?
**

L1 = {0n1m: n, m ≥ 0} L2 = {0n1n: n ≥ 0} L3 = {1n: n is divisible by 3} L4 = {1n: n is prime} L5 = {x: x has same number of 0s and 1s} L6 = {x: x has same number of patterns 01 and 10} Σ = {0, 1} Σ = {1} Σ = {0, 1}

**Which are regular?
**

= 0*1*, so regular L1 = {0n1m: n, m ≥ 0} • How about: L2 = {0n1n: n ≥ 0} = {ε, 01, 0011, 000111, …} • Let’s try to design a DFA for it

… it appears that we need infinitely many states!

**A non-regular language
**

• Theorem The language L2 = {0n1n: n ≥ 0} is not regular. • To prove this, we argue by contradiction:

– Suppose we have managed to construct a DFA M for L2 – We show something must be wrong with this DFA – In particular, M must accept some strings not in L2

**A non-regular language
**

imaginary DFA for L2 with n states

x

M

**• What happens when we run M on input x = 0n+11n+1?
**

– M better accept, because x ∈ L2

**A non-regular language
**

0

x

M

0 0r1n+1

0

0

0

**• What happens when we run M on input x = 0n+11n+1?
**

– M better accept, because x ∈ L2 – But since M has n states, it must revisit at least one of its states while reading 0n+1

Pigeonhole principle

Suppose you are tossing n + 1 balls into n bins. Then two balls end up in the same bin. • Here, balls are 0s, bins are states: If you have a DFA with n states and it reads n + 1 consecutive 0s, then it must end up in the same state twice.

**A non-regular language
**

0

x

M

0 0r1n+1

0

0

0

**• What happens when we run M on input x = 0n+11n+1?
**

– M better accept, because x ∈ L2 – But since M has n states, it must revisit at least one of its states while reading 0n+1 – But then the DFA must contain a loop with 0s

**A non-regular language
**

0 0 0 0 0 0r1n+1

M

• The DFA will then also accept strings that go around the loop multiple times • But such strings have more 0s than 1s, so they are not in L2!

**General method for showing nonregularity
**

• Every regular language L has a property:

z

an a1

… ak

ak+1

… an-1

an+1…am

• For every sufficiently long input z in L, there is a “middle part” in z that, even if repeated several times, keeps the input inside L

**Pumping lemma for regular languages
**

• Theorem: For every regular language L There exists a number n such that for every string z in L, we can write z = u v w where |uv| ≤ n |v| ≥ 1 For every i ≥ 0, the string u vi w is in L.

z … u v … w

**Proving non-regularity
**

• If L is regular, then: There exists n such that for every z in L, we can write z = u v w where |uv| ≤ n, |v| ≥ 1 and For every i ≥ 0, the string u vi w is in L. • So to prove L is not regular, it is enough to show: For every n there exists z in L, such that for every way of writing z = u v w where |uv| ≤ n and |v| ≥ 1, the string u vi w is not in L for some i ≥ 0.

**Proving non regularity
**

For every n there exists z in L, such that for every way of writing z = u v w where |uv| ≤ n and |v| ≥ 1, the string u vi w is not in L for some i ≥ 0. • This is a game between you and an imagined adversary

adversary you choose n 1 choose z ∈ L write z = uvw (|uv| ≤ n,|v| ≥ 1) choose i 2 you win if uviw ∉ L

**Proving non-regularity
**

• You need to give a strategy that, regardless of what the adversary does, always wins you the game

adversary you choose n 1 choose z ∈ L write z = uvw (|uv| ≤ n,|v| ≥ 1) choose i 2 you win if uviw ∉ L

Example

adversary you choose n 1 choose z ∈ L write z = uvw (|uv| ≤ n,|v| ≥ 1) choose i 2 you win if uviw ∉ L

• L2 = {0n1n: n ≥ 0} 1}

adversary

Σ = {0,

you

**choose n 1 z = 0n+11n+1 write z = uvw (|uv| ≤ n,|v| ≥ 1) i = 2 2 u = 0, v = 0 , w = 01 j+k+l=n+1
**

j k l n+1

uviw = 0j+2k+l1n+1 = 0n+1+k1n+1 ∉L

More examples

L3 = {1n: n is divisible by 3} L4 = {1n: n is prime} L5 = {x: x has same number of 0s and 1s} L6 = {x: x has same number of patterns 01 and 10} L7 = {x: x has more 0s than 1s} L8 = {x: x has different number of 0s and 1s} Σ = {0, 1} Σ = {1}

- Introduction to Logic - H. W. B JosephUploaded bydmi884
- LearnRuby the Hard WayUploaded byharrychopra
- 901440 Lexical AnUploaded byCorin Mihuț
- BruceUploaded byPippo Miri
- ex5Uploaded byezhon06
- On a problem related to function S(n)Uploaded byDon Hass
- 5 MinimizeUploaded byJyotsna Suraydevara
- BSc Mathematics Major With Finance Minor at Leeds University - Course DescriptionUploaded byVytautas Kazlauskas
- Cse-V-Formal Languages and Automata Theory [10cs56]-SolutionUploaded byBnks Sdfdsfs
- Aspects of Mathematical LogicUploaded byYing Shun Yuen Clement
- 1.Cmpt260IntroUploaded bysdjkfhfjdkhadf
- Express Learning Automata Theory and Formal Languages PDFUploaded byKim
- WS9 No SequenceUploaded bydogsdontdomath
- Logic and lawUploaded byNecandi
- notes-1Uploaded byAditya Bhutra
- Hard Puzzles Book 17Uploaded byFausto Borja
- [Logic] on the Logic of Number - PeirceUploaded byluccamantini
- Assignments DAAUploaded bySandip Gajera
- Relative Rates of GrothUploaded byTemesgen Tsegaye Bihonegn
- Integral SolutionUploaded byNikhilRPandey
- 05-BDDUploaded byshankar
- Reasoning Archives - Testbook BlogUploaded byThugeshwar
- Digi-Notes-02-03-2016-Reasoning.pdfUploaded byJyoti Sukhija
- Apmo2012 SolUploaded bySơn Tèo
- Series Completion Test ShortcutsUploaded byShishir Kant Singh
- Niiniluoto - Imagination and FictionUploaded byDmitry Dundua
- Presentation 2Uploaded bySamar Hamady
- KorMOf02Uploaded bydhrubajyoti ghosh
- ParaJumblesFundas for Cat #20qn OnlyUploaded bySudhanshu Jaiswal
- Lecture 12 List Arraysv2Uploaded byRIhf

- MELJUN CORTES - MACHINE LEARNING Part 4Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 6Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 7Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 2Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 13Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 12Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 3Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 5Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 7Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 9Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 1Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 10Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 14Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES Research Paper 6 Metro South JULY 9 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - MACHINE LEARNING Part 11Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 7Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 1Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 2Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 3Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Final Exam Computer Application 2Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 8Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 4Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Syllabus Cs 3113 Multimedia Animation Syllabus Cortes Obe New Formats New Revisions 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES ABSTRACT Research Paper 6 Metro South JULY 9 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - Machine Learning Algorithm 2Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES - Machine Learning Algorithm 1Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 6Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Syllabus Elec 5 Business Intelligence Syllabus Cortes Obe New Formats New Revisions 2018Uploaded byMELJUN CORTES, MBA,MPA
- Meljun Cortes - Internet of Thing 5Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Syllabus Ds 101 Discrete Structures 1 Syllabus Cortes Obe New Formats New Revisions 2018Uploaded byMELJUN CORTES, MBA,MPA