If x is chosen uniformly at random on the interval ( 0 , 1 ] , then what is the probability that ⌊ x ⌊ x ⌋ + 1 ⌋ ≤ 3 ?
Notation: ⌊ ⋅ ⌋ denotes the floor function .
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.
Where did the 4 come from?
Log in to reply
x > 0
x 1 > 0
By definition of floor function,
⌊ x 1 ⌋ ≤ x 1 < ⌊ x 1 ⌋ + 1 ≤ 3 + 1 = 4
∴ x 1 < 4
Log in to reply
I did not realize the entire function was a floor function.
We get the 4 because it says less than or equal to 3, and since we're dealing with the floor function, that's the same as saying less than 4.
This is the easiest problem from the advanced section I had ever seen
Log in to reply
Ok, and...
Maybe because many people answer it too fast (like I did) and choose 3 2 instead of the correct one.
Log in to reply
I was about to answer 3 1 because I had misread as ≥ 3 then I quickly said "nope" and switched to 3 2 as well. D'oh!
Log in to reply
@Jeremy Galvagni – I did the very same thing :)
Seems a slightly weird question. Why is the interval (0,1] instead of (0,1), and why is there a floor of x? Note that the solution has a few slight errors: Floor(x) = 1 is possible, as x=1 is valid. This leads to the satisfying x's being in the interval (0.25,1] instead.
All in all the question would have been a nice intermediate problem, but should really be reposed as just floor(1/x) <= 3 for x in (0,1)
Log in to reply
The denominator x doesn't allow the value 0 .Regardless, the probability is the same, because a point is negligible on a line.
Log in to reply
Yes... that wasn't really what I meant. It would look neater as a question if it was (0,1) instead of (0,1], and if there was no floor(x).
Surely x in the range 0 25-0.333 leads to values greater than 3?
Log in to reply
The outer floor function then rounds it down to 3.
Doesn't (0.25,0.33) leads to exact 3 which validates the function in tern the probability should be 2/3 ?
Log in to reply
Yes? f( (1/4,1/3] ) = 3, f ( (1/3,1/2] ) = 2, f ( (1/2, 1) ) = 1. And f(1) = 2.
So f( (1/4,1] ) <= 3, hence probability is 3/4.
[x] can also be 1 at x = 1 and so LHS=2≤3 which satisfies hence x belongs to (1/4,1] and not (1/4,1) although probability remains same but it would be more accurate to write it this way
The fact that x is distributed uniformly, and the fact that the floor function returns an integer, both make this problem relatively simple. Note that because x is continuously distributed,
P( floor(x) = 0 ) = 1.
This simplifies the function -- let's call it f(x):
f(x) = floor(1/x)
where x ~ U(0,1).
Now we solve for the probability:
P ( f(x) <= 3 )
= P ( f(x) < 4 )
= P ( x >= 1/4)
= 3/4
Similar to how I solved it. Rather simple though, in fact it's possible to solve it in your head, no need to write. I wonder why it's "advanced"...
We are choosing
x
from
(
0
,
1
]
.
⌊
x
⌋
⌊
x
⌊
x
⌋
+
1
⌋
=
⌊
x
1
⌋
x
1
x
=
0
(
since we can ignore
x
=
1
)
≤
3
<
4
∈
(
4
1
,
1
)
Therefore the probability is
4
3
.
Problem Loading...
Note Loading...
Set Loading...
Since x ∈ ( 0 , 1 ] ,
⌊ x ⌋ = 0
⌊ x ⌊ x ⌋ + 1 ⌋ = ⌊ x 1 ⌋ ≤ 3
x > 0
x 1 > 0
By definition of floor function,
⌊ x 1 ⌋ ≤ x 1 < ⌊ x 1 ⌋ + 1 ≤ 3 + 1 = 4
∴ x 1 < 4
x > 4 1
x ∈ ( 4 1 , 1 )
The required probability = 1 − 4 1 = 4 3