You are on page 1of 3

Question 4

a) Using a computer, there are different ways to represent sets. Modern


programming languages, like JAVA, have the collection class predefined to
represent the set. We need to insert the set elements in such a class and
different class operations are defined on the set for the algebraic operations.
b)
i. {1,2,3,4,7,8,9,10}
ii. {2,4,5,6,7
iii. {1,10}

Question 5

a) p: “The diagnostic message is stored in the buffer”


q: “The diagnostic message is retransmitted”
“The diagnostic message is stored in the buffer or it is retransmitted”
pq
“The diagnostic message is not stored in the buffer”
p
“If the diagnostic message is stored in the buffer, then it is
retransmitted”
pq
“The diagnostic message is not retransmitted”
q

p q pq p pq q

F F F T T T
F T T T T F
T F T F F T
T T T F T F

The system specifications are inconsistent.

b) p: “The router can send packets to the edge system”


q: “The router supports the new address space.”
r: “The latest software release is installed.”
“The router can send packets to the edge system only if it supports the new
address space.

pq

“For the router to support the new address space it is necessary that the latest
software release be installed.”

qr

“The router can send packets to the edge system if the latest software release
in installed.”

rp

“The router does not support the new address space.”

q

p q r pq qr rp q


T T T T T T F
T T F T F T F
T F T F T T T
T F F F T T T
F T T T T F F
F T F T F T F
F F T T T F T
F F F T T T T

The system specifications are consistent.

c) p: “The system software is being upgraded.”


q: “User can access the file system.”
r: “User can save new files.”

“Whenever the system software is being upgraded, users cannot access the
file system.”

pq
“If users can access the file system, then they can save new files.”

qr

“If users cannot save new files, then the system software is not being
upgraded.

r  p

p q r p q r pq qr r  p

T T T F F T F T F
T T F F F F F F T
T F T F T T T T F
T F F F T F T T T
F T T T F T T T T
F T F T F F T F T
F F T T T T T T T
F F F T T F T T T

The system specifications are consistent.

Question 6

a) f(x) = -3x2 + 7

The function is not a bijection.

The function is not injective because it can have the same value for f(x) given
two different x values. f(2)= -3(2)2 +7 = -5 and f(2)= -3(-2)2 +7 = -5

The function is also not surjective because of the range, −3x2 ≤ 0, f(x) ≤ 7; it
has a maximum value of 7 and it does not map to any real number > 7.

𝑥+1
b) 𝑓(𝑥) = 𝑥 + 2

The function is not a bijection from R to R because it is not defined at −2 and


𝑥+1
there is no real number such as 𝑓(𝑥) = 𝑥 + 2 = 1.

You might also like