Is it correct to combine the results of two cases for n=2k and n=2k+1?

46 Views Asked by At

The problem I'm working on

For every real number x, $⌊⌊\frac x2⌋/2⌋=⌊\frac x4⌋$

My proof is based on two cases.

Let $n = ⌊\frac x2⌋$

  1. For even integer n:
    $n = 2k$ (for some integer k), the result is $k \le \frac x4 \lt k + \frac 12$

  2. For odd integer n:
    $n = 2k + 1$ (for some integer k), the result is $k + \frac 12 \le \frac x4 \lt k + 1$

Would it be correct to combine the results into $k \le \frac x4 \lt k + 1$?

My main concern that k is supposed to be an arbitrarily chosen integer, thus, might be these k integers should be even named differently?

2

There are 2 best solutions below

0
On BEST ANSWER

If you want to combine the results, I would avoid using $k$ and just write $\left\lfloor \frac n2 \right\rfloor$ instead, so it would look like $$\left\lfloor \frac n2 \right\rfloor \leq \frac x4 < \left\lfloor \frac n2 \right\rfloor + \frac 1 2 \implies \left\lfloor \frac n2 \right\rfloor \leq \frac x4 < \left\lfloor \frac n2 \right\rfloor + 1$$ and $$\left\lfloor \frac n2 \right\rfloor + \frac 12 \leq \frac x 4 < \left\lfloor \frac n2 \right\rfloor + 1\implies \left\lfloor \frac n2 \right\rfloor \leq \frac x4 < \left\lfloor \frac n2 \right\rfloor + 1.$$ In both cases you can conclude $\left\lfloor \frac x4 \right\rfloor = \left\lfloor \frac n2 \right\rfloor.$

3
On

If $k$ is defined as in the two cases, then your two results imply $k\le x < k+1$ for all $n$, but not the other way around. We could write it as $\lfloor \frac n2\rfloor \le x < \lfloor \frac n2\rfloor+1$ for all $n$. But we still get too many possible $x$-values.

However, both cases are actually just $\frac n2\le x < \frac n2 +\frac12$ for all $n$, so that is the best way to join them together.