0 Up votes0 Down votes

5 views31 pagesMELJUN CORTES Automata Lecture the Regular Operations on Languages 1

Jun 12, 2015

© © All Rights Reserved

PDF, TXT or read online from Scribd

MELJUN CORTES Automata Lecture the Regular Operations on Languages 1

© All Rights Reserved

5 views

MELJUN CORTES Automata Lecture the Regular Operations on Languages 1

© All Rights Reserved

- Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
- Hidden Figures Young Readers' Edition
- The Law of Explosive Growth: Lesson 20 from The 21 Irrefutable Laws of Leadership
- The Art of Thinking Clearly
- The E-Myth Revisited: Why Most Small Businesses Don't Work and
- The Wright Brothers
- The Other Einstein: A Novel
- State of Fear
- State of Fear
- The Power of Discipline: 7 Ways it Can Change Your Life
- The Kiss Quotient: A Novel
- The 10X Rule: The Only Difference Between Success and Failure
- Being Wrong: Adventures in the Margin of Error
- Algorithms to Live By: The Computer Science of Human Decisions

You are on page 1of 31

Languages

The Regular Operations on

Languages

Suppose

there

are

languages X and Y.

Y (written as X

Y) is a

language that is composed of

all strings w such that w is a

string from language X or w is

a string from language Y.

Mathematically,

X

Y = {w w

X or w

two

Y}

* Property of STI

Page 1 of 31

Suppose

there

are

languages X and Y.

The

concatenation

of

languages X and Y (written as

X Y) is a language that is

composed of all strings w = xy

such that x is a string from

language X and y is a string

from language Y.

Mathematically,

X Y = {xy x

X and y

two

Y}

* Property of STI

Page 2 of 31

X.

(written as X*) is a language

that is composed of all strings

that

are

formed

by

concatenating 0 or more

strings of X.

The star

operation is also called the

Kleene closure.

includes the empty string and

is always infinite.

* Property of STI

Page 3 of 31

Examples

language Y = {bb, cc, dd}.

X

is:

X Y = {aabb, aacc, aadd,

bbbb, bbcc, bbdd}

aabb, aabbaa,

bbbb, bbaabb, }

* Property of STI

Page 4 of 31

Languages

Definition of Closure

under a certain operation if

performing that operation on

the elements of the set

produces an object that is still

a member of that set.

integers is closed under

multiplication since multiplying

integers always produces an

integer.

closed under division since

dividing two integers does not

always

produce

another

integer.

* Property of STI

Page 5 of 31

Operations

languages closed under union,

concatenation

and

star

operations? Specifically,

languages also

regular?

2. Is the concatenation of

regular languages also

regular?

3. Is the star of a regular

language also regular?

* Property of STI

Page 6 of 31

languages also regular?

Assume that L1 is a regular

language recognized by the

NFA N1:

N1 = {Q1,

1,

1,

q 1, F1}

regular language recognized

by the NFA N2:

N2 = {Q2,

2,

2,

q 2, F2}

If the union L1

L2 is regular,

then there must be an NFA

that recognizes it.

Let this

NFA be N3:

N3 = {Q3,

The Regular Operations on Languages

3,

3,

q 3, F3}

* Property of STI

Page 7 of 31

diagrams for N1 and N2:

q1

NFA N1

q2

NFA N2

and L2 should be able to

accept a string if it is a

member of either L1 or L2.

In other words, N3 should

accept an input string if it is

accepted by either N1 or N2.

The Regular Operations on Languages

* Property of STI

Page 8 of 31

should be able to start two

parallel computations.

One computation will try to see

or guess if the string belongs

to L1. The other computation

will try to see or guess if the

string belongs to L2.

N3 will then be a combination

of N1 and N2.

The state

diagram for N3 will be

q1

NFA N1

q0

q2

NFA N2

* Property of STI

Page 9 of 31

from the start state q0 to state

q1 (the start state of N1) and

state q2 (the start state of N2),

N3 automatically starts two

computations.

One computation simulates

N1 to determine if the input

string is a member of L1.

The

second

computation

simulates N2 to determine if

the input string is a member of

L 2.

If either computation ends up

in a final state, then N3 accepts

the input string.

The Regular Operations on Languages

* Property of STI

Page 10 of 31

recognizes L1 L2

1. The set of states Q3 for N3

Q3 = {q0}

2. The alphabet

3

Q1

Q2

x = input symbol

If q

Q1 then

3(q,

x) =

1(q,

x)

* Property of STI

Page 11 of 31

If q

Q2 then

3(q,

If q

x) =

2(q,

x)

q0 and x = then

3(q,

x) = {q1,q2}

The start state of N3 is q0.

F3 = F1

F2

* Property of STI

Page 12 of 31

Example:

Let L1 = {w w ends with a 00}

Let L2 = {w w starts with a 1}

0, 1

q1

q2

q3

0, 1

q4

q5

* Property of STI

Page 13 of 31

NFA N3 for L1

L 2:

0, 1

q1

q2

q3

0, 1

q0

q4

Therefore, L1

language.

q5

L2 is a regular

* Property of STI

Page 14 of 31

languages also regular?

Assume that L1 is a regular

language recognized by the

NFA N1 defined by

N1 = {Q1,

1,

1,

q 1, F1}

regular language recognized

by the NFA N2 defined by

N2 = {Q2,

2,

2,

q 2, F2}

If the concatenation L1 L2 is

regular, then there must be an

NFA that recognizes it.

Let

this NFA be N3 defined by

N3 = {Q3,

The Regular Operations on Languages

3,

3,

q 3, F3}

* Property of STI

Page 15 of 31

diagrams for N1 and N2:

q1

NFA N1

q2

NFA N2

The

NFA

N3

for

the

concatenation of L1 and L2

should be able to accept a

string if it is of the form xy

where x

L1 and y

L2. In

other words, N3 should accept

an input string if it can be

divided into two parts where

the first part is accepted by N1

and the second part is

accepted by N2.

The Regular Operations on Languages

* Property of STI

Page 16 of 31

first part of the input string is

accepted by N1.

Once N1 is in a final state, N3

tries to see or guess if that is

the point where the first part

stops and the second part

begins. So N2 performs its

computation.

The state diagram for NFA N3

will be:

e

q1

NFA N1

q2

NFA N2

* Property of STI

Page 17 of 31

state of N1.

Upon arrival of the first symbol

of the input string, N3 starts

simulating N1 to determine if

the first part of the string is a

member of L1.

Every time the computation

reaches a final state of N1, N3

assumes or guesses that this

is the point where the first part

ends and the second begins.

Hence, N3 starts simulating N2

to determine if the second part

of the string is a member of L2.

The set of final states of N3 is

the set of final states of N2.

* Property of STI

Page 18 of 31

recognizes L1 L2

1. The set of states Q3 for N3

Q3 = Q1

Q2

2. The alphabet

3

x = input symbol

If q

Q1 and q

3(q,

x) =

F1 then:

1(q,

x)

* Property of STI

Page 19 of 31

if q

F1 and x

3(q,

if q

1(q,

x)

F1 and x = then:

3(q,

if q

x) =

then:

x) =

1(q,

x)

{q2}

Q2 then:

3(q,

x) =

2(q,

x)

The start state of N3 is q1.

5. The Set of Final States

F3 = F2

The Regular Operations on Languages

* Property of STI

Page 20 of 31

Example:

Let L1 = {w w ends with a 00}

Let L2 = {w w starts with a 1}

0, 1

q1

q2

q3

0, 1

q4

q5

* Property of STI

Page 21 of 31

for L1 L2

0, 1

q1

q2

q3

0, 1

q4

q5

Therefore, L1

language.

L2 is a regular

* Property of STI

Page 22 of 31

Is

the

star

of

regular

languages also regular?

Assume that L1 is a regular

language recognized by the

NFA N1.

N1 = {Q1,

1,

1,

q 1, F1}

then there must be an NFA

that recognizes it.

Let this

NFA be N2.

N2 = {Q2,

2,

2,

q 2, F2}

diagram for N1:

q1

NFA N1

* Property of STI

Page 23 of 31

accept a string if it is of the

form x1x2x3 where xi L1. In

other words, N2 should accept

an input string if it can be

divided into several parts

where each part is accepted

by N1.

NFA N2 will first try to see if the

first part of the input string is

accepted by N1.

Once N1 is in a final state, N2

tries to see or guess if the

second part is also accepted

by N1. So N2 goes back to the

start and begins computing

again.

By definition of the star

operation, N2 should also be

able to accept empty strings.

The Regular Operations on Languages

* Property of STI

Page 24 of 31

will be

q0

q1

e

`

NFA N1

state q0 which is also a final

state.

Adding this state

ensures that the empty string

is also accepted by N2.

of the input string, N2 starts

simulating N1 to determine if

the first part of the string is a

member of L1.

The Regular Operations on Languages

* Property of STI

Page 25 of 31

reaches a final state of N1, N2

assumes or guesses that this

is the point where the first part

ends and the second begins.

Hence, N2 goes back to the

start and tries to see if the next

part is also accepted by N1.

The set of final states of N2 is

the set of final states of N1 plus

state q0.

Formal construction of N2 that

can recognize L1*:

1. The set of states Q2 for N2:

Q2 = {q0} Q1

2. The alphabet

2 =

1

The Regular Operations on Languages

2:

* Property of STI

Page 26 of 31

2:

x = input symbol

If q

Q1 and q

2(q,

If q

F1 and x

2(q,

If q

x) =

1(q,

x)

then

1(q,

x)

F1 and x = then

2(q,

x) =

F1 then

x) =

1(q,

x)

{q1}

* Property of STI

Page 27 of 31

If q

q0 and x = then

2(q,

x) = q1

F2 = {q0}

F2

* Property of STI

Page 28 of 31

Example:

Let L1 = {w w ends with a 00}

NFA N1 for L1:

0, 1

q1

q2

q3

for L1*:

0, 1

q0

q1

q2

q3

language.

The Regular Operations on Languages

* Property of STI

Page 29 of 31

Theorems on Closure

Theorem 2

The

family

of

regular

languages is closed under the

union operation.

Theorem 3

The

family

of

regular

languages is closed under the

concatenation operation.

Theorem 4

The

family

of

regular

languages is closed under the

star operation.

* Property of STI

Page 30 of 31

Exercise:

Let L1 = {w w contains the

substring 010} and L2 = {w w

contains no more than two

1s}.

1. Give the state diagram for

the NFA that recognizes

L 1 L 2.

2. Give the state diagram for

the NFA that recognizes

L 1 L 2.

3. Give the state diagram for

the NFA that recognizes

L 2 L 1.

4. Give the state diagram for

the NFA that recognizes

L1*.

5. Give the state diagram for

the NFA that recognizes

L2*.

The Regular Operations on Languages

* Property of STI

Page 31 of 31

- A FGM Standard InstructionalText AllUploaded byEsteban Camilo Ortiz Zambrano
- FAFL Padma Reddy1Uploaded bynbpr
- Therory of ComputationUploaded byRam Gopal
- Regular ExpressionsUploaded byvipin3196
- Introduction to Automata Theory Languages and Computation by John Hopcroft, UllmanUploaded byHelton Danilo
- Face DetectionUploaded byAnand Raj
- 010 Lexical AnalysisUploaded byGagan Brar
- ADUni - Theory of Computation - Problem Set 01 SolutionsUploaded bykiet edu
- log warnUploaded bySumeet Bachchas
- Alignment 101 Assignment Ankit Tripathi c1Uploaded byankittri7
- Unit 2 Lexical AnalyzerUploaded byRashi Nigam
- aUploaded byMìrägé Σ∞ Ãçê
- busca exit_badis nas transações.TXTUploaded byMoises Joao
- VNX OE for Block 5.33.6 and File 8.1.6 Q1 2015 Release Technical DifferencesUploaded byJosé Francisco Hernández Pinto
- coade c 114 safaa mashhour autosavedUploaded byapi-276418332
- syllabus of automataUploaded byRosalea Contiga
- Turing VariationsUploaded byRaggy
- Java 3Uploaded byRizka Ardina
- Stacked Networks ApproachUploaded byIvan H. Tchalakov
- Lecture#03,4Uploaded byAniza Khan
- A Tutorial on Data Representation - Integers, Floating-Point Numbers, And CharactersUploaded byGoce Stavreski
- EngUploaded byRamses Casas
- BinaryUploaded byImaginRtist
- Solutions+-+Quiz+5Uploaded byHaseebAshfaq
- Assembly Adp Library Imperial AccUploaded byManado
- what ifUploaded byBrandon Berrios
- sagarUploaded bysagar
- Annals of Fuzzy Mathematics and Informatics, Volume 14, No. 1 (July 2017). Special issue for Neutrosophic SetsUploaded byAnonymous 0U9j6BLllB
- Lecture 27012011Uploaded byredpaladin
- KIMIAFIZIKBIOUploaded byIzt 2000

- TCU 2019 Certificate Recognization SERVICE AWARD 5 YearsUploaded byMELJUN CORTES, MBA,MPA
- TCU 2018 Certificate of Recognition Outstanding FacultyUploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2018 2019Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2018 2019Uploaded byMELJUN CORTES, MBA,MPA
- 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 Evaluation Faculty TCU Taguig City 2nd Semester 2016 2017Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2016 2017Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2015 2016Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2015 2016Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 2nd Semester 2014 2015Uploaded byMELJUN CORTES, MBA,MPA
- MELJUN CORTES TCU Evaluation Faculty TCU Taguig City 1st Semester 2014 2015Uploaded 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

- __2 Chapter 2 Review HomeworkUploaded byNaina Agarwal
- MAT1320 Fall 2003 Sample Final Exam.pdfUploaded byTurab
- NMO QUESUploaded bymaheshnagarkar
- Euler's Marvelous FormulaUploaded byUtkarsh Bajpai
- Chapter_14 Advanced Regression ModelsUploaded bymgahabib
- Net BookUploaded bysofilinde
- Downsampling and UpsamplingUploaded byblackboxvn
- Long Division Can Be Easy!Uploaded bycorinnwoods@pgcps
- Arbitrary Lagrangian-eulerian Method ForUploaded byraa_rap
- Ch2 Motion in 2D and 3D_2 StudentUploaded byfeen
- Automatic Control Systems Solutions ManualUploaded bySmijeet Kurup
- Bit Rev 2Uploaded byGoAway Chang
- Manov a NewestUploaded byglpi
- Completed Additional Mathematics Project Work Selangor 2014Uploaded byIsaac Hiew Yi Sa
- Chapter 1 LogicUploaded byClayton John
- Methods and Software Engineering Tools for Simulation of Robot DynamicsUploaded byAnonymous Hy5Ir9QX
- EMBA ProgramUploaded bymakbipu
- Brain TeasersUploaded byhariprabu
- Jackson 2 13 Homework SolutionUploaded byJardel da Rosa
- Docdownloader.com Statistics and Probability Problems With SolutionsUploaded byJustine Marowe Austria
- Gomes 2015Uploaded byAnna Karina
- Complex Analysis 11111Uploaded byعماد عماد
- Lecture 615Uploaded byJayakumar
- Euclid Workshop SolutionsUploaded byVenkat Venkataramanan
- RoboticsbasicUploaded bydanvic
- Introduction_to_Decimals.pdfUploaded byPeaceandLove Keisha Roldan
- Transformation DataUploaded byAbu Amany Assundawy
- Mathematics vs. Physics: Ibn al-Haytham’s Geometrical Conception of Space and the Refutation of Aristotle’s Physical Definition of PlaceUploaded byShahid.Khan1982
- Arturo Locatelli-Optimal Control_ An Introduction-Birkhäuser Basel (2001).pdfUploaded byMicheleSpagnolo
- Famous MathematiciansUploaded byFeby Demellites

## Much more than documents.

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

Cancel anytime.