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

Re: Revised version of Level 1 text (draft)



John Pryce wrote:

Point A.
--------
Interval implementations have to trust the user to get (*) right. Consider Arnold's example below, which can be written
   g(x)= (x1-x2)/(x1+x2)
   h(x) = 2/(1+x2/x1) - 1
where x = (x1,x2). A computer algebra system can easily see h is a rearrangement of g, so (*) holds; but no practical implementation will check this at run time--if I suggested such a thing, Nate would flatten me, and rightly so.
So if there is a typo in the code, how will this be revealed?

One shouldn't expect a program that uses intersection to be smarter than one that doesn't use it. This would be an unreasonable demand.

Suppose one just evaluates y=x^2+1 in a standard Fortran program. If there is a typo in the code and intended was y=x^2-1, nothing will reveal it.

This persists in interval evaluations. An interval program can only be as valid as the code it contains. Thus correctness of the input formulas
_must_ be the user's responsibility.



Point B.
--------
Let (*) hold. Write Dg and Dh for the domains of g and h, and let xx be an input box. Then, whether intersection is appropriate to apply seems to depend on how xx relates to Dg and Dh. Let g(xx) denote the result of interval-evaluating g with input xx, etc.

I think what we are REALLY after is
   a tight enclosure of range(f,xx)
plus
   some knowledge of the relation between xx and f.

Theory gives these elementary facts:
(a)   gg = g(xx) encloses range(g,xx),   by FTIA; but is usually bigger.
(b)   hh = h(xx) encloses range(h,xx),   ditto.
(c)   range(f,xx) = range(g,xx) if xx happens to be a subset of Dg.
(d)   As (c) with g changed to h.
(e)   Df = (Dg union Dh) in all cases.
(f)   range(f,xx) = ( range(g,xx) union range(h,xx) ) in all cases.

Now using the AN+JDP (ill<emp<con<def<saf) scheme, let gg and hh become decorated intervals (gg,dg) and (hh,dh).

(i) I think the only situation where intersection is appropriate is when BOTH of dg,dh are in {def,saf}. Then we know xx is a subset of both Dg and Dh (hence of Df). Then (a,b,c,d) above imply
   (gg intersection hh) encloses range(f,xx).
And if EITHER of dg,dh is saf, we know f is "safe" on xx; otherwise, at least we know f is everywhere defined on xx.
Hence in this case we can return
   (ff,df) = (gg intersection hh, max(dg,dh))
as a decorated enclosure of range(f,xx).

Why should we have an operation that always does
(gg,dg) intersection (hh,dh) = (gg intersection hh, something) = (ff,df), say, when for certain values of dg and dh we know ff is totally useless?

My scheme doesn't always have the from you postulate here, and accounts for some situations that were (a long time ago) covered by your theorem on rational function evaluation with the Walster variant of IA. If, as in my example, lack of definedness is solely due to the formula containing a limiting case (division by zero) then the intersection is ok. This is frequent when working with rational functions. (Or should we perhaps distinguish between different ways of causing lack of definedness, by splitting the con decoration?)