# A simple modulo arithmetic problem

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.

• Ok. Comments deleted then. Now I still don't really understand how you want to derive something non-trivial from the three given equalities: the first two define $D_1$ and $D_2$, they don't really carry information. The third one does carry the information that $0\leq (a+b)x <L$. That's basically all you have. Finally, what do you mean by " is it possible to compute..."? Do you mean compute "the" representative of that modulo $L$? And how is that question related to $D_1$ and $D_2$? – Arnaud Mortier Jul 29 '18 at 22:59
• No, I mean the quantity outright. That is, if $D_3=(a+b)\cdot x \in [0,L)$ then I want $D_3+(a+b)w \in \mathbb{R}$ – enthdegree Jul 29 '18 at 23:02
• So to be clear, you want an answer in terms of $D_1$ and $D_2$? – 高田航 Jul 29 '18 at 23:12
• Yes. ${}{}{}{}$ – enthdegree Jul 29 '18 at 23:14
• You don't know $x$ and $w$ but you know $a$ and $b$ is that right? – Arnaud Mortier Jul 31 '18 at 22:02

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)$$