
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
New format for FAs, CFG to CNF converting, Null productions, Removing the unit productions, Introducing the new productions, Class of machines, Regular language are the key points and terms you can learn in this lecture. Other related concepts are also explained in this course.
Typology: Slides
1 / 32
This page cannot be seen from the preview
Don't miss anything!
Convert the following CFG to CNF
S ABAB
A a|
B b|
Solution : Removing the null productions
A and B , and introducing the new productions as
S BAB|AAB|ABB|ABA|AA|AB|BA|BB|A|B
A class of machines (FAs) has been discussed accepting the regular language i.e. corresponding to a regular language there is a machine in this class, accepting that language and corresponding to a machine of this class there is a regular language accepted by this machine. It has also been discussed that there is a CFG corresponding to regular language and CFGs also define some nonregular languages, as well
Input TAPE The part of an FA, where the input string is placed before it is run, is called the input TAPE. The input TAPE is supposed to accommodate all possible strings. The input TAPE is partitioned with cells, so that each letter of the input string can be placed in each cell. The input string abbaa is shown in the following input TAPE.
The character ∆ indicates a blank in the TAPE. The input string is read from the TAPE starting from the cell (i).
It is assumed that when first ∆ is read, the rest of the TAPE is supposed to be blank.
a b b a a ∆ ∆.
Cell i (^) Cell ii Cell iii
ACCEPT: This state is like a final state of an FA and is expressed by
ACCEPT
REJECT: This state is like dead-end non final state and is expressed by
NOTE: It may be noted that the ACCEPT and REJECT states are called the halt states.
REJECT
b
a x-
b^ a
y+
REJECT ACCEPT
START
READ a^ READ
a
b
b
∆
∆
a
b
a
1 b +
a,b
REJECT ACCEPT
START
READ
a READ
a
b (^) READ
REJECT
b
a,b
∆ ∆ ∆
c
b
a
∆
PUSH a
STACK
When a letter is pushed, it replaces the existing letter and pushes it one position below.
POP : POP is an operation that takes out a letter from the top of the STACK. The rest of the letters are moved one location up. POP state is expressed as
POP
∆
a
b