(no title)
canjobear | 8 days ago
S -> F_K
F_i -> F_{i-1} + G_{i-1} for i>0
G_i -> F_{i-1} - G_{i-1} for i>0
F_0 -> f
G_0 -> g
This kind of CFG is used for example by https://journals.aps.org/prx/pdf/10.1103/PhysRevX.14.031001
canjobear | 8 days ago
S -> F_K
F_i -> F_{i-1} + G_{i-1} for i>0
G_i -> F_{i-1} - G_{i-1} for i>0
F_0 -> f
G_0 -> g
This kind of CFG is used for example by https://journals.aps.org/prx/pdf/10.1103/PhysRevX.14.031001
YeGoblynQueenne|6 days ago
I believe that would work too and you could convert to this sub-scripted format with a simple pre-processor. I prefer the simpler and clearer notation that leaves the counting of generations to an interpreter because it's easier to read, but that's personal taste.
Thanks for the link to the paper which looks interesting. I'll have to read it more carefully.