CampusLearn
← CSC 113 Discrete Mathematics

Set Theory and Relational Operations

Notes

FUNDAMENTALS OF SET THEORY Set theory provides the theoretical bedrock for database structures, query languages such as SQL, and type systems in modern programming. A set is defined as an unordered collection of distinct objects, commonly termed elements or members. If an object belongs to a set, set membership notation is applied. The empty set represents a unique set containing zero elements, while the universal set contains all conceivable elements within a specific context of discussion. CORE SET OPERATIONS Operations on sets manipulate collections to generate new sets: Union: The union of set A and set B contains elements that belong to A, B, or both. Intersection: The intersection contains strictly those elements that belong to both A and B. Set Difference: The relative complement of B in A contains elements belonging to A but excluding all elements found in B. Complement: The absolute complement includes all elements in the universal set that do not belong to the target set. Cartesian Product: The product of two sets consists of all ordered pairs where the first coordinate is from the first set and the second coordinate is from the second set. PRACTICAL EXAMPLE Consider the Kenya Universities and Colleges Central Placement Service (KUCCPS) auditing first-year student enrollments across dual technology disciplines at the University of Nairobi. Let the universal set U encompass all 100 first-year students registered in the Department of Computing. Let set C be students enrolled in CSC 113 (Discrete Mathematics), totaling 65 students. Let set S be students enrolled in CSC 115 (Structured Programming), totaling 50 students. According to administrative records, 25 students are enrolled in both CSC 113 and CSC 115. We determine how many students are enrolled in exclusively one of the two units, and how many are taking neither unit. Using the principle of inclusion-exclusion: The total students taking at least one unit is given by: |C union S| = |C| + |S| - |C intersection S| |C union S| = 65 + 50 - 25 = 90 students. Students taking only CSC 113: |C - S| = |C| - |C intersection S| = 65 - 25 = 40 students. Students taking only CSC 115: |S - C| = |S| - |C intersection S| = 50 - 25 = 25 students. Students taking neither unit: |U| - |C union S| = 100 - 90 = 10 students. This relational computation informs lecture hall allocation and timetabling.

Quiz

1. Given set A = {1, 2, 3} and set B = {3, 4, 5}, what is the set difference A minus B?

2. If two sets A and B are disjoint, what is their intersection?

3. What is the cardinality of the power set of a set containing 4 elements?

Sign in to submit and securely grade your quiz.