35
25 Combinations
Let there be cards with the letter “”, cards with the
letter “” and cards with the letter “” written on them.
Then number of possible different ways to arrange all
cards in a row, is given by:
Program
?→ A:?→ B:?→ C:(A + B + C)!÷ A!÷ B!÷ C!→ Y:Y < 33 STEP >
INPUT A, B, C, : number of cards showing “A”, “B” and “C” respectively
OUTPUT Y : the number of combinations
Execution Example:
How many combinations are possible for 3 “”s, 2 “”s and 2 “”s?
B
C
AB× C×()
:
:
C
C
CB
B
B
A
AA
A
A
A
C
abc++
a
C
b
bc+
×
abc++()!
a! bc+()!
-----------------------------
bc+()!
b!c!
-------------------
abc++()!
a!b!c!
-----------------------------==
a! 1 2×
…
× a×=
0! 1=
ON
MODE MODE MODE
1
PRGM
MODE
1
COMP
1
P1
B
C
Prog
1
S A
D R
P1
P2 P3 P4
G
3
EXE
S A
D R
P1
P2 P3 P4
G
2
EXE
S A
D R
P1
P2 P3 P4
G
2
EXE
S A
D R
P1
P2 P3 P4
G
関数電卓事例集 .book 35 ページ 2002年9月2日 月曜日 午後6時51分