Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For instance given the mapping in the table below for the field $\mathbb{Z}_5$, for a mapping $f:(\mathbb{Z}_5)^3 \rightarrow \{-1, 1\} \subset \mathbb{Z}_5$: $$ \begin{vmatrix} 1 & 1 & 2 & \rightarrow & 1 \\ 2 & 1 & 3 & \rightarrow & -1 \\ 1 & 1 & 4 & \rightarrow & 1 \\ 3 & 2 & 3 & \rightarrow & -1 \\ \end{vmatrix} $$

where the rest of the domain can map to anything ("don't cares"), how do I calculate a polynomial that will achieve this?

Use for it: there exists a polynomial $f$ for each ordering $\lt$ on $\mathbb{Z}_5$ say for example $0 \lt 1 \lt 2 \lt \dots \lt 4$, such that if $a\lt b$, then $f(a,b,c)\ c a \lt f(a,b,c) \ c b$ for all $a,b,c \in \mathbb{Z}_5$

share|cite|improve this question

For the example you give, you have 4 pieces of information, so you need 4 unknown coefficients in your polynomial. It should work to assume $f(x,y,z)=ax+by+cz+d$ for some unknown $a,b,c,d$. From the data, you get the equations, $$\eqalign{a+b+2c+d&=1\cr2a+b+3c+d&=-1\cr a+b+4c+d&=1\cr3a+2b+3c+d&=-1\cr}$$ Now solve by the usual methods for solving a system of linear equations.

In this example, equations 1 and 3 tell you $c=0$; then equations 1 and 3 are identical, so you can chuck out equation 3 and play with $$\eqalign{a+b+d&=1\cr2a+b+d&=-1\cr3a+2b+d&=-1\cr}$$

Now the first two equations tell you $a=-2$, so you are left with $b+d=3$, $2b+d=0$. This forces $b=2$, $d=1$, so $f(x,y,z)=3x+2y+1$.

In general, just use a polynomial with enough terms to get you as many unknowns as you have equations.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.