Squares

Description

Squares with transition P systems.

../../_images/Squares.png

Model in P-Lingua

The corresponding P-Lingua file is the following:

@model<transition>

def main()
{
        call squares();
}

def squares()
{
        @mu = [[[]'3 []'4]'2]'1;
        @ms(3) = a,f;

        [a --> a,bp]'3;
        [a --> bp,@d]'3;
        [f --> f*2]'3;

        [bp --> b]'2;
        [b []'4 --> b [c]'4]'2;
        (1) [f*2 --> f ]'2;
        (2) [f --> a,@d]'2;
}

Files