Binomial Coefficients and Difference Equations, Slides of Discrete Mathematics

The concept of binomial coefficients in the context of binomial expressions and difference equations. It provides examples and solutions for expanding binomial expressions and deriving theorems related to difference equations. The document also covers the method of undetermined coefficients and boolean functions.

Typology: Slides

2023/2024

Uploaded on 04/08/2024

randy-fobi-osei
randy-fobi-osei 🇬🇭

1 document

1 / 121

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CSM 166: DISCRETE
MATHEMATICS FOR
COMPUTER SCIENCEII
Yao. Elikem.Ayekple
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Binomial Coefficients and Difference Equations and more Slides Discrete Mathematics in PDF only on Docsity!

CSM 166: DISCRETE

MATHEMATICS FOR

COMPUTER SCIENCEII

Yao. Elikem.Ayekple

Unit 1

Fundamentals of Counting

The major goal of this unit is to establish several techniques for counting large finite sets without actually listing their elements. There are two basic counting principles used throughout. One involves addition and the other multiplication.

Elements of Counting

Sum Rule Principle For a set X , X denotes the number of elements of X. It is easy to

see that for any two sets A and B we have the following result known as the Inclusion- Exclusion Principle

ABABAB.

Indeed, A gives the number of elements in A including those that are

common to A and B. The same holds for B. Hence, AB

includes twice the number of common elements. Hence, to get an accurate count of the elements of AB , it is necessary to subtract AB from AB.

Note that if A and B are disjoint then AB  0 and consequently

ABAB.

Induction step: Let (^)  A 1 (^) , A 2 (^) ,..., An , An (^)  1 be a collection of pairwise

disjoint sets. Since

A 1^ ^ A 2^ ^ ...^ ^ An^  ^ An^  1 ^  A 1^ ^ An^  1  ^  A 2^ ^ An^  1  ^  An^ ^ An  1  

then by the Inclusion-Exclusion Principle and the induction hypothesis we have

A 1 (^)  A 2 (^)  ...  AnAn (^)  1  A 1 (^)  A 2 (^)  ... AnAn  1  A 1 (^)  A 2 (^)   AnAn (^)  1

Example 1. A total of 35 programmers interviewed for a job; 25 knew FORTRAN, 28 knew PASCAL, and 2 knew neither language. How many knew both languages?

Solution: Let A be the group of programmers that knew FORTRAN, B those Who knew PASCAL. Then AB is the group of programmers who knew both languages. By the Inclusion-Exclusion Principle we have: ABABAB.

That is, 33  25  28  AB. Solving for AB we find AB  20 |.

Product Rule Principle Another important rule of counting is the multiplication rule. The second Rule Principle (Product Rule Principle): Suppose there is an event A which can occur in m ways and, independent of this event, there is a second event B which can occur in n ways. Then combinations of A and B can occur in mn ways. In other words (Product Rule Principle): Suppose A and B are finite sets. Then ABAB

Clearly, the principle can be stated as: If a decision consists of k steps, where the first step can be made in n 1 different ways, the

second step in (^) n 2 ways,…, the k th step in (^) nk ways, then the decision

itself can be made in n 1 (^)  n 2 (^)    nk ways.

For example,

. Tossing a coin has two possible outcomes and tossing a die has six possible outcomes. Then the combined experiment, tossing the coin and die together results in 2  6 = 12 possible outcomes: H 1, H 2, H 3, H 4, H 5, H 6, T 1, T 2, T 3, T 4, T 5, T 6 . The number of different ways for a man to get dressed if he has 8 different shirts and 6 different pairs of trousers is 8  6 = 48 . The number of ways a three-figure integer be formed from the numbers, 4, 3, 5, 6 and 7 if no number is used twice or more is 5  4  3 = 60.

Solution:

  1. By the multiplication rule there are 6  6  36 possible outcomes.
  2. By the multiplication rule there are 26  25  24  10  9  8  7  78,624,000possible license plates.

Example 1.

Let   (^)  a b c d , , , be an alphabet with 4 letters. Let  2 be the set of all

words of length 2 with letters from . Find the number of all words of length 2 where the letters are not repeated. First use the product rule. List the words by means of a tree diagram.

Solution: By the multiplication rule there are 4  3  12 different words. Constructing a tree diagram:

we find that the words are:

ab ,^^ ac ,^^ ad^ ,^ ba ,^^ bc ,^^ bd ca ,^ ,^^ cb ,^^ cd^ ,^ da ,^^ db ,^ dc

Applying the multiplication principle, results in the other two counting techniques, namely Permutation and Combination , used to find the number of possible ways when a fixed number of items are to be picked from a lot without replacement

a

b c^ d

b

a (^) c d (^) a (^) b a b

c

d^ c

d

PERMUTATIONS

Any arrangement of a set of n object in a given order is called a permutation of the objects (taken all at a time). Any arrangement of any rn of those objects in a given order is called an r - permutation of n objects or a permutation of the n objects taken r at a time. In symbol P n  , r (^) , is an ordered selection of r objects from a given n objects.

Consider, for example, the set of letters a b c , , , and d. Then: a) abcd bcda acdb , , , and dcba are permutations of the four letters (taken all at a time); b) bad adb cbd , , ,and bca are permutations of the four letters taken three at a time; c) ad cb da , , , and bd are permutations of the four letters taken two at a time.

Example 1. a) Use the product rule to show that (^)    

P n r n  (^) nr

b) Find all possible 2 - permutations of the set (^) 1, 2, 3 .

Solution: a) We can treat a permutation as a decision with r steps. The first step can be made in n different ways, the second in n  1 different ways, ..., the r th in n  (^)  r  (^1)   nr  1 different ways. Thus, by the

(iv) n distinct objects arranged in a circle, called circular permutations is given by nn! (^)  ( n  1 )!.

For example,

  1. The number of possible permutations of the letters, A , B and C is (^) 3!  6.The required permutations are ABC, BAC, ACB, BCA, CAB and CBA.
  2. The number of permutations of 10 distinct digits taken two at a time 10 2 10!^10 9 90.  P  (^) (10 2)!  
  3. The number of permutations of the letters forming the following 14- letter word, S C I E N T I F I C A L L Y , which contains 2 C’s , 3I’s, 2L’s , and 1’s of the rest of letters = (^) 2!.3!.2!14! = 3,632,428,
  4. The number of circular permutations of 6 persons sitting around a circular table = 5! = 120

Ordered Samples When we choose one element after another from the set S containing n elements, say r times, we call the choice an ordered sample of size r. We consider two cases:

I. Sampling with replacement Here the element is replaced in the set S before the next element is chosen. Since there are n different ways to choose each element (repetitions are allowed), the product rule principle tells us that there are r times n n n^    nnr different ordered samples with replacement of size r.

II. Sampling without replacement Here the element is not replaced in the set S before the next element is chosen. Thus there are no repetitions in the ordered sample. According, an ordered sample of size r without replacement is simply an r  permutation of the elements in the set S with n elements. Thus there are P n r  , (^)   n n   (^1)  n  (^2)   nr  (^1)   (^)  n n ^! r !

different ordered samples without replacement of size r from a population (set) with n elements. In other words, by the product rule, the first element can be chosen in n ways, the second in n  1 ways, and so on.

COMBINATIONS

Suppose we have a collection of n objects. A combination of these n objects taken r at a time is any selection of r of the objects without taking order in account. An r - combination of n objects, in symbol

C n  , r , is an unordered selection of r of the n objects. In other

words, an rcombination of a set of n objects is any subset of r elements. But the number of different ways that r objects can be

ordered is r !. Since there are C n  , r (^)  groups of r objects from a

given n objects then the number of ordered selection of r objects from n given objects is r C n! (^)  , r (^)   P n  , r .Thus

C n r  , (^)   P n r ^ r!^ ,^  (^) r ! nn ! r !^ ^^ nr   

For example, the combinations of the letters a b c d , , , taken three at a

time are:

a b c , ,  ,  a b d , ,  , a c d , ,  , b c d , , or simply abc abd acd bcd , , ,

Observe that the following combinations are equal: abc acb bac bca cab cba , , , , ,

That is, each denotes the same set (^)  a b c , , 

Example 1. Find the number of combinations of four objects, a b c d , , , taken three

at a time.

Solution: Each combination consisting of three objects determines 3!  6 permutations of the objects in the combination. Thus the number of combination multiplied by 3! equals the number of permutations. That is:

C (^)  4,3  3!  P  4,3or C (^)  4,3 ^ P ^ 3!4,3

But P  4,3  4 3 2   24 and 3!  6. Thus C  4,3  4 , which is

shown in the table below:

Example 1. In how many different ways can a hand of 5 cards be selected from a deck of 52 cards? (no repetition)

Solution: C (^)  52,5 (^)   2, 598, 960

Combinations Permutations abc abc acb bac bca cab cba ,^ ,^ ,^ ,^ , abd abd adb bad bda dab dba ,^ ,^ ,^ ,^ , acd acd adc cad cda dac dca ,^ ,^ ,^ ,^ , bcd bcd bdc cbd cdb dbc dcb ,^ ,^ ,^ ,^ ,

Example 1.

  1. Find the number m of committees of three that can be formed from eight people. Each committee is, essentially, a combination of the eight people take three at a time. Solution:  

m C (^) 3 1 2 3   ^ ^  ^     (^)  

  1. A farmer buys three cows, two pigs, and four hens from a man who has six cows, five pigs, and eight hens. How many choices does the farmer have?

Solution: The farmer can choose the cows in  ^63   

ways, the pigs in  ^52    ways, and the hens in  ^84   

ways. Hence altogether he can choose

the animals in (^6 5 8) 20 10 70 14, 3 2 4

        ways

  1. Find the number m of ways that 9 toys can be divided between 4 children if the youngest is to receive 3 toys and each of the others 2 toys.

Solution: There are C (^)  9,3  84 ways to first choose 3 toys for the youngest. Then there are C (^)  6,2 (^)  15 ways to choose 2 of the remaining 6 toys for the oldest. Next, there are C (^)  4,2 (^)  6 ways to choose 2 of the remaining 4 toys for the second oldest. The third oldest receives the remaining 2 toys. Thus, by the product rule: m  84 15   6  (^)  (^1)   7560

Example 1. 1.11(a) (i) In how many ways can a three-figure integer is formed from the numbers: 4, 3, 5, 6 and 7 if any number can be used more than once? (ii) In a certain examination paper, students are required to answer 5 out of 10 questions from Section A another 3 out of 5 questions from Section B and 2 out of 5 questions from Section C. In how many ways can the students answer the examination paper?

Solution: (i) The first, second and third numbers, each can be chosen in 5 ways. The total number of ways = 5  5  5 = 125 (ii) The number of ways of answering the questions in Section A

= 10  9  8  7  6 = 30,

The 2 girls can exchange places and so the required number of ways they can seat themselves = 5!  2! = 240 (ii) The number of ways the boys can arrange themselves = 4! The number of ways the 2 girls can occupy the arrowed places: B 1 B 2 B 3 B 4 =^5 P 2  5  4

The required number of permutations (with the 2 girls not sitting next to each other) = 4!  5  4 = 480

1.11(d) Find the number of ways in which a committee of 4 can be chosen from 6 boys and 5 girls if it must (i) Consist of 2 boys and 2 girls. (ii) Consist of at least 1 boy and 1 girl.

Solution: (i) The number of ways of choosing 2 bys from 6 and 2 girls from 5 = (^)  

       2

.^5 2

(ii) For the committee to contain at least 1 boy and 1 girl we have 1B3G, 2B2G or 3B1G The required number of ways = (^)  

                       1

.^5 3

6 2

.^5 2

6 3

.^5 1

6

= 6 10   15 10   20 5  130

1.11(e) (i) A school Parent-Teacher committee of 5 members is to be formed from 6 parents, 2 teachers and the principal. In how many ways can the committee be formed in order to include (  ) The principal?^ (  ) Exactly four parents? ( )  Not more than four parents? (ii) Four balls are drawn from a bag of 12 balls of which 7 are blue and 5 are red. In how many of the possible combinations of 4 balls is at least a red?

Solution: (i) (  ) If the principal is to be included then we select 4 people

from the remaining 8. Hence required number of ways the committee is formed

= 11.^84 ^70 

 

 

 

(  ) The number of ways of selecting 4 parents out of 6 =^  46 . The number of ways of selecting the remaining number from the 3 (2 teachers and

the principal) = (^)  

 

 1

3

Therefore the number of ways of selecting exactly 4 parents

=  ^64   . 1 3     

( )  The number of ways of forming a 5-member committee = (^)  

 

 5

12