0% found this document useful (0 votes)
118 views

Context-Sensitive Languages and Linear-Bounded Automata: Another Intermediate-Strength Model of Computation

This document discusses context-sensitive languages and linear-bounded automata (LBA), an intermediate model of computation. It defines context-sensitive grammars and languages, and shows that LBAs can recognize any context-sensitive language by operating within a space bound equal to the length of the input. Examples are given of LBAs that recognize specific context-sensitive languages. The key points are that context-sensitive languages are characterized by context-sensitive productions, and are equivalent in power to LBA-acceptable languages.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views

Context-Sensitive Languages and Linear-Bounded Automata: Another Intermediate-Strength Model of Computation

This document discusses context-sensitive languages and linear-bounded automata (LBA), an intermediate model of computation. It defines context-sensitive grammars and languages, and shows that LBAs can recognize any context-sensitive language by operating within a space bound equal to the length of the input. Examples are given of LBAs that recognize specific context-sensitive languages. The key points are that context-sensitive languages are characterized by context-sensitive productions, and are equivalent in power to LBA-acceptable languages.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Context-Sensitive Languages and

Linear-Bounded Automata
Another Intermediate-Strength Model
of Computation
Context-Sensitive Grammars
• Language {anbncn|n > 0} not context-free
• Application of Pumping Lemma for
Context-Free Grammars
• Generative grammars exist that generate L
• Example 9.8.3
Example 11.1.1

S  aSBC|aBC
CB  BC
aB  ab
bB  bb
bC  bc
cC  cc
Context-Sensitivity
• Context-sensitive production any
production    satisfying ||  ||.
• Context-sensitive grammar any generative
grammar G = , , ,  such that every
production in  context-sensitive.
• No empty productions.
Context-Sensitive Language
• Language L context-sensitive if there exists
context-sensitive grammar G such that
either L = L(G) or L = L(G)  {}.
Context-Free and Context-
Sensitive Languages
• Any context-free language context-sensitive
despite fact that there exist context-free
grammars that are not context-sensitive
grammars.
• A bit of engineering.
Generates {a b c d |i, j  1}
i j i j

S  AB
A  aAX|aX
B  bBd|bYd
Xb  bX
XY  Yc
Y 
Generates {aibjck|1  i  j  k}

S  aS´bX|abX
S´  aS´bC|S´bC|S´C|bC|C
Cb  bC
CX  Xc
X c
Linear-Bounded Automaton
• Special sort of nondeterministic, single-tape
Turing machine
• Language acceptor only
• Left endmarker  and right endmarker
flanking input
• Multiple tapes possible (also with  and
in same positions)
Summary of Formal Definition
 Upon encountering , either M halts or M’s
read/write head must move to right
 Upon encountering , either M halts or M’s
read/write head must move to the left.
• M nevers writes either  or .
•  and  can never be “moved.”
• Mark bounds of memory.
Word Acceptance
• Input tape contains w immediately preceded
by  and immediately followed by  and
otherwise blank.
• M (is able to) halt scanning symbol 1 on a
tape that contains string 1B|w|1 and that is
blank otherwise.
• Input w =  a special case.
LBA-Acceptable Language
• LBA M accepts language L if M accepts all
and only words of L.
• L is LBA-acceptable if there exists LBA
that accepts it.
Powerful Model of
Computation
• N. Savoiu’s Deus ex machina (software
simulation)
• Example 11.3.1 accepts {anbncn|n  1}.
• Example 11.3.2 accepts {ai|i prime}
• Example 11.3.3 accepts {ai2|i  0}
Context-Sensitive Languages and
Linear-Bounded Automata
Related
• L is context-sensitive language if and only
if L is LBA-acceptable.
• Tool: (equivalent) variant notion whereby
M accepts by terminal state

You might also like