Casio fx-9750GIII: Combination Matrices
Introduction
The program COMBMTRX creates an aligned combination triangle with rows 0 to W-1 and columns 0 to W-1. The matrix is a square matrix with size W x W.
1. Pascal
n NCR k
2. Catalan
(n - k + 1) / (n + 1) * [ n+k NCR n ]
3. Borel
1 / (n + 1) * [ 2n+2 NCR n-k ] * [ n+k NCR n ]
4. User Function
f(n, k, h(n,k) NCR g(n,k))
"Blank" spaces will be filled with 0.
Casio fx-9750GIII Program: COMBMTRX
(320 bytes)
Note: On the program screen, nCr will be symbolized as a bold C
"2020-08-11 EWS"
"COMBINATION MATRIX"
"SIZE"? → W
Identity W → Mat A
Menu "SELECT TYPE","PASCAL",1,"CATALAN",2,"BOREL",3,"USER",4
Lbl 1
"(N)nCr(K)" → fn1
Goto 5
Lbl 2
"(N-K+1)÷(N+1)×(N+K)nCr(N)" → fn1
Goto 5
Lbl 3
"1÷(N+1)×(2N+2)nCr(N-K)×(N+K)nCr(N)" → fn1
Goto 5
Lbl 4
"F(N,K)"? → fn1
Goto 5
Lbl 5
For 1 → I To W
For 1 → J To I
I-1 → N
J-1 → K
fn1 → Mat A[I,J]
Next
Next
Mat A
Examples
Size: 5
Option 1: Pascal
[[ 1 0 0 0 0 ]
[ 1 1 0 0 0 ]
[ 1 2 1 0 0 ]
[ 1 3 3 1 0 ]
[ 1 4 6 4 1 ]]
Option 2: Catalan
[[ 1 0 0 0 0 ]
[ 1 1 0 0 0 ]
[ 1 2 2 0 0 ]
[ 1 3 5 5 0 ]
[ 1 4 9 14 14 ]]
Option 3: Borel
[[ 1 0 0 0 0 ]
[ 2 1 0 0 0 ]
[ 5 6 2 0 0 ]
[ 14 28 20 5 0 ]
[ 42 120 135 70 14 ]]
Option 4: User
f = (N+K+1)nCr(K) ÷ (N=1)
(in fraction form)
[[ 1 0 0 0 0 ]
[ 1/2 3/2 0 0 0 ]
[ 1/3 4/3 10/3 0 0 ]
[ 1/4 5/4 15/4 35/4 0 ]
[ 1/5 6/5 21/5 56/5 126/5 ]]
Source:
Cai, Yue and Yan, Catherine. "Coutning with Borel's Triangle" Elsevier B.V. Discrete Mathematics. November 15, 2018 https://arxiv.org/pdf/1804.01597.pdf
Also: https://doi.org/10.1016/j.disc.2018.10.031
Retrieved August 9, 2020
Eddie
All original content copyright, © 2011-2020. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.