a) Let set A be the bit strings of length 8 beginning with two 0s:
∣A∣=1⋅1⋅2⋅2⋅2⋅2⋅2⋅2=26=64
Let set B be the bit strings of length 8 ending with one 1s:
∣B∣=2⋅2⋅2⋅2⋅2⋅2⋅2⋅1=27=128
Let C be the bit strings of length 8 beginning with two 0s and ending with one 1s:
∣C∣=∣A∩B∣=1⋅1⋅2⋅2⋅2⋅2⋅2⋅1=25=32
Then
∣A∪B∣=∣A∣+∣B∣−∣A∩B∣=64+128−32=160
b) Let A be computer science majors
∣A∣=36
Let set B be math majors
∣B∣=29
And joint majors are ∣A∩B∣=5
Therefore there are students in the class:
∣A∪B∣=∣A∣+∣B∣−∣A∩B∣=36+29−5=60
Answer:
a) 160
b) 60
Comments
Leave a comment