Post Reply 
(12C) Combination and Permutation
03-15-2020, 11:37 AM (This post was last modified: 03-15-2020 11:45 AM by Gamo.)
Post: #11
RE: (12C) Combination and Permutation
Combination and Permutation program for HP-12C

--------------------------------------------------------

For Combination assuming that user already know that

mCo = mCm = 1
mC1 = m

For Permutation assuming tha user already know that

mPo = 1
mP1 = m
mPm = m!
--------------------------------------------------------
Formula used:

C(m,n) = [m x (m-1) x (m-2) x ... x (m-n+1)] ÷ (1 x 2 x 3 x ... x n)

P(m,n) = m x (m-1) x (m-2) x ... x (m-n+1)
--------------------------------------------------------

Program:
Code:

01 ENTER
02 STO 0 
03 R/S
04 STO 1
05  1
06  -
07  1
08  +
09  -
10  1
11  +
12  x
13 LSTx
14 RCL 0
15  1
16  -
17 X≤Y
18 GTO 21
19 R↓
20 GTO 10
21 R↓
22 R↓
23 ENTER
24 RCL 1
25  n!
26  ÷
27 GTO 00
------------------------------------------------
Remark: For 2 ≤ n

Example: [FIX] 0
80C5 and 80P5

80 [R/S] display 80
5 [R/S] display Combination 24,040,016
[X<>Y] display Permutation 2,884,801,920
-------------------------------------------------
Gamo 3/2020
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Combination and Permutation - BartDB - 08-17-2017, 09:49 PM
RE: (12C) Combination and Permutation - Gamo - 03-15-2020 11:37 AM



User(s) browsing this thread: 10 Guest(s)