Interval arithmetic, of a sort
- To: mathgroup at smc.vnet.net
- Subject: [mg33721] Interval arithmetic, of a sort
- From: "DIAMOND Mark R." <dot at dot.dot>
- Date: Wed, 10 Apr 2002 00:49:00 -0400 (EDT)
- Organization: The University of Western Australia
- Sender: owner-wri-mathgroup at wolfram.com
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}} = {{1,{0,2}},{2,{2,3}},{1,{3,100}}, 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 with {{1,{0,1}},{3,{1,20}},{1,{20,100}}} + {4,{15,30}} = {{1,{0,1}},{3,{1,15}},{4,{15,30}},{1,{30,100}}} 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