I posted this over at the mathematics stack excahnge, but as its programming related I wondered if somebody can help out here.
I am working through a subject guide on involving L-Systems and have the following alphabet A = {a, b, c}. The initiator is the string “a” and the rules of substitution a → ba, b → ccb, c → a.
The study guide gives the first five generations as:
[a] → [ba] → [ccba] → [acba] → [aaba] → [aaccba]
I can’t for the life of me figure out how this works. No rules regarding the order of substitution are provided, and my lecturer say’s that it is possible to get to this.
Does anybody have any ideas?
In your example, it looks like they’re only doing one substitution each step, with later rules taking priority over earlier. This might be a variation on the classic L-system, but I’ve never seen it done that way. The rules in an L-system are supposed to be applied to all symbols each generation. The correct expansion for those rules (spaces added to show which symbols the next generation came from) would be