cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Do you know why 0!=0 pardon 1

ValeryOchkov
24-Ruby IV

Do you know why 0!=0 pardon 1

5 REPLIES 5

Basically its a just a convention, an additional definition, but it is not done completely arbitrary to set the empty product equal to the multiplicative identity.

You may see it so that there is exactly 1 way to arrange nothing (= 0 elements) 😉

See also https://en.wikipedia.org/wiki/Empty_product and the references given there.

 

A more elaborate approach would try to find a function (in R or C) with the property f(x+1)=x * f(x) and you quickly end up with the Gamma function

Werner_E_0-1664967810136.png

And when you define

Werner_E_1-1664968221689.png

you automatically arrive at

Werner_E_2-1664968336143.png

 

So you see its just a matter of how you define n! and mathematicians try to define things so that the definition meets their needs, clever, isn't it 😉

 

 

 

LucMeekes
23-Emerald III
(To:ValeryOchkov)

It's because:

n! = n * (n-1)!

Now substitute n=1, you get:

1! = 1 * (1-1)! = 1 * 0! = 0!

So 1! = 0! (=1).

 

Mathcad (11)  gives:

LucMeekes_0-1664968625096.png

Numeric and symbolic agree.

 

Success!
Luc


@LucMeekes wrote:

It's because:

n! = n * (n-1)!

Now substitute n=1, you get:

1! = 1 * (1-1)! = 1 * 0! = 0!

So 1! = 0! (=1).

 

Mathcad (11)  gives:

LucMeekes_0-1664968625096.png

Numeric and symbolic agree.

 

Success!
Luc



In Math often things are not that easy as they may look on first sight.

The examples with negative numbers you give clearly show this.

According to your definition n! := n* (n-1)! with 1! := 1 as an anchor, it would be 0!=0*(-1)! and therefore (-1)!=0!/0=1/0 ... Oooops!!

Actually Gamma(x) is not defined for x=0,-1,-2,.... it has poles there. This is the reason why n! is defined only for the members n of the natural numbers (which accodring to the current standards include 0) and not for negative integers.

 

But no fear - your Mathcad is fully correct, because you typed -1!=1 (which is a correct result) whereas you wanted to see (-1)! =  which is undefined and I am pretty sure that MC11 knows that, too 😉

LucMeekes
23-Emerald III
(To:Werner_E)

Yes, Mathcad knows:

LucMeekes_0-1664975878514.png

I must admit that I was initially surprised at the results of factorials of negative numbers, but then accepted them for a fact. I implicitly assumed that signs (of numbers) go above/precede multiplication in the calculation order....

There's a Dutch help-sentence that goes: "Meneer van Dalen wacht op antwoord" (literally: "Mister van Dalen is waiting for an answer") in which each first letter stands for: "Machtsverheffen, Vermenigvuldigen, Delen, Worteltrekken, Optellen Aftrekken". In order: Exponentiation, Multiplication, Division, Taking a/the root, Addition, Subtraction.

In the C-programming language the expression -1!=1 is a boolean expression that results in 1 (TRUE).

 

Luc


There's a Dutch help-sentence that goes: "Meneer van Dalen wacht op antwoord" (literally: "Mister van Dalen is waiting for an answer") in which each first letter stands for: "Machtsverheffen, Vermenigvuldigen, Delen, Worteltrekken, Optellen Aftrekken". In order: Exponentiation, Multiplication, Division, Taking a/the root, Addition, Subtraction.

Nice! Actually I would not know of anything comparable in German. Found a collection of mnemonics on the net but I did not know any of them.

 


In the C-programming language the expression -1!=1 is a boolean expression that results in 1 (TRUE).


At least as long as you don't accidentally type a space between ! and =

An then ... C thinks that 1!=1 is FALSE and 5!=1 is TRUE ...  ‌‌

Top Tags