ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Discrete Structures
    CSI-303
    Progress0 / 21 topics
    Topics
    1. Introduction to Logic and Proofs2. Direct Proofs3. Proof by Contradiction4. Sets5. Combinatorics6. Sequences7. Formal Logic8. Propositional and Predicate Calculus9. Methods of Proof10. Mathematical Induction and Recursion11. Loop Invariants12. Relations and Functions13. Pigeonhole Principle14. Trees and Graphs15. Elementary Number Theory16. Optimization and Matching17. Fundamental Structures18. Functions19. Relations (Recursions)20. Cardinality and Countability21. Probabilistic Methods
    CSI-303›Sets
    Discrete StructuresTopic 4 of 21

    Sets

    12 minread
    1,970words
    Intermediatelevel

    Sets

    A set is a collection of distinct objects, considered as an object in its own right. The objects in a set are called elements or members of the set. Sets are fundamental objects in mathematics and are used to define many mathematical concepts and structures.

    Basic Set Theory Concepts

    1. Notation

    • Set Representation: A set is typically denoted using curly braces {}. For example, the set of natural numbers less than 5 is written as:

      A={1,2,3,4}A = \{1, 2, 3, 4\}A={1,2,3,4}
      • This represents a finite set because it contains a finite number of elements.
      • If a set has an infinite number of elements, we can represent it by a rule or pattern. For example, the set of all natural numbers is written as:
      B={1,2,3,4,5,… }B = \{1, 2, 3, 4, 5, \dots\}B={1,2,3,4,5,…}
    • Set Membership: If an element xxx is in set AAA, we write x∈Ax \in Ax∈A. If xxx is not in set AAA, we write x∉Ax \notin Ax∈/A.

    2. Types of Sets

    • Finite Set: A set with a limited number of elements. For example:

      A={1,2,3}A = \{1, 2, 3\}A={1,2,3}
    • Infinite Set: A set with an infinite number of elements. For example, the set of natural numbers:

      N={1,2,3,4,… }N = \{1, 2, 3, 4, \dots\}N={1,2,3,4,…}
    • Subset: A set AAA is a subset of set BBB if every element of AAA is also an element of BBB. This is written as:

      A⊆BA \subseteq BA⊆B

      For example, {1,2}⊆{1,2,3}\{1, 2\} \subseteq \{1, 2, 3\}{1,2}⊆{1,2,3}.

    • Proper Subset: A set AAA is a proper subset of set BBB if every element of AAA is in BBB and A≠BA \neq BA=B. This is written as:

      A⊂BA \subset BA⊂B

      For example, {1,2}⊂{1,2,3}\{1, 2\} \subset \{1, 2, 3\}{1,2}⊂{1,2,3}, but {1,2,3}⊄{1,2,3}\{1, 2, 3\} \not\subset \{1, 2, 3\}{1,2,3}⊂{1,2,3}.

    • Empty Set (Null Set): The set that contains no elements is called the empty set, and it is denoted by:

      ∅or{}\emptyset \quad \text{or} \quad \{\}∅or{}
    • Universal Set: The universal set, denoted by UUU, is the set that contains all the elements under consideration in a particular discussion or problem. All other sets are subsets of the universal set.

    • Singleton Set: A set that contains exactly one element. For example:

      A={7}A = \{7\}A={7}
    • Power Set: The power set of a set AAA, denoted P(A)P(A)P(A), is the set of all subsets of AAA. If A={1,2}A = \{1, 2\}A={1,2}, then the power set of AAA is:

      P(A)={∅,{1},{2},{1,2}}P(A) = \{\emptyset, \{1\}, \{2\}, \{1, 2\}\}P(A)={∅,{1},{2},{1,2}}

    3. Operations on Sets

    • Union of Sets: The union of two sets AAA and BBB, denoted A∪BA \cup BA∪B, is the set of elements that are in AAA, in BBB, or in both. For example:

      A={1,2,3},B={3,4,5}A = \{1, 2, 3\}, \quad B = \{3, 4, 5\}A={1,2,3},B={3,4,5} A∪B={1,2,3,4,5}A \cup B = \{1, 2, 3, 4, 5\}A∪B={1,2,3,4,5}
    • Intersection of Sets: The intersection of two sets AAA and BBB, denoted A∩BA \cap BA∩B, is the set of elements that are in both AAA and BBB. For example:

      A={1,2,3},B={3,4,5}A = \{1, 2, 3\}, \quad B = \{3, 4, 5\}A={1,2,3},B={3,4,5} A∩B={3}A \cap B = \{3\}A∩B={3}
    • Difference of Sets: The difference of two sets AAA and BBB, denoted A−BA - BA−B or A∖BA \setminus BA∖B, is the set of elements that are in AAA but not in BBB. For example:

      A={1,2,3},B={3,4,5}A = \{1, 2, 3\}, \quad B = \{3, 4, 5\}A={1,2,3},B={3,4,5} A−B={1,2}A - B = \{1, 2\}A−B={1,2}
    • Complement of a Set: The complement of a set AAA, denoted A′A'A′ or ∁A\complement A∁A, is the set of all elements in the universal set UUU that are not in AAA. For example, if U={1,2,3,4,5}U = \{1, 2, 3, 4, 5\}U={1,2,3,4,5} and A={1,2,3}A = \{1, 2, 3\}A={1,2,3}, then:

      A′={4,5}A' = \{4, 5\}A′={4,5}
    • Symmetric Difference: The symmetric difference of two sets AAA and BBB, denoted AΔBA \Delta BAΔB, is the set of elements that are in either AAA or BBB, but not in both. For example:

      A={1,2,3},B={3,4,5}A = \{1, 2, 3\}, \quad B = \{3, 4, 5\}A={1,2,3},B={3,4,5} AΔB={1,2,4,5}A \Delta B = \{1, 2, 4, 5\}AΔB={1,2,4,5}

    4. Venn Diagrams

    Venn diagrams are a visual way of representing sets and their relationships (union, intersection, etc.). The universal set is usually represented by a rectangle, and the sets are represented by circles inside this rectangle.

    • Union: The union of two sets is represented by shading the entire area covered by both sets.
    • Intersection: The intersection is represented by shading only the area where the two sets overlap.
    • Difference: The difference is represented by shading the area of one set that does not overlap with the other.
    • Complement: The complement is represented by shading the area outside a set, within the universal set.

    5. Set-Builder Notation

    Sometimes, instead of listing all the elements of a set, we can define a set using a property that its elements satisfy. This is called set-builder notation.

    • For example, the set of all even numbers can be written as: A={x∣x is an even integer}A = \{ x \mid x \text{ is an even integer} \}A={x∣x is an even integer} or more formally as: A={x∣x=2n,n∈Z}A = \{ x \mid x = 2n, n \in \mathbb{Z} \}A={x∣x=2n,n∈Z} where Z\mathbb{Z}Z denotes the set of all integers.

    6. Cartesian Product

    The Cartesian product of two sets AAA and BBB, denoted A×BA \times BA×B, is the set of all ordered pairs (a,b)(a, b)(a,b) where a∈Aa \in Aa∈A and b∈Bb \in Bb∈B.

    • For example, if A={1,2}A = \{1, 2\}A={1,2} and B={x,y}B = \{x, y\}B={x,y}, then: A×B={(1,x),(1,y),(2,x),(2,y)}A \times B = \{(1, x), (1, y), (2, x), (2, y)\}A×B={(1,x),(1,y),(2,x),(2,y)}

    7. Applications of Sets

    Sets are used extensively in mathematics, computer science, logic, and many other fields. Some applications include:

    • Database theory: Sets are used to represent collections of data, and operations on sets are used to query databases.
    • Probability theory: Sets are used to define events, and operations on sets represent combinations of events.
    • Graph theory: Sets are used to represent vertices and edges in graphs.
    • Logic and Boolean algebra: Sets are used to model logical propositions, especially when using set operations to represent logical operations.

    Conclusion

    A set is a fundamental concept in mathematics that helps organize objects or elements according to specific properties. Understanding the operations and properties of sets is essential for building more complex structures in mathematics and computer science. Key operations like union, intersection, difference, and complement are tools you will often use to manipulate sets and analyze their relationships.

    Previous topic 3
    Proof by Contradiction
    Next topic 5
    Combinatorics

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time12 min
      Word count1,970
      Code examples0
      DifficultyIntermediate