Is Floor(x)/y Always Equal to Floor(x/y) When y Is an Integer?

  • Thread starter jaw088
  • Start date
In summary: If y<\lfloor x \rfloor, then \left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor<\left\lfloor \frac{x}{y} \right\rfloor, so the floor function cannot be defined for this case. However, if y=\lfloor x \rfloor, then \left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor>\left\lfloor \frac{x}{y} \right\rfloor, so the floor function is defined and equal to \left\lfloor
  • #1
jaw088
2
0
Hi,

I'm trying to proof that:
[tex]\left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor= \left\lfloor \frac{x}{y} \right\rfloor[/tex] for the specific case where y is an integer.

At the recommendation of somebody who I discussed the problem with, here's how I started:

[tex] \lfloor x \rfloor \le x < \lfloor x \rfloor + 1[/tex]
[tex] \frac{\lfloor x \rfloor}{y} \le \frac{x}{y} < \lfloor \frac{x}{y} \rfloor + \frac{1}{y} [/tex]
[tex] \left\lfloor \frac{\lfloor x \rfloor}{y} \right\rfloor \le \left\lfloor \frac{x}{y} \right\rfloor [/tex]

And from there, prove that the case of [tex] \left\lfloor \frac{\lfloor x \rfloor}{y} \right\rfloor < \left\lfloor \frac{x}{y} \right\rfloor [/tex] is impossible, leaving [tex] \left\lfloor \frac{\lfloor x \rfloor}{y} \right\rfloor = \left\lfloor \frac{x}{y} \right\rfloor [/tex]

Any ideas?

Thanks for your help,
John
 
Physics news on Phys.org
  • #2
Don't you also need x and y to be positive for this to work?
 
  • #3
Yes, x and y are both positive.

Sorry about that.

Even more specifically, in the application I'm using it, y >= 2.
 
Last edited:
  • #4
Well if you want to prove it's impossible you can try assuming it's possible and looking for a logical contradiction that arises.

I guess you could start by multiplying through by y and get [itex]
\left \lfloor \lfloor x \rfloor \rfloor} \right\rfloor < \left\lfloor x \right\rfloor
[/itex]
Then since x is a positive integer you can say that floor(floor(x))=floor(x), this is true since floor(x) leaves the integral part and taking the floor of that is like taking the integral part of the integer leaving the integer.

There is your contradiction, proving that the two statements are equal.
 
  • #5
I was thing that if you set
[tex]\left\lfloor\ x \right\rfloor+a=x[/tex]

where [tex]0 \leq a < 1[/tex]

then with substitution into

[tex]\left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor= \left\lfloor \frac{x}{y} \right\rfloor[/tex]

you would get

[tex]\left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor= \left\lfloor \frac{\left\lfloor\ x \right\rfloor+a}{y} \right\rfloor[/tex]

switch it up a bit

[tex]\left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor= \left\lfloor \frac{\left\lfloor\ x \right\rfloor}{y} +\frac{a}{y}\right\rfloor[/tex]

since a is bounded in the interval [tex]0 \leq a < 1[/tex] (by definition) than the the the second term [tex]\frac{a}{y}[/tex] will always be a smaller decimal than needed to raise the value of the floor function. basicly what i mean by that is
[tex]\left\lfloor \left\lfloor\ x \right\rfloor +a\right\rfloor - \left\lfloor\ x \right\rfloor \neq 1[/tex]
because obviously
[tex]\left\lfloor \left\lfloor\ x \right\rfloor +a\right\rfloor - \left\lfloor\ x \right\rfloor = 0[/tex]
the the second term will always be negligible in the equation so it can be removed giving you the equivalence. The proof seems pretty clearly stated to me except for the second to last step where i said you can phase out the second terms. I'm having a little trouble putting that step into words but intuitively i feel strongly that it works. it just needs someone more articulate than me to come along and fix it up. good luck.
 
  • #6
Maybe some insight can be gained from considering why y needs to be an integer. If y is allowed to be a real number, we could pick some [itex]0< \epsilon < a < 1[/itex] and use [itex]y = \lfloor x \rfloor + \epsilon[/itex]. Then, we have

[tex]\left\lfloor \frac{\left\lfloor x \right\rfloor}{y} \right\rfloor= \left\lfloor \frac{\left\lfloor x \right\rfloor}{\lfloor x \rfloor + \epsilon} \right\rfloor=0[/tex]

but

[tex]\left\lfloor \frac{\left\lfloor\ x \right\rfloor+a}{y} \right\rfloor= \left\lfloor \frac{\left\lfloor x \right\rfloor+a}{\lfloor x \rfloor + \epsilon} \right\rfloor=1[/tex]

So, assuming y is an integer, I'd break it into three cases: [itex]y<\lfloor x \rfloor[/itex], [itex],y=\lfloor x \rfloor[/itex] and [itex]y>\lfloor x \rfloor[/itex]. The second and third cases are easy to see, but what about the first case?
 
Last edited by a moderator:

FAQ: Is Floor(x)/y Always Equal to Floor(x/y) When y Is an Integer?

What is the meaning of "floor" in this equation?

"Floor" refers to the mathematical function that rounds a given number down to the nearest integer. It is denoted by the symbol "⌊ ⌋" and is commonly used in equations involving division.

Can you explain the significance of "y in Z" in this equation?

The notation "y in Z" indicates that the variable y can take on any integer value. This is important because it restricts the possible values of y in the equation and ensures that the result will also be an integer.

How is this equation useful in scientific research?

This equation is useful in a variety of fields, such as computer science, economics, and physics. It can be used to model real-world scenarios involving discrete quantities, as well as in algorithms and data analysis.

Is this equation always true?

Yes, this equation is always true for any integer values of x and y. This can be proven using mathematical induction or by analyzing the properties of the floor function.

Can this equation be extended to include non-integer values?

No, this equation only holds true for integer values of x and y. If non-integer values are used, the result will not be equal on both sides of the equation. However, there are similar equations that can be used for non-integer values, such as "⌊x⌋/y = ⌊x/y⌋" for x and y in R (real numbers).

Similar threads

Back
Top