Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Module 1_basic Structures

The document provides an overview of basic structures in mathematics, focusing on sets and matrices. It covers fundamental concepts such as set operations, cardinality, Venn diagrams, and the properties of ordered pairs and Cartesian products. Additionally, it introduces matrix arithmetic and its applications in discrete mathematics.

Uploaded by

sahanakm8867
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Module 1_basic Structures

The document provides an overview of basic structures in mathematics, focusing on sets and matrices. It covers fundamental concepts such as set operations, cardinality, Venn diagrams, and the properties of ordered pairs and Cartesian products. Additionally, it introduces matrix arithmetic and its applications in discrete mathematics.

Uploaded by

sahanakm8867
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MODULE_1

BASIC STRUCTURES

Sets and Matrices


Overview

1. Sets
2. Set Operations
3. Cardinality of Sets
4. DeMorgan’s Law for Sets
5. Matrices

Introduction to Sets

A set is a group of objects, usually with some relationship or similar property. The objects in the
set are called elements or members of the set. A set contains its elements.
We use the symbol ∈ to indicate that an element is or is not in a set:

x ∈ A: x is in set A
x /∈ A: x is not in set A

A set is described by either listing out the elements of the set in braces, or using set builder
notation.

 Example: The set V of vowels in English is V = {a, e, i, o, u}


• Example: The set O of all odd positive integers less than 10 is: O = {x|x is an odd positive
integer less than 10}
• We use uppercase letters to denote a set.
Special Sets
N, Z, R are reserved to represent special sets:
• N: the natural numbers {1, 2, ...}
• Z: the set of integers {..., −2, −1, 0, 1, 2, ...}
• Z+: the set of non-negative integers
• R: the set of real numbers.
• ∅: the empty set (no elements)
Set Equality
Two sets are equal if and only if they contain the same elements.
Venn Diagrams
A Venn diagram is a graphical representation of a set.
a V

The rectangle represents U , the . The universal set is the set that contains all objects under
consideration. In this example, U is the set of all letters, and the set V is the set of vowels. Specific
elements are represented by a point (labeled or not).
Subset
The set A is a subset of B if and only if every element of A is also an element of the set B. We use
the notation: A ⊆ B

Another way to think about a subset:

If A ⊆ B, then ∀x(x ∈ A → x ∈ B)

The null set ∅ is a subset of every set: To see that ∅ ⊆ S, see that every element in
is in
Further, every set is a subset of itself.
Proper Subset
When A is a subset of B and AB, we say that A is a proper subset of B, and write it:

A ⊂B

A = {1, 2, 3}
B = {x : 0 < x ≤ 4}
⇒A ⊂B

Use subsets to prove equality of sets


A and B have the same elements if each set is a subset of the other. For example:

A : {a, b, c, d}
B : {a, b, c, d}
A ⊆ B (all elements in A are in B) B ⊆ A (all elements in B are in A)
⇒A = B

Cardinality
Let S be a set. If there are n distinct elements in S (and n is an integer greater than or equal to
0), S is a finite set, and n is the cardinality or S.
The cardinality of S is written |S|
Cardinality: Examples
Example: Let A be the set of odd positive integers less than 10. What’s |A|?
Answer:
Example: Let S be the set of letters in the alphabet. What’s |S|?
Answer:
Example: What’s |∅|?
Answer:
Power Set
Let S be a set. The power set of S is the set of all subsets of the set S. The power set of S is
written P(S).
Let S be the set {0, 1, 2}.
P(S) = {∅, {0}, {1}, {2}, {0, 1}, {0, 2}, {1, 2}, {0, 1, 2}}
Note: The empty set and S (the set itself) are members of the power set.
Power Set: Note
Example: What is the power set of the empty set?
Answer:
Example: What is the power set of the set {∅}?
Answer:
n-tuples
Sets are unordered, but we usually care about the ordering of elements.
For example, we may have a bunch of words, but it would be easier to search them if they’re sorted, or
put in a particular order.
Ordered n-tuple
The ordered n-tuple (a1, a2, . . . , an ) is the ordered collection that has a1 as its first element,
a2 as its second element, and an as its nth element.
Ordered n-tuples are equal if and only if each corresponding pair of their elements are equal:
(a1, a2, . . . an) = (b1, b2, . . . bn ) if and only if:
ai = bi for i = 1, 2, . . . n.

Ordered Pairs
A 2-tuple is called a ordered pair.
The ordered pair (a, b) equals the ordered pair (c, d) if and only if a = c and b = d. (a, b) only
equals (b, a) if a = b.
Cartesian Products
The Cartesian product of sets A and B (denoted A × B) is the set of all ordered pairs (a, b)
where a ∈ A and b ∈ B.
A × B = {(a, b)|a ∈ A ∧ b ∈ B}
Example: What is the Cartesian product of A = {1, 2} and B = {a, b, c}? Answer: A × B =
Cartesian Products of multiple sets
The Cartesian product of sets A1, A2, . . . An denoted A1 ×A2 . . .×An is the set of n-tuples (a1, a2, .
. . an) where ai ∈ Ai for i = 1, 2, . . . n.

A1 × A2 . . . × An = {(a1 , a2 , . . . an )|ai ∈ Ai for i = 1, 2, . . . n}

A : {a, b, c}
B : {1, 2, 3}
C : {blue, red, green}
⇒ A × B × C = {(a, 1, blue), (a, 1, red), (a, 1, green), (a, 2, blue) . . .}

The Cartesian product A × B × C consists of all ordered triples (a, b, c), where a ∈ A, b ∈
B, c ∈ C.
Union
Let A and B be sets. The union of the sets A and B, denoted A ∪ B is the set that contains
the elements in either A or in B, or in both.

A ∪ B = {x|x ∈ A ∨ x ∈ B}

Example: {1, 2, 3, 4} ∪ {7, 8, 9} = ?


Answer:

Intersection
∩ that contains
Let A and B be sets. The intersection of the sets A and B, denoted AB is the set
the elements in both A and B.

A ∩ B = {x|x ∈ A ∧ x ∈ B}

Example: {1, 2, 3, 4} ∩ {x : x ∈ N } = ?
Answer:

Disjoint
Let A and B be sets. The two sets are disjoint if their intersection is the empty set.

Cardinality of sets
Inclusion-Exclusion Principle
We frequently want too know how many items are in groups.
Note that A| +
| B| counts
| all the elements in only A once, and all the elements in only B once.
BUT, it counts the elements in A and B TWICE.
Therefore, we need to subtract the number of elements that are in A and B

|A ∪ B| = |A| + |B| − |A ∩ B|

Complement of sets
The complement of a set A, denoted Ac is the set of elements that belong to U but which do not
belong to A: t
Ac
Ac = {x : x ∈ U, x /∈ A}

U : {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
A : {2, 5, 8}

Differencsets

The relative complement or difference of a set B with respect to A, denoted A B\(said


A minus B) is the set of elements that belong to A but which do not belong to B.
A \B

A\ B = {x : x ∈ A, x /∈ B}

Example: {5, 6, 7, 8, 9, 10} \ {7, 8, 9} =

Answer:
Symmetric Difference
The symmetric difference of sets A and B, denoted A ⊕ B is the set of elements that
belong to A or B but not both.

A ⊕ B = (A ∪ B) \ (A ∩ B)

Example:

Union of many sets


We use the following notation to denote the union of sets A1, A2, ..., An:
A1 ∪ A2
∪ . . . ∪ An n Ai i=1Example: A1 = {1, 2, 3, 4}; A2 ={7, 8, 9}, A3 = {4, 5, 6, 7} = ?

Answer:

Intersections of many sets


We use the following notation to denote the intersection of sets A1, A2, ..., An:

A1 ∩ A2

Membership table
Just like we use truth tables for determining equality of logic statements, we can use mem- bership
tables to prove equality of sets.
1 is used to indicate that an element belongs to a set; 0 is used to indicate that an element is not in
that set.

Membership for Distributive Property


A B C B A A A (A ∩ B)
∩ ∪ (A ∩
∪ ( ∩ ∩ C)
B
C ∪ B C
C
)
1 1 1 1 1
1 1 0 1 0
1 0 1 0 1
1 0 0 0 0

DeMorgan’s Law
Set Problems
¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬qExample: Let A be the set of students who live within one mile of school, and B the set of
students who walks to campus from home. Describe each of these sets of students:
1. A ∩B
2. A ∪B
3. A −B
4. B −A
Answer:
1. The students who live within a mile of school and walk to campus (but not take the bus).
2. The students who live within a mile of school (and walk or drive), and the students who walk to
school (no matter how far it is).

3. The students who live within a mile of school but DON’T walk to school.
4. The students who walk to school but live further than a mile away.
Set Identities

Set Identities
Identity Name
A ∪∅= A Identity
A ∩U = A laws
A ∪U = U Dominatio
A∩∅= ∅ n laws
A ∪A = A Idempotent
A ∩A = A laws

(A) = A Compleme
ntation law
A ∪B = B ∪A Commutati
A ∩B = B ∩A ve laws
A ∪ (B ∪ C) = (A ∪ Associativ
B) ∪ C e laws
A ∩ (B ∩ C) = (A ∩
B) ∩ C
A ∩ (B ∪ C) = (A ∩ Distributiv
B) ∪ (A ∩ C) e laws
A ∪ (B ∩ C) = (A ∪
B) ∩ (A ∪ C)
A ∪B = A ∩B De
A ∩B = A ∪B Morgan’s
laws

4.2 Worked Problems: Sets

1. Let A, B and C be sets. Show that (A − B) − C is not necessarily equal to A − (B − C).

2. Let E denote the set of even integers and O the set of odd integers. Z is the set of all integers.
Determine these sets:
(a) E ∪ O
(b) E ∩ O
(c) Z − E
(d) Z − O
3. Show that if A and B are sets, then A − (A − B) = A ∩ B.
4. Show that if A is a subset of B, then the powerset of A is a subset of the power set of B.Show that
symmetric difference follows the associative property using the following Venndiagrams. That is, (A
⊕ B) ⊕ C = A ⊕ (B ⊕ C)
Matrices

Matrices are used throughout discrete mathematics to express relationships between elements in sets. In
subsequent chapters we will use matrices in a wide variety of models. For instance, matrices will be used
in models of communications networks and transportation systems. Many algorithms will be developed
that use these matrix models. This section reviews matrix arithmetic that will be used in these
algorithms.
Example: Social network
Here’s something you might be familiar with: We start with a shape on the screen, and it transforms over
time. First it moves from one place to another, then it gets

Definition 1: Matrix

matrices are equal if they have the same number of rows and the same
number of columns and the corresponding entries in every position are
equal.

You might also like