Monday, February 13, 2012

Interval inequalities and Picard continued

Jan has continued to implement the components of the Picard operator for interval polynomials. The additions are evaluation of a polynomial, either in one or all of its variables, as well as the primitive function operator. Once evaluation was there, the interval versions of order relations were easy to add.

One interesting aspect of the interval version of an order relation is that it becomes three-valued. This is because intervals represent any number they contain, thus only disjoint intervals can safely be said to be 'less than' or 'greater than' each other. To see the problem with intersecting intervals consider [1,5] < [3,7]. The interval [1,5] represents any value between 1 and 5, so also 4. If the number represented by [3,7] is 3, then the result should be 'true', if the number is 4 or above the result should be 'false'. Therefore it makes sense to return a third truth value for the interval relation, representing the lack of information. Scala provides a neat way of adding an extra value to a type through the Option type, and Option[Boolean] is therefore the right return type of interval relations, with None representing the lack of information, at least when they are used to represent real numbers.

The next steps towards an interval polynomial Picard operator are to add composition of polynomials. In the case of multivariate polynomials this requires a slightly more general type of composition as the variable to compose into needs to be specified. Luckily, the operation itself is fairly easy to implement as it is built up from the ring operations already present.