Formal Language

4 views
Skip to first unread message

Faegheh

unread,
Mar 17, 2011, 3:58:46 AM3/17/11
to proglang-course-2011
Give an eaxmple of a formal language that is not regular. (4 points)
is the answer C^n Y B^n ?
What is the differences between formal language and context free?

Thanks in advance

Aarne Ranta

unread,
Mar 17, 2011, 4:14:49 AM3/17/11
to proglang-c...@googlegroups.com
Hello,

Whether this is regular depends on C, Y, and B. If C == B and Y == "", then this is regular, and the expression is (B B)*. But if C /= B then it isn't. For instance,

  'a'^n 'b'^n

A formal language is *any* set of strings. A context-free language is a set of strings that can be defined by a context-free grammar. 

  Aarne.
Reply all
Reply to author
Forward
0 new messages