Lecture#25-Linear Bounded Automata
Lecture#25-Linear Bounded Automata
Lecture#25-Linear Bounded Automata
Lecture#25
blog.bazaarvoice.com
Umar Faiz
Pakistan Institute of Engineering and Applied Sciences
LINEAR BOUNDED AUTOMATA
• Linear Bounded Automata (LBAs) are the same as Turing Machines with
one difference.
• A linear bounded automaton (LBA) is a finite state machine with a finite
length tape. The tape consists of a sequence of cells, where each cell can
store a symbol from the machine’s alphabet.
• Symbols can be written or read from any position on this tape. LBA has a
read-write head that can be moved left or right one cell. The tape is used
both to store the input and any ongoing calculations.
Input string
[ 1 0 1 0 1 ]
Input string
[ 1 0 0 0 0 1 1 0 0 1 0 1 ]
[ 1 0 ]
tape is limited in size to 2
times the size of the input.
Input string
[ 1 0 0 1 ]
tape is limited in size to 3
times the size of the input.
Slides based on Costas Busch - RPI
LINEAR BOUNDED AUTOMATA
• At each step the LBA read the symbol under the read-write
head, replaces the by another symbol (could be the same
symbol) and then perform one of four possible actions
– Accept the input string
– Reject the input string
– Move the read-write head one cell to the left/right
q n gn
Chomsky Hierarchy
blog.bazaarvoice.com
Umar Faiz
Pakistan Institute of Engineering and Applied Sciences
THE CHOMSKY HIERARCHY
Non Recursively Enumerator)
Technical Note:
Type-0 Languages
Type-1 languages explicitly
exclude the null string. (Recursively Enum.)
All other language Recursive
families permit the null
Languages
string as a member.
(The Venn diagram is
in slight error because
of this technicality.) Type-1
(Context-sensitive)
Languages
Type-2
(Context-free)
Languages
Linear
(Context-free)
Type-3 Languages
(Regular)
Languages
THE CHOMSKY HIERARCHY
According to Noam Chomsky, there are four types of grammars. The
following table shows how they differ from each other.
Grammar
Grammar Accepted Language Accepted Automaton
Type
Recursively enumerable
Type 0 Unrestricted grammar Turing Machine
language
Context-sensitive Linear-bounded
Type 1 Context-sensitive language
grammar automaton
S ABC CA AC
S ABCS CB BC
AB BA Aa
AC CA Bb
BC CB Cc
BA AB
THE CHOMSKY HIERARCHY
Type–1 Grammar (Context-Sensitive Grammars):
n n n is generated by the following context-
– The language {a b c }
sensitive grammar.
• The derivation for the string aabbcc is
S aSBC S abc | aAbc
aaBCBC
aabCBC
Ab bA
aabBCC Ac Bbcc
aabbCC bB Bb
aabbcC
aabbcc aB aa | aaA
THE CHOMSKY HIERARCHY
Type–1 Grammar (Context-Sensitive Grammars):
• Context-sensitive grammars are more general than context-free
grammars, in the sense that there are languages that can be
described by CSG but not by context-free grammars.