0 Up votes0 Down votes

3 views6 pagesMELJUN CORTES Automata Lecture Non-regular Languages 1

Jun 12, 2015

© © All Rights Reserved

PDF, TXT or read online from Scribd

MELJUN CORTES Automata Lecture Non-regular Languages 1

© All Rights Reserved

3 views

MELJUN CORTES Automata Lecture Non-regular Languages 1

© All Rights Reserved

- sc_jalc
- Present Simple vs Present Continuous
- kleene closure
- 355mt1s12sol.pdf
- JK Police Sub Inspector Syllabus Exam Pattern
- 01-Memoria Descriptiva Proyecto Edificio Brisas Del Golf
- Compositional Probabilistic Verification Through m
- amn m
- Recognition John Castro 141
- Contents Level1
- Lecture 10
- k-cat
- Col Lab English Seg 1
- Comprehension Beginner
- moreo2013
- Four Dark Corners of Requirements Engineering
- Px c 3878700
- UNIT-I-SRM
- prefixes
- Report Section 1

You are on page 1of 6

Specific Objectives:

At the end of the topic session, the students are expected to:

Cognitive:

1. Discuss the difficulty of proving the non-regularity of languages.

2. Explain the special property of regular languages that can be

used to show if a language is not regular.

Affective:

1. Listen to others with respect.

2. Participate in class discussions actively.

MATERIALS/EQUIPMENT:

o

o

Topic slides

OHP

TOPIC PREPARATION:

o

o

o

o

Non-Regular Languages

previous courses.

Prepare the slides to be presented in class.

It is imperative for the instructor to incorporate various kinds of

teaching strategies while discussing the suggested topics.

Prepare additional examples on the topic to be presented.

*Property of STI

Page 1 of 6

Non-Regular Languages

Page 1 of 10

Non-Regular Languages

Non-Regular Languages Versus Regular Languages

The previous lessons have shown that a language can be proven to be regular by

showing that there is a finite automaton (deterministic or nondeterministic) that

recognizes it, or by showing that there is a regular expression that describes it.

However, not every language is regular.

It is easy to conclude at this point in time that a language can be proven to be nonregular by showing that there is no finite automaton that can recognize it, or by

showing that there is no regular expression that can represent it.

However, this is not the case. This lesson will present the difficulty in proving the

non-regularity of languages.

Non-Regular Languages

Page 2 of 10

x x

regular.

x > 0} is

1

2

3

0

R = 0, then R = 0, R = 00, R = 000. Obviously, R = .

Language L1 is then the set of all strings that starts with x number of consecutive

0s followed by x number of consecutive 1s. In other words, this language is

composed of all strings wherein the total number of consecutive 0s is equal to the

total number of consecutive 1s following it. Sample strings of this language are 01,

0011, 000111, and 00001111.

If L1 is regular, then there is a finite automaton that recognizes it. The finite

automaton for this language should be able to count and remember the number of

consecutive 0s it has received at any point in time. Then, it should be able to count

and remember the number of consecutive 1s it will be receiving. The final step is

to compare the number of consecutive 0s against the number of consecutive 1s.

However, that would require an infinite number of states since the number of

possible 0s and 1s is infinite. There could be an unlimited of number possibilities.

It is possible for the string to have an infinite number of consecutive 0s followed by

an infinite number of consecutive 1s. Moreover, it was emphasized before that a

finite automaton has a finite number of states only. It is very difficult to use a finite

automaton to count an unlimited number of things or events.

It can therefore be concluded that there is no finite automaton that can recognize

L1 since there are only a limited number of states. Language L1 is therefore not

regular.

Non-Regular Languages

*Property of STI

Page 2 of 6

Non-Regular Languages

Page 3 of 10

number of 0s and 1s} is regular.

Like language L1, the finite automaton required to recognize L2 has to count and

remember the number of 0s and 1s it has received which can be infinite. A DFA

with only a limited number of states cannot accomplish this.

Hence, there is no finite automaton that can recognize language L2, and it is also

not regular.

and 10 as substrings}. From languages L1 and L2, it can be intuitively concluded

that there are also unlimited possibilities in language L3 since the finite automaton

required to recognize it also has to count and remember the occurrences of 10s

and 01s. Since it seems that there is no finite automaton that can recognize L3

then it is not regular.

However, there is a DFA that can recognize L3 as shown below:

0

1

1

1

1

Note that in the case of L3, a series of 01s cannot occur without intervening 10s,

and vice versa. For example, a second 01 will always form a 10, as in

01111101. Hence, at most only one unmatched pattern (01 or 10) can exist at

any point in time.

Non-Regular Languages

Page 4 of 10

regular. It is not automatic that if a language seems to have infinite possibilities,

then it is a non-regular language.

Hence, it is more difficult to prove the non-regularity of languages than to prove

their regularity. It is necessary to have some formal way of proving that a language

is non-regular.

To prove the non-regularity of languages, it is appropriate to discuss first one

special property of regular languages that is based on the pigeonhole principle.

The pigeon principle states that if there are m pigeonholes and n pigeons where

n > m, there will be at least one pigeonhole with at least two pigeons.

Non-Regular Languages

*Property of STI

Page 3 of 6

Non-Regular Languages

Page 5 of 10

To show how the pigeonhole principle is applied to regular languages, consider the

4-state DFA shown below:

1

q0

0, 1

q1

q2

q3

Now assume that there is the input string 011 whose length is 3. If the DFA is

currently at the start state q0, the sequence of states that will be traversed during

the computation are

0

q0

1

q2

q1

q3

The DFA goes from state q0 to q1 to q2 to q3. Hence, for the given input string

whose length is three, four states were traversed, and no state was repeated

during the computation.

Non-Regular Languages

Page 6 of 10

Now consider the input string 0011 whose length is 4. If the DFA is currently at the

start state q0, the sequence of states that will be traversed during the computation

are

0

q0

0

q1

1

q1

1

q2

q3

The DFA goes from state q0 to q1, then back to q1 again, then to q2, and finally to

q3. For the given input string whose length is four, five states were traversed

during the computation.

Take note that although there are only four states in the DFA, five states were

traversed. The pigeonhole principle can be applied here where the DFA states are

the pigeonholes and the states that were traversed during the computation are the

pigeons. Since there are more pigeons than pigeonholes, there is at least one

DFA state that will be traversed at least twice (a repeated state). In this example,

state q1 was traversed twice, or was repeated.

Non-Regular Languages

*Property of STI

Page 4 of 6

Non-Regular Languages

Page 7 of 10

Next, consider the input string 01011 whose length is 5. If the DFA is currently at

the start state q0, the sequence of states that will be traversed during the

computation is

0

q0

1

q1

0

q2

1

q3

1

q2

q3

The DFA goes from state q0 to q1 to q2 to q3 to q2 to q3. For the given input string

whose length is five, six states were traversed.

Although there are only four states in the DFA, six states were traversed.

Following the pigeonhole principle again, at least one DFA state will be traversed at

least twice. In this example, states q2 and q3 were traversed twice or were

repeated.

Notice that the number of states traversed will always be equal to the length of the

input string plus one. This is because even before the input string arrives, the DFA

is already at the start state q0. Hence, if the length of the input string is greater or

equal to the number of DFA states, the number of states traversed will always be

greater than the number of states of the DFA. By the pigeonhole principle, there

will then be at least one state that will be traversed at least twice.

Non-Regular Languages

Page 8 of 10

In general, if the length of the input string is greater than or equal to the number of

states of the DFA, there will be at least one state that will be repeated. It is

important to mention that short strings (strings whose length is less than the

number of states in the DFA) do not guarantee that there will be no repeated

states. There may be repeated states even though the string is short depending

on the type of input string. However, strings whose length are greater than or

equal to the number of states in the DFA do guarantee that there will be repeated

states.

Observe also that the repeated state or states will always form a loop.

In the third example, when the input string was 01011, the loop started with the

DFA at state q2. From there, it moved back to state q1 when it received a 0. And

from state q1, it went back to state q2 when it received a 1.

Looking at the given input string 01011, the loop was caused by the second 01

substring. Specifically,

0

1

this part

caused the

loop

Non-Regular Languages

*Property of STI

Page 5 of 6

Non-Regular Languages

Page 9 of 10

Notice now that if the substring 01 that formed the loop is repeated any number of

times, the input string is still accepted (it is still a member of the language).

Hence, the input strings 0101011 and 01010011 are still accepted by the DFA.

All regular languages have this property that if they have strings that are of a

certain minimum length (greater than the number of states in the DFA that

recognizes them), then they have a substring that can be repeated an arbitrary

number of times, and the resulting strings will still be in the language.

Non-Regular Languages

Page 10 of 10

Repeating a part of a string any number of times is called pumping the string.

This property of regular languages can now be used to determine if a language is

non-regular. All that has to be done is to show that they do not have this property.

This property is formalized by a lemma called the pumping lemma and it will be

discussed in the next lesson.

Non-Regular Languages

*Property of STI

Page 6 of 6

- sc_jalcUploaded byIshan Rastogi
- Present Simple vs Present ContinuousUploaded byDaniela Naged
- kleene closureUploaded bypbhmmmm
- 355mt1s12sol.pdfUploaded byCameron Harman
- JK Police Sub Inspector Syllabus Exam PatternUploaded byVikas Choudhary
- 01-Memoria Descriptiva Proyecto Edificio Brisas Del GolfUploaded byedson
- Compositional Probabilistic Verification Through mUploaded byBouchekirRedouane
- amn mUploaded bykksuvvari
- Recognition John Castro 141Uploaded byJULIETH
- Contents Level1Uploaded byIs Montaña
- Lecture 10Uploaded byJayant Bhardwaj
- k-catUploaded byvanaj123
- Col Lab English Seg 1Uploaded byEthan Michael Miller
- Comprehension BeginnerUploaded bySalah Ouali
- moreo2013Uploaded byPrimanaOky
- Four Dark Corners of Requirements EngineeringUploaded byAsif Sohail Abid
- Px c 3878700Uploaded bymuttus
- UNIT-I-SRMUploaded byanchit
- prefixesUploaded byAsta Andrašiūnaitė
- Report Section 1Uploaded byDarrel Susaya
- A Modified Cellular Automaton in Lagrange Form with Velocity Dependent Acceleration Rate PDF Kamini RAWAT, Vinod Kumar KATIYAR, Pratibha GUPTAUploaded bygreenleaff
- Body Parts1Uploaded byAnurag Goel
- 2011-0103 14 Formal LanguagesUploaded byshubham
- Assessment Kit 1 - SpeakingUploaded byMuhammad Zulafiq
- coevaluatio lessepsUploaded byapi-254470594
- Introduction to Needs Analysis.pptUploaded bychongperryboy
- nataly abreu tinb-3Uploaded byapi-458871094
- JavaScript Cheat SheetUploaded byshivanand_shettennav
- Pengaruh Karya YB Mangunwijaya.pdfUploaded bybayudesain - studio
- Diap_Leng_C++Uploaded byKarla C Ulloa

- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2017 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2017 2018Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2019 Certificate Recognization SERVICE AWARD 5 years of TCU OSASUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2018 Certificate of Recognition Outstanding Faculty of TCUUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC III BookkeepingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC II CSS Computer Systems ServicingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA TM 1 2016 Trainer's Methodology IUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA Data Encoder Eligibility 2Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA Data Encoder Eligibility 1Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC II PC OperationsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC I Data EncoderUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA License NC I TechnicianUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA 2009 Tm Am Trainers AMUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TESDA 2009 CHS NC II 392 Hours Certificate of Training Computer Hardware ServicingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU OSAS 2019 Certificate Recognization SERVICE AWARD 5 YearsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2018 Certificate of Recognition Outstanding Faculty - TEACHERUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM COGNOS Certified 2013Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate DATA WareHousingUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate BIG DATAUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate Predictive AnalyticsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate Descriptive AnalyticsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate Enterprise Data ManagementUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate Business AnalyticsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Training Certificate Lotus DominoUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES IBM Exam Certificate 2013Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2019 Certificate Recognition SERVICE AWARD 5 YearsUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2018 Certificate of Recognition Outstanding FacultyUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2018 Certificate of Recognition 6th Metro South RESEARCH Predictive MODELUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2017 Certificate of Recognition 6th University Research Festival August 2017Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU 2017 Certificate of Recognition 4th Metro South Thesis Adviser May 2017Uploaded byMELJUN CORTES, MBA,MPA

- C++ Interview Q & A 4Uploaded byAzhag Arasu
- 22 InheritanceUploaded byfractels
- PROJECT For Computer ScienceUploaded byPAUL
- Filetype PDF AutomataUploaded byDavid
- Java Lab Manual by HashmeeUploaded byhashmi8888
- 2 Group Assignment2.docxUploaded bykachulo
- Exam 2 MCUploaded byMadhu Ck
- I_CSCI_2843_390_26595_201620 C++ Programming Language -Online Spring 2016Uploaded byWilliam Smith
- Interview QuestionsUploaded byRemoMeansRemo
- mini-haskell-tutorial(1)Uploaded bygetdownload3525
- AutomataUploaded byPradeep Cool
- M257-MTA-2012-2013Fall 1_MOCKUploaded bySalif Ndiaye
- 07a4ec08 Object Oriented ProgrammingUploaded bySRINIVASA RAO GANTA
- AutomataUploaded bySunnyArora
- L03 StacksUploaded byAndrija Bozovic
- Object Oriented Programming Question PaperUploaded byAnonymous BOreSF
- Cse-V-Formal Languages and Automata Theory [10cs56]-SolutionUploaded byBnks Sdfdsfs
- Java programming notes OBJECT-ORIENTED PROGRAMMING – INHERITANCEUploaded byBalaji Shanmugam
- C++ - Chapter 1 - The Big PictureUploaded byMohamed Adel
- Improving Object Oriented Generic ProgrammingUploaded byapi-3722217
- c Sharp Notes for ProfessionalsUploaded byconrado
- Lecture08 dfdUploaded byZia Ahmad
- EIT Question Bank_FFUploaded byhdvsf
- C++Uploaded bySoumya Prakash Sahoo
- handout-02Uploaded byamos4354
- IPCSE202Uploaded bySudeep Biswas
- Handout 9.docxUploaded bymano
- 1Uploaded byArvind Sharma
- Post Assessment - Design PatternsUploaded byAmit Sharma
- C+++++++++++++++Uploaded byAshdada

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.