[net.puzzle] x to the x to the x ...

wws@whuxlm.UUCP (Stoll W William) (04/24/85)

This one may be old, it's from an old MAA test.

x^x^x^x... = 2

the x's go on forever and the carots mean "power of", not "exclusive OR".
What is the value of x?

By the way, I had to look up the answer the first time I saw this --
Did anybody get it without cheating?

Bill Stoll, ..!whuxlm!wws

john@x.UUCP (John Woods) (04/25/85)

> This one may be old, it's from an old MAA test.
> x^x^x^x... = 2
> the x's go on forever and the carots mean "power of", not "exclusive OR".
> What is the value of x?
> 
I remembered the form of the answer but not the actual answer, so I guess
I half-cheated.  It's OK, I'm only half confident in my answer.

	x^x^x^x^... = 2
          A
	  |
	  ---
	    |
Let zeta be x^x^x^x^..., and re-write the left-hand side as

	x^zeta = 2	Note also that x^zeta = zeta, and therefore that
			2 = zeta.  Rewrite as
	x^2 = 2

Simple, no?  Not done yet:  there are two answers, plus and minus root-2.

It (seems to me that it) can't be plus root-2, because trying to do the
"series" by hand leads to an unbounded value.  So it must be minus root-2.
However, I am not comfortable with that, either, because I don't remember
my complex arithmetic well enough to work out whether or not it works (I
knew it - I've been programming in C too long!  I had to look in a FORTRAN
manual just to convince myself that log and exponent operations are OK on
negative quantities.  All that math in college has just poured out my ears!).

Well, I tried.
-- 
John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101
...!decvax!frog!john, ...!mit-eddie!jfw, jfw%mit-ccc@MIT-XX.ARPA

You can't spell "vile" without "vi".

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (04/25/85)

> x^x^x^x... = 2

x = sqrt(2)

easy enough

pruhs@uwvax.UUCP (Kirk Pruhs) (04/25/85)

> This one may be old, it's from an old MAA test.
> 
> x^x^x^x... = 2
> 
> the x's go on forever and the carots mean "power of", not "exclusive OR".
> What is the value of x?
> 

let y = x^x^x^...   then y = x^y.
y=2, now take log of both sides , ln y = ln2  or ln (x^y) =ln 2.
but ln(x^y) = y*ln x  and y=2. so we have 2*ln x =ln 2. Or if I can do this
right x= 2-e^2. Is this right?

Additional problems using the same idea:
in each of the following solve for x:

1. 2 = sqrt(x + sqrt(x + sqrt(x + (sqrt x + .......
2. 
    x = 1 +  1
            --------
	    1+ 1
               _______
	       1+ 1
		  _______
		      .
		       .
			.

smp@gitpyr.UUCP (Scott M Pfeffer) (04/26/85)

In article <748@whuxlm.UUCP> wws@whuxlm.UUCP (Stoll W William) writes:
>This one may be old, it's from an old MAA test.
>
>x^x^x^x... = 2
>
>the x's go on forever and the carots mean "power of", not "exclusive OR".
>What is the value of x?
>
>By the way, I had to look up the answer the first time I saw this --
>Did anybody get it without cheating?
>
>Bill Stoll, ..!whuxlm!wws

    This problem is solved as follows:

    1.  x^x^x^ ... = 2    (given in original problem)


               x^x^x^ ...
    2.  log (x           ) = log (2)
           2                    2


    3.  (x^x^x ...) log (x) = 1
                       2 


    4.  2 log (x) = 1     (remember that (x^x^x^ ... = 2) )
             2


    5.  log (x) = 1/2
           2

             (1/2)
    6.  x = 2


    I think that this problem came from the 1984 test, but I am note sure.
    I also believe that the original problem asked not what (x^x^x^ ...) is
    but rather wanter the student to figure out what   1/2  1/2  1/2
                                                      2  ^ 2    ^    ...
 
    is equal to.  I may be wrong.
 
  
          Scott Pfeffer
          {agkua,hplabs}!gatech!gitpyr!smp

ron@brl-tgr.ARPA (Ron Natalie <ron>) (04/26/85)

> > This one may be old, it's from an old MAA test.
> > 
> > x^x^x^x... = 2
> > 
> > the x's go on forever and the carots mean "power of", not "exclusive OR".
> > What is the value of x?
> > 
> 
> let y = x^x^x^...   then y = x^y.
> y=2, now take log of both sides , ln y = ln2  or ln (x^y) =ln 2.
> but ln(x^y) = y*ln x  and y=2. so we have 2*ln x =ln 2. Or if I can do this
> right x= 2-e^2. Is this right?
> 
Close

	2 * ln x = ln 2		You have this right
	    ln x = .5 ln 2
	       x = 2^.5 or sqrt of 2

You can't do division by subtraction unless you take another log.

-Ron

dilvish@dartvax.UUCP (James VanVerth) (04/26/85)

> This one may be old, it's from an old MAA test.
> 
> x^x^x^x... = 2

If you raise x to both sides, you get:
 
x^x^x^x.... = x^2

And by substitution, 2 = x^2, so x = sqrt(2).

Now, how about this one:
 
2 = sqrt(x + sqrt(x + sqrt(x + ... )))

chuck@dartvax.UUCP (Chuck Simmons) (04/28/85)

> > x^x^x^x... = 2
> > 
> Let zeta be x^x^x^x^..., and re-write the left-hand side as
> 
> 	x^zeta = 2	Note also that x^zeta = zeta, and therefore that
> 			2 = zeta.  Rewrite as
> 	x^2 = 2
> 
> Simple, no?  Not done yet:  there are two answers, plus and minus root-2.
> 
> It (seems to me that it) can't be plus root-2, because trying to do the
> "series" by hand leads to an unbounded value.  So it must be minus root-2.
> However, I am not comfortable with that, either, because I don't remember
> my complex arithmetic well enough to work out whether or not it works (I
> knew it - I've been programming in C too long!  I had to look in a FORTRAN
> manual just to convince myself that log and exponent operations are OK on
> negative quantities.  All that math in college has just poured out my ears!).
> 
> Well, I tried.
> -- 
> John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101

You better go back and dust off your math books.  First, minus root 2
is not a really nice answer because you have to leave the real numbers
and get into the complex numbers.  Secondly, "by hand" calculations show
that plus root 2 converges to 2 fairly quickly.

I wrote a real simple pl1 program to do my by hand calculations for
both the positive and negative square roots.  (Arn't languages with
complex numbers wonderful?)  (Oh bummer!  I suddenly remember that last
summer I found a few bugs in our complex number runtime package exponentiation
routines.  So I have no "by hand" calculations for negative square roots.)

Your by-hand calculations should use the following algorithm:

    result = root2;
    do forever;
        result = root2 ** result;
    end;

Here, 'result' will quickly converge to 2.0.  (We should be able to
prove we have a monotonic-increasing bounded sequence.  Any suggestions?)

Possibly your by-hand calculations used the similar algorithm:

    result = root2;
    do forever;
        result = result ** root2;
    end;

Here 'result' rapidly diverges.  However, this algorithm solves
for ((((...^root2)^root2)^root2)^root2)^root2; which is not what we want.

-- Chuck Simmons

js2j@mhuxt.UUCP (sonntag) (04/29/85)

> In article <748@whuxlm.UUCP> wws@whuxlm.UUCP (Stoll W William) writes:
> >This one may be old, it's from an old MAA test.
> >
> >x^x^x^x... = 2
> >
>     This problem is solved as follows:
> 
    <solution deleted.  Presumably you've all seen it by now.>
I couldn't figure out exactly what was wrong with the derivation, but
Scott's answer:
>              (1/2)
>     6.  x = 2

     Is easily demonstrated to be wrong, with the help of my trusty TI-58.
Let x=2^(1/2).
          x^x=1.632...
	  x^x^x=2.000...
	  x^x^x^x=2.665..., and the series just keeps on growing.  I suspect
that the problem *has* no solution, and that x^x^x...=1 for  0<x<=1 and that
x^x^x^x...approaches infinity for x>1.
     I suppose that it is possible that there exists some non-real solution.
-- 
Jeff Sonntag
ihnp4!mhuxt!js2j
    "This here's a story 'bout Minnie the Moocher.
     She was a low-down hoo-oochy koocher.
     She was the roughest, meanest frail.
     But Minnie had a heart as big as a whale." - idunno (mail me if you do!)

bs@faron.UUCP (Robert D. Silverman) (04/30/85)

> > > x^x^x^x... = 2
> > > 
> > Let zeta be x^x^x^x^..., and re-write the left-hand side as
> > 
> > 	x^zeta = 2	Note also that x^zeta = zeta, and therefore that
> > 			2 = zeta.  Rewrite as
> > 	x^2 = 2
> > 
> > Simple, no?  Not done yet:  there are two answers, plus and minus root-2.
> > 
> > It (seems to me that it) can't be plus root-2, because trying to do the
> > "series" by hand leads to an unbounded value.  So it must be minus root-2.
> > However, I am not comfortable with that, either, because I don't remember
> > my complex arithmetic well enough to work out whether or not it works (I
> > knew it - I've been programming in C too long!  I had to look in a FORTRAN
> > manual just to convince myself that log and exponent operations are OK on
> > negative quantities.  All that math in college has just poured out my ears!).
> > 
> > Well, I tried.
> > -- 
> > John Woods, Charles River Data Systems, Framingham MA, (617) 626-1101
> 
> You better go back and dust off your math books.  First, minus root 2
> is not a really nice answer because you have to leave the real numbers
> and get into the complex numbers.  Secondly, "by hand" calculations show
> that plus root 2 converges to 2 fairly quickly.
> 
> I wrote a real simple pl1 program to do my by hand calculations for
> both the positive and negative square roots.  (Arn't languages with
> complex numbers wonderful?)  (Oh bummer!  I suddenly remember that last
> summer I found a few bugs in our complex number runtime package exponentiation
> routines.  So I have no "by hand" calculations for negative square roots.)
> 
> Your by-hand calculations should use the following algorithm:
> 
>     result = root2;
>     do forever;
>         result = root2 ** result;
>     end;
> 
> Here, 'result' will quickly converge to 2.0.  (We should be able to
> prove we have a monotonic-increasing bounded sequence.  Any suggestions?)
> 
> Possibly your by-hand calculations used the similar algorithm:
> 
>     result = root2;
>     do forever;
>         result = result ** root2;
>     end;
> 
> Here 'result' rapidly diverges.  However, this algorithm solves
> for ((((...^root2)^root2)^root2)^root2)^root2; which is not what we want.
> 
> -- Chuck Simmons

*** REPLACE THIS LINE WITH YOUR MESSAGE ***

Hey people, 2^(1/2) happens to be the right answer and while the formal
derivations are more or less correct noone has bothered to show whether
the infinite exponentiation converged for x = 2^(1/2). The question
of convergence appeared on the Putnam exam a few years back (~ 10).
The sequence converges if x < e^(1/e)  and x > e^(-1/e). 

The derivation x^x^x^x ... = 2  IF (and that's a big IF) it converges
then let y = x^x^x... = 2   leads immediately to x^2 = 2.
 
As it also happens (for complex variable freaks) that it still 
conveges as long as x*conjugate(x) falls in the above bounds.
 

gjerawlins@watdaisy.UUCP (Gregory J.E. Rawlins) (05/01/85)

In article <821@mhuxt.UUCP> js2j@mhuxt.UUCP (sonntag) writes:
>Let x=2^(1/2).
>       x^x=1.632...
>      x^x^x=2.000...
>      x^x^x^x=2.665..., and the series just keeps on growing.  I suspect
>that the problem *has* no solution, and that x^x^x...=1 for  0<x<=1 and that
>x^x^x^x...approaches infinity for x>1.
>     I suppose that it is possible that there exists some non-real solution.
>Jeff Sonntag
    Unfortunately mathematics is not only stranger than we
imagine it's stranger than we *can* imagine. The sequence you
give does not converge because you leave off infinitely many
terms which *will* cause equality with 2.
    Let a=2^(1/2) Then   a^2 = 2
                         a^a^2 = 2
                         a^a^a^2 = 2
                         a^a^a^a^2 = 2
                         a^a^a^a^a^2 = 2
                         a^a^a^a^a^a^2 = 2
    ...to infinity. The problem is that unlike an (addition)
series of numbers we cannot separate the terms of the
exponentiations and stop after finitely many terms with a "good"
approximation to the answer. I confess that there are hard
problems here of convergence, but this is the essence of the
flaw. Is there a space in which we can prove (the normal)
epsilon-delta convergence??
    greg.

-- 
Gregory J.E. Rawlins, Department of Computer Science, U. Waterloo
{allegra|clyde|linus|inhp4|decvax}!watmath!watdaisy!gjerawlins

ark@alice.UUCP (Andrew Koenig) (05/01/85)

In article <821@mhuxt.UUCP> js2j@mhuxt.UUCP (sonntag) writes:
>Let x=2^(1/2).
>       x^x=1.632...
>      x^x^x=2.000...
>      x^x^x^x=2.665..., and the series just keeps on growing.  I suspect
>that the problem *has* no solution, and that x^x^x...=1 for  0<x<=1 and that
>x^x^x^x...approaches infinity for x>1.
>     I suppose that it is possible that there exists some non-real solution.
>Jeff Sonntag

Greg Rawlins attempts to explain this with some puzzled hand-waving:

>     Unfortunately mathematics is not only stranger than we
> imagine it's stranger than we *can* imagine. The sequence you
> give does not converge because you leave off infinitely many
> terms which *will* cause equality with 2.
>    Let a=2^(1/2) Then   a^2 = 2
>                         a^a^2 = 2
>                         a^a^a^2 = 2
>                         a^a^a^a^2 = 2
>                         a^a^a^a^a^2 = 2
>                         a^a^a^a^a^a^2 = 2
>     ...to infinity. The problem is that unlike an (addition)
> series of numbers we cannot separate the terms of the
> exponentiations and stop after finitely many terms with a "good"
> approximation to the answer. I confess that there are hard
> problems here of convergence, but this is the essence of the
> flaw. Is there a space in which we can prove (the normal)
> epsilon-delta convergence??
>    greg.

In fact, the explanation is simpler than that: Jeff's arithmetic is wrong.

He is mistakenly assuming that exponentiation is left-associative,
where it is really right-associative.  Thus:

	x = 1.414...
	x^x = 1.632...
	x^x^x = 1.761...
	x^x^x^x = 1.841...

The series really does converge.

training@rtech.ARPA (Training account) (05/03/85)

> > >x^x^x^x... = 2

> >     This problem is solved as follows:

>     <solution deleted.  Presumably you've all seen it by now.>

> I couldn't figure out exactly what was wrong with the derivation, but
> Scott's answer:
> >              (1/2)
> >     6.  x = 2
> 
>      Is easily demonstrated to be wrong, with the help of my trusty TI-58.
> Let x=2^(1/2).
>           x^x=1.632...
> 	  x^x^x=2.000...
> 	  x^x^x^x=2.665..., and the series just keeps on growing.  I suspect
> that the problem *has* no solution, and that x^x^x...=1 for  0<x<=1 and that
> x^x^x^x...approaches infinity for x>1.

Nothing was wrong with Scott's answer; you parenthesized incorrectly.
You computed the answer to ((((x^x)^x)^x)^x...) which does grow
without bound.  If, however, you parenthesize as (x^(x^(x^(x...)))),
and substitute radical-2 for x, the answer is indeed 2.

There's a nice intuitive proof that this is true:  suppose we raise
radical-2 to the second power.  The answer is 2.  So if we raise
radical-2 to the power of any number LESS than 2, the result will be
less than 2.  And if we raise radical-2 to that new power, the result
must therefore be less than 2.  And if we raise... you get the idea.

Here's another problem:

x*x*x*x*x...=2.

This is the same as

x*(x*x*x*x*x...)=2, so by substituting, we get

x*2=2.

Therefore, x = 1.

But substituting back in the original equation, we get

1*1*1*1*1*1*1=2, so 1 = 2.

What's wrong here?


Robert Orenstein
Relational Technology

stevev@tekchips.UUCP (Steve Vegdahl) (05/03/85)

> He is mistakenly assuming that exponentiation is left-associative,
> where it is really right-associative.

Mumble.  Left- or right-associativity is not a property of a function;
it is rather a is matter of notional convention.  The subtraction
operator ('-') is left-associative in Pascal, but right-associative in APL.
Traditionally in mathematics, exponentiation has been denoted by making
the exponent smaller (and higher and to the right ...), or possibly by a
notation such as exp(x,y).  (Both of these are more or less unambiguous).

My strong impression (correct my if I am mistaken) is that the '^' operator
has been used to denote exponentiation only since the advent of
programming languages, ascii terminals, etc.  While it may be true that
most programming languages that use '^' for exponentiation define it to be
right-associative, I do not find either interpretation to be unreasonable.

Ideally, it would have been nice if the original problem had been
parenthesized so as to be unambiguous.


		Steve Vegdahl
		Computer Research Lab.
		Tektronix, Inc.
		Beaverton, Oregon

roy@gitpyr.UUCP (Roy J. Mongiovi) (05/09/85)

>                                               While it may be true that
> most programming languages that use '^' for exponentiation define it to be
> right-associative, I do not find either interpretation to be unreasonable.

The reason that right associativity is preferred is that:

	(x ^ y) ^ z  is equivalent to  x ^ (y * z)

and the multiplication is certainly more efficient.  Therefore the only
sensible way to associate exponentiation is to the right.  If a language
does it the other way, then it's less than useless.
-- 
Roy J. Mongiovi.	Office of Computing Services.		User Services.
Georgia Institute of Technology.	Atlanta GA  30332.	(404) 894-6163
 ...!{akgua, allegra, amd, hplabs, ihnp4, masscomp, ut-ngp}!gatech!gitpyr!roy

smp@gitpyr.UUCP (Scott M Pfeffer) (05/10/85)

In article <821@mhuxt.UUCP> js2j@mhuxt.UUCP (sonntag) writes:
>    <solution deleted.  Presumably you've all seen it by now.>
>I couldn't figure out exactly what was wrong with the derivation, but
>Scott's answer:
>>              (1/2)
>>     6.  x = 2
>
>     Is easily demonstrated to be wrong, with the help of my trusty TI-58.
>Let x=2^(1/2).
>          x^x=1.632...
>	  x^x^x=2.000...
>	  x^x^x^x=2.665..., and the series just keeps on growing.  I suspect
>that the problem *has* no solution, and that x^x^x...=1 for  0<x<=1 and that
>x^x^x^x...approaches infinity for x>1.
>     I suppose that it is possible that there exists some non-real solution.
>-- 
>Jeff Sonntag
I too have see the error in my ways, but I cannot find any error in the deri-
vation. I did notice one interesting thing, however.
 
    In the "solution" I gave, the following appeared (more or less).

              (x^x^x^ ...)
    a)  log (x             ) = log (2)
           2                      2

    b)  (x^x^x^ ... ) log  (x)) = (1)
                         2

    This led to x = 2**(1/2). (for the fortran people left out there :-)
 
    Notice, though, that b) could have also been the following:

                           x
    b)  (x^x^x ... ) log (x  ) = (1)
                        2

    which would lead to "x to the x" equalling 2**(1/2), or
 

    c)  log (x**x) = log 2**(1/2)
    d)  xlogx      = (1/2)log2
    e)  xlogx      = (1/2)
    f)  logx       = 1/(2x)
    g)  If one plots  logx  and 1/(2x) on the positive half of an x-y
        graph, one finds that the only solution is somewhere between
        1 < x < 2, x not equal to 2**(1/2), try it.
 
   There must be something faulty that I am doing with logarithms and
   the "exponent" rule that my math teachers forgot to mention.  Does
   anyone out there know?  I'm lost.
 
          Scott Pfeffer
          {akgua, hplabs}!gatech!gitpyr!smp
          Georgia Institute of Technology
          Atlanta, Georgia

smp@gitpyr.UUCP (Scott M Pfeffer) (05/10/85)

   In the solution given, the following appeared:

              (x^x^x^ ...)
    a)  log (x             ) = log (2)
           2                      2

    b)  (x^x^x^ ... ) log  (x)) = (1)
                         2
    c)  2 log  (x) = 1
             2

    d)  x = 2**(1/2)

 
    Notice, though, that the solution could have progressed as follows:

                           x
    b)  (x^x^x ... ) log (x  ) = (1)
                        2

                 x
    c)  2 log  (x  ) = 1
             2
          x
    d)  (x  ) = 2**(1/2)

    e)  log (x**x) = log 2**(1/2)
    f)  xlogx      = (1/2)log2
    g)  xlogx      = (1/2)
    h)  logx       = 1/(2x)
    i)  If one plots  logx  and 1/(2x) on the positive half of an x-y
        graph, one finds that the only solution is somewhere between
        1 < x < 2, x not equal to 2**(1/2) as in the original solution,
        try it.
 
        Can anyone explain?  Are there an infinite set of solutions?
        I do not think so.

-------------------------------------------------------------------------------
Part 2:  What about solutions to the "general" formula (x^x^x^ ...) = p,
         where p is a positive integer (to keep it simple).

         Using the argument given in the original solution, and excluding
         any problems presented in the first half of this note, would not
         the solution be:

         PROOF:

         x = "the pth root of p"?
 
         a) log  (x^x^x^ ...) = log  p
               p                   p
         b) log  (x^x^x^ ...) = 1
               p

         c) (x^x^x^ ...) log  (x) = 1
                            p

         d) p log  (x) = 1
                 p

                 (1/p)
         d) x = p        Q.E.D.
-------------------------------------------------------------------------------

        Scott Pfeffer
        {akgua, hplabs}!gatech!gitpyr!smp
        Georgia Institute of Technology
        Atlanta, Georgia

gjerawlins@watdaisy.UUCP (Gregory J.E. Rawlins) (05/11/85)

In article <383@gitpyr.UUCP> smp@gitpyr.UUCP (Scott M Pfeffer) writes:
>[......]
>-------------------------------------------------------------------------------
>Part 2:  What about solutions to the "general" formula (x^x^x^ ...) = p,
>         where p is a positive integer (to keep it simple).
>[......]
>         x = "the pth root of p"?
>[......]
>        Scott Pfeffer
    This is correct for all positive x less than e^(1/e). It was
proved some years ago in Aequations Math., although i can't find
the reference. Note that 2^(1/2) is slightly less than e^(1/e) so
its quite close to the best we can get away with.
	greg.
-- 
Gregory J.E. Rawlins, Department of Computer Science, U. Waterloo
{allegra|clyde|linus|inhp4|decvax}!watmath!watdaisy!gjerawlins

stevev@tekchips.UUCP (Steve Vegdahl) (05/13/85)

> >                                               While it may be true that
> > most programming languages that use '^' for exponentiation define it to be
> > right-associative, I do not find either interpretation to be unreasonable.
> 
> The reason that right associativity is preferred is that:
> 
> 	(x ^ y) ^ z  is equivalent to  x ^ (y * z)
> 
> and the multiplication is certainly more efficient.  Therefore the only
> sensible way to associate exponentiation is to the right.  If a language
> does it the other way, then it's less than useless.

There is a great deal to be said for minimizing the number of exceptions
in a language.  If all operators except '^' are left-associative, many
would consider it say good language design to make '^' left-associative
as well.  I wonder how many people have used the left- or right-associativity
of an exponention operator in a program (i.e., written something of the form
x^y^z).  Is it worth making an exception to the language for a construct
that occurs so rarely?  Maybe, maybe not.

Which strikes you as cleaner language design?
	"All operators in language X are left-associative"
    or
	"All operators in language X are left-associative, except '^'"
    or
	"All operators in language X are left-associative, unless the
	amount on line 12b of Schedule A is less than 10% of adjusted
	gross income" :-)

ALGOL-60 and some of its descendants (e.g., SAIL), use '^' as a
left-associative exponentiation operator.  I stand by my earlier
statement that either interpretation is reasonable.  Remember that
precedence and left-(right-)associativity are properties of the
OPERATOR, not of the FUNCTION.  It is possible to define a language
with two exponentiation operators (of different precedence), one of
which is associates left the and other right.

I find the efficiency argument give above to be irrelavent.
If (x ^ y) ^ z is equivalent to x ^ (y * z), then an optimizing
compiler can transform the former to the latter.  I'm not even
sure that they are equivalent, when round-off error is considered.
Floating-point addition is NOT associative, for example.

		Steve Vegdahl
		Computer Research Lab.
		Tektronix, Inc.
		Beaverton, Oregon