l-systems
DESCRIPTION
L-systems. L-systems are grammatical systems introduced by Lyndenmayer to describe biological developments such as the growth of plants and cellular organisms. - PowerPoint PPT PresentationTRANSCRIPT
1
L-systems
L-systems are grammatical systems introduced by Lyndenmayer to describe biol
ogical developments such as the growth of plants and cellular organisms.
The major difference from the formal grammars that we have defined in the class
is that in L-systems every string that can be derived belongs to the language. Henc
e, there is no identification for terminals and nonterminals.
There are several variations of L-systems. Zero-sided L-systems correspond to th
e context-free grammars in the sense that the production rules are not context depe
ndent, i.e., there is only one symbol on the left side of the production rules. There a
re one-sided (left-sided or right-sided) L-systems and two-sided L-systems dependi
ng on context-sensitivity (to the left, right or both sides of a symbol) of a productio
n rule. The following definitions show variations of zero-sided L-systems.
2
L-systems
Definition 1. A 0L (zero-sided Lindenmayer) system is a triple G = ( , h, ), where
is a finite alphabet, h is a finite substitutions on into the set of subsets of *,
(i.e., h: 2 * .), and , called the axiom, is an element in *. The word sequence
generated by a 0L system is h0( ) = , h1( ) = h( ), h2 = h(h1( )), ...….
The language of G is defined by L(G) = { hi( ) | i 0}.
Example. G = ( {a}, h, a2 ), where h(a) = {a, a2 }. L(G) = {an | n 2}.
Definition 2. DOL (deterministic 0L) system is a 0L system (, h, ) with h: *.
Example. G = ({a, b}, h, ab ), where h(a) = a, h(b) = ab. L(G) = {anb | n 0}.
Notice that h gives only one string.
3
Drawing Plants Using Lindermayer System
1
23
224
.
.
229[229[24]9[3]8765]9[229[3]8765]9[228765]9[228765]9[2265]9[225]9[24]9[3]8765 2
2
9
2
2924
9
38
7
6
5
9
2
2
9
3
8
7
6
5
9
2
2
8
7
6
5
9
2
2
8
7
6
5
9
2
2
6
5
9
2
2
5
9
2
4
9
38
7
6
5
1 23 2 2 3 24
4 25 5 65 6 7
7 8 8 9[3] 9 9
4
Other Models for Language Definition (Syntax Diagram)
digit
letter
digit
letter
digit
unsigned integer unsigned integer. E
+
-
identifier
unsigned integer
unsigned number