Thread: 0 ^ 0 = 1

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158

    0 ^ 0 = 1

    I read that zero to the power of zero is suppose to be 1...
    Does anyone know why this is the case? It seems silly to me. Wouldn't the logical answer be zero? To my understanding, exponentation is simply recursive multiplication, 3 ^ 4 is 3 * 3 * 3 * 3, 8 ^ 2 is 8 * 8. This would make zero to the power of x nothing. The way I see it, this should give zero, or, at the very least, an 'undefined' result. (much like dividing by zero).
    ?

  2. #2
    Banned ಠ_ಠ's Avatar
    Join Date
    Mar 2009
    Posts
    687
    Exponentiation - Wikipedia, the free encyclopedia


    also

    Computer programming languages that evaluate 0^0 to 1[16] include bc, Haskell, J, Java, LISP,MATLAB, ML, Perl, PHP, Python, R, Ruby, Scheme, and SQL. In the .NET Framework, the method System.Math.Pow treats 0^0 to be 1.

    Among spreadsheet applications, Microsoft Excel issues an error when it evaluates 0^0, while OpenOffice.org 3 returns 1.

    Microsoft Windows' Calculator and the calculator in Google search[17] evaluate 0^0 to 1.

    Maple simplifies a^0 to 1 and 0^a to 0, even if no constraints are placed on a, and evaluates 0^0 to 1.

    Mathematica simplifies a^0 to 1, even if no constraints are placed on a. It does not simplify 0^a, and it takes 0^0 to be an indeterminate form.

    The TI-84 returns a Domain Error when given 0^0 to solve, but the TI-89 returns 1. The TI-89 Titanium returns undef.
    Last edited by ಠ_ಠ; 05-09-2009 at 10:22 PM.
    ╔╗╔══╦╗
    ║║║╔╗║║
    ║╚╣╚╝║╚╗
    ╚═╩══╩═╝

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Division can be done by subtracting powers.

    Any number can be written as some base, raised by some exponent (floating point does this all the time)
    x = n ^ a
    y = n ^ b

    so
    x / y == n ^ ( a - b )

    Dividing a number by itself gives 1, which in the above identity would mean a and b are the same, that is a-b is 0
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Based on the same reasoning that n^0 is 1 for some n not equal to 0 (which is what Salem just outlined), I reason that 0^0 = 0/0, and hence it is indeterminate. However, I have never asked a professional mathematician for his opinion.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    0^0=1 is true simply for convenience, yet it is not something that is universally agreed upon. Read this for more information.

  6. #6
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    >> I reason that 0^0 = 0/0, and hence it is indeterminate.
    0^0 is perfectly defined.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by twomers
    0^0 is perfectly defined.
    Please elaborate.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Whoops. Though I wrote it as 0^0 I meant x^0.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by twomers
    Though I wrote it as 0^0 I meant x^0.
    Right, in which case you completely missed or ignored the "based on the same reasoning that n^0 is 1 for some n not equal to 0" part of my sentence. (Though in retrospect it should be any n rather than some n, but whatever.)
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Thanks, laserlight. I'd love an omelette.

  11. #11
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    to calculate 0^0 one can take lim(x^y) when x,y -> 0

    Depending on the relative speed of approximation to zero the result will be different
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  12. #12
    Complete Beginner
    Join Date
    Feb 2009
    Posts
    312
    The recursive definition of the product is:

    prod() = 1
    prod(x,y,z, ...) = x * prod(y,z, ...)

    Thus, prod(5,3) = 5*prod(3) = 5*3*prod() = 5*3*1 = 15.

    1 has been chosen because it is the neutral element of multiplication. Hence, a^0, 0^0, 0! are all equal to 1.

    Check your favorite math book for "empty product", "empty sum", "empty function"...

    EDIT: and it makes sense, too: how many functions are there from X->Y? Exactly |Y|^|X| functions. What if X=Y=<empty set>? Then |Y|^|X| = 0^0 = 1, and there's exactly one function from the empty set to the empty set: the empty function.

    Greets,
    Philip
    Last edited by Snafuist; 05-11-2009 at 02:41 AM.
    All things begin as source code.
    Source code begins with an empty file.
    -- Tao Te Chip

  13. #13
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    x^0 (where x -> 0) = 1
    0^x (where x -> 0) = 0

    So 0^0 will get different values depending on how you approach it. The actual value is thus undefined.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  14. #14
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Magos
    So 0^0 will get different values depending on how you approach it. The actual value is thus undefined.
    You can always define it out of convenience (and possibly elegance), which is what the cited Wikipedia article notes, as do bithub and Snafuist. If that Wikipedia article is to be believed, mathematicians do concur with my analysis as well, to some extent.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  15. #15
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    I've looked around more (already seen Wiki's say on it), it seems that most agree that the value is (in reality) undefined.
    Glad that's cleared up. My mind often has a mind of it's own and goes off pondering things that I really don't care about.

    >> Thanks, laserlight. I'd love an omelette.
    Forgive me for not understanding this, but... what?

Popular pages Recent additions subscribe to a feed