[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

736.0. "everywhere discontinuous function" by KIRK::KOLKER (Conan the Librarian) Wed Jul 22 1987 15:19

    I need to construct an everywhere discontinuous functions from the
    reals to the reals.
    
    Question: Does such a function exist. 
    
    Question: If such a function exists, what is an algorithm to compute
    it.
    
T.RTitleUserPersonal
Name
DateLines
736.1some well known examples...ENGINE::ROTHWed Jul 22 1987 15:5511
    Try f(x) = 0 if x is rational, f(x) = 1 if x is irrational.

    Another nice example of a 'pathological' function is continuous
    non-differentiable function.  You construct it by a convergent
    Fourier series whose derivative is divergent and hence non-existant:

	w(t) = sqrt(1-w^2) * sum(n >= 0) (w^n * exp(2*pi*i*b^n*t))

	with b real and > 1, w = b^h, 0 < h < 1

    - Jim
736.2Need a discontinuous surjectionKIRK::KOLKERConan the LibrarianWed Jul 22 1987 16:418
    re .1
    
    Thank you for example. But I was looking for a function from the
    reals onto the reals.  My error for not being more explicit.
    
    That other function which is nowhere differentiable, was that invented
    by Wierstrass by any chance?
    
736.3ontoVINO::JMUNZERWed Jul 22 1987 19:437
    Use
    
    	g(x) = f(x) + x
    
    where f is defined in .1
    
    John
736.4Not so hard...TLE::BRETTWed Jul 22 1987 19:4929
    f(x) = x	x is rational
    	   -x   otherwise
    
    is pretty close, but is continuous at 0, so lets try to ruin that...
    
    f(x) = x    	x is rational
         = -x   	|x| > 1, x irrational
    	 = 1+x  	-1..0    x irrational
    	 = -1+x 	0..1     x irrational
    
    Creating the following cartesian graph
    
    
    		\          / 
    		 \        / 
    		  \      /
                     /  /
                    /  /
    		   /  / 
                     /  /
    		    /  /  
    		   /  /   
    		  /       \
    		 /         \
                            \
    
    Voila! 1-1, onto, discontinuous everywhere
                                             
    /Bevin
736.5KIRK::KOLKERConan the LibrarianWed Jul 22 1987 21:104
    re .3, .4
    
    Thank you, thank you.
    
736.6a dollar late and a day shortCLT::GILBERTBuilderWed Jul 22 1987 22:014
    f(x) = x+1	x is rational
    	   x-1  x is irrational

    (I'd have replied earlier, but had to look up 'onto').
736.7Funny thing about computers...AKQJ10::YARBROUGHWhy is computing so labor intensive?Thu Jul 23 1987 12:5814
>    Question: Does such a function exist. 
    
>    Question: If such a function exists, what is an algorithm to compute
>    it.

As the earlier replies suggest, such a function exists; but no, there is no way
to compute functions of irrational numbers, because every value that is 
representable in computers is rational.

However, let the domain of x be those numbers representable in H-arithmetic on
VAX. Then the least significant bit of x, LSB(x), is everywhere discontinuous
and representable. 

Lynn Yarbrough 
736.8BEING::POSTPISCHILAlways mount a scratch monkey.Thu Jul 23 1987 14:2412
    Re .7:
    
    > . . . every value that is representable in computers is rational.
    
    I have a calculator which represents sqrt(2) with a radical sign and a
    two, pi with the letter pi, e with e, and i with i.  It swears that
    sqrt(2) squared is two and the cosine of pi is -1, and it arrives at
    those conclusions without converting sqrt(2) or pi to numeric
    representations first.
    
    
    				-- edp 
736.9how long does it keep track of it?MORRIS::JANZENTom LMO2/O23 2965421Thu Jul 23 1987 15:3211
>    I have a calculator which represents sqrt(2) with a radical sign and a
>    two, pi with the letter pi, e with e, and i with i.  It swears that
>    sqrt(2) squared is two and the cosine of pi is -1, and it arrives at
>    those conclusions without converting sqrt(2) or pi to numeric
>    representations first.
 Great.  what does it do with:

	(2.1 * pi) /2.1

?
Tom
736.10Just when you thought I was done...KIRK::KOLKERConan the LibrarianThu Jul 23 1987 17:4911
    re .0 and others
    
    yet another challange.  Is there a discontinuous function f from
    real onto real such that:
    
    	for each x in real and every small e > 0 and every large L >
    0, there exists a pair of points x1, x2 in the e nbhd of x such
    that |f(x1) - f(x2)| > L.
    
    You might call such a function f *wildly* discontinuous.
    
736.11tamely discontinuousVINO::JMUNZERThu Jul 23 1987 19:2113
Re .10:
    
    	Given a rational x, express x in lowest terms -- i.e.

		x = p / q

	where p and q are relatively prime.  Then let

		f(x) = x + q

	Let f(x) = x for irrational x.
	
	John
736.12ALIEN::POSTPISCHILAlways mount a scratch monkey.Thu Jul 23 1987 19:478
    Re .9:
    
    It says '2.1*pi/2.1'.  Depending on how you manipulate/evaluate that,
    it may or may not convert to numeric representation before figuring it
    is pi or 3.14159265359.
    
    
    				-- edp 
736.13DWOVAX::YOUNGBack from the Shadows Again,Thu Jul 23 1987 20:0016
    Re. 12:
    
    Thats one d*mn smart calculator.
    
    Re .?: (lost track)
    
    Using an idea from .11, heres a 'wildly' disc. function (I think):
    
    f(x) = x-1		when x is irrational
    f(x) = 0		when x is 0
    f(x) = q / p	when x is rational; x = p / q; p is even
    f(x) = -q / p	when x is rational; x = p / q; p is odd
    
    Does this do it?
    
    --  barry
736.14tamerVINO::JMUNZERFri Jul 24 1987 13:1011
    Re .13:
    
    Barry:
    
    I think your function is too tame.  A little interval around x is
    mapped by f to three little intervals at (x-1) & (1/x) & (-1/x).
    
    I understand .? to ask for the little interval to be mapped to an
    unbounded set.
    
    John
736.15is e**(Pi*i)=-1?AKQJ10::YARBROUGHWhy is computing so labor intensive?Fri Jul 24 1987 13:2019
>    > . . . every value that is representable in computers is rational.
>    
>    I have a calculator which represents sqrt(2) with a radical sign and a
>    two, pi with the letter pi, e with e, and i with i.  It swears that
>    sqrt(2) squared is two and the cosine of pi is -1, and it arrives at
>    those conclusions without converting sqrt(2) or pi to numeric
>    representations first.

OK, so you have a computer that manipulates symbols. That's nice, but they are
*symbols*, not *values*. Inside the computer, there is some (probably 8-bit
character) representation of Pi, Sqrt, I, etc., but these are merely reserved
integers which are interpreted in a special way. Their values are in fact 
integers. Your ability to manipulate symbols does not give you any way of
representing a 'random' real number. 

In fact, we don't have a decent way of *identifying* real numbers except to 
describe them as (more or less complex) functions of the integers. At any rate,
we can only come close to computing arbitrary real numbers, which answers 
the question posed in .0 negatively.
736.16CLT::GILBERTBuilderFri Jul 24 1987 15:3134
I took issue with one of Lynn's comments in a previous reply (essentially
the same as Eric raises in note 739), and Lynn sent back the following,
which contains what I think is a very interesting question.

From:	AKQJ10::YARBROUGH    24-JUL-1987 11:14

The original question was, in effect, can we compute functions of real (as 
distinguished from rational) arguments? My thesis is no, we can't, 
because we can't supply arguments that are not rationals. That's all.

Another way of posing the question is, can we write a program of the form

	FUNCTION is_real(x)
	  IF <x is a representation of a rational number> THEN
		return false
	  ELSE
		return true

that returns 'true'?

Lynn Yarbrough 


Suppose we limit the argument (to is_real) to an expression using addition,
subtraction, multiplication, division, and square roots, applied to integers.
Can we specify the is_real algorithm?

What if we include the trigonometric function sin and cos?  I recall a result
proving that there are only trivial solutions in rational numbers (or was it
non-transendental numbers?) of the equations y = sin(x) or y = cos(x).
Can someone provide a reference?

What if pi is also included?
					- Gilbert
736.17BEING::POSTPISCHILAlways mount a scratch monkey.Fri Jul 24 1987 23:5612
    Re .16:
    
    Conjecture:  Every expression formed from addition, subtraction,
    multiplication, division, square roots, and integers can be expressed
    in the form a+sqrt(b+sqrt(c+sqrt(d . . . ))) where the variables are
    rationals and the sequence is finite.  If the innermost variable is the
    square of a rational number, the expression may be reduced -- if no
    reduction is possible, the expression is said to be in simplest form.
    An expression is rational only if its simplest form is simply a. 
                                      
    
    				-- edp 
736.18BEING::POSTPISCHILAlways mount a scratch monkey.Sun Jul 26 1987 12:415
    In the previous response, "sqrt" may be either the positive or negative
    root.
    
    
    				-- edp
736.19ENGINE::ROTHMon Jul 27 1987 09:2315
    Here's an information theoreteic point of view.  Suppose you can
    represent a real number by a convergent series or continued
    fraction, where the terms are formed by some 'algorithm' of finite
    complexity.  Quadratic surds have repeating continued fraction
    expansions for example.

    From this point of view you can know everything you need to know
    about a given real number and its composition with other numbers
    (addition, multiplication, etc).

    Then a program could be said to be handling these real numbers in a
    certain sense.  But an arbitrary real number without a systematic
    expansion rule couldn't be handled by this.

    - Jim
736.20ENGINE::ROTHMon Jul 27 1987 09:2711
    Random question...

    Suppose we map the interval [0..1] onto 0 and 1 by f(x) = 0 if x rational,
    f(x) = 1 if x irrational.

    Map the interval [0..1] onto the unit square by a space filling curve,
    such as a Hilbert curve.

    What is the structure of the set of values of f(x) over square?

    - Jim
736.21CLT::GILBERTBuilderMon Jul 27 1987 15:282
    If we have f(x) = 0 if x is rational, f(x) = 1 if x is irrational,
    then f is a periodic function!
736.22re .21: What is its period?JON::MORONEYWelcome to the MachineMon Jul 27 1987 16:290
736.23CHOVAX::YOUNGBack from the Shadows Again,Mon Jul 27 1987 19:327
    Re .14:
    
    Yes, after I entered .13, I realized that it did not meet the criteria,
    but both of my local systems have been unavailable for the last
    few days, so I have no had a chance to correct it.
    
    I think there is a way to do it, but I am still testing it out.
736.24CLT::GILBERTBuilderTue Jul 28 1987 14:145
The book "Counterexamples in Analysis" by Gelbaum and Olmsted (Holden-Day)
includes a function defined on R (the reals), equal to zero almost everywhere
and whose range on every nonempty open interval is R.

The book contains many other interesting aberrations.
736.25CLT::GILBERTBuilderWed Jul 29 1987 16:086
re .21, .22

>   If we have f(x) = 0 if x is rational, f(x) = 1 if x is irrational,
>   then f is a periodic function!

    Let r be rational.  Then f(r+x) = f(x), and so the function has period r.
736.26ENGINE::ROTHWed Jul 29 1987 16:134
    I don't think that the foregoing argument really works, since there
    doesn't seem to exist a fundamental (smallest) period.

    - Jim
736.27ULTRA::ELLISDavid EllisThu Jul 30 1987 15:236
What's the definition of a function being periodic?

Does there _have_ to be a fundamental period?  (I didn't think so)

If constant functions are regarded as periodic, then there is no fundamental
period for them, either.
736.28CLT::GILBERTBuilderFri Jul 31 1987 14:1010
    A function f(x) is periodic iff there is a constant p (the period)
    such that f(p+x) = f(x) whenever f(x) or f(x+p) is defined.

    For example, sin(x) has the period 2*pi, since sin(2*pi+x) = sin(x).
    And the function:
	f(x) = 0 if x is an even integer, = 1 if x is an odd integer
    has a period of 2.  Or 4, or -6.

    The Gelbaum and Olmsted book mentions that if a non-constant function is
    continuous *anywhere*, then it has a unique smallest positive period.
736.29Finally, wild & wierd functions...CHOVAX::YOUNGBack from the Shadows Again,Sun Aug 02 1987 06:1723
    Re .24:
    
>The book "Counterexamples in Analysis" by Gelbaum and Olmsted (Holden-Day)
>includes a function defined on R (the reals), equal to zero almost everywhere
>and whose range on every nonempty open interval is R.

    Sure, we could look it up, but whats the fun of that?
    
    Heres two examples I came up with that have unlimited ranges for
    any continous domain:
    
    1)  Let the function transform the rationals so that F(x)=y where
    'y' is equal to 'x' with the highest prime-power factor of the
    denominator exchanged for the highest prime-power factor of the
    numerator.
    
    2)  If in decimal notation the fractional part of the number 'x'
    has no zeroes, then leave it unchanged.  If it does have any zeroes
    then multiply 'x' by a power of ten sufficient to place the first
    zero in the ones place.
    
    
    --  Barry