Note: It is to be noted that for every FA, there exists a CFG that generates the language accepted by this FA.
|
| ||||||||||||||||
CFG corresponding to the above FA may be S --> bS | aA A --> aB | bS B --> aB | bB | It may be noted that the number of terminals in above CFG is equal to the number of states of corresponding FA where the nonterminal S corresponds to the initial state and each transition defines a production. |
Semi-word, Word and Theorem |
| ||||||
Semiword A semiword is a string of terminals (may be none) concatenated with exactly one nonterminal on the right i.e. a semiword, in general, is of the following form
(terminal)(terminal)… (terminal)(nonterminal)
word A word is a string of terminals. is also a word.
Theorem If every production in a CFG is one of the following forms Nonterminal --> semiword Nonterminal --> word then the language generated by that CFG is regular.
| |||||||
|
|
|
| ||||
A CFG is said to be a regular grammar if it generates the regular language i.e. a CFG is said to be a regular grammar in which each production is one of the two forms Nonterminal --> semiword Nonterminal --> word
Examples The CFG S --> aaS | bbS | is a regular grammar. It may be observed that the above CFG generates the language of strings expressed by the RE (aa+bb)*. The CFG S --> aA|bB, A --> aS | a, B --> bS | b is a regular grammar. It may be observed that the above CFG generates the language of strings expressed by RE (aa+bb)+.
Following is a method of building TG corresponding to the regular grammar.
| |||||||
|
|
|
|
plz share any one GDB of cs 402
On 7/1/11, Syed Shujaat Ali <bc090202244@gmail.com> wrote:
> Please send me Solution of STA301 Assignment # 4. and solved quiz of
> CS610 Quiz No:3
>
> MCM301 Quiz 05
>
> Also
> Graded Discussion Boards of CS402
> thanks
>
> --
> For study materials, past papers and assignments,
> Join VU School at www.VusCool.com
> and www.VUGuys.com
> CoooL Virtual University Students Google Group.
> To post to this group, send email to coool_vu_students@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/coool_vu_students?hl=en
>
--
For study materials, past papers and assignments,
Join VU School at www.VusCool.com
and www.VUGuys.com
CoooL Virtual University Students Google Group.
To post to this group, send email to coool_vu_students@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/coool_vu_students?hl=en
--
For study materials, past papers and assignments,
Join VU School at www.VusCool.com
and www.VUGuys.com
CoooL Virtual University Students Google Group.
To post to this group, send email to coool_vu_students@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/coool_vu_students?hl=en
No comments:
Post a Comment