286 views

Functions $g$ and $h$ are defined on $n$ constants, $a_0,a_1,a_2,a_3,...a_{n−1}$, as follows: $g(a_p,a_q)=a\mid p−q\mid$, if $\mid p-q \mid\leq(n-4) =a_n−\mid p−q\mid$, if $\mid p-q\mid>(n-4) h (a_p,a_q)=a_k$, where $k$ is the remainder when $p+q$ is divided by $n$.

If $n=10$, find the value of $g(g(a_2,a_8),g(a_1,a_7))$,

1. $a_9$
2. $a_7$
3. $a_2$
4. $a_0$

1