summaryrefslogtreecommitdiff
path: root/3808/CH8/EX8.1/Ex8_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3808/CH8/EX8.1/Ex8_1.sce')
-rw-r--r--3808/CH8/EX8.1/Ex8_1.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/3808/CH8/EX8.1/Ex8_1.sce b/3808/CH8/EX8.1/Ex8_1.sce
new file mode 100644
index 000000000..aeefc31b2
--- /dev/null
+++ b/3808/CH8/EX8.1/Ex8_1.sce
@@ -0,0 +1,17 @@
+//Chapter 08: Advanced Counting Techniques
+
+clc;
+clear;
+
+//For (-2 3)
+u=-2 //From definition 2
+k=3 //From definition 2
+bin_coeff1=(u*(u-1)*(u-k+1))/factorial(k)
+
+//For (1/2 3)
+u=1/2 //From definition 2
+k=3 //From definition 2
+bin_coeff2=(u*(u-1)*(u-k+1))/factorial(k)
+
+mprintf("The extended binomial coefficient for (-2 3) is %d",bin_coeff1)
+mprintf("\nThe extended binomial coefficient for (1/2 3) is %f",bin_coeff2)