Discrete Structure05 marksNumerical: Set operations via bit stringsBit strings for set operations
Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Use bit strings to find the union and intersection of the sets {1, 2, 3, 4, 5} and {1, 3, 5, 7, 9}.
Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Use bit strings to find the union and intersection of the sets {1, 2, 3, 4, 5} and {1, 3, 5, 7, 9}. [5]
- Universal set: $U = {1,2,3,4,5,6,7,8,9,10}$ (length 10) - Set A: ${1,2,3,4,5}$ - Set B: ${1,3,5,7,9}$ Bit string convention: position $i$ = 1 if element $i \in$ set, else 0. Positions ordered $1 \to 10$. Positions: $;1;2;3;4;5;6;7;8;9;10$ $$A = 1,1,1,1,1,0,0,0,0,0$$ $$B...