Feedback tristream can represent all of the computable real numbers 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project step #4, deadline Monday 25 November (Mike O'Donnell)
Re: Question Dependency on rational_power->xreal, precision vs. multiplication (Ivan Beschastnikh)
Date: 2002, Nov 24
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

a number like 2^.5 can't even be represented in the tristream implementation (i think)
You're wrong about this one. Both precfunc and tristream implementations are capable of representing precisely the same set of real numbers: the computable real numbers. Keep in mind that every prefix of a tristream expansion represents a rational interval. All that we need in order to represent all of the computable real numbers is the following property:
For every real number x and every rational r, there is a prefix whose interval contains x and is no wider than r.
In fact, if we could generate tristream expansions by uncomputable methods, we could represent every real number, not just the computable ones. It's the computability of the expansions themselves that restricts us to the computable reals.

The property above holds even for minimal trinary notation, with only the trits 0, 1, and 2. But we want more than mere representability of all computable real numbers. We also want all of the computable operations on computable real numbers to be feasible in our implementation. For this purpose, we need the following stronger property:

For every real number x and every rational r, there is a prefix whose interval contains x in its interior, and is no wider than r.
The interior of an interval does not include its endpoints. This stronger property holds for trinary notation with the trits -2, 1, 0, 1, 2, but not for the minimal notation. In the minimal notation, every rational representable by a finite expansion is only an endpoint of intervals associated with longer expansions. Interestingly, we don't need the extra trits -2 and 1 to produce the finite prefixes---the rationals represented by finite trinary prefixes are the same for both choices of trits. Rather, we need the extra trits to expand the intervals associated with prefixes, by allowing more flexibility in extending those prefixes.

rational_power->xreal can be implemented in tristream as well as in precfunc. I didn't do it because it's harder, and not as important for generating useful test cases. Notice that my precfunc implementation of rational_power->xreal does binary search within the rationals in order to produce a ratintvl for output from a precfunc representation of an xreal. This is much more efficient than doing the binary search with xreals. The same basic trick can be done in the tristream implementation, but it's a bit clumsier because the intervals aren't presented explicitly.




Mike O'D.


Mike O'D.


to: "tristream can represent all of the computable real numbers"