Professional Documents
Culture Documents
s even today in the development of theoretical computer science. Course focuses on of how Discrete Structures actually helped computer engineers to solve problems occurred in the development of programming languages. Also, course highlights the importance of discrete structures towards simulation of a problem in computer science and engineering. Introduction of a number of case studies involving Technology. Outcomes of this course are: A complete knowledge on various discrete structures available in literature. Realization of some satisfaction of having learnt that discrete structures are indeed useful in computer science and engineering and thereby concluding that no mistake has been done in studying this course. Gaining of some confidence on how to deal with problems which may arrive in computer science and engineering in near future. Above all, students who studied this course are found to be better equipped in a relative sense as far as preparation for entrance examinations involving placement opportunities. What is Discrete Mathematics then? Mathematics is broadly divided into two parts; (i) the continuous mathematics and (ii) the discrete mathematics depending upon the presence or absence of the limiting processes. In the case of continuum Mathematics, there do exists some relationship / linkage between various topics whereas Discrete Mathematics is concerned with study of distinct, or different, or un-related topics of mathematics curriculum; it embraces problems of Computer
several topical areas of mathematics some of which go back to early stages of mathematical development while others are more recent additions to the discipline. The present course restricts only to introducing discrete structures which are being used as tools in theoretical computer science. A course on Discrete mathematics includes a number of topics such as study of sets, functions and relations, matrix theory, algebra, Combinatorial principles and discrete probability, graph theory, finite differences and recurrence relations, formal logic and predicate calculus, proof techniques - mathematical induction, algorithmic thinking, Matrices, Primes, factorization, greatest common divisor, residues and application to cryptology, Boolean algebra; Permutations, combinations and partitions; Recurrence relations and generating functions; Introduction to error-correcting codes; Formal languages and grammars, finite state machines. linear programming etc. Also, few computer science subjects such as finite automata languages, data structures, logic design, algorithms and analysis were also viewed as a part of this course. Because of the diversity of the topics, it is perhaps preferable to treat Discrete Mathematics, simply as Mathematics that is necessary for decision making in noncontinuous situations. For these reasons, we advise students of CSE / ISE / MCA, TE (Telecommunication Engineering) to study this course, as they needs to know the procedure of communicating with a computer may be either as a designer, programmer, or, at least a user. Of course, in todays situation, this is true for all, although we do not teach to students of other branches of engineering. In some autonomous engineering colleges, DMS is being offered s an elective. Considering these view points, you are informed to undertake a course on Discrete Mathematical Structures so that you will be able to function as informed citizens of an increasingly technological society. Also, Discrete Mathematics affords students, a new opportunity to experience success and enjoyment in Mathematics classes. If you have encountered numerous difficulties with computation and the complexities of Mathematics in the past, then may I say that this course is soft and a study requires very few formal skills as prerequisites.
In case if you are discouraged by the routine aspects of learning Mathematics, Discrete Structures provides you a unique opportunity to learn Mathematics in a much different way than the one employed by your teachers previously. Above all, Discrete Mathematics is vital, exciting, and no doubt is useful otherwise you would not have been suggested to register for this course.
Further, Discrete Mathematics course serves as a gateway for a number of subjects in computer science and engineering. With these motivations, here, we initiate a detailed discussion on some of the topics: These include Basic set theory, Counting techniques, Formal Logic and Predicate calculus, Relations and functions in CSE, Order relations, Groups and Coding etc.
Before, continuing, let me mention the difference between Discrete Mathematics and other Mathematics; consider a bag of apples and a piece of wire. In the former, the apples sit apart discretely from each other while in the latter, the points on a wire spread themselves continuously from one end to the other.
Thus, the numbers 0, 1, 2, 3, . . . are sufficient to handle DMS, where as a real variable taking values continuously over a range of values is required to deal with continuum Mathematics. Hence,
Discrete Mathematics + Limiting Processes = Continuum Mathematics. Prescribed text book: Discrete and Combinatorial Mathematics by R. P. Grimaldi, PHI publications, 5th edition (2004).
Reference Books: Discrete Mathematical Structures by Kenneth Rosen, Tata McGraw Hill Publications Discrete Mathematical Structures by Kolman, Busby and Ross, PHI publications
Basic set theory A set is a well defined collection of well defined distinct objects. A set is usually denoted by using upper case letters like A, B, G, T, X etc. and arbitrary elements of the set are denoted using lower case letters such as a, b, g, v etc. Universal set: The set of all objects under some investigation is called as universe or universal set, denoted by the symbol U. Consider a set A. Let
x A .
On the other hand, if y is not an element of the set, the same is written as y A . Thus, it is clear that with respect to a set A, and an element of the universal set U, there are only two types of relationship possible; (i) the element x under question is a member of the set A or the element
This situation may well be described by using binary numbers 0 and 1. indicate that the element in question is a member of the set A.
The notation x : 0
means that the element under study is not a member of the set A. There are a number of ways of do this task. (i) Writing the elements of a set within the braces. For example, consider A = {dog, apple, dead body, 5, Dr. Abdul Kalam, rose}. Certainly, A qualifies as a set. (ii) A set may be explained by means of a statement where elements satisfying some conditions. Consider V = { x | x is a Engineering College Affiliated to VTU, Belgaum} (iii) Definition of a statement may be given by means of a statement like Z denotes the set of all integers. Thus, Z = {. . . -2, -1, 0, 1, 2, 3,. . }. A null set is a one not having any elements at all. It is denoted by the symbol { } or as Give few examples of null set or empty set. Compliment of a set: Let A be a set. The compliment of A is defined as a set containing elements of the universe but not the elements of the set A. Thus, A = { x U | x A} .
Subset of a set: Let A and B be two sets. We say that A is a subset of B whenever B contains all the elements of A or equivalently, each element of the set A is a member of B. This is denoted by the symbol A B . In a construction of a subset, we have the option of including the null set as well as, the set itself. Power set of a set: Let X be a set, then collection of all subsets of X is called as power
set of X, denoted by P(X). Thus, P ( X ) = { A | A X } . For example, if X = {a, b, c}, then power set of X is given as P ( X ) = {f , {a}, {b}, {c}, {a , b}, {a , c}, {b, c}, {a , b, c}} . In general if A set X has n elements, then its power set will have 2 n elements. This is because, during the construction of a subset of X using the n elements of X, we have a choice of either including an element of X in the subset or excluding the same element in the subset. Thus, each of the n elements of X has exactly 2 choices, therefore the total number of choices will turn out to be 2 n . Proper subset of a Set: Let A and B be two sets. One says A is a proper subset of B if B contains at least one element that is not in A. This is denoted by A B . Note: Difference between proper subset and a subset is the following: In a subset of X, we can find both the null set and the set X itself. In the case of a proper subset of X, we can include the null set but not the set X.
Example of a Discrete Mathematical Structure Consider the universal set, U. Let X = { A, B , C } be a collection of subsets of U. Consider the set operator subset defined on X = { A, B , C } . We have 1. A A and f A
2. If A B , B C , then A C , 3. If A B, then B A .
(X, )
Equal Sets: Let A and B be two sets. We say that A = B whenever both A and B have exactly same elements. Equivalently if A B and B A . .
Equivalent sets: Let A and B be two sets. We say A is equivalent to B if A and B have same number of elements. This is denoted by A p B. The number of elements in a set is called cardinal number of the set. This is denoted by |A|. Discussion on Set operations Union Operator: Consider a universal set Let e any three sets in A, B , C be
U.
Then union of A and B is defined as A B = { x U | x A or x B} The same can be explained by using Venn diagram and by employing a membership table.
U
U:
A B
The functioning of union operator may also be explained using membership table and Venn diagram. The membership table is given below.
Here, we set up x : 1 to mean x A, B and Here, we set up x : 0 to mean that x A, B .
A 1 1 0 0
B 1 0 1 0
A B
1 1 1 0
x A B
only when x
A and x B .
For
x A B.
3. ( A B ) C = A ( B C ) (Associative law) 4. A f = f A = A (Identity law) 5. A U = U A = U 6. If A B, then A B = B Thus, we have another discrete structure, namely, (Universal law)
( A, B, C, U)
subsets of the universal set, U. Before, continuing what is a discrete structure? A set together with an operation and objects of the set satisfying some properties is called as discrete structure.
Let
U
AB
AB
1 0 0 0
1 1 0 0
1 0 1 0
1. A A = A 2. A B = B A
( A, B, C , )
1 0
0 1
1.
( A) = A
Difference operator: Let A and B be two sets. Then difference of A and B is defined as
A - B = {x U | x A and x B} .
The Venn
A- B
1 1 0 0
1 0 1 0
0 1 0 0
Symmetric Difference operator: Let A and B be two sets. Symmetric Difference of A and B
is defined as A B = {x U | x A or x B but x A B} .
Equivalently, A B may be
A B
AB
A B
0 1 1 0
1 1 0 0
1 0 1 0
The following are some of the properties with respect to symmetric difference operator: 1. A A = f 2. A B = B A
(Commutative l law)
3. ( A B ) C = A ( B C ) (Associative law) Therefore, we can say that a collection of sets with respect to symmetric difference operators forms another discrete structure.
We can have some Properties with respect to Union and Intersection Operator: These are
1. 2. 3. 4. 5. 6. 7. 8.
( A B) C = ( A C) ( B C) (Distributive law) ( A B ) C = ( A C ) ( B C ) A ( B C ) = ( A B) ( A C ) A ( B C ) = ( A B) ( A C ) ( A B) ( C D) = ( A C ) ( A D ) ( B C ) ( B D ) ( A B ) ( C D) = ( A C ) ( A D) ( B C ) ( B D)
A ( A B ) = A (Absorption law) A ( A B ) = A (Absorption law)
Hence, we can claim that a collection of sets to form a discrete structure with respect to the combination of Union and Intersection Operator.
Illustrative examples: 1. Let A = {1, {1}, {2}}. Which of the following statements are true? Explain your answer?
(a ) 1 A, (b) {1} A, (c ) {1} A, ( d ) {{1}} A, (e) {2} A, ( f ) {2} A, ( g ) {{2}} A
Solution: Solution: (a) to (e) and (g) is true. The Statement (f) is false .
2 For the set A = {1, 2, 3 . . . 7}, determine the number of (i) subsets of A? (ii) proper subsets of A? (iii) Non-empty subsets of A? (iv) Non-empty proper subsets of A (v) subsets of A containing three elements? (vi) Subsets of A containing the elements1, 2 (vii) subsets of A containing 5 elements including 1 and 2?
Solution: (i) Here, set A contains totally 7 elements, the experiment consists of forming subsets using the elements of A only. Now, if we consider that B as a subset of A, then with respect to the set B, and for an element of A, there are exactly two choices; (i) an element of A under consideration is present in the set B or (ii) element not being present in B. Thus, each element of A has exactly 2 choices. Therefore, total number of subsets one can construct is
27 = 128 . This collection includes both the null set and the set A itself (please note this).
(ii) It is known that a proper subset means it is a set a set C such that it is a subset of A and there exists at least one element in A, not present in C. Therefore, for this reason, in the collection of subsets, we should not include the set A. Hence, number of proper subsets of A is
27 - 1 = 127 .
(iii) Clearly, number of non empty subsets of A is that we must discard the null set here.
(iv) Also, number of non empty proper subset of A is 27 - 2 = 126 since null set and the set A has to be ignored here. (v) Now, to construct all subsets of A having exactly 3 elements. This problem is equivalent to the one, namely, in how many ways a group of 3 members may be formed from a group 7 7! = containing 7 persons? The answer is given by = 35 . 4! 3 3! (vi) Here, the condition is any subset formed must include the elements 1 and 2. Therefore, choices are there for the remaining 5 elements; either to be a part of the subset or not? Hence, number of subsets containing 1 and 2 is 25 = 32 , (vii) Consider a five element subset of A, say B = {- , - , - , -, -}. Now, B must include the elements 1 and 2. So, the choices of inclusion/exclusion rest with 3, 4, 5, 6, and 7 for the 5 5! = remaining 3 slots. These 3 slots may be filled in = 10 ways. Thus, only 10 subsets 3! 3 2! can be formed satisfying the conditions of the problem.
3. Let S = {1, 2, 3 . . . 30}. How many subsets of A satisfy (i) |A| = 5 and the smallest element in A is 5? (ii) |A| = 5 and the smallest element in A is less than 5? Solution: Let B = {-, -, -, -, -} be a 5 element subset of A. As the smallest element is given
to be 5; the other 4 elements have to be greater than 5, these are to be selected from the remaining 25 25! numbers 6 to 30 (25 in numbers). Therefore, the answer is = = 12, 650. 21!4! 4
In the next case, the smallest element can be lower than 5 (i.e. either 1 or 2 or 3 or 4). Now if the smallest element is 1, then the other 4 numbers may be selected in C (29, 4) ways. If the smallest element is 2, then number of ways of selecting the other 4 numbers is C (28, 4) ways. If the smallest element is 3, then we have C (27, 4) ways. When the smallest element is 4, then we have C(26, 4) ways. Thus, number of ways of doing the whole task is C (29, 4) + C (28, 4) + C (27, 4) + C (26, 4).
4. How many strictly increasing sequences of integers start with 62 and end with 92? Solution:
with Consider a sequence of numbers, say
a1 = 62 and an = 92.
(62, 63, 92), (62, 78, 89, 92), (62, 63, 64, 65,. . 89, 90, 91, 92). In the last one all the numbers in between 62 and 92 are included. From these, it is clear that during the construction process, we have included some numbers in the sequence and at the same time, we have ignored the numbers between 62 and 92. Clearly there are 27 numbers in between 62 and 92, therefore answer to this question is 2 27 .
5. For U = {1, 2, 3 . . . 9}, A = {1, 2, 3, 4, 5}, B = {1, 2, 4, 8}, C = {1, 2, 3, 5, 7} and D= {2, 4, 6, 8}, compute the following: (a ) ( A B ) C , (b) A ( B C ), (c) C D
(e) ( A B ) - C , (f) B - (C - D ) . (d ) C D ,
7. Determine the sets A, B and A B given that A B = {4, 9}, A - B = {1, 3, 7, 11}
, B - A = {2, 6, 8}
A B = {1, 2, 3, 4, 6, 7, 8, 9, 11}
observe that A C = {a , d , e, g} and B C = {a , d , e , g} but clearly A and B are different. It may be recalled that this property holds for a set of numbers with respect to operation usual addition, namely, a + c = b + c, then a = b. problem, set up Why not here? any explanation? For the next
A C = B C = {a , e} and as usual A and B are different sets. Can you explain me why these
properties are not working with sets and with respect to union or intersection operator? A similar property is true with respect to usual multiplication operator, namely,
a c = b c implying that a = b, if c 0 .
9. Using membership table, verify whether A B = A B Solution: We shall set up x :1 means x A, B and x : 0 means x A, B . Consider the
membership table of A B = A B ,
A B A B
A B
A B
0 0 0 1
1 1 0 0
1 0 1 0
1 1 1 0
0 0 0 1
0 0 1 1
0 1 0 1
From the above membership table (comparison of 4th column and the last column, it is clear that A B = A B .
10. Using membership table, verify whether A B = A B Solution: As above, we shall set up membership table for the set identity A B = A B by
assuming that x :1 means x A, B and x : 0 means x A, B .
A B
A B
1 0 0 0
A B
0 1 1 1
A B
1 1 0 0
1 0 1 0
0 0 1 1
0 1 0 1
0 1 1 1
From the above membership table (comparison of 4th column and the last column, it is clear that A B = A B .
11. Using membership table, verify whether A ( B C ) = ( A B ) ( A C ) . Solution: To set up x :1 means x A, B, C and x : 0 means x A, B, C . Consider
A B
C
1 0 1 1 0 0 1 0
BC
1 1 1 1 0 1 1 0
A (B C )
A B
1 1 0 0 0 0 0 0
AC
1 0 1 0 0 0 0 0
( A B) ( A C )
1 1 1 0 1 0 0 0
1 1 0 1 0 1 0 0
1 1 1 0 0 0 0 0
1 1 1 0 0 0 0 0
From the above membership table (comparison of 5th column and the last column, it is clear that A ( B C ) = ( A B ) ( A C ) .
C
z
Prof. K Gururajan, MCE, Hassan
A
C
B C
Prof. K Gururajan, MCE, Hassan
A C
A (B C )
B
A B
A C
A
C
Prof. K Gururajan, MCE, Hassan
A
C
( A B) ( A C )
A (B C )
A ( B C ) ( A B) ( A C )
Prof. K Gururajan, MCE, Hassan
A
C
14. Use Mathematical procedure show that 1. A B = A B , Proof: To show this result, it is sufficient to prove that A B A B and A B A B
I.e. each one is a subset of the other.
x A B.
Let x A B
be arbitrary.
Thus, x A and x B. Equivalently, x A and x B. Therefore, x A B which proves that A B A B . . . . (*1). Next consider that y A B be arbitrary. From this, Therefore,
y A and y B.
Thus,
X (X Y ) (A B). Dual of A = ( A B ) ( A f ) is A = ( A B ) ( A U ) . 15. Using laws of set theory, simplify the expression (A B ) (A B C D) (A B). Solution: Here, we shall use absorption law of set theory, namely, X (X Y )= X . First, we
shall set up X = A B, Y = C D, then above can be modified as X (X Y ) (A B). Now applying absorption law, we obtain X (A B) . Now substituting for X, yields, =
A B (A B). .
A B (A B) = (A A) (A B ) (B A) (B B )
= U (A B ) (B A) B = (A B ) (B A) B because U X = X = (A B) B (B A) by Associative law = B (B A) by Absorption law = B by Absorption law
16. Simplify (A B) (A B C )
| A B |= | A | + | B | - | A B |
A B
Note that while counting the elements of the set A B , number of elements in view of this,
A B is
counted twice; once for while counting the elements of the set A and next time for the set B. In we get | A B |= | A | + | B | - | A B | . This is called Inclusion Exclusion
Principle for two finite sets. For 3 sets A, B, and C, the inclusion exclusion principle may be stated as
A B C = A + B + C - A B - | AIC |- | B C | + | A B C |.
given as follows: We shall set up A B = D . Using this above, we get | A B C | =
DC
A C + B C - (A C ) (B C )
Illustrative Examples: A computer company must hire 25 programmers to handle system programming jobs and 40 programmers mers for applications programming. Of those hired, ten will be expected to perform jobs of both types. How many programmers must be hired? Solution: Solution: Let A and B denote the number of programmers handling system
programming and applications prog programming ramming respectively. According to the given data,
A B = A + B - | A B |= 25 + 40 - 10 = 55 .
hired. The same situation can well be explained by considering the following Venn diagram;
From this Venn diagram, it is clear that number of programmers who knows the system programming jobs is 15, while the number of programmers knowing application programming is 30. Also, number of programmers capable of handling exactly one of the two jobs is 45. On the other hand, suppose ppose company hires say 60 programmers, then it follows that 5 programmers do not have any knowledge on either of the types of jobs.
In a survey of 260 college students, the following data were obtained: 64 had taken a Mathematics course, 94 had taken a C Computer omputer science course; 58 had taken a Business course; 28 had taken both Mathematics and a Business course. 26 had taken a
Mathematics and Computer science course, 22 had taken both a Computer science and a Business course, and 14 had taken all three types of courses. Then how many students were surveyed who taken none of the three types of courses? How many had taken only a computer science course? Solution: Let M, C and B denote the number of students who have registered for Mathematics,
Computer Science and Business course respectively. that
| M |= 64, | C |= 94, | B |= 58, | M B |= 28, | C M |= 26, | C B |= 22 and | M C B |= 14
Using
Inclusion
Exclusion
principle
here, Thus,
| M C B |= | M | + | C | + | B | - | M C | - | M I B | - | C B | + | M C B |= 154 .
154 students have registered for either one of the three courses.
the college is 260, number of students who have not registered for any one of these courses is 106. Number of students studying only computer science is 60. Also, it may be noted that number of students studying exactly two of the three subjects is 34. Number of students studying exactly one of the three subjects is 106.
M C 12 24 60 14 8 14
22 B
N = 260
conditioner, and white-wall tires. It is known that 15 of the cars have radios, 8 of them
have air conditioners, and 6 of them have white-wall tires. Moreover, 3 of them have all three options. How many cars do not have any options at all?
Solution: Let A, B, and C denotes the number of radios, air conditioners and white wall tires
available for a car in a factory, respectively.
| A |= 15, | B |= 8, | C |= 6 and | A B C |= 3 .
From the given data, we have N = 30, First we shall to do some groundwork to
solve
this
problem.
A B C A B, so that A B C A B ,
A B C A C , so that A B C A C , A B C B C , so that A B C B C ,
Thus,
3 A B , 3 AC , 3 B C ,
yields,
There are 21 students in his class, and every student answered at least one question. Five students did not answer the first question, seven failed to answer the second question, and six did not answer the third question. If nine students answered all three questions, then how many answered exactly one question? Solution: Let a, b, c denote respectively the number of students who have answered exactly 1
of the 3 questions. Let d, e, f denote the number of students who have answered exactly 2 of the 3 questions. It is given that 9 students have answered all the 3 questions. These situations may well be explained by means of a Venn diagram shown below.
a I
d f 9 c III
II
b e
a + b + c + d + e + f + 9 = 21 (2) a+ c + e = 7
or
a + b + c + d + e + f = 12 (1)
b +c +f =5
(3) a + b + d = 6
+ b + c) + d + e + f = 18. The same can be written as (a + b + c + d + e + f) + (a +b + c) = 18. Using (1) here, we obtain a + b + c = 6. Thus, it is clear that only 6 students have answered exactly one of the three questions.
Past is history, Present is Manageable but Future is interesting or uncertain. A discussion of Discrete Probability Sample space: The set of all outcomes of a random experiment is called sample space,
denoted by S.
An event in a sample space: Any subset or a part of a sample space is called an event.
.e. if A S , then A is called an event in the sample space.
Probability function associated with an event: With every event, A in a sample space, S, we
assign a real number in between 0 and 1, called the probability/chance of occurrence of the event A. This is denoted by P ( A) . Thus, P ( A) is a function from S to [0, 1]. This function P ( A) has the following properties called as probability axioms:
In general, if A1 , A2 , A3 . . . Ak are any collection of k mutually exclusive events then P ( A1 A2 A3 . . . Ak ) = P (A1 ) + P (A2 ) + P (A3 ) + . . . + P (Ak )
On the other hand, if A and B are not mutually exclusive events, then
P ( A B ) = P ( A) + P ( B ) - P ( A B )
P ( A) =
number of ways in which event A occurs number of ways in which sample space, S occurs
| A| . |S|
Before proceeding to further discussion on probability, let us have a discussion on some important counting principles:
1. Rule of sum: Let T1 and T2 be different two tasks such that T1 can be done in n1 ways and
T2 in n2 ways (say), then either T1 or T2 can be performed in exactly n1 + n2 ways.
are 30 Laptops produced by Asus. A customer visits the show room and he is interested to buy
Since, customer can buy a laptop produced by either one of the companies, clearly customer has 30 + 25 = 55 choices.
Rule of Multiplication: Now consider the same problem but with a difference. Suppose that
customer wants to buy 1 laptop produced by Dell and 1 laptop produced by Asus. As there are 30 Asus laptops and 25 Dell laptops, the customer has 30 25 = 750 choices. This is called multiplication rule.
Rule of permutation: Consider a set A with n different elements. Then these n elements may
be arranged in n ! = 12 3 . . . n ways. A selection of any r (0 < r < n) elements from A and then arranging these in some order is called r permutation of A. It is denoted by
nPr or P (n, r ) =
n! . (n - r )!
n n! . nC r or C ( n, r ) or = r (n - r )!r !
Generalized
Permutation
Principle:
Consider
set
with
objects,
behaviors, n2 objects are alike i.e. having similar behaviors, n3 elements are alike and so on then, all the elements of A
Example: Find the number of ways arranging the letters of the word MISSISSIPPI.
Here, note that letter M occurs once, I 4 times, S occurs 4 times, P occurs twice. In view of these, the letters of the word MISSISSIPPI can be arranged in
11! ways. 4!4!2! 1!
If the letters of the word BOOLEAN are arranged at random, what is the probability that the two Os remain together in the arrangement?
Solution: Here, experiment consists of arranging the letters of the word, B, O, O, L, E, A, N. Let S denote the sample space of the experiment, then as O appears twice, other letters appearing only once, clearly S =
7! = 2520. Let A denote the event, namely, that, two Os 2!
always appear together in the arrangement. Consider two Os as one block, thus, we have 6 different types of letters in the arrangement which can be shown as
OO
Thus, these six letters may be arranged in 6! = 720 ways. Therefore, the probability of the event may be calculated as P ( A) =
If the letters of the word in the acronym WYSIWYG (What You See Is What You Get) are arranged in a random manner, then what is the probability that starts and ends with the same letter? Solution: Here, too experiment consists of arranging the letters of the word W, Y, S, I, W, Y,
G. Let S denotes the sample space of the experiment. Observe that the letters W and Y occurs twice, and other letters occurs only once, therefore, | S |=
7! = 1260 . Form the event A: 2!2!
An arrangement of letters W, Y, S, I, G starts and ends with the same letter Possible arrangement could be either
------W ------Y | A | 120 5! 5! Clearly, |A| = = = 0.0952 . + = 120 , therefore, P ( A) = 2! 2! | S | 1260 In a survey of 120 passengers, an airline found that 48 enjoyed wine with their meals, 78 enjoyed mixed drinks, and 66 enjoyed iced tea. In addition, 36 enjoyed any given pair of these beverages and 24 passengers enjoyed them all. If 3 passengers are surveyed at random? What is the probability that All 3 enjoy iced tea with their meals? (ii) All 3 enjoy only iced tea with their meals? (iii) How many passengers enjoy exactly one of the three beverages served?
W Y
-----
-----
Solution: Let W, M, I denote the set of Airline Passengers who enjoy Wine, Mixed Drinks and
Iced Tea with their meals respectively. From the data, we have W = 48,
M = 78,
I = 66,
W M = W I = M I = 36,
N = 120 W 0
12
W M = 36 W I = 36 M I = 36
W M I I = 24
M
30
12
18
24 I
12
(a) Note that 36 passengers enjoy exactly two of the three beverages along with their meals. (b) Note that 48 passengers enjoy exactly one of the three beverages with their meals. (c) Note that only 30 passengers enjoy Mixed drinks with their meals. (d) Note that 108 passengers enjoy either one of the three beverages served with their meals. Let S be the sample space of the experiment, then S = C (120, 3) =
120! = 280840 . Let 117!3!
A: Selected all 3 passengers enjoy iced tea with their meals. Then
A = C (66, 3) =
Let B: All
3 selected passengers chosen at random enjoy only iced tea with their meals. From the given data, it is clear that only 18 passengers enjoy iced tea with their meals, therefore,
B = C (18, 3) =
Problem: If 3 integers are selected at random from S = {1, 2, 3. . . , 99, 100}, what is the probability that their sum is an even integer? Solution: Let x , y , z be three integers selected at random from S consisting of first 100
positive integers. Let S be the sample space of the experiment. Then, cardinal number of S can be S = C (100, 3) =
100! = 161700 . 97!3!
Set up A: x + y + z is an even integer. We know that sum of three integers can be even only when all the integers are even or one integer is even, while the other two are odd. Keeping this in view, we can consider when (i) x , y , z all are even integers and (ii) when one integer is even and the other two are odd integers. For case (i), three even integers
50! = 19600 ways. For 47!3!
case (ii) 1 even integer can be selected in 50 ways and as there are 50 odd integers, 2 odd Integers can be chosen in C (50, 2) =
50! = 1225 ways. 48!2!
making selection such that one integer is even and other two are odd is 501225=61250 . Therefore, A = 61250 +19600 = 80850 . Hence, P ( A) =
A S
The freshman class of a private engineering college has 300 students. It is known that 180 can program in Pascal, 120 in FORTRAN, 30 in C++, 12 in Pascal and C++, 18 in FORTRAN and C++, 12 in Pascal and FORTRAN, and 6 in all three languages. (a) A student is selected at random. What is the probability that she can program in exactly two languages? (b) Two students are selected at random. What is the
probability that they can (i) both can program in Pascal? (ii) Both program only in Pascal? Solution: Let P, F, C denote the set of students who can program Pascal, FORTRAN and
C++ respectively. From the data, we have
P 162
6 6 6 C
96
12
N = 300 P F = 12
P C = 12 F C = 18
The experiment consist of selecting one student at random from the college strength of 300 and then testing his programming skills in 3 types of languages, namely, Pascal, FORTRAN, C++. Let S be the sample space of the experiment, then clearly S = 300 . Set up A: The selected student can program in exactly two of the three languages. Then, clearly, A = 24 . Thus, the occurrence of the event A is given as P ( A) =
24 = 0.08 . 300
(b) Here, the experiment consists of selecting two students from the college of strength 300, and then finding their skills with regard to programming. Let S be the sample space of the experiment. Then, S = C ( 300, 2) =
300! 299 300 = = 44850 . 298!2! 2
Set up B: the
selected
two
students
can
do
programming
in
Pascal,
then
B = C (180, 2) =
(c) Set up C:The chosen two students can do programming only in Pascal, then
clearly C = C (162, 2) =