Feedback Every finite prefix represents an interval 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News Project Step #3, deadline Monday 18 November (Mike O'Donnell)
Re: Question Comporder again... (Benedict Singer)
Date: 2002, Nov 18
From: Mike O'Donnell <odonnell@cs.uchicago.edu>

Every finite prefix of a trinary stream represents a rational interval, where the denominators happen to be powers of 3. The left endpoint of the interval is the rational number represented by the prefix extended infinitely by -2, and the right endpoint is the same thing extended infinitely by 2. abs_xreal->ratintvl in the tristream implementation should produce one of those intervals. So you can definitely do the comparisons after converting to intervals. Or you can project the comparisons back onto the prefixes of the trinary streams.

Perhaps you're confused by the fact that, while rational intervals produced by precfunc representations tend to be different by accident, the limited choice of intervals representable by prefixes of tristream representations have a much greater chance of being exactly the same. If the streams for xr1 and xr2 agree through a sufficiently long prefix, then you may report indistinguishability. Also, if two sufficiently long stream prefixes are sufficiently close together, you may report indistinguishability. You just need to figure out the right technical definitions of "sufficiently long" and "sufficiently close together." Use the equivalent intervals for that purpose.




Mike O'D.


Messages

1. Question precision by Katie Edmonds, 2002, Nov 18
(_ Feedback xreal abstraction is the same, implementation is different by Mike O'Donnell, 2002, Nov 18
1. Question Untitled by Katie Edmonds, 2002, Nov 18
1. Feedback In the tristream implementation, (xreal p) is a type error by Mike O'Donnell, 2002, Nov 18
3. None Untitled by Katie Edmonds, 2002, Nov 18

to: "Every finite prefix represents an interval"