User blog:Nayuta Ito/Grass Hydra

Listen, everyone. This is really^n salad and huge.

Definitions of words:

Grass is a letter W or w.

Grass field is a n-dimensional array of grasses.

nDm is "n-dimensional W cube with the length of m."

ndm is "n-dimensional w cube with the length of m."

What grass hydras look like:

WWW

Ww(1)wW

W(2)WwW(1)w(1)Www

How to calculate:

Count steps every time. This is really important. Let step number n:

If the last is w, remove it (just removing takes one step).

If the last is W, remove it and place n w's.

If the last is bracket (k), {

If the last grass is W, remove it and place kDn after the bracket.

If the last grass is w, remove it and place kDn after the bracket.

}

When the grass field become empty, the work stops. The last step number is for the original grass field.