入門級的編程。零的階乘按定義是一。但這定義也有不錯的解釋:

來源: 金拇指 2019-12-09 08:53:31 [] [博客] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (2790 bytes)
回答: 啥級別的編程?零的階乘不會算4BigFive2019-12-09 07:59:19

http://mathforum.org/library/drmath/view/57128.html

Why does 0 factorial equal 1?

Date: 03/18/98 at 13:10:04
From: Denise Chavis
Subject: 0 factorial = 1

Why does 0! = 1?  Is there a reason or is this like anything to the 
power of 0 = 1 - there is not a reason?

Date: 03/18/98 at 16:39:40
From: Doctor Sam
Subject: Re: 0 factorial = 1

Denise,

You are correct that 0! = 1 for reasons that are similar to why
x^0 = 1. Both are defined that way. But there are reasons for these 
definitions; they are not arbitrary.

You cannot reason that x^0 = 1 by thinking of the meaning of powers as 
"repeated multiplications" because you cannot multiply x zero times.  
Similarly, you cannot reason out 0! just in terms of the meaning of 
factorial because you cannot multiply all the numbers from zero down 
to 1 to get 1.

Mathematicians *define* x^0 = 1 in order to make the laws of exponents 
work even when the exponents can no longer be thought of as repeated 
multiplication. For example, (x^3)(x^5) = x^8 because you can add 
exponents. In the same way (x^0)(x^2) should be equal to x^2 by 
adding exponents. But that means that x^0 must be 1 because when you 
multiply x^2 by it, the result is still x^2. Only x^0 = 1 makes sense 
here.

In the same way, when thinking about combinations we can derive a 
formula for "the number of ways of choosing k things from a collection 
of n things." The formula to count out such problems is  n!/k!(n-k)!.   
For example, the number of handshakes that occur when everybody in a 
group of 5 people shakes hands can be computed using n = 5 (five 
people) and k = 2 (2 people per handshake) in this formula. (So the 
answer is 5!/(2! 3!) = 10).

Now suppose that there are 2 people and "everybody shakes hands with 
everybody else."  Obviously there is only one handshake. But what 
happens if we put n = 2 (2 people) and k = 2 (2 people per handshake) 
in the formula? We get 2! / (2! 0!).  This is 2/(2 x), where x is the 
value of 0!. The fraction reduces to 1/x, which must equal 1 since 
there is only 1 handshake. The only value of 0! that makes sense here 
is 0! = 1.  

And so we define 0! = 1.

I hope that helps.

-Doctor Sam,  The Math Forum
Check out our web site! http://mathforum.org/dr.math/   
    

 

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”