Back - Solutions Index | Next - Exercise 2 - Functions


Solutions to Exercise 1 - Sets

 

Question 1

F == {J,O,S,E,P,H}

S == {B,L,O,G,S}

H == {S,T,R,A,N,O,C,U,M}

 

Question 2

M == {5,9,3,2,1,0,6}

P == {B,T,5,4,2,D,J}

 

Question 3

I == {O,S}

U == {B,L,O,G,S,T,R,A,N,C,U,M}

D1 == {T,R,A,N,C,U,M}

D2 == {J,E,P,H}

D1 ´ D2 = {(T,J), (T,E), (T,P), (T,H), (R,J), (R,E), (R,P), (R,H), (A,J), (A,E), (A,P), (A,H), (N,J), (N,E), (N,P), (N,H), (C,J), (C,E), (C,P), (C,H), (U,J), (U,E), (U,P), (U,H), (M,J), (M,E), (M,P), (M,H)}

# ˆS = 16

# {F ´ H ´ M} = 378

# (ˆ {I ´ P}) = 16384

 

Question 4

Birthday == (7,4,80)

from which the given predicate is

(false ™ true) ˜ (‰ true)

i.e. false

 

Question 5

alert Û waiting ™ practice

teaching ™ practice ΄ alert

teaching ™ practice ™ ‰ waiting

By substituting statement two in statement three, we have alert Ù Ø waiting, substituting for alert from statement one, we now have waiting Ù practice Ù Ø waiting or (waiting Ù Ø waiting) Ù practice, which includes an inconsistency in terms of waiting.

 

Question 6

There are two types of users : normal users and system users.

The latter have extra privileges.

Each user owns a number of files.

These are stored in the file store of a computer.

Each normal user can own upt to 50 files while a system user can own up to 100 files.

 

Question 7

{n:÷ | (2000 ó n ó 2100) ™ ((n mod 4 = 0 ™ n mod 100 ² 0) ˜ (n mod 400 = 0))}