Skip to content

Question 12

Evaluate:

{(0,0), (1,1)} | {0, 1} & {(0,0), 1}
Hint

This is a trick question. Mathematically, you work through the expression from left to right. However, the & and | operators have different precedences. With sets in this case, these operators, which would have been binary operators otherwise, represent set operations like what one would find in math.

Given sets \(A = \{1, 2\}\), \(B = \{1, 3, 5\}\), and \(C = \{4, 5\}\),

\[ A \cup B = \{1, 2, 3, 5\} \\ A \cup C = \{1, 3, 4, 5\} \\ A \cap B = \{1\} \\ B \cap C = \{5\} \\ A \cap B \cap C = \{\}\text{ or } \emptyset \]
Solution

This is a trick question. Like how multiplication and division have a higher precedence over addition and subtraction, the & operator has a higher precedence over the | operator. With sets, & represents the intersection operator (i.e., \(A \cap B\)), whilst | represents the union operator (i.e., \(A\cup B\)).

By order of precedence, we work out {0, 1} & {(0,0), 1} first to obtain {1}: \(\{0, 1\} \cap \{(0,0), 1\} = \{1\}\)

Following this, we work on the remainder of the expression: \(\{(0,0), (1,1)\} \cup \{1\} = \{(0,0), (1,1), 1\}\)

{(0,0), (1,1)} | {0, 1} & {(0,0), 1}
= {(0,0), (1,1)} | {1}
= {(0,0), (1,1), 1}
Answer
{1, (1, 1), (0, 0)}