A grammar for the language L should be designed. $$ L=\left\{ { a }^{ n }{ b }^{ \frac { n }{ 2 } }|n\in N,\quad n\quad mod\quad 2\quad =\quad 0 \right\} $$ The special part of this language is the modulo operator (n % 2 = 0). Personally, I had a first idea for the grammar, but I can not reconcile it with the modulo operator.
My idea can be formalized something like this: Set $$ n = 2m $$ then $$ {a} ^ {n} {b} ^{ \frac { n }{ 2 } } = a ^ {2m} {b} ^ {m} $$ From this I derived the production rule: $$ S --> aaSb | \ E $$ Where E is the empty word. I am not sure if this is correct. What is your opinion about this? I hope my question is clear so far :)
Your solution is perfect.
Note that $n\in\Bbb N,\ n\,\mathrm{mod}\, 2=0$ means nothing else but that $n$ is a nonnegative even number, so that writing $n=2m$ for some $m\in\Bbb N$ is correct.
And indeed, the original set of words could also be replaced by $$L=\{a^{2m}b^m\mid m\in\Bbb N\}$$