Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Empty interval representations & Motion 13...



Nate Hayes wrote:
John Pryce wrote:
Dan & P1788

I have gone through Dan's work on comparisons with the empty set
(below), checking against the set theory definitions given in my mail
earlier today.

I think they all agree, except the two I have marked (*). Namely I
think
empty   interior   empty
empty  strictLess  empty
should both give True.


THere are a few other cases that don't agree, e.g., by the set-theory
definitions:

   empty lessEqual any
   empty strictlyLess any
   any lessEqual empty
   any strictlyLess empty

also give True.

Nate

My mistake: I found a better copy of the old Sun C++ interval programmers guide. At least by those definitions, it appears
    empty lessEqual any
    empty strictlyLess any
    any lessEqual empty
    any strictlyLess empty
are all false.

Interestingly enough, the manual explicitly says
   empty interior empty
is true, but for strictLess, it says
   empty strictLess empty
is false!

So -4 for Nate, +1 for John, +1 for Dan, I think.

Nate






Pretty good overall.

John

On 22 Apr 2010, at 03:46, Dan Zuras Intervals wrote:
But if we use empty = [+oo,-oo], how does that come out
for Ulrich's comparisons?

a    equals    b <==> a1  = b1 && a2  = b2
a    subset    b <==> b1 <= a1 && a2 <= b2
a  lessEqual   b <==> a1 <= b1 && a2 <= b2
a precedeTouch b <==> a2 <= b1
a   interior   b <==> b1 <  a1 && a2 <  b2
a  strictLess  b <==> a1 <  b1 && a2 <  b2
a   preceed    b <==> a2 <  b1

Let's let any = [b1,b2] be some otherwise non-empty
interval.  I believe we have that

empty    equals    any = False
empty    subset    any = True
empty  lessEqual   any = False (1)
empty precedeTouch any = True (2)
empty   interior   any = True
empty  strictLess  any = False
empty   preceed    any = True (3)

as well as

any    equals    empty = False
any    subset    empty = False
any  lessEqual   empty = False (1)
any precedeTouch empty = True (2)
any   interior   empty = False
any  strictLess  empty = False
any   preceed    empty = True (3)

and, for completeness sake

empty    equals    empty = True
empty    subset    empty = True
empty  lessEqual   empty = True (4)
empty precedeTouch empty = True (2)
empty   interior   empty = False   (*)
empty  strictLess  empty = False   (*)
empty   preceed    empty = True (4)


Which are all correct with the following qualifications

(1) (a lessEqual b) tests for mere overlap in one direction
or the other.  Therefore, it is acceptable to the programmer
that this be true if SOME a is less than or equal to SOME b.
This has the flavor of an existential quantification & if
this test is written in this way, empty tests correct.

(2) Similarly, (a precedeTouch b) test to make sure that NO
element of a exceeds ANY element of b.  If it is written
with universal quantification (essentially not (any a >
any b)) then empty tests correct.

(3) This one is True except for (empty preceed [-oo,x]) or
([x,+oo] preceed empty) in which case it tests False.  This
may have to be special cased.

(4) My interpretation is that these two are False with the
quantification I suggest.  So they may have to be special
cased as well.