Вы находитесь на странице: 1из 10

Discrete Mathematics

SET THEORY

Discrete mathematics is the study of


mathematical structures that are
fundamentally discrete rather than
continuous. Discrete mathematics
therefore excludes topics in "continuous
mathematics" such as calculus and
analysis. Discrete objects can often be
enumerated by integers. More formally,
discrete mathematics has been
characterized as the branch of
mathematics dealing with countable sets.

Discrete Mathematics
1

The set of objects studied in discrete


mathematics can be finite or infinite.
Concepts and notations from discrete
mathematics are useful in studying and
describing objects and problems in
branches of computer science, such as
computer algorithms, programming
languages, cryptography, automated
theorem proving, and software
development.

Discrete Mathematics

Conversely, computer implementations


are significant in applying ideas from
discrete mathematics to real-world
problems, such as in operations research.
Although the main objects of study in
discrete mathematics are discrete objects,
analytic methods from continuous
mathematics are often employed as well.

Discrete Mathematics
3

Basic Definition of Terms


Universal set/Sample space (U) set of
all possible outcomes/values or
sometimes referred to as the universal
set.
Experiment a process that generates
data in a set.
Element each outcome in a sample
space/set.
Set /Event a collection of elements.

Set Theoretic Notation


1. List elements in braces: {0, 1, 2, 3, 4,
5}
2. Described in terms of some property:
{x : x is an integer between x > -1/2 and x
< 19/2}
3. Described in terms of some other set
that satisfy some property
{x R : x3 2x2 3x +2 = 0}

Discrete Mathematics

Discrete Mathematics
5

Special Sets
N : the set of natural numbers, or the set
of non-negative integers i.e. {0, 1, 2, 3,
4, ...}
Z : the set of integers, or { ...,-1, 0, 1, 2,
...}
Q : the set of rational numbers, i.e., {
1/3, 2/5, ...}
R : the set of real numbers, i.e.,
{1.23456, 2.35353....}
: the null or empty set, or the set { }
with no elements.

Finite sets
A set that has limited number of elements
or its elements can be matched with the
elements of some subset {1, 2,...n} of
the natural numbers.
Infinite sets
It is a set which contain unlimited
elements such that there is no way to
match all the elements.

Discrete Mathematics

Discrete Mathematics
7

Subsets ()
Subsets are defined as sets that contains
the same elements usually denoted as A
B (A is a subset of B) i.e. every element
of A is also an element of B.
Example 1. {1, 2, 3, 2,1} {1, 2, 3}

Power sets [P(S)]


It is a set of all subsets of the given set
determined by obtaining all the possible
combination of the elements in the given
set including null set (). The number of
possible sets on a power set is 2n.
Example 2. P({0, 1, 2}) = {, {0}, {1},
{2}, {0, 1}, {0, 2}, {1, 2}, {0, 1 ,2}}

Discrete Mathematics

Discrete Mathematics
9

Venn Diagram
It is a systematic development that
utilizes graphical illustration like geometric
figures. It is used to show existing
relationships among sets usually
represented with a rectangle (for
universal set) and circles (for sets).

Discrete Mathematics

10

Venn Diagram

Discrete Mathematics
11

12

Sample problems:
1. List the elements of each of the following
sets:
a. set of odd natural numbers less than 10.
b. set S = {x Z : x2 + 3x + 2 = 0}
c. set S = {x N : 2x 4 0}
d. set S = {x Z : x2 = 1}
e. set S = { x N : x = 2k2 3 for some k
N}

Discrete Mathematics

2. Given the following sets, A = {2, 4, 6},


B = {2, 6}, C = {4, 6} and D = {4, 6, 8}.
Determine the subsets of any of these
sets from the given sets.

Discrete Mathematics
13

Operations on sets
Union of two sets A and B (A B)
It is the set which consists of all the
elements EITHER in set A or in set B or
BOTH mathematically denoted as {x : x
A or x B}.

14

Intersection of two sets A and B (A


B)
It is the set which consists of all elements
contained in BOTH set A and set B
mathematically denoted as { x : x A
and x B}.

Discrete Mathematics

Discrete Mathematics
15

16

Mutually exclusive sets (Disjoint)


It is a set having no elements in common
which means they cannot both occur at
the same time.

Complement of set A (denoted by A or


A or A )
It is the set which consists of all elements
in the universal set that are not contained
in set A. The complement of a set is also
called the absolute difference.

Discrete Mathematics

Discrete Mathematics
17

Set Difference
It is the set containing those elements
that are in A but not in B, denoted by A
B (relative difference). The difference of A
and B is also called the complement of B
with respect to A, represented as A B =
{x : x A x B}

18

Principle of inclusion-exclusion
This technique is applied to determine the
number of elements in the union of two
and three sets mathematically stated as,

A B A B A B
A B C A B C A B B C AC A B C

Discrete Mathematics

Discrete Mathematics
19

20

Set Identities
1. A U = A
2. A = A
3. A U = U
4. A =
5. A A = A
6. A A = A
7. A B = B A
8. A B = B A

Set Identities
(Identity Law)

A A

(Complementation Law)
(B C) = (A B) C (Distributive
11. A
(B C) = (A B) C Law)
12. A
(A B) = A
(Absorption Law)
13. A
B = (A B) (B A) (Symmetric
14. A
(B C) = (A B) C difference)
15. A B A B
(De Morgans Law)
9.

10. A

(Domination Law)
(Idempotent Law)
(Commutative Law)

16. A B

Discrete Mathematics

A B

Discrete Mathematics
21

Product of Sets
The Cartesian product of the sets A1, A2,
A3,...An, denoted by A1x A2 x A3 x...x An is
the set of ordered n-tuples (a1, a2,
a3,...an) where ai belongs to Ai for i = 1,
2, 3,...n defined mathematically as,
A1x A2 x A3 x...x An = {(a1, a2,...an) : ai
Ai
for i = 1, 2, 3,...n}
Example 3. Let A = {0, 1}, B = {2, 3}
A x B = {(0, 2), (0, 3), (1, 2), (1, 3)}

22

Computer representation of sets


There are various ways to represent sets
using a computer. A bit representation
defines whether the element in a set is
present in the universal set by
representing it with either a value of 1
(for true) or 0 (for false). Note that this
operation corresponds to taking the
negation of each bit when the bit is
associated with a truth value.

Discrete Mathematics

Discrete Mathematics
23

24

Example 4. Let A = {1, 2, 3, 4, 5} and B =


{3, 4, 5, 6, 7, 8} be subsets of the
universal set U = {1, 2, 3, 4, 5, 6, 7, 8,
9}.

Ex. 1 Consider the universal set S =


{copper, nitrogen, oxygen, potassium,
sodium, uranium, zinc} and the set A =
{copper, sodium, zinc}, set B =
{nitrogen, potassium, sodium}, set C =
{oxygen}. List the elements of the sets
corresponding to the following events:
a. A
b. A C
c. (A B) C
d. B C
e. (A B) (A C)

Discrete Mathematics

Discrete Mathematics
25

2. A mathematics professor has been keeping


track of the excuses student give for missing
class. He discovers that, 65 said that their
dog had the flu, 70 said that their car
wouldnt start, 30 said that they needed to
bake cookies, 12 said that both their dog had
the flu and that they needed to bake cookies,
8 said that both their car wouldnt start and
that they needed to bake cookies, 5 said that
both their dog had the flu and that their car
wouldnt start, 1 person used all three
excuses and 95 students didnt use any of
the excuses

Discrete Mathematics

27

26

a.
b.
c.
d.
e.

How many students were in the


professors record?
How many students had only one
excuse?
How many students didnt say that their
car wouldnt start?
How many students said only that they
had to bake cookies?
How many students had exactly two
excuses?

Discrete Mathematics
28

3. Suppose that in a senior college class of


500 students, it is found that 210 smokes,
258 drink alcoholic beverages, 216 eat
high-cholesterol meals, 122 both smokes
and drink alcoholic beverages, 83 both
eats high cholesterol meals and drink
alcoholic beverages, 97 both smokes and
eats high-cholesterol meals and 52
engage in all three of these bad health
practices.
Discrete Mathematics

If a member of this senior class is selected


at random, find the number of students
that;
a. smokes but does not drink alcoholic
beverages
b. eats high-cholesterol meals and drinks
alcoholic beverages but does not smoke
c. neither smokes nor eats high-cholesterol
meals.

Discrete Mathematics
29

Mathematical Induction
It is the standard method of mathematical
proof typically used to establish that a
given statement is true of all natural
number. It is done by proving the first
statement in the infinite sequence of
statements is true and then proving that if
any one statement in the infinite
sequence of statement is true then so is
the next one. This proof technique also
often is used to prove that algorithms are
correct and to determine expressions for
the complexity of algorithms.
Discrete Mathematics

30

The simplest and most common form of


mathematical induction proves that a
statement involving a natural
number n holds for all values of n. The
proof consists of two steps:
1. The basis (base case): showing that the
statement holds when n is equal to
the lowest value that n is given in the
question. Usually, n = 0 or n = 1.
2. The inductive step: showing that if the
statement holds for some n, then the
statement also holds when n + 1 is
substituted for n.

Discrete Mathematics
31

32

The assumption in the inductive step that


the statement holds for some n is called
the induction hypothesis (or inductive
hypothesis). To perform the inductive
step, one assumes the induction
hypothesis and then uses this assumption
to prove the statement for n + 1. The
choice between n = 0 and n = 1 in the
base case is specific to the context of the
proof.

Discrete Mathematics

This method works by first proving the


statement is true for a starting value, and
then proving that the process used to go
from one value to the next is valid. If
these are both proven, then any value can
be obtained by performing the process
repeatedly.

Discrete Mathematics
33

34

Seatwork: Mathematical induction


1. Prove that the formula is true for any
natural number n using mathematical
induction.
(1 x)(1 + x + x2 + x3 + x4 + + xn)
= 1 xn+1
2. Prove that the identity of the Fibonacci
numbers is true for all n 1.
Fibonacci identity:
A1 + A3 + A5 + A7 ++ A2n1 = A2n 1
Where: n = no. of odd subscript terms
included in the sequence

Example 5. Prove that the formula is true


for any natural number n using
mathematical induction.
0 + 1 + 2 + 3 + + n = [n(n + 1)]/2
Stronger form of mathematical induction:
Example 6. Prove that the formula is true
for any natural number n using
mathematical induction.
1 + 2 + 22 + 23 + + 2n = 2(n+1)-1
Discrete Mathematics

Discrete Mathematics
35

36

Fibonacci Numbers:
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
A10,,An1 + An2
1, 1, 2, 3, 5, 8, 13, 21, 34, 55,
89,,An

Discrete Mathematics
37

10

Вам также может понравиться