Come104 Lecture 4

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

COME104-DISCRETE

MATHEMATICS

LECTURE 4
Review
Example
 Prove, by induction that the sum of first n positive odd integers is
 1+3+5+…+(2n-1)=
Solution
The sum of first n positive odd integers is
1+3+5+…+(2n-1)=
Example
 Prove using mathematical induction that for all
Steps

 Base case: n=1

 Inductive Step:
 Suppose that holds

1+4+7+…+(3k-2)=

 Show that holds


1+4+7+…+(3k-2)+(3(k+1)-2)=

1+4+7+…+(3k-2)+(3k+1)=
Steps
 1+4+7+…+(3k-2)+(3k+1)=

 1+4+7+…+(3k-2)=

 1+4+7+…+(3k-2)+(3k+1)=

+(3k+1)
equate denominators

𝑘 ( 3 𝑘− 1 ) +6 𝑘+ 2 3 𝑘2 −𝑘+6 𝑘+2
2 2
Example
 Prove using mathematical induction that is divisible by 6 for all

 Note that an integer a is divisible by an integer b, if there is some integer m


with a=mb
 a=51, b=17 a=17 x 3=51
Solution
Base case: n=1,

Therefore P(1) is true.

Inductive Step:

Assume now is divisible by 6 for some k. Then

Assume k=2,

= 7.48 + 6
= 342
342/6= 57
İt is also divisible by 6
Hence, is divisible by 6 and so
Ɐ k (P(k)  P(k+1)) is true.
Divisible by Therefore, by induction, P(n) is true for all n
6
Example
 A sequence of integers is defined recursively as follows:

 Prove using mathematical induction that


Solution
Base case: if n=1,

Therefore P(1) is true.

Inductive Step:

Assume that for some k.

Hence, Ɐ k (P(k)  P(k+1)) is true.

By induction, P(n) is true for all n .


Set Theory
Sets
 A set is a collection or group of objects or elements or members. (Cantor
1895)

 A set is said to contain its elements.

 There must be an underlying universal set U, either specifically stated or


understood.
Sets (cont.)
 Notation:

 list the elements between braces:


 S = {a, b, c, d}={b, c, a, d, d}
(Note: listing an object more than once does not change the set.
Ordering means nothing.)

 specification by predicates:
 S= {x| P(x)},
S contains all the elements from U which make the predicate P true.

 brace notation with ellipses:


 S = { . . . , -3, -2, -1},
the negative integers.
Example
 S= {x: x is an odd positive integers}, describes the set
 S= {1,3,5,7,…}

 An alternative description of the same set is


 S= {2n-1: n is a positive integer}
Example
 Find simpler descriptions of the following sets by enumerating their
elements:

a) A={x: x is an integer and }

b) B={x: x is a day of the week not containing the letter u}

c) C={: n is an integer}
Answer
 Find simpler descriptions of the following sets by enumerating their
elements:
a) A={x: x is an integer and }

then x(x+4)=12.
Since x is an integer and the factors of 12 are ,
The only possibilities for x are x=-6 or x=2

Alternatively, solve the quadratic equation to obtain x=-6 or x=2. Therefore,

A={-6,2}
Answer
 Find simpler descriptions of the following sets by enumerating their
elements:

b) B={x: x is a day of the week not containing the letter u}

B={Monday, Wednesday, Friday}


Answer
 Find simpler descriptions of the following sets by enumerating their
elements:

c) C={: n is an integer}

C={0, 1, 4, 9,16,…}
Sets (cont.)
 Common Universal Sets

 R = is the set of all real numbers (all decimals)


 N = natural numbers = {0,1, 2, 3, . . . }, the counting numbers
 Z = all integers = {. . , -3, -2, -1, 0, 1, 2, 3, 4, . .}
 Z+ is the set of positive integers
 Q= is the set of rational numbers ={p/q: p,q integers, q≠0}
 Ø or {} is the empty set

 Notation:
 x is a member of S or x is an element of S:
 x  S.
 x is not an element of S:
 x  S.
Sets (cont.)
 Subsets

 Definition: The set A is a subset of the set B, denoted A  B, iff


x [x  A  x  B]
(if every element of A is an element of B)

Ex: A={2,3,5,7,11} and N={0,1,2,3,…}


Every element in A is automatically an element of the set N.
Sets (cont.)
 Subsets

Definition: The void set, the null set, the empty set, denoted , is the set with
no members.

Note:  is a subset of every set.

Note: A set B is always a subset of itself.


Sets (cont.)
 Definition: If A  B but A  B then we say A is a proper subset of B,
denoted A  B (in some texts).

 Definition: The set of all subset of a set A, denoted P(A), is called the
power set of A.

 Example: If A = {a, b} then


P(A) = {, {a}, {b}, {a,b}}
Sets (cont.)
 Definition: The number of (distinct) elements in A, denoted |A|, is called
the cardinality of A.

 If the cardinality is a natural number (in N), then the set is called finite,
else infinite.

 Example: A = {a, b},


|{a, b}| = 2,
|P({a, b})| = 4.
A is finite and so is P(A).

Useful Fact: |A|=n implies |P(A)| = 2n


Sets (cont.)
 Definition: The Cartesian product of A with B, denoted A x B, is the set of
ordered pairs {<a, b> | a  A  b  B}
Notation:
n
 Ai   a 1 , a 2 ,...,a n  a i  Ai 
i 1

Note: The Cartesian product of anything with  is . (why?)

 Example:
A = {a,b}, B = {1, 2, 3}
AxB = {<a, 1>, <a, 2>, <a, 3>, <b, 1>, <b, 2>, <b, 3>}
What is BxA?

 If |A| = m and |B| = n, what is |AxB|?


Sets (cont.)
 For finite sets A and B, If |A| = m and |B| = n, then |AxB|=m x n

 AxB ≠ BxA

 Example: Let A={x,y} and B={1,2,3}


 Find the Cartesian products AxB, BxA, BxB
Answer
 Example: Let A={x,y} and B={1,2,3}
 Find the Cartesian products AxB, BxA, BxB

 AxB={(x,1), (x,2), (x,3), (y,1), (y,2), (y,3)}


 BxA={(1,x), (1,y), (2,x), (2,y), (3,x), (3,y)}
 BxB={(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)}
Set Operations (cont.)
 Definition:

Two sets A and B are equal, denoted A = B, iff


x [x  A  x  B].

 Note: By a previous logical equivalence we have

A = B iff x [(x  A  x  B)  (x  B  x  A)]


or
A = B iff A  B and B  A
Set Operations (cont.)
 Definitions:

 The union of A and B, denoted A U B, is the set


{x | x  A  x  B}

 The intersection of A and B, denoted A  B, is


the set
{x | x  A  x  B}
Note: If the intersection is void, A and B are
said to be disjoint.

 The complement of A, denoted , is the set


{x | (x  A)}
Note: Alternative notation is Ac, and {x|x  A}.

 The difference of A and B, or the complement of


B relative to A, denoted A - B, is the set A 
Note: The (absolute) complement of A is U - A.

 The symmetric difference of A and B, denoted


A  B, is the set (A - B) U (B - A)
Set Operations (cont.)
 Examples:
 U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
 A= {1, 2, 3, 4, 5},
 B = {4, 5, 6, 7, 8}.
 Then

1) AB
2) AB

3) A-B
4) B-A
5) AB
Set Operations (cont.)
 Examples:
 U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
 A= {1, 2, 3, 4, 5},
 B = {4, 5, 6, 7, 8}.
 Then

1) A  B = {1, 2, 3, 4, 5, 6, 7, 8}
2) A  B = {4, 5}
3) = {0, 6, 7, 8, 9, 10}
4) = {0, 1, 2, 3, 9, 10}
5) A - B = {1, 2, 3}
6) B - A = {6, 7, 8}
7) AB = {1, 2, 3, 6, 7, 8} A  B = (A - B) U (B - A)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy