What can be the additions to a finite automaton so that it may accept any context-free language? Clearly, some addition is required as each regular language is context-free and there are context-free languages that are not regular. For example, the language L = {anbn: n ε N} is context-free but it is not regular. Here you can see that somehow the automaton must remember how many a’s it has read, and then it has to consume b’s one after another matching to that number. A finite automaton does not remember any thing. So, we do not see how an automaton can accept the language {ww: w ε {a, b}*}, where w is the string obtained from w by interchanging a’s with b’s. We add some sort of memory to a finite automaton so that it remembers the first half and then match that with the second half, symbol by symbol. Moreover, how would it know that it has come across the first half of the input string?Well, we will keep that undetermined so that the automaton would guess and then will do the right thing when it has the right guess. If it is not the right guess, then the machine will not be penalized for it. A nondeterministic machine with some kind of memory might do the job.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2009 Springer-Verlag London Limited
About this chapter
Cite this chapter
(2009). Structure of CFLs. In: Elements of Computation Theory. Texts in Computer Science. Springer, London. https://doi.org/10.1007/978-1-84882-497-3_6
Download citation
DOI: https://doi.org/10.1007/978-1-84882-497-3_6
Publisher Name: Springer, London
Print ISBN: 978-1-84882-496-6
Online ISBN: 978-1-84882-497-3
eBook Packages: Computer ScienceComputer Science (R0)