Sol Assignment4-SetTheory

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Name: NIM: Class:

Solution to Assignment 4:
Elementary Set Theory
Mathematical Logic - A (MSH1B3)
First Term 2019-2020
Instructions:

1. This assignment is due Tuesday December 10, 2019 at 5:00 p.m.. Please submit your work at School
of Computing academic roster (roster akademik Fakultas Informatika), room A203A (building A room
A203A). Do not forget to write your identity on the space provided. You may submit this assignment as
of Monday December 9, 2019 at 8:00 a.m..

2. In order to prevent any academic misconduct, you also need to submit a readable scan or photograph of
this assignment to the provided submission slot in CeLoE. Please submit it in a .pdf file. Please contact
your class instructor for more detailed information. The due date of this online submission is the same
as the hardcopy. Please make sure that your file size do not exceed the maximum file size allowed.

3. Please upload your assignment to the CeLoE under the file name: A4-<student ID>.pdf, for
example: A4-1301198888.pdf.

4. To save paper, you may print and reproduce this assignment on both sides of a paper.

5. Your answers should be handwritten. You may use: HB or 2B pencil, or pen with blue or black ink.

6. All problems in this assignment are adapted from the textbooks. The problems are written in English.
If you are a student in a regular class, you may answer the problems in Bahasa Indonesia. However,
if you are a student in international class, your answers must be written in English—otherwise your
assignment will not be graded. You may ask your class instructor or teaching assistant for helping you
understanding the problem, but you should not ask them to give the solution of any problem.

7. Write your solutions on the space provided. If you need more space, you may use additional A4 papers
and attach them to your assignment.

8. Be neat and write legibly. You will be graded not only on the correctness of your answers, but also on
the clarity with which you express them.

9. This assignment consists of 10 problems, each problem is worth 10 points.

10. Please retain yourself from copying answers from elsewhere without understanding the steps. This
assignment is an individual evaluation.

11. Important: late submission without reasonable explanation will not be graded.

page 1 of 11
Problem 1 Rewrite each of these sets by listing all of its members. Write the set carefully, no partial credits
for wrong answer or wrong notation.

(a). [2 points] A = x 2 Z : x2 + 2x 24 = 0 .

(b). [2 points] B = fx 2 Z : x divides 6g.

(c). [2 points] C = fx 2 N : x is a prime factor of 2310g.

(d). [2 points] D = x 2 Z>0 : (x < 100) ^ x = y 3 , for some y 2 Z .

(e). [2 points] E = x 2 Z : 4x2 1=0 .

S OLUTION :

(a). A = f 6; 4g, since x2 + 2x 24 = 0 if and only if (x + 6) (x 4) = 0, thus x = 6 or x = 4.

(b). B = f 6; 3; 2; 1; 1; 2; 3; 6g, since the integer that divides 6 are 1, 2, 3, and 6.

(c). C = f2; 3; 5; 7; 11g, since 2310 = 2 3 5 7 11.

(d). D = f1; 8; 27; 64g, since 1 = 13 , 8 = 23 , 27 = 33 , and 64 = 43 .


1
(e). E = ;, since there is no integer x satisfying 4x2 1 = 0 (the solution is x = 2 62 Z).

page 2 of 11
Name: NIM: Class:

Problem 2 For each of the following numbers, put a X in the corresponding column if that number belong
to the associated set. Part (a) is an example. No partial credits for wrong answer. (Note: you do not need
to provide argument/justification for your answer. All logarithms and exponents are considered over real
numbers.)
Part [1 point] Number N N0 Z Q R C
(a). 1 23 X X X
300
(b).
q 4
2
(c). ( 3)
p
(d). 32
(e). x that satisfies 3x = 2x
x
(f). x that satisfies ( 4) = 1024
x
(g). x that satisfies 9 = 27
(h). x that satisfies 9x2 1=0
(i). x that satisfies x2 + 2x + 5 = 0
(j). x that satisfies 3x = 8
(k). x that satisfies 4x2 + 1 = 0

S OLUTION :
Part Number N N0 Z Q R C
(a). 1 23 X X X
(b). 300
X X X X
q 4
X X X X X X
2
(c). ( 3)
p
(d). 32 X
(e). x
x that satisfies 3 = 2 x
X X X X X
X X X X X X
x
(f). x that satisfies ( 4) = 1024
(g). x that satisfies 9x = 27 X X X
(h). x that satisfies 9x 2
1=0 X X X
(i). 2
x that satisfies x + 2x + 5 = 0 X
(j). x that satisfies 3x = 8 X X
(k). 2
x that satisfies 4x + 1 = 0 X

page 3 of 11
Problem 3 Determine whether each of these statements is true or false, provide a concise explanation.

(a). [2 points] 0 2 ;.

(b). [2 points] ; 2 f0g.

(c). [2 points] ; f0g.

(d). [2 points] f0g f0g.

(e). [2 points] f;g f;g.

S OLUTION :

(a). False, because ; does not have any element.

(b). False, because f0g only contains one element, i.e., 0.

(c). True, because ; is the subset of any set, ; f0g, and ; =


6 f0g.

(d). False, f0g = f0g and f0g f0g, therefore f0g f0g.

(e). True, because f;g is a subset of itself.

page 4 of 11
Name: NIM: Class:

Problem 4 Determine the power set of each of these sets, where x, y, and z are distinct elements.

(a). [2 points] A = fxg.

(b). [2 points] B = fx; yg.

(c). [2 points] C = f;; xg.

(d). [2 points] D = f;; f;gg.

(e). [2 points] E = fx; y; zg.

S OLUTION :

(a). P (A) = P (fxg) = f;; fxgg.

(b). P (B) = P (fx; yg) = f;; fxg ; fyg ; fx; ygg.

(c). P (C) = P (f;; xg) = f;; f;g ; fxg ; f;; xgg.

(d). P (D) = P (;; f;g) = f;; f;g ; ff;gg ; f;; f;ggg.

(e). P (E) = P (fx; y; zg) = f;; fxg ; fyg ; fzg ; fx; yg ; fx; zg ; fy; zg ; fx; y; zgg.

page 5 of 11
Problem 5 Determine the cardinality of each of the following sets, where P (X) denotes the power set of
the set X.

(a). [2 points] P (fxg).

(b). [2 points] P (fx; fx; ygg).

(c). [2 points] P (fx; y; fx; ygg).

(d). [2 points] P (f;; x; fxg ; ffxggg).

(e). [2 points] P (P (;)).

S OLUTION : We will use the fact that for any finite set X, the cardinality of P (X) is 2jXj .

(a). jP (fxg)j = 21 = 2, because jfxgj = 1.

(b). jP (fx; fx; ygg)j = 22 = 4, because jfx; fx; yggj = 2.

(c). jP (fx; y; fx; ygg)j = 23 = 8, because jfx; y; fx; yggj = 3.

(d). jP (f;; x; fxg ; ffxggg)j = 24 = 16, because jf;; x; fxg ; ffxgggj = 4.

(e). jP (P (;))j = 21 = 2, because P (;) = f;g and jP (;)j = 1.

page 6 of 11
Name: NIM: Class:

Problem 6 Given a universal set U = fx 2 Z j 1 x 10g, and the sets A, B, and C as follows

A = fx 2 U j x is a factor of 24g ,
B = fx 2 U j x is divisible by 3g , and
C = fx 2 U j x is a prime numberg ,

rewrite each of these sets by listing all of its members.

(a). [2 points] A [ B [ C

(b). [2 points] A \ B \ C

(c). [2 points] A B,

(d). [2 points] B r C, where r denotes the set difference operation

(e). [2 points] P (B r C), where P (X) denotes the power set of a set X

S OLUTION : We have A = f1; 2; 3; 4; 6; 8g, B = f3; 6; 9g, and C = f2; 3; 5; 7g.

(a). A [ B [ C = f1; 2; 3; 4; 6; 8g [ f3; 6; 9g [ f2; 3; 5; 7g = f1; 2; 3; 4; 5; 6; 7; 8; 9g.

(b). A \ B \ C = f1; 2; 3; 4; 6; 8g \ f3; 6; 9g \ f2; 3; 5; 7g = f3g.

(c). A B = f1; 2; 3; 4; 6; 8g f3; 6; 9g = f1; 2; 4; 8; 9g.

(d). B r C = f3; 6; 9g r f2; 3; 5; 7g = f6; 9g.

(e). P (B r C) = P (f6; 9g) = f;; f6g ; f9g ; f6; 9gg.

page 7 of 11
Problem 7 Given the universal set U = fa; b; c; d; e; f g, a set A = fa; b; c; dg, a set B = fb; c; d; eg, and
a set C = fa; b; c; eg. Determine:

(a). [2 points] A [ B [ C
C
(b). [2 points] (A \ B \ C) , where X C denotes the complement of a set X with respect to the universal
set U .

(c). [2 points] (A r B) r C, where X r Y denotes the difference of X and Y .

(d). [2 points] A r (B r C).

(e). [2 points] (A B) C, where X Y is defined as a set (X [ Y ) r (X \ Y ).

S OLUTION :

(a). A [ B [ C = fa; b; c; dg [ fb; c; d; eg [ fa; b; c; eg = fa; b; c; d; eg.


C C
(b). A\B\C = fa; b; c; dg\fb; c; d; eg\fa; b; c; eg = fb; cg. Therefore (A \ B \ C) = (fb; cg) =
U r fb; cg = fa; d; e; f g.

(c). A r B = fa; b; c; dg r fb; c; d; eg = fag, hence (A r B) r C = fag r fa; b; c; eg = ;.

(d). B r C = fb; c; d; eg r fa; b; c; eg = fdg, hence A r (B r C) = fa; b; c; dg r fdg = fa; b; cg.

(e). A B = fa; b; c; dg fb; c; d; eg = fa; eg, hence (A B) C = fa; eg fa; b; c; eg = fb; cg.

page 8 of 11
Name: NIM: Class:

Problem 8 Given the universal set N, for every non-negative integer k, a set Ak is defined as

Ak = f2k; 2k + 2; 2k + 4; :::g , for k 2 N

and a set Bk is defined as


Bk = f1; 2; : : : ; kg , for k 2 N.

Determine the following sets:

S
2020
(a). [2.5 points] Ak
k=1

T
2020
(b). [2.5 points] Ak
k=1

S
2020
(c). [2.5 points] Bk
k=1

T
2020
(d). [2.5 points] Bk
k=1

S OLUTION : For the set Ak , observe that Ak = fn 2 N : n is even and n 2kg. For all n; k 2 N we
have

if n 2k + 2 then n 2k , thus
if n 2 Ak+1 then n 2 Ak , hence
Ak+1 Ak .

Furthermore Ak+1 Ak since 2k 2 Ak but 2k 62 Ak+1 . From these results we get Ak [ Ak+1 = Ak
and Ak \ Ak+1 = Ak+1 for every k 2 N.
For the set Bk , observe that Bk = fn 2 N : n kg. For all n; k 2 N we have

if n k then n k + 1 , thus
if n 2 Bk then n 2 Bk+1 , hence
Bk Bk+1 .

Furthermore Bk Bk+1 since k +1 2 Bk+1 but k +1 62 Bk . From these results we get Bk [Bk+1 =
Bk+1 and Bk \ Bk+1 = Bk for every k 2 N.

S
2020
(a). Ak = A1 [ A2 [ [ A2020 = A1 = f2; 4; 6; : : :g = fx 2 N : x is eveng, because
k=1
A1 A2 A2020 .
T
2020
(b). Ak = A1 \A2 \ \A2020 = A2020 = f4040; 4042; 4044; : : :g = fx 2 N : x 4040 and x is eveng,
k=1
because A1 A2 A2020 .
S
2020
(c). Bk = B1 [ B2 [ [ B2020 = B2020 = f1; 2; : : : ; 2020g = fx 2 N : x 2020g, because
k=1
B1 B2 B2020 .
T
2020
(d). Bk = B1 \ B2 \ \ B2020 = B1 = f1g, because B1 B2 B2020 .
k=1

page 9 of 11
Problem 9 A computer company receives 218 applications for programmer position. Suppose that 128 of
these applicants know C++, 117 know Python, and 85 applicants know C++ but do not know about Python
at all. How many of these applicants that neither know C++ nor Python?

S OLUTION : Suppose

U = fx : x is an applicants for a jobg ,


C = fx 2 U : x knows C++g ,
P = fx 2 U : x knows Pythong .

From the information in the problem we have

jU j = 218, jCj = 128, jP j = 117, jC r P j = 85.

C
The number of applicants that are neither know C++ nor Python is represented by (C [ P ) .
First, we determine jC [ P j. By inclusion-exclusion principle for two sets, we have

jC [ P j = jCj + jP j jC \ P j
= 128 + 117 jC \ P j .

For determining jC \ P j, we observe that jC r P j = jC r (C \ P )j = jCj jC \ P j. Since


jC r P j = 85 and jCj = 128, we obtain

jC r P j = jCj jC \ P j
jC \ P j = jCj jC r P j = 128 85 = 43.

Therefore, we get

jC [ P j = jCj + jP j jC \ P j
= 128 + 117 43 = 202,

so

C
(C [ P ) = jU r (C [ P )j = jU j jC [ P j

= 218 202 = 16.

page 10 of 11
Name: NIM: Class:

Problem 10 There are 2504 computer science students at a school. Of these, 1876 have taken a course in
Java, 999 have taken a course in Pascal, and 345 have taken a course in C. Further, 876 have taken courses
in both Java and Pascal, 231 have taken courses in both Pascal and C, and 290 have taken courses in both
Java and C. If 189 of these students have taken courses in Pascal, Java, and C, how many of these 2504
students have not taken a course in any of these three programming languages?

S OLUTION : Suppose

U = fx : x is a computer science students at a schoolg ,


J = fx 2 U : x have taken a course in Javag ,
P = fx 2 U : x have taken a course in Pascalg ,
C = fx 2 U : x have taken a course in Cg .

From the information in the problem we have

jU j = 2405 jJ \ P j = 876
jJj = 1876 jP \ Cj = 231
and
jP j = 999 jJ \ Cj = 290
jCj = 345 jJ \ P \ Cj = 189

The number of students that have not taken a course in any of these three programming lan-
C
guages is represented by (J [ P [ C) . First, we determine jJ [ P [ Cj. By inclusion-exclusion
principle for three sets, we have

jJ [ P [ Cj = jJj + jP j + jCj (jJ \ P j + jP \ Cj + jJ \ Cj) + jJ \ P \ Cj


= 1876 + 999 + 345 (876 + 231 + 290) + 189
= 2012, thus
C
(J [ P [ C) = jU r (J [ P [ C)j = jU j jJ [ P [ Cj

= 2504 2012 = 492.

page 11 of 11

You might also like