You are on page 1of 7

CS 205 Quiz #4B Oct 11, 2012

NAME: ____________________________SOLUTIONS____________________________________

RUID:___________________________________________________________________________

Electronic Devices are not permitted during the quiz. These include but are not restricted to calculators,
computers and cell phones.
No communication between students or anyone outside of class is permitted during the quiz.
Textbooks, notes and any other written materials are not permitted during the quiz.

DO NOT OPEN UNTIL


INSTRUCTED TO DO SO

1. For each of the following statements, provide the cardinality of the result.
____4______

a)

{ 1, 2, 3, 3, 4 }

1 point per blank

= { 1, 2, 3, 4 }
____3______

b)

{ 1, 2, , }
= { 1, 2, }

____0______

c)

{ 1, 2, , }
=

____3______

d)

{ 1, 2, , } -
= { 1, 2, }

____0______

e)

{ , { } }
=

____2______

f)

{ } { { } }
= { , { } }

____1______

g)

{ } { }
=

____1______

h)

{ 1, 1 } { 3, 3 }
=

____8______

i)

{ (,) }

{ 1 } { 3 } =

{ (1,3) }

( { 1, 2 } { 3, 4 } ) { 5, 6 }
Cardinality = (2 x 2) x 2

____0______

j)

____4______

k)

({ 1, 2 } { 3, 4 }) ({ 3, 4 } { 2, 1 })
= { 1, 2 } { 3, 4 }

____8______

l)

Cardinality = 2 x 2

({ 1, 2 } { 3, 4 }) ({ 3, 4 } { 2, 1 })

Cardinality = 2 x 2 + 2 x 2

(each tuple is distinct)

2. For each of the following statements, provide the cardinality of the result.
____4______

a)

P( { 1, 2 } )
Cardinality = 2 ^ 2

____1______

b)

P( ) P( { 1 } )
= P( )

____2______

c)

d)

Cardinality = 2 ^ 0

P( ) P( { 1 } )
= P( { 1 } )

____1______

1 point per blank

Cardinality = 2 ^ 1

P( { } ) P( { 1 } )
= { }

____3______

e)

P( { } ) P( { 1 } )
= { , {}, {1} }

____1______

f)

P( { { } } ) P( { 1 } )
= { }

____3______

g)

P( { { } } ) P( { 1 } )
= { , {{}}, {1} }

____8______

h)

P( { 1, 2 } { 3 } )
Cardinality = 2 ^ 3

____5______

i)

P( { 1, 2 } ) P( { 3 } )
= { , {1}, {2}, {1,2}, {3} }

___16______

j)

P( { 1, 2 } P({ 3 }) )
= P( { , {1}, {2}, {3} } => 24

____2______

k)

P( { 1, 2, 3, 4, 5 } ) P( { 5, 6, 7, 8, 9 } )
= { , {5} }

____62_____

l)

P( { 1, 2, 3, 4, 5 } ) P( { 5, 6, 7, 8, 9 } )

Cardinality = 2 ^ 5 + 2 ^ 5 2
(minus 2 for sets common to both power sets)

3. For each of the following statements, provide the cardinality of the result.
____8______

a)

P( { 1, 2 } { 3, 4 } )

1 point per blank

Cardinality = 2 ^ (2 x 2)
__4096_____

b)

P( ({ 1, 2 } { 3, 4 }) { 5, 6, 7 } )
Cardinality = 2 ^ ((2 x 2) x 3)

__4096_____

c)

P( { 1, 2 } ({ 3, 4 } { 5, 6, 7 }) )
Cardinality = 2 ^ ((2 x 2) x 3)

____0______

d)

P( { 1, 2, 3 } ) - P( { 1, 2, 3, 4, 5} )
=

___24______

e)

P( { 1, 2, 3, 4, 5} ) - P( { 1, 2, 3 } )
Cardinality = 2 ^ 5 2 ^ 3

____1______

f)

P( P( ) - P( ) )
= P( )

___16______

g)

P( P( P( P ( ) ) ) )
Cardinality = 2 ^ ( 2 ^ ( 2 ^ ( 2 ^ 0)))

____2______

h)

P( P( ) P( ) )
= { , { } }

____2______

i)

P( P( ) P( ) )
= { , { (,) } }

____1______

j)

P( (P( ) P( )) )
= P( )

____0______

k)

P((P( ) P( )))
=

__1024_____

l)

P( { 1, 2, 3, 4, 5 } { 6, 7, 8, 9, 10 } )
Cardinality = 2 ^ 10

4. Suppose we have the following sets:


A
B
C
D
E

=
=
=
=
=

{
{
{
{

1,
1,
2,
1,

2 points per part

1, 2, 2 }
2, 3, 4 }
3, 4 }
2 }

Provide all combinations of sets for which the following statements are true, where Si denotes
a set. Do not use a set more than once in a single combination.
Example:
Question: S1 { 1 , 2 } = S2
Answer: S1 = A, S2 = D
S1 = B, S2 = D
*Note that we cannot have S1 = D, S2 = D because it would mean we used D more than once.
If no solutions exist, write None.
a) S1 { 1 } = S2
S1 = A, S2 = D
S1 = D, S2 = A
S1 = C, S2 = B

b) S1 { 4 } = S2
S1 = A, S2 = E
S1 = D, S2 = E

c) S1 { 1 , 4 } = S2 { 1 , 4 } and S1 { 1 , 4 } = S2 { 1 , 4 }
S1 = A, S2 = D
S1 = D, S2 = A
(As seen in recitation, this is equivalent to S1 = S2)

5. Find the sets A and B if A B = { 3, 6, 9 }, B A = { 2, 10 }, and


A B = { 1, 5, 7, 8 }. If the answer cannot be determined, write insufficient
information.

A = (A B) (A B) = { 1, 3, 5, 6, 7, 8, 9 }

B = (B A) (A B) = { 2, 3, 6, 9, 10 }

3 points possible

6. Find the sets A and B if A (B A) = { 3, 5, 8 }, and


B (A B) = .
If the answer cannot be determined, write insufficient information.

A = A (B A) = { 3, 5, 8 }

B = B (A B) =

3 points possible

7. Suppose

= { 0, 1, 2, ..., i-1, i }.

3 points per part

a) Find

{ 0, 1, 2 }

b) Find
=
{ 0, 1, 2, 3, 4, 5 }

8. Let the universe consist of positive integers less than or equal to 5. Suppose
and
= { 3, 4 }. Provide the cardinality of the following:
____3______

a)

1 point per blank


{ 1, 2, 5 }

____3______

b)

{ 1, 2, 3 }
____1______

c)

{ 5 }

____4______

d)

{ 1, 2, 4, 5 }

____5______

e)

{ 1, 2, 3, 4, 5 }

____1______

= { 1, 2, 3 }

f)
{ 5 }

You might also like