Let U = {l, 2, 3, 4, 5, 6, 7, 8, 9, and 10} be a universal set. Let A, B, C such that A= {l, 3, 4, 8},
B = {2, 3, 4, 5, 9, 10}, and C = {3, 5, 7, 9, 10}. Use bit representations(computer representation) for A, B, and C together with UNION, intersection, difference, and complement to find the bit representation for the following:
(a) AU B
(b) An B n C
(f)) (AU C) n B
(d) (A - B) UC
(e) An (B - (C n B))
(f) A - (B - C)
(g) (AU B) U (C - B)
Solution:
Given, U = {1, 2, 3, 4, 5, 6, 7, 8, 9, and 10}.
U has 10 elements, so bit representation will contain 10 digits with 0 and 1.
"x_{i}= \\begin{cases}1 & \\text { if } i \\in X \\\\ 0 & \\text { for } i \\notin X\\end{cases}"
A= {1, 3, 4, 8}, B = {2, 3, 4, 5, 9, 10}, and C = {3, 5, 7, 9, 10}
"(a) A\\cup B=\\{1,2,3,4,5,8,9,10\\}=1111100111\n\\\\(b)A\\cap B\\cap C=\\{3\\}=0010000000\n\\\\(c)(A\\cup C)\\cap B=\\{1,3,4,5,7,8,9,10\\}\\cap \\{2, 3, 4, 5, 9, 10\\}=\\{3,4,5,9,10\\}=0011100011\n\\\\(d) (A-B)\\cup C=\\{1,8\\} \\cup \\{3, 5, 7, 9, 10\\}=\\{1,3,5,7,8,9,10\\}=1010101111"
"(e) A\\cap (B - (C \\cap B))=\\{1, 3, 4, 8\\}\\cap (\\{2, 3, 4, 5, 9, 10\\}-\\{3,5,9,10\\})\n\\\\=\\{1, 3, 4, 8\\}\\cap \\{2\\}=\\phi=0000000000\n\\\\(f) A - (B - C)=\\{1, 3, 4, 8\\}-\\{2,4\\}=\\{1,3,8\\}=1010000100\n\n\\\\(g) (A\\cup B) \\cup (C - B)=\\{1,2,3,4,5,8,9,10\\}\\cup\\{7\\}=\\{1,2,3,4,5,7,8,9,10\\}\n\\\\=1111101111"
Comments
Leave a comment