summaryrefslogtreecommitdiff
path: root/1553/CH30
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /1553/CH30
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '1553/CH30')
-rw-r--r--1553/CH30/EX30.1/30Ex1.sce8
-rw-r--r--1553/CH30/EX30.2/30Ex2.sce9
-rw-r--r--1553/CH30/EX30.3/30Ex3.sce19
-rw-r--r--1553/CH30/EX30.4/30Ex4.sce10
-rw-r--r--1553/CH30/EX30.5/30Ex5.sce14
-rw-r--r--1553/CH30/EX30.6/30Ex6.sce15
-rw-r--r--1553/CH30/EX30.7/30Ex7.sce14
-rw-r--r--1553/CH30/EX30.8/30Ex8.sce8
-rw-r--r--1553/CH30/EX30.9/30Ex9.sce10
9 files changed, 107 insertions, 0 deletions
diff --git a/1553/CH30/EX30.1/30Ex1.sce b/1553/CH30/EX30.1/30Ex1.sce
new file mode 100644
index 000000000..a4a076160
--- /dev/null
+++ b/1553/CH30/EX30.1/30Ex1.sce
@@ -0,0 +1,8 @@
+//Chapter 30 Ex 1
+
+clc;
+close;
+clear;
+n1=30; n2=28;
+ans=factorial(30)/factorial(28);
+mprintf("The value of expression is %d",ans);
diff --git a/1553/CH30/EX30.2/30Ex2.sce b/1553/CH30/EX30.2/30Ex2.sce
new file mode 100644
index 000000000..89057a137
--- /dev/null
+++ b/1553/CH30/EX30.2/30Ex2.sce
@@ -0,0 +1,9 @@
+//Chapter 30 Ex2
+clc;
+clear;
+close;
+ //(i)
+ n1=60; r1=3; n2=4; r2=4;
+ f1=factorial(n1)/factorial(n1-r1);
+ f2=factorial(n2)/factorial(n2-r2);
+ mprintf("(i) 60P3=%d\n (ii)4P4=%d",f1,f2);
diff --git a/1553/CH30/EX30.3/30Ex3.sce b/1553/CH30/EX30.3/30Ex3.sce
new file mode 100644
index 000000000..8a5fc0465
--- /dev/null
+++ b/1553/CH30/EX30.3/30Ex3.sce
@@ -0,0 +1,19 @@
+//Chapter 30 Ex 3
+
+clc;
+clear;
+close;
+
+//(i)
+n1=10; r1=3;
+C1=factorial(n1)/(factorial(r1)*factorial(n1-r1));
+
+//(ii)
+n2=100; r2=98;
+C2=factorial(n2)/(factorial(r2)*factorial(n2-r2));
+
+//(iii)
+n3=50; r3=50;
+C3=factorial(n3)/(factorial(r3)*factorial(n3-r3));
+
+mprintf("10C3=%d \n 100C98=%d \n 50C50=%d",C1,C2,C3);
diff --git a/1553/CH30/EX30.4/30Ex4.sce b/1553/CH30/EX30.4/30Ex4.sce
new file mode 100644
index 000000000..29054baae
--- /dev/null
+++ b/1553/CH30/EX30.4/30Ex4.sce
@@ -0,0 +1,10 @@
+//Chapter 30 Ex4
+clc;
+clear;
+close;
+
+S={'B','I','H','A','R'};
+sizeS=size(S,"c");
+reqLetters=sizeS; //since all the letters are required
+noWords=factorial(sizeS)/factorial(sizeS-reqLetters);
+mprintf("The required number of words are %.0f",noWords);
diff --git a/1553/CH30/EX30.5/30Ex5.sce b/1553/CH30/EX30.5/30Ex5.sce
new file mode 100644
index 000000000..7a2ff7323
--- /dev/null
+++ b/1553/CH30/EX30.5/30Ex5.sce
@@ -0,0 +1,14 @@
+//Chapter 30 Ex5
+clc;
+clear;
+close;
+
+S={'D','A','U','G','H','T','E','R'};
+sizeS=size(S,"c");
+n=6; //since there are 3 vowels, they are considered as 1 letter
+reqLetters=n; //since all the letters are required
+noLetters=factorial(n)/factorial(n-reqLetters);
+reqVowels=3; //since vowels are required to be together
+noWays=factorial(reqVowels); //no of ways in which vowels can be arranged together
+mprintf("The required number of words are %.0f",noLetters*noWays);
+
diff --git a/1553/CH30/EX30.6/30Ex6.sce b/1553/CH30/EX30.6/30Ex6.sce
new file mode 100644
index 000000000..e8c47b045
--- /dev/null
+++ b/1553/CH30/EX30.6/30Ex6.sce
@@ -0,0 +1,15 @@
+//Chapter 30 Ex6
+clc;
+clear;
+close;
+
+S={'E','X','T','R','A'};
+sizeS=size(S,"c");
+n=4; //since there are 3 vowels, they are considered as 1 letter
+reqLetters=n; //since all the letters are required
+noLetters=factorial(n)/factorial(n-reqLetters);
+reqVowels=2; //since vowels are required to be together
+noWays=factorial(reqVowels); //no of ways in which vowels can be arranged together
+noWords=factorial(n)/factorial(n-reqLetters);
+noWordsAll=factorial(sizeS); //no of words using all letters
+mprintf("The required number of words having vowel together are %.0f\n The no of words having each vowel never together are %.0f",noWords*noWays,noWordsAll-noWords*noWays);
diff --git a/1553/CH30/EX30.7/30Ex7.sce b/1553/CH30/EX30.7/30Ex7.sce
new file mode 100644
index 000000000..f1da7ab6c
--- /dev/null
+++ b/1553/CH30/EX30.7/30Ex7.sce
@@ -0,0 +1,14 @@
+//Chapter 30 Ex7
+clc;
+clear;
+close;
+
+S={'D','I','R','E','C','T','O','R'};
+sizeS=size(S,"c");
+n=6;
+r=2; //since R occurs twice
+noWays=factorial(n)/factorial(r);
+Vowels=3;
+noWaysVowels=factorial(Vowels); //no of ways in which vowels can be arranged
+reqWays=noWaysVowels*noWays;
+mprintf("The required number of ways are %.0f",reqWays);
diff --git a/1553/CH30/EX30.8/30Ex8.sce b/1553/CH30/EX30.8/30Ex8.sce
new file mode 100644
index 000000000..d220da288
--- /dev/null
+++ b/1553/CH30/EX30.8/30Ex8.sce
@@ -0,0 +1,8 @@
+//Chapter 30 Ex 8
+
+clc;
+clear;
+close;
+total=15; chosen=11;
+noways=factorial(total)/(factorial(chosen)*factorial(total-chosen));
+mprintf("The number of ways in which a cricket 11 be chosen out of a batch of 15 players is %d",noways);
diff --git a/1553/CH30/EX30.9/30Ex9.sce b/1553/CH30/EX30.9/30Ex9.sce
new file mode 100644
index 000000000..a8b68c8d1
--- /dev/null
+++ b/1553/CH30/EX30.9/30Ex9.sce
@@ -0,0 +1,10 @@
+//Chapter 30 Ex 9
+
+clc;
+clear;
+close;
+men=6; mselect=3; ladies=5; lselect=2; //given
+menways=factorial(men)/(factorial(mselect)*factorial(men-mselect));
+ladiesway=factorial(ladies)/(factorial(lselect)*factorial(ladies-lselect));
+totways=menways*ladiesway;
+mprintf("A committee of 5 members consisting of 3 men and 2 ladies selected from 6 men and 5 ladies cen be choosen in %d ways",totways);