MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Interval arithmetic, of a sort

I cannot find any solution to this problem without using very time consuming
procedural programming, and yet it seems that it ought to have a reasonably
simple functional solution. BTW: Even though I don't use it in the
following, I am familiar with the Interval notation and functions.

The origin of the programming problem is most easily pictured as one of
laying down numbered strips of cardboard on top of one another within an
interval. For simplicity, assume that the total interval is
Interval[{0,100}], which I will just write as {0,100}, and it has the value
1, with the notation now being {1,{0,100}}

Uniquely numbered strips of card are put on top of this one; they may or may
not overlap; I want to be able to obtain a description of the visible bits
of card at the end. So for example, if "+" indicates laying down a new
numbered strip, and if we start with
{{1,{0,100}}}, then {{{1,{0,100}}} + {2,{2,3}} =
 indicating that the original strip is visible from 0-2, strip 2 is visible
from 2-3, and the original is again visible from 3-100. Continuing, complete
occlusion would happen with
{{1,{0,2}},{2,{2,3}},{1,{3,100}}, + {3,{1,20}} =
{{1,{0,1}},{3,{1,20}},{1,{20,100}}}; again continuing, overlap would happen
{{1,{0,1}},{3,{1,20}},{1,{20,100}}}  + {4,{15,30}} =

Mark R. Diamond
No spam email ROT13: znexq at cfl.hjn.rqh.nh
No crawler web page ROT13 uggc://jjj.cfl.hjn.rqh.nh/hfre/znexq

  • Prev by Date: Interval functions: comment on conceptual problem
  • Next by Date: Re: Different Methods inside one package. More details
  • Previous by thread: Interval functions: comment on conceptual problem
  • Next by thread: RE: Interval arithmetic, of a sort