## 0!=1

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

NOT Steve
Posts: 45
Joined: Thu May 24, 2007 12:32 am UTC
Location: Thousand Oaks, CA
Contact:

### 0!=1

Can someone explain to me why this is the case? I know it makes things work nicely in probability problems, but is their any actual mathematical explanation for it?
Should horses be represented in the Senate? Nay.

crazyjimbo
Posts: 887
Joined: Fri Apr 20, 2007 11:45 pm UTC
Location: Durham, England
Contact:
If you consider factorials to be special integer cases of the gamma function, then 0! = 1 is no longer by definition, but is instead the same case as Gamma(1) = 1.

I don't know how or why it was initially defined, but this is a good enough reason for me.

dp
Posts: 23
Joined: Mon Jun 04, 2007 1:41 am UTC
An intuitive way to think about it is that n! = n*(n-1)!. So 1! = 1 * 0!, which suggests 0! = 1.

Woxor
Posts: 506
Joined: Mon May 07, 2007 11:28 pm UTC
dp wrote:An intuitive way to think about it is that n! = n*(n-1)!. So 1! = 1 * 0!, which suggests 0! = 1.

Heh, that sort of works for negative integers, too.

0! = 0*(-1)!, so (-1)! = 1/0, which is undefined, just like the gamma function at zero. It's increasing to infinity from one side, and decreasing to negative infinity on the other side.

(-1)!=-1*(-2)!, so (-2)!=-1/0. Undefined again, but with opposite limits from either side, and so on for the rest of the negative integers.

It makes intuitive sense, even if the mathematics is nonsense. Actually for 0!, the given method is totally valid for computing Gamma(1) from Gamma(2)=1!. But the rest is Pretty Picture Mathematical Fun Time more than a proof.
Last edited by Woxor on Wed Jun 06, 2007 1:39 am UTC, edited 1 time in total.

Posts: 361
Joined: Mon Mar 19, 2007 7:33 pm UTC
Location: Brownsville, PA
Contact:
Hahaha, flashback from my first course in discrete mathematics (tons of easy subjects as a simple CS credit), I asked why 0! was 1.

The professor just said because if it wasn't, nothing would work properly.
1010011010

Our truth is only as good as our assumptions.

SpitValve
Not a mod.
Posts: 5130
Joined: Tue Sep 26, 2006 9:51 am UTC
Location: Lower pork village
Ha! I have been doing too much programming, because I thought somebody was asking us to prove that zero is not equal to one.

<ahem> never mind

Also 0! = 1 fits the form for the 0th order term in the Taylor series...

crazyjimbo
Posts: 887
Joined: Fri Apr 20, 2007 11:45 pm UTC
Location: Durham, England
Contact:
SpitValve wrote:Ha! I have been doing too much programming, because I thought somebody was asking us to prove that zero is not equal to one.

Well clearly it is equal... 0! = 1! => 0 = 1. Q.E.D.

Buttons
Posts: 858
Joined: Wed May 02, 2007 3:27 pm UTC
Location: Somerville
If we define n! (for nonnegative integers n) to be the number of bijections from a set of cardinality n to itself, then 0! should be 1, since there's exactly one function (the "empty function") from the empty set to itself. This is also the justification for why we have 0^0 = 1, rather than 0.

NOT Steve
Posts: 45
Joined: Thu May 24, 2007 12:32 am UTC
Location: Thousand Oaks, CA
Contact:
All right. I'm just fourteen so I don't really know gamma yet, but I can accept the other explanation of x!=x*(x-1)! since that seems to work out well. Thanks.
Should horses be represented in the Senate? Nay.

themandotcom
Posts: 64
Joined: Tue Jun 05, 2007 10:50 pm UTC
Contact:
But what I don't get is why 1^infinity is undefined. I can clearly express it as a limit 1^x as x->infinity should equal one. Does anyone know why?
e^pi*i=WHAT??

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco
It's an "indefinite form" with respect to limits, since if x_n tends towards 1 and y_n tends towards infinity, x_n^y_n could take on infinitely many values. Sure if x_n stays 1 you get 1, but if x_n is the sequence (1+1/n) and y_n is the sequence n, then the limit is e, for example. For other applications it may make sense to treat 1^oo differently.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

Blatm
Posts: 638
Joined: Mon Jun 04, 2007 1:43 am UTC
crazyjimbo wrote:
SpitValve wrote:Ha! I have been doing too much programming, because I thought somebody was asking us to prove that zero is not equal to one.

Well clearly it is equal... 0! = 1! => 0 = 1. Q.E.D.

I loled.

ptveite
Posts: 159
Joined: Tue Dec 12, 2006 3:15 pm UTC
n! is the number of permutations on n elements. There is exactly one permutation on 0 elements, the empty map.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:
As far as I know, every possible line of reasoning you could use to give 0! a value leads to the value 1. It's not like 0^0 or anything. Am I right? Or is there any reason at all to give it another value?

Peshmerga
Posts: 2061
Joined: Wed Oct 04, 2006 1:56 am UTC
Contact:
i hurd u liek mudkips???

Posts: 114
Joined: Mon Jun 04, 2007 6:21 am UTC
Contact:
Buttons wrote:This is also the justification for why we have 0^0 = 1, rather than 0.

I always thought that was undefined (it gives me errors in my calculator >.<)

PaulT
Posts: 80
Joined: Wed Feb 21, 2007 1:39 pm UTC
Location: Manchester, UK
If you think of it as n! being the product of x over all 1<=x<=n (x in the naturals), then 0! is the product over the empty set, and makes sense to define this as one, because if you're taking products, you have to 'start' with a 1 seeing as its the multiplicative identity. Plus it makes everything else work properly.

kira
I hate bananas.
Posts: 904
Joined: Fri Apr 14, 2006 4:21 am UTC
Location: school
Contact:
Buttons wrote:This is also the justification for why we have 0^0 = 1, rather than 0.

I always thought that was undefined (it gives me errors in my calculator >.<)

Unless they have changed math in the past few years, 0^0 IS undefinied. Indeterminate form, L'Hopital's Rule, all that.

Andrew
Posts: 619
Joined: Tue Jan 02, 2007 9:59 pm UTC
Location: Manchester, UK
Contact:
SpitValve wrote:Ha! I have been doing too much programming, because I thought somebody was asking us to prove that zero is not equal to one.

Yeah, and there was nothing in the post that suggested otherwise -- if 0==1 then probability problems would indeed be troublesome.

kira wrote:
Buttons wrote:This is also the justification for why we have 0^0 = 1, rather than 0.

I always thought that was undefined (it gives me errors in my calculator >.<)

Unless they have changed math in the past few years, 0^0 IS undefinied.

Nullity!

Buttons
Posts: 858
Joined: Wed May 02, 2007 3:27 pm UTC
Location: Somerville
kira wrote:Unless they have changed math in the past few years, 0^0 IS undefinied. Indeterminate form, L'Hopital's Rule, all that.

I guess it depends on the context, then. In set theory, 0^0 is most definitely defined, but then again set theorists don't have to worry about continuity as much.

Google seems to think that it's 1, whereas my calculator doesn't. Interesting.

Yakk
Poster with most posts but no title.
Posts: 11128
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove
kira wrote:
Buttons wrote:This is also the justification for why we have 0^0 = 1, rather than 0.

I always thought that was undefined (it gives me errors in my calculator >.<)

Unless they have changed math in the past few years, 0^0 IS undefinied. Indeterminate form, L'Hopital's Rule, all that.

Set theoretically, a^b is the set of functions from b to a.

Numbers are sets whose cardinality is their value.

So 1 is a set with 1 element, 2 is a set with 2 elements, etc.

Then 2^2 is the number of functions from a set with 2 elements to a set with 2 elements -- 4.

1^1 is the number of functions from a set with 1 element to a set with 1 element -- 1.

0^0 is the number of functions from a set with 0 elements to a set with 0 elements -- 1.

A "function" being a set of pairs {(a,b)} such that the 'a's are unique. If (x,y) is in a function f, then the function f is said to map x to y (ie, f(x)=y).

The domain of a function is the set of 'a's, and the range of a function is the set of 'b's. A function is said to belong to A->B (the set of functions from A to B) if the domain of the function is A, and the range is contained in B.

This means there is one function in {}->{}: namely {}. ({} is a set of pairs -- an empty set of pairs, but still a set of pairs. The domain of {} is {}. The range of {}, which is {}, is a subset of {}. Thus, {} is a function from {}->{}.)

In {1}->{1} there is one function: namely {(1,1)}. Note that {} does not qualify -- the domain of {} is {}, which does not equal {1}.

Note that 1 and {1} are both "sets containing 1 element", so for this purpose they are relatively interchangeable. Often in set theory, the natural number n is denoted as the set containing it's predicessors: so 0 = {}, 1 = {0} = {{}}, 2 = {1,0} = {{0},0} = {{{}},{}}, etc.

In 2->2 (aka 2^2), there are 4 functions. {Identity, {(1,1),(2,1)}, {(1,2), (2,2)}, {(1,2),(2,1)}}

etc. :)

So by that definition, 0^0 is clearly 1.

Edit: changed at 0 to a 1, d'oh! Also added green-text more explicit descriptions of what is going on.
Last edited by Yakk on Wed Jun 06, 2007 5:45 pm UTC, edited 2 times in total.

Posts: 361
Joined: Mon Mar 19, 2007 7:33 pm UTC
Location: Brownsville, PA
Contact:
*anger*

The empty set {} is not the same as { {} } or { *null char* }...

Becoming a math major is using your intuition but not letting it get in the way of new ideas, at least for me. 3 more years to go... *sigh*

0! = 1, why? I'm sure the proof is in "The Book".
1010011010

Our truth is only as good as our assumptions.

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

Yakk
Poster with most posts but no title.
Posts: 11128
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove
skeptical scientist wrote:Yakk, you're contradicting yourself.

Thanks. Fixed my typo (sigh), and added explanations as to why {} is a function. :)

SpitValve
Not a mod.
Posts: 5130
Joined: Tue Sep 26, 2006 9:51 am UTC
Location: Lower pork village
dammit! Everytime I read this I read "zero not equal to one"

I still can't read != as "factorial equals"... it just feels wrong to me...

Sygnon
Posts: 32
Joined: Tue Jan 23, 2007 1:47 am UTC
Contact:
This is really just a rewording of some posts but sometimes phraseology can make all the difference,

if the factorial function describes the number of arrangements of n elements, there is only one way you can arrange zero elements.

hencethus
Posts: 24
Joined: Thu May 31, 2007 4:25 am UTC
Location: Port Orange, FL
Contact:
SpitValve wrote:dammit! Everytime I read this I read "zero not equal to one"

I still can't read != as "factorial equals"... it just feels wrong to me...

(0! = 1) != (0 != 1)

I'd say that the thread title is ambiguous, but this is the mathematics forum.

Also, for anyone that's interested, the Wikipedia article on the empty product concept is pretty relevant and informative.

Posts: 114
Joined: Mon Jun 04, 2007 6:21 am UTC
Contact:
The reason I thought 0^0 was undefined was because it seems like 0^0=0/0

PaulT
Posts: 80
Joined: Wed Feb 21, 2007 1:39 pm UTC
Location: Manchester, UK
deadly penguin wrote:The reason I thought 0^0 was undefined was because it seems like 0^0=0/0

This is what I thought, admittedly mostly based on the nullity guy who 'proved' that 0^0 was nullity by defining 0/0 as nullity and reasoning 0^0 = 0^(1-1) = 0^1 * 0^-1 = 0/0 = nullity! Essentially he'd come up with a new way to pronounce "0/0" and hence was featured in television news broadcasts. I feel I could contribute to mathematics similarly.

SpitValve
Not a mod.
Posts: 5130
Joined: Tue Sep 26, 2006 9:51 am UTC
Location: Lower pork village
hencethus wrote:(0! = 1) != (0 != 1)

heh, no way that would confuse anyone

shill
Posts: 107
Joined: Thu May 24, 2007 2:13 am UTC
Location: Toronto, ON, CA
Sygnon wrote:This is really just a rewording of some posts but sometimes phraseology can make all the difference,

if the factorial function describes the number of arrangements of n elements, there is only one way you can arrange zero elements.

Nah, that phraseology sucks, because one might be inclined to say that you can't arrange zero elements at all, and thus the answer should be zero.

aguacate
Posts: 209
Joined: Fri Feb 16, 2007 10:29 pm UTC
shill wrote:
Sygnon wrote:This is really just a rewording of some posts but sometimes phraseology can make all the difference,

if the factorial function describes the number of arrangements of n elements, there is only one way you can arrange zero elements.

Nah, that phraseology sucks, because one might be inclined to say that you can't arrange zero elements at all, and thus the answer should be zero.

I'm inclined to say that there are an infinite number of ways to arrange zero elements.

PainGod
Posts: 19
Joined: Wed Jun 06, 2007 8:10 pm UTC
0/0 is undefined, and yet somehow I still remember doing summation problems where the prof just says,"and let's assume 0/0=0 for simplicity".

Being a math major, I don't care what the definition is. I just care that it is defined.

Question: Name one way that you can arrange 0 elements. Now, tell me why doing nothing is considered something.

_______________________________________________________________

Set theory is t3h suXX0rz

Posts: 361
Joined: Mon Mar 19, 2007 7:33 pm UTC
Location: Brownsville, PA
Contact:
PainGod wrote:Question: Name one way that you can arrange 0 elements. Now, tell me why doing nothing is considered something.

Before someone who is more education jumps on this question... I'll try to answer.

Consider the empty set, it is a set containing no elements. It is still something.
A function is just a subset of a Cartesian product.
The Cartesian product of an empty set onto an empty set is *alas* an empty set.
Therefore, the only function that can be a subset of that, would be, the empty set function.
And that, in itself, is one thing.

I hope I didn't butcher any definitions with this.
1010011010

Our truth is only as good as our assumptions.

Yakk
Poster with most posts but no title.
Posts: 11128
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove
An arrangement is a bijective function from your set into the set of numbers {1 ... n}, where n is the size of your set.

It assigns each element of your set the order it is in the arrangement.

A function is, if you recall, a set of pairs (source, dest), such that source ranges over everything in your source set exactly 1, and dest ranges over some subset of your destination set.

A bijection is simply a function that if you flip each element (source, dest) to (dest, source) you end up with another function (ie, dest also exactly covers the destination set exactly once).

So an {a, b} arrangement would include: {(a, 1), (b, 2)} or {(a, 2), (b, 1)}.

Now, what are the arrangements of {}? As it happens, {} is a valid arrangement under the above definition. It is also the only arrangement. So there is exactly 1 arrangements of the empty set.

Thus, 0! = 1.

Note that this means you can calculate things like aleph_0! as a bonus. (with a slight redefinition of the destination set {1...n}).

Which leads to the question: what is the value of aleph_0!?

Isn't math fun!

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco
Aleph_0! is the number of permutations of the natural numbers. Every such permutations is a function from the natural numbers to themselves, which can be thought of as a subset of Aleph_0xAleph_0 (i.e. the graph). Therefore Aleph_0! is at most 2^(Aleph_0xAleph_0)=2^Aleph_0, since the cardinality of Aleph_0xAleph_0 is Aleph_0. On the other hand, you can code an infinite and coinfinite subset of the natural numbers into a permutation as follows: let f send the nth smallest element of the set to the nth odd number, and the nth smallest element of the complement to the nth even number. Then f is a permutation of the natural numbers so that the set in question is f^(-1) of the set of even numbers. So Aleph_0! is at least 2^Aleph_0, and therefore there are the same number of permutations of the natural numbers as there are subsets of the natural numbers (as there are functions from the natural numbers to themselves).

Aleph_0^Aleph_0=Aleph_0!=2^Aleph_0
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

Ended
Posts: 1459
Joined: Fri Apr 20, 2007 3:27 pm UTC
Location: The Tower of Flints. (Also known as: England.)
From an analytical perspective, it's possible to show that the gamma function is the (unique) analytic continuation of the factorial.

I.e., if we want an analytic function which is equal to the factorial on positive integer points, we have to take the gamma function (actually, gamma(z+1)). So, we define 0! = gamma(0+1) = 1.
Generally I try to make myself do things I instinctively avoid, in case they are awesome.
-dubsola

PainGod
Posts: 19
Joined: Wed Jun 06, 2007 8:10 pm UTC

### *tries to explain his point

Question: Name one way that you can arrange 0 elements. Now, tell me why doing nothing is considered something.

Consider the empty set, it is a set containing no elements. It is still something.
A function is just a subset of a Cartesian product.
The Cartesian product of an empty set onto an empty set is *alas* an empty set.
Therefore, the only function that can be a subset of that, would be, the empty set function.
And that, in itself, is one thing.

My point is that considering the empty set as a valid function is essentially an arbitrary choice. You can think of as many reasons as you like to say why it is clear that one exists, but I will still say that the existence of a empty set is just our own choice. This applies to probability, too.

In general, when you apply a function to a set that does not intersect the function's domain, the set does not change. Thus, applying any function to the set {} will do nothing. For good reason, we only include functions that have exactly the given set as a domain (who knows why). Thus, in order to have a function "of interest", as above, on {}, it must have a domain of {}. What can this function possibly do to the empty set? Well, do nothing. BUT who's to say that a function from {} to {} is otherwise a function? Granted it does make the math easier and does eliminate the need for a special case, but I still say it's a choice that we have made.

_____________________________________________________________

I used to really hate it when books and profs used superscript notation in n-tuples. Then I derived Gaussian curvature with an arbitrary metric and found myself superscripting to save myself from triple subscripts.

Woxor
Posts: 506
Joined: Mon May 07, 2007 11:28 pm UTC

### Re: *tries to explain his point

PainGod wrote:My point is that considering the empty set as a valid function is essentially an arbitrary choice. You can think of as many reasons as you like to say why it is clear that one exists, but I will still say that the existence of a empty set is just our own choice. This applies to probability, too.

But really, the definition of a function implies the existence of the empty set function. A function is simply a relation such that for any element a of the domain, there is exactly one pair (a, b) in the relation. Since the domain has no elements, the condition holds for the empty relation. It's no more arbitrary than set theory itself.

Yakk
Poster with most posts but no title.
Posts: 11128
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove
PainGod wrote:Granted it does make the math easier and does eliminate the need for a special case, but I still say it's a choice that we have made.

*nod*, it is a statement true by Occam, not by Observation or Consequence.