Math for CS: Sets


Informally, a set is a bunch of objects, which are called the elements of the set. The elements of a set can be just about anything: numbers, points in space, or even other sets. The conventional way to write down a set is to list the elements inside curly-braces.

This is somewhat review for me. We go over set notations like subsets, unions, intersections, difference, complement, etc.

The power set and set builder notation is covered, as well as sequences. That’s all for this unit, it was short.

The in class problems were iffy for me. I understood like half of it. After struggling for 16-32 min, I looked up the solution, then built understanding from there. In particular had a hard time understanding problem 3 (c). Even after reading the solution I was a bit lost. Deciding not to spend time trying to understand this, because it doesn’t seem to be important to know this detail.

Update: I put it on chatgpt and got an explanation but still not able to follow. Something must be missing. It leans on certain axioms like foundation axiom. Maybe I need to review that. I mean, the axiom itself is intuitive. A set cannot have itself as a member.

That much I understand, but the proof for 3(c), how does it all connect? How does {a, {a, b}} have itself as a set? I only see two sets, namely {a, {a, b}} and the member set {a, b}. Okay, after spending more time thinking about it, I now understand the proof for 3(c)! The step I got stuck on was the insertion for case 2 where we have a = {c, d} and c = {a, b}.