Need Help: Highest integer Funtion

ArslanSSS

Intermediate
Aug 19, 2010
149
0
21
30
Lahore
Asalam -o -alikum.
Guys as the title suggest need help in a question from maths.
i wanna know why the graph of |[[x]]| is different from [[|x|]]? maybe its a dumb question but i just cant figure it out and this is the last question on my assignment.
please explain it to me.
 

r3v3rs3

Proficient
May 25, 2007
586
1
23
Assuming that the double bracket really is used to represent the floor function, then I guess the question is just asking the difference between:
1- abs(floor(x)) .... |[[x]]|
2- floor(abs(x)) .... [[|x|]]
Here abs is supposed to represent absolute value

In explanation below ofc square brackets are used for representing a closed(inclusive) interval and normal brackets are used for open(exclusive) interval.

2- Lets take the second function first because it is simpler. Here is how its values would look like(from which you can draw a rough approximation graph)
for x [0,1) ... floor(abs(x)) = 0
for x [1,2) ... floor(abs(x)) = 1
for x [2,3) ... floor(abs(x)) = 2
for x [3,4) ... floor(abs(x)) = 3
for x [4,5) ... floor(abs(x)) = 4
....
for negative values the graph of this function would be symmetric about y-axis (should be relatively easy to see).
for x (-1,0] ... floor(abs(x)) = 0
for x (-2,-1] ... floor(abs(x)) = 1
for x (-3,-2] ... floor(abs(x)) = 2
for x (-4,-3] ... floor(abs(x)) = 3
for x (-5,-4] ... floor(abs(x)) = 4
....

1-
for x [0,1) ... abs(floor(x)) = 0
for x [1,2) ... abs(floor(x)) = 1
for x [2,3) ... abs(floor(x)) = 2
for x [3,4) ... abs(floor(x)) = 3
for x [4,5) ... abs(floor(x)) = 4
....
for negative values
for x [-1,0) ... abs(floor(x)) = 1
for x [-2,-1) ... abs(floor(x)) = 2
for x [-3,-2) ... abs(floor(x)) = 3
for x [-4,-3) ... abs(floor(x)) = 4
for x [-5,-4) ... abs(floor(x)) = 5

When you sketch the graphs, you can see the difference for negative values. Also note that the intervals(for negative values of x) are slightly different for both functions.
 

ArslanSSS

Intermediate
Aug 19, 2010
149
0
21
30
Lahore
Can someone kindly explain to me why
for x (-1,0] ... floor(abs(x)) = 0 when for x [-1,0) ....abs(floor(x)) = 1 ??
 

r3v3rs3

Proficient
May 25, 2007
586
1
23
for x (-1,0] ... floor(abs(x)) = 0 when for x [-1,0) ....abs(floor(x)) = 1 ??
Calculating step by step for different values
for x (-1,0] ... floor(abs(x)) = 0
Take three representative values of x, say -1, -0.5, 0.

1- x=-1
abs(x) = abs(-1) = 1
floor(abs(x)) = floor ( 1 ) = 1

2- x=-0.5
abs(x) = 0.5
floor(abs(x)) = floor(0.5) = 0

3- x=0
abs(x) = 0
floor(abs(x)) = floor(0) = 0

for x [-1,0) ....abs(floor(x)) = 1
1- x=-1
floor(x) = floor(-1) = -1
abs(floor(x)) = 1

2- x=-0.5
floor(x) = floor(-0.5) = -1
abs(floor(x)) = 1

3- x=0
floor(x) = floor(0) = 0
abs(floor(x)) = 0

-----

I think I understand where you are getting the trouble from. For numbers greater or equal to 0 the floor function can indeed be obtained by removing all the decimal places just leaving the integer part. However, for negative values this doesn't work.

The floor function, for any number, must be less than (or equal) the value of that number. This is in contrast to ceiling function. Put simply:
for all x -- floor(x) <= x
for all x -- ceiling(x) >= x

so, for example, floor(-1.7) = -2, floor(-2.2) = -3. Similarly ceiling(-1.7) = -1, ceiling(-2.2) = -2
 

Behrox

Seasoned
Nov 9, 2011
2,583
0
41
27
Karachi,Pakistan
Can someone kindly explain to me why
for x (-1,0] ... floor(abs(x)) = 0 when for x [-1,0) ....abs(floor(x)) = 1 ??
the main thing to understand is about what the brackets represent (a,b] means that a is less than x which is less than or equal to b.
The small bracket ( means the function is open at that end and the consecutive value is not included in the representative set while ] means the function is closed at that end and the value is included in the function like for x (-1,5] the set of values can be:
x= {0,1,2,3,4,5}
While for something like x [-1,5) the set of values will be:
x= {-1,0,1,2,3,4}
Hope this clears it up just remember Square bracket [ means the value next to is will be included and small bracket ( means the value next to it will not be included
 
General chit-chat
Help Users
We have disabled traderscore and are working on a fix. There was a bug with the plugin | Click for Discord
  • No one is chatting at the moment.
    Necrokiller Necrokiller: Alan wake 2 is yet to recover it's development costs. Due to no physical release and no steam...