Exercise 1: Set Operations on A = {2,4,6,8,10} and B = {4,8,12,16} — Possible Solution ==================================================================== A UNION B (everything in A, B, or both) ------------------------------ Combine every element from both sets, listing each value only once even if it appears in both: A u B = {2, 4, 6, 8, 10, 12, 16} A INTERSECT B (only what's in both) ------------------------------ Check each element of A against B: 2 (not in B), 4 (in B - keep), 6 (not in B), 8 (in B - keep), 10 (not in B). A n B = {4, 8} A MINUS B (in A, but not in B) ------------------------------ Take every element of A, and remove any that also appear in B: 2 (stays, not in B), 4 (removed, in B), 6 (stays), 8 (removed, in B), 10 (stays). A - B = {2, 6, 10} B MINUS A (in B, but not in A) ------------------------------ Take every element of B, and remove any that also appear in A: 4 (removed, in A), 8 (removed, in A), 12 (stays, not in A), 16 (stays, not in A). B - A = {12, 16} WHY A - B AND B - A ARE DIFFERENT SETS ------------------------------ Per this chapter, "difference isn't symmetric, unlike union and intersection." A - B keeps only A's own unique elements (2, 6, 10), while B - A keeps only B's own unique elements (12, 16) - genuinely different results, since "what's only in A" and "what's only in B" are two separate questions about the same pair of sets. WHY THIS WORKS AS AN ANSWER ------------------------------ Each operation is worked through element by element rather than stated as a bare final answer, and the result for A - B is explicitly contrasted with B - A to confirm they aren't the same set, matching this chapter's own explicit warning that set difference is not symmetric.