I need some little help in connection with linguistics.
My first question is: Is there any fast way to figure out grammar if I have sequence of symbols, or do I have to guess?
My second question is: Given the following language, what is a phrase structure grammar that produces this language?
L = {x^(2^i) : i >= 0}
This language contains the follwing sequences:
x
xx
xxxx
...
I started with something like this:
G = (V,T,P,S)
V = {A, ... }
T = {x}
P = {
S -> A
...
}
Can anybody help with completing the grammar?
For example, the grammar for the language defined as
`L2 = {x^i : i > 0}`
is
G = (V,T,P,S)
V = {A}
T = {x}
P = { A -> x | xA }
S = A
I need to figure out a similar set of production rules P
for the language defined above.