A simple modulo arithmetic problem

88 Views Asked by At

I slur `$z\mod L$' here to mean the only element of $\{z+nL: n\in \mathbb{Z}\}\cap [0,L).$

We are given quantities:

  • $a,b, L,$
  • $D_1 = (ax \mod L) + aw$,
  • $D_2 = bx+bw.$

We are also given the fact:

  • $D_3 =(ax + bx)\in [0,L).$, i.e. $D_3=(D_3\mod L)$

From these facts, is it possible to compute the following in terms of the given quantities? $$D_4 = ax+bx+aw+bw= D_3+aw + bw$$


Here's my try:

\begin{align} (D_1+D_2) &= ((ax \mod L) + aw + bx+bw) \\ &= ((ax \mod L)-ax+ax+bx+aw+bw)\ \\ &= ((ax \mod L)-ax)+D_4. \end{align}

So it is enough to find $(ax \mod L)-ax,$ which I am not sure is possible.

1

There are 1 best solutions below

0
On BEST ANSWER

The difficulty of that problem is that there is a lot of useless data. All you need is that you know $a$, $b$, and $D_2=bx+bw$.

$$D_4=D_2\left(1+\frac ab\right)$$