From the course: Programming Foundations: Discrete Mathematics
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Set operations
From the course: Programming Foundations: Discrete Mathematics
Set operations
- [Voiceover] Now that we've defined a set and reviewed the set notation, we can move on to Set Operations. In the Exercises file, there is a folder that contains several reference materials, including a list of all the set operations and laws used in this movie. Use that as a reference when you try the challenge for this section. In set theory, we'll use the following operations: Set Intersection. It's written as A intersects B and the formal notation says that the result of the intersection of sets A and B is the set of all values X such that X is an element of A, and X is an element of B. Set Union is A union B. And this definition says the set of all values X, where X is an element of A, or X is an element of B, or both. Next, we have Set Difference, which takes the elements in set A minus the elements in set B. The formal definition says the set of all values X such that X is an element of A, and X is not an element of B. Set Complement. Set Complement is written as A with a line…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Objects as sets2m 56s
-
(Locked)
Set notation3m 56s
-
(Locked)
Set operations5m 1s
-
(Locked)
Power sets4m 29s
-
(Locked)
Sequences and sums7m 22s
-
Recursion3m 5s
-
(Locked)
Cardinality, disjointness, and partitions2m 19s
-
(Locked)
Sets from Cartesian products3m 2s
-
(Locked)
Challenge: Practice with sets47s
-
(Locked)
Solution: Practice with sets6m 53s
-
(Locked)
-
-
-
-
-
-