Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

Welcome to All Test Answers

Key Concepts in Computer Science -Assignment 6

1) [4 marks] Suppose that A = {2, 4, 7}, B = {2, 7}, C = {4, 7}, and D = {4, 6, 9}. Determine which of these sets are subsets of which other of these sets.
 B ⊆ A
 C ⊆ A
2) [4 marks] What is the cardinality of each of these sets?
a) ∅ cardinality is zero
b) {∅} cardinality is one
c) {∅, {∅}} cardinality is two
d) {∅, {∅}, {∅, {∅}}} cardinality is three
3) [6 marks] Let A = {e, g, f}, B = {x, y}, and C = {2, 3}. Find
a) A × B × C
A × B × C = { (e,x,2) , (e,x,3) , (e,y,2) , (e,y,3) , (g,x,2) , (g,x,3) , (g,y,2) , (g,y,3) , (f,x,2) , (f,x,3) , (f,y,2) , (f,y,3) }
b) C × B × C = { (2,x,2), (2,x,3), (2,y,2), (2,y,3), (3,x,2), (3,x,3), (3,y,2), (3,y,3) }
4) [6 marks] Find the truth set of each of these predicates where the domain is the set of integers.
a) P(x) : x3 ≥ 1
The truth set is {1, 2, 3, 4, ….} (all positive integers larger than or equal to one)
b) Q(x) : x2 = 2
The truth set is empty ({}) since no integer satisfies the equation.
c) R(x) : x ≤ x2
The truth set is {…, -4, -3, -2, -1, 0, 1, 2, 3, 4, ….} (all integers)
5) [4 marks] Let A = {a, b, c, d, e} and B = {a, b, c, d, e, f, g, h}. Find:
a) A ∪ B { a, b, c, d, e, f, g, h}
b) A ∩ B {a, b, c, d, e}
c) A − B {}
d) B – A { f, g, h}
6) [6 marks] Let A and B be sets. Show that:
a) A ∩ B ⊆ A
For any x ∈ A ∩ B, x ∈ A and x ∈ B, Therefore, any such x is in A. A ∩ B ⊆ A.
b) A ⊆ (A ∪ B)
If x ∈ A, then x ∈ (A ∪ B). This comes from the definition of union.

About

Leave a reply

Captcha Click on image to update the captcha .

error: Content is protected !!