On 30 Nov 2006 at 16:55, Kerry Mitchell wrote:
More of an intellectual curiosity question than anything useful. Is there a "nice" function that is one-to-one and continuous that maps the closed interval [0, 1] to the open interval (0, 1)? ... If such a thing doesn't exist, is there at least a "not nice" function that is one-to-one and maps the intervals? If not, why not?
As has been mentioned, there's no 'nice' way of doing it [in either direction, open->closed or vice versa]. But there *is* a pretty ugly way of doing it [mindbogglingly non constructive, but I suppose it is a 'function' in some sense of the term :o)]. Take any irrational # -- $PI will do fine: For n integer, f(n) = fp($PI * n) ;, n = 1, 2, 3, ... Since PI is irrational, this is a 1-1 "into" function. Let A be the range of f, and B = (0,1] - A. Then define, for r R if r = 0, g(r) = fp($PI) if r A, then r = fp($PI * k) for some k, and set g(r) = fp($PI * (k+1)) if r B, then g(r) = r; g maps [0,1] -> (0,1]. At least I think that works. /bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <--