Download 13.07.2011 - Erwin Sitompul

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Lecture 11
EXERCISES
Discrete Mathematics
Dr.-Ing. Erwin Sitompul
http://zitompul.wordpress.com
Homework 10, No.1
Take a look at the graphs (a), (b), and (c).
Determine whether each graph is an Eulerian graph, semiEulerian graph, Hamiltonian graph, or semi-Hamiltonian graph.
Give enough explanation to your answer.
Erwin Sitompul
Discrete Mathematics
11/2
Solution of Homework 10
 There are two vertices of odd degree, the
others are of even degree  Euler path.
 Euler path must starts from one vertex of odd
degree and finish at the other vertex of odd
degree.
 It can also be proven that graph (a) contains
a Hamilton circuit.
 All vertices have even degree Euler
circuit.
 Graph (b) contains Hamilton path, i.e., from
down left vertex to top left vertex, or the
opposite way around.
Erwin Sitompul
Discrete Mathematics
11/3
Solution of Homework 10
 There are more than two vertices of odd
degree graph (c) does not contain either
Euler path or Euler circuit.
 Graph (c) contains Hamilton circuit.
Erwin Sitompul
Discrete Mathematics
11/4
Homework 10, No.2
A department has six task forces. Every task force conducts a
routine monthly meeting. The member of the six task forces
are:
TF1 = {Amir, Budi, Yanti}
TF2 = {Budi, Hasan, Tommy}
TF3 = {Amir, Tommy, Yanti}
TF4 = {Hasan, Tommy, Yanti}
TF5 = {Amir, Budi}
TF6 = {Budi, Tommy, Yanti}
(a) What is the minimum number of time slots that must be
allocated so that everyone that belong to more than one
task force can attend the meetings that he/she must join
without any time conflict?
(b) Draw the graph that represents this problem and explain
what do a vertex and an edge represent.
Erwin Sitompul
Discrete Mathematics
11/5
Solution of Homework 10
TF1 = { Amir, Budi, Yanti }
TF2 = { Budi, Hasan, Tommy }
TF3 = { Amir, Tommy, Yanti }
TF4 = { Hasan, Tommy, Yanti }
TF5 = { Amir, Budi }
TF6 = { Budi, Tommy, Yanti }
Schedule 1
TF1
Schedule 2
TF2
Schedule 3
TF3
TF6
Schedule 5
Amir
Budi
Yanti
Hasan
Tommy
TF1
1
1
1
0
0
TF2
0
1
0
1
1
TF3
1
0
1
0
1
TF4
0
0
1
1
1
TF5
1
1
0
0
0
TF6
0
1
1
0
1
Erwin Sitompul
TF4
Schedule 4
TF5
Schedule 4
vertex task force
edge  someone is a
member of two task
forces at the same time
Discrete Mathematics
11/6
Exercise 1
Substitute the following switch circuit with a simpler equivalent
circuit.
Solution:
The switch circuit above can be expressed by the following
logical notation:
(AB’)  (AB)  C
(AB’)  (AB)  C = ((AB’)  (AB))  C Associative Law
= (A(B’B))  C
Distributive Law
= (AT)  C
Negation Law
=AC
Identity Law
Erwin Sitompul
Discrete Mathematics
11/7
Exercise 2
Three best friends, Amir, Budi, and Cora are talking about the
grades that Dudi got in the last semester.
Amir says, “Dudi got at least four A’s.”
Budi says, ”No, Dudi got less than four A’s.”
“I think,” Cora says, “Dudi got at least 1 A”
If only one of the three best friends said the truth, how many A’s
did Dudi get?
Solution:
If Amir said the truth, then Cora should also say the truth.
If Cora said the truth, then Amir or Budi should say the truth
also.
Thus, only Budi said the truth while Amir and Cora did not say
the truth (“Dudi got less than four A’s.”).
The answer: Dudi did not got any A.
Erwin Sitompul
Discrete Mathematics
11/8
Exercise 3
Prove that (X – Y) – Z = X – (Y  Z)
Solution:
(X – Y) – Z
Erwin Sitompul
= (X – Y)  Z’
= X  Y’  Z’
= X  (Y’  Z’)
= X  (Y  Z)’
= X – (Y  Z)
Definition of Difference
Definition of Difference
Associative Law
De Morgan’s Law
Definition of Difference
Discrete Mathematics
11/9
Exercise 4
By using the Inclusion-Exclusion Principle, determine the
number of positive integers ≤ 300 divisible by 2 or 3.
Solution:
Suppose
U = Set of positive integers ≤ 300,
A = Set of positive integers ≤ 300 divisible by 2,
B = Set of positive integers ≤ 300 divisible by 3.
Then
A  B = Set of positive integers ≤ 300 divisible by 2 and 3,
A  B = Set of positive integers ≤ 300 divisible by 2 or 3.
A = 300/2 = 150
B = 300/3 = 100
A  B = 300/6 = 50  divisible by 2 and 3 ≡ divisible by 6
A  B = A + B – A  B
= 150 + 100 – 50
= 200
Erwin Sitompul
Discrete Mathematics
11/10
Exercise 5
Determine whether the following relations are reflexive,
transitive, symmetric, or anti-symetric:
a) “The sister of”
b) “The father of”
c) “Having the same parents as”
Solution:
a) “The sister of”
Not reflexive  One cannot be the sister of him/herself.
Not transitive  If X is the sister of Y, and Y is the sister of
Z, it does not mean that X is the sister of Z (counting step
sister as a sister).
Not symmetric  X is the sister of Y, Y does not have to be
the sister of X, since Y can be the brother of X.
Not anti-symmetric  It can occur that X is the sister of Y,
and Y is the sister of X, while X ≠ Y.
Erwin Sitompul
Discrete Mathematics
11/11
Exercise 5
Determine whether the following relations are reflexive,
transitive, symmetric, or anti-symetric:
a) “The sister of”
b) “The father of”
c) “Having the same parents as”
Solution:
b) “The father of”
Not reflexive  One cannot be the father of him/herself.
Not transitive  If X is the father of Y, and Y is the father of
Z, then X is the grandfather of Z.
Not symmetric  If X is the father of Y, then it is impossible
for Y to be the father of X.
Anti-symmetric  No violation against the rule.
Erwin Sitompul
Discrete Mathematics
11/12
Exercise 5
Determine whether the following relations are reflexive,
transitive, symmetric, or anti-symetric:
a) “The sister of”
b) “The father of”
c) “Having the same parents as”
Solution:
c) “Having the same parents as”
Reflexive  Although sounds strange, it is true.
Transitive  If X R Y, and Y R Z, then X R Z.
Symmetric  X R Y, then Y R X.
Not anti-symmetric  X R Y, and Y R X, while X ≠ Y
Erwin Sitompul
Discrete Mathematics
11/13
Exercise 6
Prove that 89 and 55 are relatively prime.
Solution:
89
55
34
21
13
8
5
3
= 155 + 34
= 134 + 21
= 121 + 13
= 113 + 8
= 18 + 5
= 15 + 3
= 13 + 2
= 12 + 1
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
89 and 55 are relatively prime because their GCD(89,55) =1.
Erwin Sitompul
Discrete Mathematics
11/14
Exercise 7
Determine one pair of integers (u,v) which is the solution for
89u + 55v = 8.
Solution:
89
55
34
21
= 155 + 34
= 134 + 21
= 121 + 13
= 113 + 8
(1)
(2)
(3)
(4)
(4)
(3)
8 = 21 – 113
13 = 34 – 121
(5)
(6)
(6)(5)
8 = 21 – 1(34 – 121)
8 = 221 – 34
(7)
(2)
(8)(7)
21 = 55 – 134
(8)
8 = 221 – 34
8 = 2(55 – 134) – 34
8 = 255 – 334
(9)
Erwin Sitompul
Discrete Mathematics
11/15
Exercise 7
Determine one pair of integers (u,v) which is the solution for
89u + 55v = 8.
Solution:
89
55
34
21
= 155 + 34
= 134 + 21
= 121 + 13
= 113 + 8
(1)
(2)
(3)
(4)
8 = 255 – 334
(9)
(1)
34 = 89 – 155
(10)
(10)(9) 8 = 255 – 334
8 = 255 – 3(89 – 155)
8 = 555 – 389
Thus, one possible pair of integers (u,v) as the solution of the
linear combination is (–3,5).
Erwin Sitompul
Discrete Mathematics
11/16
Exercise 8
The ISBN code of a printed book is ISBN-13: 978-051A0B2934.
If B mod A = 2, determine A and B.
Solution:
Processing the first 12 numbers of the code:
91 + 73 + 81 + 03 + 51 + 13 +
A1 + 03 + B1 + 23 + 91 + 33 = 70 + A + B.
Including the check digit (the 13th number):
70 + A + B + 4  0 (mod 10)
74 + A + B  0 (mod 10)
A + B = {6,16,26,36,…}
While
B mod A = 2
Possible combinations for (A,B) are
(3,5), (4,6), (5,7), (6,8), (7,9), and (3,8).
The combination that fulfills the condition is: A = 7 and B = 9,
where A + B = 16.
Erwin Sitompul
Discrete Mathematics
11/17
Exercise 9
The fixed-line phone numbers in one region consist of 8 digits.
The first digit may not be 0 or 1.
(a) How many possible phone numbers are there in the
region?
(b) How many phone numbers have no 0?
(c) How many phone numbers have at least one 0?
Solution:
(a) 810101010101010 = 80.000.000 phone numbers.
(b) 89999999 = 38.263.752 phone numbers.
(c) Phone numbers with at least one 0
= Possible phone numbers –
Phone numbers without any 0
= 41.736.248 phone numbers.
Erwin Sitompul
Discrete Mathematics
11/18
Exercise 10
(a) Determine the number of ways a president can fill the
position of Foreign Minister, Minister for Internal Affairs,
Defense Minister, and Secretary of State, out of 45
candidates that he has?.
(b) In how many ways can you choose 4 pails of wall paint out
of 45 pails of wall paint, each with different colors?
Solution:
(a)
45!
 3.575.880 ways
P(45, 4) 
(45  4)!
(b) C (45, 4) 
Erwin Sitompul
45!
 148.995 ways
(45  4)!4!
Discrete Mathematics
11/19
Exercise 11
Persib Bandung conducts a preparation training center with 16
players for the next Indonesian Super League season. The
players are requested to choose 5 people among them to
become the member of team council for occasional
negotiations with the management.
(a) In how many ways can the players choose their team
council?
(b) If 7 of the 16 players are young and below 23 years old, in
how many ways can the team council be elected if there
are 2 young players in the council?
Solution:
(a) C (16,5) 
16!
 4.368 ways
(16  5)!5!
7!
9!
 1.764 ways
(b) C (7, 2)  C (9,3) 

(7  2)!2! (9  3)!3!
Erwin Sitompul
Discrete Mathematics
11/20
End of the Lecture
Erwin Sitompul
Discrete Mathematics
11/21
Related documents