Wednesday, October 26, 2005

Overlapping intervals

After a long discussion with Mike^2 yesterday, it became obvious that there was something slightly ambiguous about my problem statement--specifically, does the interval (x,x] overlap with the interval of (x,x]?

Assuming the answer is yes, then you do in fact need to do more operations than I claimed. Kudos to Mike^2! Extra credit this time, even.

In the context I'm dealing with, a zero-width interval doesn't really make any sense, and it's behavior in this case isn't important, so I get to stick with my super-efficient solution. Also, since the interval as I've coded it will not include the point x in (x,x], the solution is consistent with my implementation (though not consistent with my statement of the problem).

Okay, done boring you for now.

1 Comments:

At Wed Nov 02, 12:41:00 AM PST, Blogger Mason said...

With that notation, the normal convention (at least in math) would be that each of these "intervals" is just the empty set.

 

Post a Comment

<< Home