5

I found a detailed paper which outlines the rules of interval arithmetic for closed intervals, including unbounded closed intervals, but it makes no mention whatsoever about open intervals.

I'm hoping to write a package of software which handles interval arithmetic, and I'd like to include open intervals and mixed-type (left-open, right-open) intervals if possible.

Is someone able to tell me whether arithmetic is defined for open and mixed intervals, and point me to the rules which govern such arithmetic if so?

Arkanon
  • 151
  • 3
    The rules for open intervals would be the same as they are for closed intervals. It's only a subtle distinction. – Klaas van Aarsen Jul 26 '14 at 12:51
  • Despite my degree in Mathematics & Computer Science, I'm not strong in maths. (The computing carried me, basically.) What would be the exact rules which state what happens when a closed interval is combined with an open interval? Would the endpoints of the result be open or closed? If I can find the rules I can write and test the software, but I stand very little chance of deriving the rules myself. – Arkanon Jul 26 '14 at 13:22
  • Let's start with addition. If we add $(a,b)+(c,d)$, the result is $(a+c,b+d)$. This is completely similar to $[a,b] + [c,d]=[a+c,b+d]$. – Klaas van Aarsen Jul 26 '14 at 13:28
  • So far as the case where both intervals are open, that would have been my guess. But I'm looking for a definitive set of rules, including cases where the intervals are of mixed types. For example, what happens for (-1, 1] × [-2, 2) or [8.6, 9.1) / (0.6, 3.1)? Are there defined rules for the resulting mode of an endpoint based on the operation type and the endpoints of the operand intervals? – Arkanon Jul 26 '14 at 19:06
  • 4
    The basic rule is going to be that open-ness beats closed-ness. For example, if you look at the relation $[a, b] + [c, d] = [a + c, b + d]$, the only way to get the left endpoint $a+c$ is if you chose both left endpoints from the two original intervals. So $(a,b]+[c, d]=[a, b] + (c, d] = (a+c, b+d]$, since in neither case are you allowed to choose both left endpoints. – Micah Jul 26 '14 at 19:27
  • Check all combinations of the end points. That should tell you. And if you're dividing, make a distinction if $0$ is in the denominator or not. – Klaas van Aarsen Jul 26 '14 at 19:30
  • @Micah Yes, I suspected that any involvement of an open endpoint will mean that the calculated endpoint must be open, but I'm hoping someone can point me to a document which lays this out completely. That way I can cite the document and its author in my source code, rather than put my name to highly suspect formulae I've derived myself. – Arkanon Jul 26 '14 at 20:23
  • You could also study Minkowski addition and transfer that for intervals. In general, if $K,L$ are sets of say reals (or another vector space, or additive group) one could define $K+L={p+q:p\in K, q\in L}$. Similarly for other operations. If you check the details, you will get the same as what is already pointed out in previous comments. – Mirko Aug 28 '19 at 15:34
  • Hi! did you end up writing your package? – Stef Feb 14 '24 at 10:46
  • 1
    @Stef, I don't think I ever did add arithmetic operations, because I kept finding further questions about interval arithmetic which I couldn't answer. But it was ten years ago, so the details are hazy. – Arkanon Feb 16 '24 at 15:00

2 Answers2

2

You could also study Minkowski addition and transfer that for intervals. In general, if $K,L$ are sets of say reals (or another vector space, or additive group) one could define $K+L=\{p+q:p\in K, q\in L\}$. Similarly for other operations. If you check the details, you will get the same as what is already pointed out in previous comments. Under this definition you could prove that $(a,b]+[c, d]=$ $(a+c, b+d]=$ $[a, b] + (c, d]=$ $(a, b] + (c, d]$

Note also that $(a,b]-[c, d]=$ $(a,b]+[-d,-c]=$ $ (a-d, b-c]=$ $(a, b] - [c, d)=$ $[a, b] - [c, d)$

Mirko
  • 13,445
0

Unums are a number format that supports open intervals and (some) exact numbers. In particular, it supports a number that is greater than zero and less than the smallest exact number.

false
  • 101