Greatest integer sums

Algebra Level 2

For two random positive real numbers x x and y y chosen uniformly and independently from the interval ( 1 , 1000 ) (1,1000) , determine the probability that x + y = x + y . \lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor.

Notation: \lfloor \cdot \rfloor denotes the floor function .

1 3 \frac{1}{3} 1 e \frac{1}{e} 1 2 \frac{1}{2} 2 3 \frac{2}{3} 1 1

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

12 solutions

Jeremy Galvagni
Apr 11, 2018

Relevant wiki: 2-dimensional Geometric Probability

If the fractional parts (portions after the decimal) add up to less than 1, the two will be equal, otherwise unequal. The probability is zero that they'd add to exactly 1, so that can be ignored. If the fractional parts are plotted on coordinate axes, the resulting unit square is divided by a diagonal line from ( 0 , 1 ) (0,1) to ( 1 , 0 ) (1,0) separating these two equal areas. The probability is 1 2 \boxed{\frac{1}{2}} .

Moderator note:

There was a question in the comments about the sum being exactly 1 with zero probability.

When you take a point from a continuous probability, the chance of picking some exact point q q in the interval is 0. Intuitively, that's because there's an infinitude of points to pick from. You can think of it in a discrete case: imagine you have an infinity of balls marked 1, 2, 3, ... and you pick one at random; what is the probability that you've picked ball #235,234,123?

More formally, the probability is lim x 1 x = 0. \lim_{x\rightarrow \infty } \frac{1}{x} = 0 .

Would the probability of the decimals adding to exactly 1 really be zero? What if x and y had decimals of 0.4 and 0.6 respectively, for example?

Jordan Paul - 3 years, 1 month ago

Log in to reply

Zero probability is not equal to impossible.

Smile Machine - 3 years, 1 month ago

Log in to reply

Or, if you define impossible happening to be one of which' probability is 0, impossible things can happen!

Inksa Inkeroinen - 3 years, 1 month ago

Yes, the probability is really zero. You're talking about a point probability over an interval of real numbers.

Richard Desper - 3 years, 1 month ago

Good Solution!!!

Ariijit Dey - 3 years, 1 month ago

I guessed the answer thinking that it would require tedious PDFs :-P

Ariijit Dey - 3 years, 1 month ago

Apparently "real numbers x and y chosen uniformly and independently" implies some relationship between x and y, but what? There's no link to explain this.

Stacy Blatt - 3 years, 1 month ago

Log in to reply

I think you misunderstand the terminology being used. When it comes to random distributions, "uniformly" means that every point in the interval is equally likely to be picked. This is in contrast to, for example, a distribution formed by flipping a fair coin 1000 times and taking the number of heads that come up. You can see that in that case, numbers near 500 are going to be far more likely than numbers near 0 or 1000.

The word "independently" implies that there is no link between x and y. That is, no matter what value of x is drawn, it will not affect the probability that y is a certain number, and vice versa.

Kyle Coughlin - 3 years, 1 month ago

I understand there's no sum over an interval, it's uncountable, but since discrete case (infinity of balls marked 1, 2, 3, ... and you pick one at random) is countable, can I sum up all those 0 probabilities and claim that the result is 1?

lovro cupic - 3 years, 1 month ago

Log in to reply

It's not a question of whether the values are countable, but whether the set is infinite. Recall that one divided by zero is undefined, because it would be infinity and infinity isn't a number. Since a/b = c implies that a/c = b as long as c and b aren't zero, 1/0 is infinity implies that 1/infinity would be 0. Add up all the zeroes you want, you won't get to one. Adding an infinite "number" of zeros is undefined.

Tom Spencer - 3 years, 1 month ago

In mathematical terminology, this is known as " almost never ".

Stewart Gordon - 3 years, 1 month ago
Vimay MarCisse
Apr 30, 2018

Here, the only thing that matters are the decimals of x and y. There are two differents wways : either the sum of the decimals of x and y is >1 (=] 1; 2]), or the sum of the decimals of x and y is <1 (= [0; 1 [). These 2 cases therefore have the same probability : 1/2. This demonstration is by no means rigorous; I simply used my logic. This is my first.

Congratulations on posting your first solution, let me give you your first upvote!

Robert Williams - 3 years, 1 month ago

This was my approach as well. The decimal fraction will add up to somewhere between 0 and 2 and the probability will be symmetrical around 1 (replace the range with 1001-x and you get the same problem mirrored).

D B - 3 years, 1 month ago

I think this approach can be made rigorous with a little bit of work.

Agnishom Chattopadhyay - 3 years, 1 month ago
Nathan Klassen
Apr 30, 2018

I separated this into several different scenarios: The fractional part of x could either be less that 0.5 or greater than 0.5. The same is true for y. (Technically, it's possible that numbers with the fractional part exactly equal to 0.5, but this has probability zero as we are concerned with continuous numbers)

This leaves 4 equally likely scenarios:

  1. Both x and y's fractional parts are less than 0.5, so the relation is satisfied. This will occur 1/4 of the time.
  2. Both x and y's fractional parts are greater than 0.5, so the relation is NOT satisfied. This will occur 1/4 of the time.
  3. x's fractional part is less than 0.5, and y's fractional part is greater than 0.5. Either the relation will be satisfied, or not, with equal probability giving a 1/8 chance for either.
  4. x's fractional part is greater than 0.5, and y's fractional part is less than 0.5. Either the relation will be satisfied, or not, with equal probability giving a 1/8 chance for either.

Adding up the probabilities where it is satisfied gives 1/2.

This doesn't quite work. You're glossing over the meat of the proof.

Richard Desper - 3 years, 1 month ago

Don't understand the logic behind adding the probablities.

Tehillah _ - 3 years, 1 month ago
Inksa Inkeroinen
May 1, 2018

I wrote (to my paper...) the same solution that is here already about twice, but here it is a little more precisely:

x + y = x + y \lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor , when { x } + { y } < 1 \{x\} + \{y\}<1 and x + y = x + y + 1 \lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor +1 , when { x } + { y } 1 \{x\} + \{y\}\geq 1 ( { } \{ \cdot \} meaning the Fractional Part Function.)

That means, P ( x + y = x + y ) = P ( { x } + { y } < 1 ) = P ( u + v < 1 u , v ( 0 , 1 ) ) P(\lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor) = P(\{x\} + \{y\}<1) = P(u+v<1|u,v\in (0,1) )

The last probability can be considered as graphical:

Shadowed part of the square being the satisfying area. It's area is clearly 1 2 \boxed{\frac12} .

Is this text understandable in any way?

I like the graphic approach!

Nick Turtle - 3 years, 1 month ago
Ben Solomons
May 4, 2018

I literally just guessed

Robert Logan
May 5, 2018

The problem can be rewritten to separate the integer and decimal portions. X and Y are each the sum of a random integer A on some interval, and a random real α on the interval [0,1). I’ll use curly brackets for the floor function.

{X + Y} = {X} + {Y}

{A + α + B + β} = {A + α} + {B + β}

The integer portion can be separated from each floor function:

{A + α} = A + {α}

Rearranging:

A + B + {α + β} = A + B + {α} + {β}

α, β are less than one so {α} = {β} = 0. Subtract (A + B) from each side:

{α + β} = 0

Replace α+β=γ, where γ is a random number on the interval γ ∈ [0,2).

{γ} = 0

This statement is true when γ < 1, or equivalently, when γ∈[0,1). The interval [0,1) is half of the interval [0,2); therefore the likelihood of γ < 1 is 1/2.

It's the same as "What's the chance that 2 random numbers in the range 0-1 add up to more than 1?"

John Rey Jimenez
May 3, 2018

Suppose x = n \lfloor x \rfloor = n if n x < n + 1 n \leq x < n+1 and y = m \lfloor y \rfloor = m if m x < m + 1 m \leq x < m+1 for integers n n and m m by the definition of floor function.

Now, x = n + 0. p x = n + 0.p and y = m + 0. q y = m + 0.q where p p and q q are the decimal part of x x and y y respectively. Hence, x = a \lfloor x \rfloor = a and x = b \lfloor x \rfloor = b

Moreover, x + y = n + m + 0. p + 0. q \lfloor x+y \rfloor = \lfloor n + m + 0.p + 0.q \rfloor

Since n n and m m are integers, thus,

x + y = a + b + 0. p + 0. q \lfloor x+y \rfloor = \lfloor a \rfloor + \lfloor b \rfloor + \lfloor 0.p + 0.q \rfloor

x + y = x + y + 0. p + 0. q \lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor + \lfloor 0.p + 0.q \rfloor

To make the equation true,

0 0. p + 0. q < 1 0 \leq 0.p + 0.q < 1

However, the values of 0. p + 0. q 0.p + 0.q can be extended such that

0 0. p + 0. q < 2 0 \leq 0.p + 0.q < 2

Thus, the value of 0. p + 0. q 0.p + 0.q must be in [ 0 , 1 ) [0,1) but it is allowable to [ 0 , 2 ) [0,2) . Therefore, half of the time the equation will be False . Thus, the probability is 1 2 \boxed{\frac{1}{2}}

Simon Dixon
May 2, 2018

As many people have said the two sides of the equation are equal when {x} + {y} < 1. {x}-U[0,1] and {y}-U[0,1] so we have two identical continuous uniform distributions. Summing these two identical distrbutions will give us a symmetrical triangular distribution as long as the two distributions are independent which they are. (Think about what happens when you toss two dice and add up their two scores. Two uniform discrete distributions becomes triangular. The same follows for continuous distributions).Therefore {x}+{y}={z} where {z}-T(0,2). Since the probability density function makes a triangle with a line of symmetry about z=1 the probability of {x}+{y}<1 must be 1/2.

Vasilis Goumas
May 2, 2018

The sum of the integral parts of two numbers is equal to the integral part of their sum when the sum of their fractional parts do not sum over 1. The case that they sum exactly to 1 is of probability zero so we can be liberal with the signs.

So we want to calculate P ( X + Y < 1 ) P(X + Y < 1) given that X , Y U ( 0 , 1 ) X, Y \sim U(0,1) . The CDF of the sum of two random variables is actually their convolutions, and the direct calculation is Thomas' soluton.

Another way to come out with the result is by symmetry. For every pair x , y x, y such that x + y > 1 x + y > 1 , (w.l.o.g x < y x < y , being liberal with the signs here too), the pair x , 1 y x, 1-y adds to a number less than one. Working from x < y x < y we have that x y < 0 x - y < 0 so x + ( 1 y ) < 1 x + (1 - y) < 1

Lets call d e c ( x ) dec(x) the decimal part of x : d e c ( x ) = x x dec(x) = x - \lfloor x \rfloor As the equality required holds if the sum of decimal parts is less than 1, we have the equivalence : P ( x + y = x + y ) = P ( d e c ( x ) + d e c ( y ) < 1 ) P( \lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor) = P( dec(x) + dec(y) < 1 )

We can therefore reduce the problem to :
For two random positive real numbers x x and y y chosen uniformly and independently from the interval ( 0 , 1 ) (0,1) , determine the probability that P ( x + y < 1 ) P( x + y < 1 ) . This equals to : P ( x + y < 1 ) = P ( y < 1 x ) = 0 1 0 1 x d y d x = 1 2 P( x + y < 1 ) = P( y < 1 - x ) = \int_0^1 \int_0^{1-x} dy dx = \frac{1}{2}

Zhuang Pei
May 1, 2018

只看小数部分,就相当于在(0,2)没取两个数保证x+y<1。用坐标系图像很容易得出½

Could you please state this in English?

Agnishom Chattopadhyay - 3 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...