1

Is the language of strings which are not of the form t#t, where t is an arbitrary string over {0,1} a CFL? I don't know to solve this.

Another question is that: Is the set consisting of: production rules of Grammers that are CFGs, itself a regular set? How to prove? I don't understand what the question mean. Thanks.

Kitchen
  • 25
  • 4
  • t#t, where t is an arbitrary string over {0,1} is NOT CFL you cannot see bottom of the stack – mk1024 May 08 '18 at 16:37

1 Answers1

0

The language of all context-free sets of rules will normally be regular. Depending a bit on your exact definitions and your representation of the rules, you basically only have to check whether all left-hand sides are of length one and whether the format of the set is correct.

((S,ab),(S,aSb))

might be a string of that language for the set with the rules S->ab and S->aSb. The parentheses never nest deeper than 2, so you do not need a stack. If you really mean the "set consisting of: production rules of Grammars" you alny have strings with singular rules as (S,ab), which is even easier.

Concerning the set of strings which are not of the form t#t, its complement is well-known not to be context-free. As CFL is not closed under complement, this does not mean anything, though. You can find an answer here.

Peter Leupold
  • 1,162
  • 1
  • 9
  • 16