RACSO
DFA
CFG
Operations:
Reg
,
CF
PDA
Reductions:
K
,
WP
,
CFG
,
NP
,
SAT
ANTLR:
lexical
,
syntactic
Exams
log in
,
register
,
become guest
This site uses cookies only for the purpose of identifying user sessions. This is required to properly register actions.
Exercise
‹
14
›
:
Non-ambiguous CFG for
{
a
n
0
b
a
n
1
b
…
a
n
m
−
1
b
a
n
m
∣
m
≥
1
∧
(
n
0
=
∑
1
≤
i
≤
m
n
i
)
}
\{ a^{n_0} b a^{n_1} b \ldots a^{n_{m-1}} b a^{n_m} \mid m\geq 1 \wedge (n_0 = \sum_{1\leq i\leq m} n_i) \}
{
a
n
0
b
a
n
1
b
…
a
n
m
−
1
b
a
n
m
∣
m
≥
1
∧
(
n
0
=
∑
1
≤
i
≤
m
n
i
)}
Write a
non-ambiguous
CFG generating the words of the form
a
n
0
b
a
n
1
b
…
a
n
m
−
1
b
a
n
m
a^{n_0}ba^{n_1}b\ldots a^{n_{m-1}} b a^{n_m}
a
n
0
b
a
n
1
b
…
a
n
m
−
1
b
a
n
m
, with
m
≥
1
m\geq 1
m
≥
1
, such that
n
0
n_0
n
0
is equal to the sum
n
1
+
n
2
+
…
+
n
m
n_1+n_2+\ldots+n_m
n
1
+
n
2
+
…
+
n
m
.
Authors:
Guillem Godoy /
Documentation:
// Write your CFG here...
To be able to submit you need to either
log in
,
register
, or
become a guest
.