1
$\begingroup$

Does the following hold $\forall a,b,c,d\in\mathbb R$? $$\quad\left\lfloor{\frac{a+b+c+d}{4}}\right\rfloor=\left\lfloor\frac{\left\lfloor{\frac{a+b}{2}}\right\rfloor+\left\lfloor{\frac{c+d}{2}}\right\rfloor}{2}\right\rfloor?$$


It seems like it's enough to restrict $a,b,c,d$ to $[0,4)$, and then we can do a case analysis for all possible values of $\left\lfloor{\frac{a+b}{2}}\right\rfloor,\left\lfloor{\frac{c+d}{2}}\right\rfloor$.

Is there a simpler way?


As suggested in a comment, an equivalent questions is whether the following holds for all $x,y\in\mathbb R$:

$$\left\lfloor\frac{x+y}{2}\right\rfloor = \left\lfloor\frac{\left\lfloor x\right\rfloor+\left\lfloor y\right\rfloor}{2}\right\rfloor.$$


As suggested in the answer (and one of the comments), this fails, e.g., for $a=2.5, c=1.5, b,d=0$.

A followup question:

Does the equality hold for all $a,b,c,d\in\mathbb N$?

$\endgroup$
6
  • 4
    $\begingroup$ Define $x:=\frac{a+b}{2},\,y:=\frac{c+d}{2}$ to halve the number of variables. $\endgroup$
    – J.G.
    Jan 7 at 17:16
  • $\begingroup$ @J.G. - good point, thanks. $\endgroup$
    – M A
    Jan 7 at 17:22
  • $\begingroup$ When executing FullSimplify[Floor[(a+b+c+d)/4]-Floor[(Floor[(a+b)/2]+Floor[(c+d)/2])/2]] I did not obtain zero, which might be a first indicator that your identity does not hold. $\endgroup$ Jan 7 at 17:24
  • 1
    $\begingroup$ This fails for $(a,b,c,d)=(0,2.2,0,1.8)$. $\endgroup$ Jan 7 at 17:25
  • $\begingroup$ @EldarSultanow - thanks. Which software is this? $\endgroup$
    – M A
    Jan 7 at 17:41

1 Answer 1

2
$\begingroup$

The result is false. As pointed out by J.G., we can apply change of variable $x=\frac{a+b}{2}$ and $y=\frac{c+d}{2}$ to get:

\begin{equation*} \lfloor \frac{x+y}{2}\rfloor = \lfloor \frac{ \lfloor x \rfloor+\lfloor y\rfloor}{2}\rfloor \end{equation*}

But this cannot hold for every real $x$ and every real $y$: just put $x=2.5$ and $y=1.5$ for example.

Edit:

If $a$, $b$, $c$, and $d$ are all positive integers, we can just make sure $a+b=5$ and $c+d=3$ to get $x=2.5$ and $y=1.5$ so that the result fails even if we assume they are all positive integers.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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