Hi,
The answer actually depends on whether the order is important (ie if it
matters if the user selects from x from the first menu and y from the
second, and if this is deemed to be identical to selecting y from the first
and x from the second).
If the order is important, then the number of permutations is
(dp_items)!/(dp_items-dp_menu)! where ! is the factorial symbol eg
6!=6*5*4*3*2*1
In the example below, this gives 5!/1!=120
If the order is unimportant, the the number of combinations is
(dp_items)!/((dp_menu)!(dp_items-dp_menu)!)
In the example below, this gives 5!/4!1! = 5
For the lottery below, the answer is actually 56!/6!50! = 32468436:1 (which
is pretty darn close to zero!)
:-)
Nigel Russell
Linnsell Science Software
-Original Message-
From: Paul A. Procacci [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 5:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: OT Math Question
Well, If I'm right. The total number of posible combinations in the NJ
state lottery, assuming there are, say, 56 numbers is
var total = 56;
total*(total-1)*(total-2)*(total-3)*(total-4)*(total-5) == 23377273920:1
Now that assuming one number was pulled from the pot and the same number
didn't exists in the pot. Now, please anyone correct me if I'm wrong,
but I believe the solution to rm's quesion is as follows:
var dp_menus = 4 // Number of drop-down menus
var dp_menus = 5 // Number of dp_items per menu
dp_menus^dp_items == 1024:1 //Total number of possibilities
Does that look right? I hope this helps
Paul.
Rm wrote:
if i have four drop down menus with five values in
each, and the values are the same for each of the four
drop down menus, how many variations are there without
duplicates, any dups,
I though the formula was 5 to the 4th power minus 5,
this can't possibly be right.
math impaired and trying to fake it
rm
__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]