0% found this document useful (0 votes)
12 views8 pages

Solution of Work Sheet II

Sol

Uploaded by

teweldeananya24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

Solution of Work Sheet II

Sol

Uploaded by

teweldeananya24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

SOLUTION OF WORK SHEET – I

1. Suppose a computer system is closed by a password four to six


characters long, where each character is an uppercase letter or a digit.
Each password necessarily contains at least one digit. How many possible
such passwords are there?
Solution:
Let P be the total number of possible passwords, and let P4, P5 and P6
denote the number of possible passwords of length 4, 5 and 6 respectively.
We will now find P4, P5 and P6. Finding P4 directly is difficult. To find P4
it is easier to find the number of strings of uppercase letters and digits that
are four characters long, including those with digits, and subtract from this
the number of strings with no digits.

C1 C2 C3 C4
A A A A
B B B B
. . . .
. . . .
. . . .
Z Z Z Z
0 0 0 0
1 1 1 1
2 2 2 2
. . . .
. . . .
. . . .
9 9 9 9
=36 ways =36 ways =36 ways =36 ways

By principle of product rule,


The number of strings of uppercase letters and digits that are four
characters long = (36)(36)(36)(36) = 36 4
And the number of strings with no digits
that are four characters long = 26 4
Thus
P4 = 36 4 − 26 4
Similarly
P5 = 36 5 − 26 5 and
P6 = 36 6 − 26 6
Finally, by principle of sum rule
Number of possible passwords = P4+P5+P6
= ( 36 4 − 26 4 ) + ( 36 5 − 26 5 ) + ( 36 6 − 26 6 )
= 36 6 + 36 5 + 36 4 −( 26 6 + 26 5 + 26 4 )
= 36 4 ( 36 2 + 36 + 1) − 26 4 (26 2 + 26 + 1)
2. How many license plates can be made using either two or three uppercase
English letters followed by either two or three digits?
Solution:
Let P be total number of license plates
P1 be number of license plates using two uppercase English letters followed
by two digits
P2 be number of license plates using two uppercase English letters followed
by three digits
P3 be number of license plates using three uppercase English letters
followed by two digits
P4 be number of license plates using three uppercase English letters
followed by three digits
Now to find P1
L1 L2 D1 D2
A A 0 0
B B 1 1
C C 2 2
. . . .
. . . .
. . . .
Z Z 9 9
=26 Ways =26 Ways =10 Ways =10 Ways

By principle of multiplicative rule,


P1 = (26)(26)(10)(10) = 262 102
P2 = (26)(26)(10)(10)(10) = 262 103
P3 = (26)(26)(26)(10)(10) = 263 102
P4 = (26)(26)(26)(10)(10)(10) = 263 103
Now, by principle of sum rule
P = P1+P2+P3+P4
= 262 102 + 262 103 + 263 102 + 263 103
= 262 102 (26 ∗ 10 + 26 + 10 + 1) = 20,077,200
3. Six different airlines fly from New York to Denver and seven fly from
Denver to San Francisco. How many different pairs of airlines can you
choose on which to book a trip from New York to San Francisco via Denver,
when you pick an airline for the flight to Denver and an airline for the
continuation flight to San Francisco?
Solution:
______F1__________ _______F7________________
_____F2____ ____F8____________

New ___F3______ ____F9___________


San
York ___F4____ Denver _____F10________
Francisco
____F5____ _____F11________
_______F6_____ _______F12__________
___________F13____________

By principle of multiplication rule,


Total number of pair flights =(6)(7) = 42
4. How many different functions are there from a set with 10 elements to sets
with the following numbers of elements?
a. 2 b. 4 c. 3 d. 5
Solution:
Counting functions: How many functions are there from a set with m elements to the
set with n elements?
Let f be a function from set A to be set B, that is
𝑓: 𝐴 → 𝐵 Must map each element of the domain A, to some element in B.
A functions corresponds to a choice of one of the n elements in the codomain for each
of the m elements in the domain. Thus
By principle of product rule
There are 𝑛 ⋅ 𝑛 ⋅ 𝑛 ⋅⋅⋅ ⋅ 𝑛 = 𝑛𝑚 functions from a set with m elements to one with n
elements.
Let 𝑓: 𝐴 → 𝐵 and suppose that set A contains 10 elements, then
a. There are 210 functions from set A to set B, where B contains 2 elements.
b. There are 410 functions from set A to set B, where B contains 4 elements.
c. There are 310 functions from set A to set B, where B contains 3 elements.
d. There are 510 functions from set A to set B, where B contains 5 elements.

5. How many one-to-one functions are there from a set with five elements to
sets with the following number of elements?
a. 4 d. 6 c. 5 d. 7
Solution:
For each part of this problem, we need to find the number of one-to-one functions
from a set with 5 elements to a set with k elements. To specify such a function, we
need to make 5 choices, in succession, namely the values of the function at each of
the 5 elements in its domain. Therefore the product rule applies. The first choice can
be made in k ways, since any element of the codomain can be the image of the first
element of the domain. After that choice has been made, there are only k - 1 elements
of the codomain available to be the image of the second element of the domain,
since images must be distinct for the function to be one-to-one.
Similarly, for the third element of the domain, there are k - 2 possible choices for a
function value. Continuing in this way, and applying the product rule, we see that
there are k(k - l)(k - 2)(k - 3)(k - 4) one-to-one functions from a set with 5 elements
to a set with k elements.
a. By the analysis above the answer is 4 · 3 · 2 · 1 · 0 = 0, what we would expect
since there are no one-to-one functions from a set to a strictly smaller set.
b. By the analysis above, the answer is 6 · 5 · 4 · 3 · 2 = 720.
c. By the analysis above, the answer is 5 · 4 · 3 · 2 · 1 = 120.
d. By the analysis above, the answer is 7 · 6 · 5 · 4 · 3 = 2520
6. Every student in a discrete mathematics class is either a computer science
or a mathematics major or is a joint major in these two subjects. How many
students are in the class if there are 38 computer science majors (including
joint majors), 23 mathematics majors (including joint majors), and 7 joint
majors?
Solution:
Let C be number of computer science major students
M be number of mathematics major students
We have n(C) =38, n(M)= 23. Then
By principle of inclusive exclusive
𝑛(𝐶 ∪ 𝑀) = 𝑛(𝐶) + 𝑛(𝑀) - 𝑛(𝐶 ∩ 𝑀)
= 38 + 23 – 7
= 54

7. How many positive integers not exceeding 100 are divisible


a. By 4? b. By 6? c. Either by 4 or by 6?
Solution:
Note: Floor function
Definition: For any x ∈ R we define
⌊ 𝑥 ⌋ = The greatest integer less than or equal to x. It is also called floor function.
Ceiling function
Definition: For any x ∈ R we define
⌈ 𝑥 ⌉ = The least (smallest) integer greater than or equal to x. It is also called ceiling
function
a. Let set A be number of positive integers not exceeding 100 that are divisible
by 4. Then
100
|𝐴| =⌊ ⌋ = 25, where ⌊ ⌋ is floor function
4
b. Let B be number of positive integers not exceeding 100 that are divisible by
6. Then
100
|𝐵| =⌊ ⌋ = ⌊16.666 … ⌋ = ⌊16. 6⌋ =16
6
c. To find number of positive integers not exceeding 100 that are divisible by
either by 4 or by 6, first let us evaluate number of positive integers not
exceeding 100 that are divisible by both 4 and 6.
We know that 4 = 22 and 6 = 2(3)
LCM(4, 6) =(22)(3) =12
100 100
|𝐴 ∩ 𝐵| =⌊ ⌋ = ⌊ 12 ⌋ = ⌊8.333 … ⌋ = ⌊8. 3⌋ = 8
𝐿𝐶𝑀(4,6)
Now, by principle of inclusive – exclusive, number of positive integers not
exceeding 100 that are divisible by either by 4 or by 6 is
|𝐴 ∪ 𝐵| = |𝐴| + |𝐵| - |𝐴 ∩ 𝐵|
= 25 + 16 – 8 = 33

8. Exercise
9. How many possibilities are there for the winning of first, second, and third
positions in a horse race with 12 horses if all orders of finish are possible?
Solution:
It is 3-permutation of 12 element set. So
12! 12(11)(10)9! 12(11)(10)
P(12, 3) = = = =210
3!(12−3)! 3!9! 3!

10. A professor writes 20 discrete mathematics true or false questions. Of the


statements in these questions, 8 questions are true. If the questions can be
positioned in any order, how many different answer keys are possible?
Solution:
This question is same as bit string question in which Total length of bit string is 20.
Of which 8 are 1's and 12 are 0's. So, by using permutations, we are having total
20 elements in which 8(TRUE) are of one kind and 12 are of other kind(FALSE).
20 20
So, the whole problem reduces to C(20, 8) = ( ) = ( )
8 12
11. Seven women and nine men are on the faculty in the mathematics
department at a school. How many ways are there to select a committee of
five members of the department if at least one woman must be on the
committee?
Solution:
There are 7 women and 9 men
Number of committee to be chosen =5
by principle of sum rule and product rule the number of ways to selecting the
committee in which at least one woman is in the committee is
7 9 7 9 7 9 7 9 7 9
( )( ) + ( )( ) + ( )( ) + ( )( ) + ( )( )
1 4 2 3 3 2 4 1 5 0
7! 9! 7! 9! 7! 9!
= [1!6!] [4!5!] + [2!5!] [3!6!] + [3!4!] [2!7!]
7! 9! 7! 9!
+ [4!3!] [1!8!] + [5!2!] [0!9!] = 4,242
This question can also be computed alternatively as
9+7 9 16 9 16! 9!
(
5
)-( )=( )-( )
5 5 5
= [5!11!] - [5!4!]
= 4,368 – 126 = 4,246
12. A collection of eight books consists of two books on artificial intelligence,
three books on operating systems, and three books on data structures.
13. An examination consists of 20 questions, of which the student must
answer any 12.
a. How many different ways can a student choose questions to answer?
b. The 20-question exam is split into three parts. There are 6 questions in the
first part, 10 in the second part, and 4 in the third part. A student must
choose three from the first part, eight from the second part, and one from the
third part. How many ways can a student choose questions to answer?
Solution:
17. How many permutations are there of the letters in the word “excellent”?
10!
Solution: =37,800
4!2!2!
21.
Twenty-one people are to be divided into two teams, the Red Team and the Blue
Team. There will be 10 people on Red Team and 11 people on Blue Team. In how
many ways can this be done?

21 21
Solution: ( ) = ( ) ways
10 10

a. The answer is just the number of different 12-element subsets of a 20-


element set, or C(20, 12) = 125,970.
b. By the Multiplication Principle, the answer will be the product of the number
of ways to make choices in each category:
(#possible choices) = (# Choices for part 1) • (# Choices for part 2).(#
Choices for part 3) = C(6, 3) . C(10, 8) . C(4, 1) = 3600

You might also like