This preview shows pages 1–2. Sign up to view the full content.
CSc 318
Final Examination
Monday
12 December 1994
7 PM
(Below ^ denotes a suprescript, e.g., 2^n denotes 2 raised to the nth power)
1.
(10 pts)
Find a CFG which is not leftrecursive and which is
equivalent to the grammar
S> AxByc
A>SyBy
B>ab
2.
(20 pts)
Given R and S, binary relations on the set A, prove that
if R is a subset of S, then R^* is a subset of S^*.
3.
(10 pts)
Find a lambdafree CFG, G', such that L(G')=L(G){lambda},
where G is the CFG given by
S>aBBaCBCbC
B>CaCbCC
C>abClambda
4.
(10 pts)
If A={a,b,c,d} and B={0,1,2,.
...} prove that #B=#(A x B).
5.
(20 pts)
Prove that for every regular expression, E, there is a CFG,
G, such that L(G)=L(E) but that there is a CFG, G, for which there
is no regular expression, E, such that L(G)=L(E).
6.
(10 pts)
For the CFG below find an equivalent CFG which has all
reachable and terminating symbols.
S>CACBBCAd
A>ADBDaBDDE
B>caSbc
C>AbBc
D>aAAbbD
E>a
7.
(20 pts)
Find a complete minimal DFA equivalent to the NFA given
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '08
 varies

Click to edit the document details