Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EN - US 1 . 2 0 points Consider the following CFG G . S - > XX | Y X - > aXb |

EN-US
1
.
2
0
points Consider the following CFG G
.
S
-
>
XX
|
Y
X
-
>
aXb
|
c
Y
-
>
bbY c
|
a
(
a
)
Create MG
,
an augmented PDA from G
.
(
b
)
Consider the augmented transition in the PDA created to mimic
the X
-
>
aXb rule in the grammar. Show the non
-
augmented
sequence of transitions required in a standard PDA that would
mimic this rule.
(
c
)
Let w
=
aacbbacb. Provide a leftmost derivation of w in the
grammar G
,
and show the computation path of w in MG
.
S
-
>
-
>
[
q
0
,
aacbbacb,
\
epsi
]
[
q
1
,
,
]
[
qloop
,
,
]
2
.
2
0
points Consider the following PDA P
.
(
a
)
Create a CFG that accepts L
(
P
)
using the method presented in
the videos. Make sure you label you variables to correspond with
the states in P as discussed in the videos and the text.
(
b
)
Let w
=
aabbbc. Show the computation path of w in P and provide
a leftmost derivation of w in G
.
fig
1
:
+
pda
title WS
1
3
Prob
2
Q
=
{
qs
,
q
1
,
q
2
,
q
3
,
qf
}
S
=
{
a
,
b
,
c
}
T
=
{
X
,
Y
,
$
}
q
0
=
qs
F
=
{
qf
}
qs
-
>
q
1
:
\
e
,
\
e
-
>
$
q
1
:a
,
\
e
-
>
X
q
1
-
>
q
2
:a
,
\
e
-
>
X
q
2
:b
,
X
-
>
\
e
q
2
:b
,
\
e
-
>
Y
q
2
-
>
q
3
:b
,
\
e
-
>
Y
q
3
:c
,
Y
-
>
\
e
q
3
-
>
qf:
\
e
,
$
-
>
\
e
done.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions