What is $\frac{1}{2}$ equal to in $\mathbb{Z_7}$?
I have this system:
$$ \left\{ \begin{array}{c} 2a+4b+3c=0 \\ 2b+d=1 \\ a+c+4d=2 \end{array} \right. $$
And one solution is $(1,\frac{1}{2},1,0)$ but the solutions must be expressed in $\mathbb{Z_7}$
What is $\frac{1}{2}$ equal to in $\mathbb{Z_7}$?
I have this system:
$$ \left\{ \begin{array}{c} 2a+4b+3c=0 \\ 2b+d=1 \\ a+c+4d=2 \end{array} \right. $$
And one solution is $(1,\frac{1}{2},1,0)$ but the solutions must be expressed in $\mathbb{Z_7}$
On
In terms of real numbers, $\frac{1}{2}$ is the number such that when you multiply it by $2$, you get $1$. Clearly $1$ and $2$ exist in $\Bbb Z_7$ so the analogue of $\frac{1}{2}$ would be the number $x$ such that $2x = 1$ in $\Bbb Z_7$. That is to say that
$$2x-1 = 7n$$
for some $n$. Checking the elements of $\Bbb Z_7$, we see that
\begin{align} 2\cdot 0 - 1 &= -1 \neq 7n \\ 2\cdot 1 - 1 &= 1 \neq 7n \\ 2\cdot 2 - 1 &= 3 \neq 7n \\ 2\cdot 3 - 1 &= 5 \neq 7n \\ 2\cdot 4 - 1 &= 7 = 7\cdot 1 \\ 2\cdot 5 - 1 &= 9 \neq 7n \\ 2\cdot 6 - 1 &= 11 \neq 7n \end{align}
Thus the number that you multiply $2$ by to get $1$ is $4$ and so the notion of $\frac{1}{2}$ is $4$ in this setting.
On
"1/2", in any number system, is the number that, when multiplied by 2, gives 1. So one way to do that is to try every possible product (not that difficult with base 7). 2*0= 0, 2*1= 2, 2*2= 4, 2*3= 6, 2*4= 8= 1 (mod 7) (we could stop here), 2*5= 10= 3 (mod 7), 2*6= 18= 4 (mod 7). 1/2= 4 (mod 7).
We can also argue that 2x= 1 (mod 7) is the same as 2x= 1+ 7y for integers x and y. We can write that as 2x- 7y= 1. Now, use the "Euclidean algorithm": 2 divides into 7 three times with remainder 1 so 7(1)- 2(3)= 2(-3)- 7(-1)= 1. That is, one solution to 2x- 7y= 1 is x= -3, y= -1. But it is easy to see that x= -3+ 7k, y= -1+ 2k is also a solution for any k: 2(-3+ 7k)- 7(-1+ 2k)= -6+ 14k+ 7- 14k= 7- 6= 1. Taking k= 1 gives a positive answer, x= -3+ 7= 4, again. This second method is suited to "modulo" problems with large base.
On
$\mathbb Z_7$ viewed as a ring system (and because $7$ is prime, as a consequence, a field) is what is called a complete residue system.
The elements $0,1,....,6$ are each a residue class and the element $k$ represents the class of all integers that are equivalent to $i$ modulo $7$.
Now admittedly the are no integers that are equivalent to $0.5$ modulo $7$ but that is not what the residue class of $\frac 12$ means.
$\frac 12 = 2^{-1}$ is the multiplicative inverse of $2$. As $\mathbb Z_7$ is a ring then !!!IF!!! a multiplicative inverse of the residue class element $2$, that is what we would call $\frac 12$.
This is legitimate and ACCEPTABLE practice despite seeming weird.
So... as $2*4 \equiv 1 \mod 7$ we state $\frac 12 \equiv 4 \mod 7$.
And that's it.
===
Going back to the original problem.
You could avoid the issue by using equivalences:
$2a+4b+3c\equiv 0 \mod 7$
$2b+d\equiv 1 \mod 7$
$a+c+4d \equiv 2\mod 7$
... $2b + d \equiv 1 \mod 7 \implies 2b \equiv 1 - d \mod 7$
$\implies 2b \equiv 8 - 8d \mod 7\implies $
$b \equiv 4 - 4d \mod 7$.
Issue avoided.
In general, $2^{-1} \equiv n+1 \pmod{2n+1}$.
But if this is an exercise, you might be expected to write out the steps to the solution using multiplication rather than division.