SlideShare a Scribd company logo
1 of 34
Chapter 2
Basic Structures
Sets, Functions
Sequences, and Sums
Objectives
 Sets
 Set operations
 Functions
 Sequences
 Summations
2.1- Sets
 An unordered collection of objects
 The objects in a set are called the elements, or members. A
set is said to contain its elements.
 Some important sets in discrete mathematics
N = { 0,1,2,3,4,… }
Z = { … , -2,-1,0,1,2,…} Z+ = {0,1,2,…}
R: the set of real numbers
aA : a is an element of the set A // a belongs to A
aA: a is not an element of A
 
,0
, , , ,
p
Q r p Z q Z
q
V a u o i e
 
    
 
 

G. Cantor
Sets…
Definitions:
 Finite set: Set has n elements, n is a nonnegative integer
 A set is an infinite set if it is not finite
 Cardinality of a set |S|: Number of elements of S
 : empty set (null set), the set with no element
 Two sets are equal  they have the same elements
A = B if and only if x (xA  x B)
 A B: the set A is a subset of the set B
A  B if and only if x (xA  x B)
 A  B: A is a proper subset of B
A  B if and only if (A  B) ^ (A ≠ B)
Venn diagram shows that A
is a subset of B
Theorem 1
 
 
Pr
For every set S ,
i)
) (x )
x True
ii) S
ii) x
S
oof
x S x S T
i False
So x x S
r
S
ue
 

    
   
  
Power Sets
Given a set S, power set P(S) of S is a
set of all subsets of the set S.
S= { 1,2,3}
P(S)= {Ø,
{1}, {2},{3},
{1,2}, {1,3},{2,3},
{1,2,3}}
Cartesian Products
 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.
 Let A and B be sets. The Cartesian product of A
and B, denoted by AxB,
 
 
   
           
 
example
A= , B= 1,2,
,1 , ,2 , ,3 , ,1 , ,2 , ,
, ,
3
3
A B a a a
A B a b a A
b b b
b
For
a b
B
 
   
Cartesian Products…
 The Cartesian product of A1,A2,…,An , denoted
A1xA2x…xAn, is the set of ordered n- tuples
(a1,a2,…,an),
 AxBxC= {(a,1,0),(a,1,1),(a,2,0),(a,2,1),(a,3,0),(a,3,1),
(b,1,0),(b,1,1),(b,2,0),(b,2,1),(b,3,0),(b,3,1) }
 
 
     
1 2 1 2
... , ,..
example
A= , B= 1,2
., , 1
,3 ,
,
, 0 1
n n i i
A A A a a a a A i
For
a b
n
C
      

2.2- Set Operations
 
 
 
The of sets A and B, denoted by A B
of A and B, denoted by
symmetric differenc
A-B
of A
diffe
e
A B=A B-A B= ( ) (
and B, denoted b
rence
A-B
y A
=
B
sec :
)
Unio
x x A x B
Inter t
n
A B x x A x B
x x A
The
The
io
x B B
n
x A



 
    
        
 
 
is the universal set, complement of A is denoted by
=U-A=
U A
A B x
x A
x
A
A x B
x
  

 
Set Identities
Identity – See proofs : pages 125, 126 Name
A  = A A U = A Identity laws
A U= U A  =  Domination laws
A A=A AA=A Idempotent laws
Complementation law
AB = B  A AB=B A Commutative laws
A (B C) = (A B)  C
A (B  C)= (A B)  C
Associative laws
A (B  C) = (A B) (A  C)
A  (B C) = (A  B) (A  C)
Distributive laws
A  B = A  B A B = A  B De Morgan laws
A  (A B) = A A  (AB) = A Absorption
A  A = U A A =  Complement laws
A
A 
Generalized Unions and Intersections
 
1 2 3
1
... , 1,2,...,
n
n i i
i
A A A A A x x A i n

        
 
1 2 3
1
1 2 3
...
...
n
n i
i
n
A A A A A
x x A x A x A x A

    
        
Computer Representation of Sets
• Use bit string U={1,2,3,4,5,6,7,8,9,10}
• A= {1,3,5,7,9 }  A = “1010101010”
• B= { 1,8,9}  B = “1000000110”
Computer Representation of
Sets
 A = “1010101010”
 B = “1000000110”
 
 
10 1010 1010 10 0000 0110=10 1010 1110
1,3,5,7,
A B=10 1010 1010 10 0000 0110 10 0000 0010
A B
8,9
1,9
A B
A B
  



  

 f: A → B : function f from A to B (or function f maps A to B)
 A: domain of f
 B: codomain of f
2.3. Functions / Mappings /
Transformations…
Functions as sets of ordered pairs
Functions / Mappings /
Transformations…
What are functions?
 f: →  : f(x) = x2 + 2
 f: →  : f(x) = 1/(x-1)2 + 5x
 f: →  : f(x) = (2x+5)/7
 f: →  : f(x) = (2x+5)2/(7-2x)
Some Important Functions
Floor function
f:  → such that f(x)= x = largest integer
that less than or equal to x, x x
Ceiling function
f:  → such that f(x)= x = smallest integer
that greater than or equal to x, x x
See Figure 10 – Page 143
One-to-One/ Injective functions
Function f is one-to-one (or
injective) if and only if
a b → f(a) f(b)
for all a and b in the domain of f.
 f :  → , f(x) = x2
f is not one-to-one
(we have f(-1) = f(1))
Onto Functions
A function f from A to B is called onto, or
surjective, iff
for every element b in B there is an element
a in A with f(a)=b.
 f:  → , f(m) =m-1
f is onto because y , y=f(m)=m-1,
where m=y+1
One-to-one Correspodent / Bijective
Functions
Function f is a one-to-one
corespondence or a bijection if it is both
one-to-one and onto.
f: {A,B,…,Z} →{65,66,…,90} is a bijection
Inverse Functions
Let f is a bijection from A to B. The inverse function,
denoted by f-1, of f is the function that assigns to an
element b belonging to B the unique element a in A such
that f(a)=b. Hence f-1(b)=a when f(a)=b.
Inverse Functions…
f:→ such that f(x)=x+1
Is f invertible? And if it is, what is its inverse?
Step 1: Show that f is onto
f(y-1)=y for all y
 f is onto
Step 2: Show that f is one-to-one
f(a)=a+1= f(b)=b+1  a=b  f is one-to-one
 f is bijection  f is invertible
Step 3: Find inverse function
f(x)= y=x+1 x=f-1(y)
x=y-1  f-1(y)=y-1
Composition of Functions
Let g:A → B, f: B → C
The composition of f and g, denoted by fg, is defined by:
(fg)(x)= f(g(x))
Example:
f:  →, f(x)=x+1
g:→, g(x)= x2
(fg)(x)= f(g(x))= f(x2) = x2+1
(gf)(x) = g(f(x)) = g(x+1)= (x+1)2
2.4- Sequences
 Sequence : a1, a2, a3,…, an,…
Ex: 1,3,5,8 : Finite sequence
Ex: 1, 1, 2, 3, 5, 8, 13,… : Infinite sequence
 A sequence is a function from a subset of
integers to a set S.
 an : image of the integer n
 ai : a term of the sequence
 {an= 1/n}: +→   1, 1/2, 1/3, 1/4, …
Sequences…
Geometric progression
f(n) = arn  a, ar, ar2, ar3, …, arn
Arithmetic progression
f(n) = a + nd  a, a+d, a+ 2d, … , a+nd
a: initial term,
r: common ratio, a real number
d: common difference, real number
Do yourself
bn= (-1)n , n>=0 cn= 2(5)n , n>=0
tn= 7-3n, n>=0 an= -1 + 4n, n>=0
Some Useful Sequences
Summations


 




 





 n
j
m j
n
m
j j
n
m
j
j
n
m
m
m a
a
a
a
a
a
a ...
2
1
a : Sequence
j : Index of summation
m: Lower limit
n : Upper limit
See examples 10, 11. Page 154
// 1 + 2 +3+4+…+n
long sum1 ( int n) // n additions
{ long S=0;
for (int i=1; i<=n; i++) S+= i;
return S;
}
// 1 addition, 1 multiplication, 1 division
long sum2 (int n)
{ return ((long)n) * (n+1)/2;
}
Summations….
Theorem 1- (Summation of geometric series)
See the proofs in page 155
Some Useful Summation Formulae
See example 15, page 157
Cardinality
 Cardinality = number of elements in a set.
 The sets A and B have the same cardinality if and only if
there is a one-to-one correspondence from A to B
 A set that is either finite or has the same cardinality as
the set of positive integers is called countable.
 A set that is not countable is called uncountable.
 When a infinite set S is countable, we denote the
cardinality of S is |S|= ‫א‬0 (aleph null)
 For example, || ‫א‬0 because  is countable and infinite
but  is uncountable and infinite, and we say ||2 ‫א‬0
Examples p.159, 160
sets countable uncountable cardinality
{a, b, …, z}, {x| x5 -3x2 – 11 = 0},
…
  <
{0, 2, 4, …, }   ‫א‬0
N, Z+, Z, Q, Z Z, …   ‫א‬0
{x| 0 < x < 1}, R,…   2‫א‬0
Summary
 Sets
 Set operations
 Functions
 Sequences
 Summations
Thanks

More Related Content

Similar to 02-Basic Structures .ppt

Ch1 sets and_logic(1)
Ch1 sets and_logic(1)Ch1 sets and_logic(1)
Ch1 sets and_logic(1)Kwonpyo Ko
 
SETS - Vedantu.pdf
SETS - Vedantu.pdfSETS - Vedantu.pdf
SETS - Vedantu.pdfAneeshRenu
 
Answers Of Discrete Mathematics
Answers Of Discrete MathematicsAnswers Of Discrete Mathematics
Answers Of Discrete MathematicsSabrina Green
 
01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdfRajuSingh806014
 
Mathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfMathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfgowhiksankar54
 
Recursive Definitions in Discrete Mathmatcs.pptx
Recursive Definitions in Discrete Mathmatcs.pptxRecursive Definitions in Discrete Mathmatcs.pptx
Recursive Definitions in Discrete Mathmatcs.pptxgbikorno
 
CMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set OperationsCMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set Operationsallyn joy calcaben
 
Relations & functions
Relations & functionsRelations & functions
Relations & functionsindu thakur
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on setsRahul Avicii
 
Multilinear Twisted Paraproducts
Multilinear Twisted ParaproductsMultilinear Twisted Paraproducts
Multilinear Twisted ParaproductsVjekoslavKovac1
 
Set and Set operations, UITM KPPIM DUNGUN
Set and Set operations, UITM KPPIM DUNGUNSet and Set operations, UITM KPPIM DUNGUN
Set and Set operations, UITM KPPIM DUNGUNbaberexha
 
POWERPOINT (SETS & FUNCTIONS).pdf
POWERPOINT (SETS & FUNCTIONS).pdfPOWERPOINT (SETS & FUNCTIONS).pdf
POWERPOINT (SETS & FUNCTIONS).pdfMaryAnnBatac1
 
Calculus of One Variable
Calculus of One VariableCalculus of One Variable
Calculus of One Variabledilip ghule
 

Similar to 02-Basic Structures .ppt (20)

Ch1 sets and_logic(1)
Ch1 sets and_logic(1)Ch1 sets and_logic(1)
Ch1 sets and_logic(1)
 
SETS - Vedantu.pdf
SETS - Vedantu.pdfSETS - Vedantu.pdf
SETS - Vedantu.pdf
 
Answers Of Discrete Mathematics
Answers Of Discrete MathematicsAnswers Of Discrete Mathematics
Answers Of Discrete Mathematics
 
01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf
 
2.1 Sets
2.1 Sets2.1 Sets
2.1 Sets
 
Mathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdfMathematics JEE quick revision notes pdf
Mathematics JEE quick revision notes pdf
 
Sets
SetsSets
Sets
 
Recursive Definitions in Discrete Mathmatcs.pptx
Recursive Definitions in Discrete Mathmatcs.pptxRecursive Definitions in Discrete Mathmatcs.pptx
Recursive Definitions in Discrete Mathmatcs.pptx
 
CMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set OperationsCMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set Operations
 
Functions (Theory)
Functions (Theory)Functions (Theory)
Functions (Theory)
 
Ch01-2.ppt
Ch01-2.pptCh01-2.ppt
Ch01-2.ppt
 
Relations & functions
Relations & functionsRelations & functions
Relations & functions
 
Final maths presentation on sets
Final maths presentation on setsFinal maths presentation on sets
Final maths presentation on sets
 
SET THEORY
SET THEORYSET THEORY
SET THEORY
 
Sets class 11
Sets class 11Sets class 11
Sets class 11
 
Multilinear Twisted Paraproducts
Multilinear Twisted ParaproductsMultilinear Twisted Paraproducts
Multilinear Twisted Paraproducts
 
Set and Set operations, UITM KPPIM DUNGUN
Set and Set operations, UITM KPPIM DUNGUNSet and Set operations, UITM KPPIM DUNGUN
Set and Set operations, UITM KPPIM DUNGUN
 
POWERPOINT (SETS & FUNCTIONS).pdf
POWERPOINT (SETS & FUNCTIONS).pdfPOWERPOINT (SETS & FUNCTIONS).pdf
POWERPOINT (SETS & FUNCTIONS).pdf
 
Math task 3
Math task 3Math task 3
Math task 3
 
Calculus of One Variable
Calculus of One VariableCalculus of One Variable
Calculus of One Variable
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

02-Basic Structures .ppt

  • 1. Chapter 2 Basic Structures Sets, Functions Sequences, and Sums
  • 2. Objectives  Sets  Set operations  Functions  Sequences  Summations
  • 3. 2.1- Sets  An unordered collection of objects  The objects in a set are called the elements, or members. A set is said to contain its elements.  Some important sets in discrete mathematics N = { 0,1,2,3,4,… } Z = { … , -2,-1,0,1,2,…} Z+ = {0,1,2,…} R: the set of real numbers aA : a is an element of the set A // a belongs to A aA: a is not an element of A   ,0 , , , , p Q r p Z q Z q V a u o i e             G. Cantor
  • 4. Sets… Definitions:  Finite set: Set has n elements, n is a nonnegative integer  A set is an infinite set if it is not finite  Cardinality of a set |S|: Number of elements of S  : empty set (null set), the set with no element  Two sets are equal  they have the same elements A = B if and only if x (xA  x B)  A B: the set A is a subset of the set B A  B if and only if x (xA  x B)  A  B: A is a proper subset of B A  B if and only if (A  B) ^ (A ≠ B) Venn diagram shows that A is a subset of B
  • 5. Theorem 1     Pr For every set S , i) ) (x ) x True ii) S ii) x S oof x S x S T i False So x x S r S ue               
  • 6.
  • 7.
  • 8. Power Sets Given a set S, power set P(S) of S is a set of all subsets of the set S. S= { 1,2,3} P(S)= {Ø, {1}, {2},{3}, {1,2}, {1,3},{2,3}, {1,2,3}}
  • 9. Cartesian Products  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.  Let A and B be sets. The Cartesian product of A and B, denoted by AxB,                       example A= , B= 1,2, ,1 , ,2 , ,3 , ,1 , ,2 , , , , 3 3 A B a a a A B a b a A b b b b For a b B      
  • 10. Cartesian Products…  The Cartesian product of A1,A2,…,An , denoted A1xA2x…xAn, is the set of ordered n- tuples (a1,a2,…,an),  AxBxC= {(a,1,0),(a,1,1),(a,2,0),(a,2,1),(a,3,0),(a,3,1), (b,1,0),(b,1,1),(b,2,0),(b,2,1),(b,3,0),(b,3,1) }           1 2 1 2 ... , ,.. example A= , B= 1,2 ., , 1 ,3 , , , 0 1 n n i i A A A a a a a A i For a b n C        
  • 11. 2.2- Set Operations       The of sets A and B, denoted by A B of A and B, denoted by symmetric differenc A-B of A diffe e A B=A B-A B= ( ) ( and B, denoted b rence A-B y A = B sec : ) Unio x x A x B Inter t n A B x x A x B x x A The The io x B B n x A                        is the universal set, complement of A is denoted by =U-A= U A A B x x A x A A x B x      
  • 12. Set Identities Identity – See proofs : pages 125, 126 Name A  = A A U = A Identity laws A U= U A  =  Domination laws A A=A AA=A Idempotent laws Complementation law AB = B  A AB=B A Commutative laws A (B C) = (A B)  C A (B  C)= (A B)  C Associative laws A (B  C) = (A B) (A  C) A  (B C) = (A  B) (A  C) Distributive laws A  B = A  B A B = A  B De Morgan laws A  (A B) = A A  (AB) = A Absorption A  A = U A A =  Complement laws A A 
  • 13. Generalized Unions and Intersections   1 2 3 1 ... , 1,2,..., n n i i i A A A A A x x A i n             1 2 3 1 1 2 3 ... ... n n i i n A A A A A x x A x A x A x A                Computer Representation of Sets • Use bit string U={1,2,3,4,5,6,7,8,9,10} • A= {1,3,5,7,9 }  A = “1010101010” • B= { 1,8,9}  B = “1000000110”
  • 14. Computer Representation of Sets  A = “1010101010”  B = “1000000110”     10 1010 1010 10 0000 0110=10 1010 1110 1,3,5,7, A B=10 1010 1010 10 0000 0110 10 0000 0010 A B 8,9 1,9 A B A B          
  • 15.  f: A → B : function f from A to B (or function f maps A to B)  A: domain of f  B: codomain of f 2.3. Functions / Mappings / Transformations…
  • 16. Functions as sets of ordered pairs
  • 17. Functions / Mappings / Transformations… What are functions?  f: →  : f(x) = x2 + 2  f: →  : f(x) = 1/(x-1)2 + 5x  f: →  : f(x) = (2x+5)/7  f: →  : f(x) = (2x+5)2/(7-2x)
  • 18. Some Important Functions Floor function f:  → such that f(x)= x = largest integer that less than or equal to x, x x Ceiling function f:  → such that f(x)= x = smallest integer that greater than or equal to x, x x See Figure 10 – Page 143
  • 19. One-to-One/ Injective functions Function f is one-to-one (or injective) if and only if a b → f(a) f(b) for all a and b in the domain of f.  f :  → , f(x) = x2 f is not one-to-one (we have f(-1) = f(1))
  • 20. Onto Functions A function f from A to B is called onto, or surjective, iff for every element b in B there is an element a in A with f(a)=b.  f:  → , f(m) =m-1 f is onto because y , y=f(m)=m-1, where m=y+1
  • 21. One-to-one Correspodent / Bijective Functions Function f is a one-to-one corespondence or a bijection if it is both one-to-one and onto. f: {A,B,…,Z} →{65,66,…,90} is a bijection
  • 22. Inverse Functions Let f is a bijection from A to B. The inverse function, denoted by f-1, of f is the function that assigns to an element b belonging to B the unique element a in A such that f(a)=b. Hence f-1(b)=a when f(a)=b.
  • 23. Inverse Functions… f:→ such that f(x)=x+1 Is f invertible? And if it is, what is its inverse? Step 1: Show that f is onto f(y-1)=y for all y  f is onto Step 2: Show that f is one-to-one f(a)=a+1= f(b)=b+1  a=b  f is one-to-one  f is bijection  f is invertible Step 3: Find inverse function f(x)= y=x+1 x=f-1(y) x=y-1  f-1(y)=y-1
  • 24. Composition of Functions Let g:A → B, f: B → C The composition of f and g, denoted by fg, is defined by: (fg)(x)= f(g(x)) Example: f:  →, f(x)=x+1 g:→, g(x)= x2 (fg)(x)= f(g(x))= f(x2) = x2+1 (gf)(x) = g(f(x)) = g(x+1)= (x+1)2
  • 25. 2.4- Sequences  Sequence : a1, a2, a3,…, an,… Ex: 1,3,5,8 : Finite sequence Ex: 1, 1, 2, 3, 5, 8, 13,… : Infinite sequence  A sequence is a function from a subset of integers to a set S.  an : image of the integer n  ai : a term of the sequence  {an= 1/n}: +→   1, 1/2, 1/3, 1/4, …
  • 26. Sequences… Geometric progression f(n) = arn  a, ar, ar2, ar3, …, arn Arithmetic progression f(n) = a + nd  a, a+d, a+ 2d, … , a+nd a: initial term, r: common ratio, a real number d: common difference, real number Do yourself bn= (-1)n , n>=0 cn= 2(5)n , n>=0 tn= 7-3n, n>=0 an= -1 + 4n, n>=0
  • 28. Summations                 n j m j n m j j n m j j n m m m a a a a a a a ... 2 1 a : Sequence j : Index of summation m: Lower limit n : Upper limit See examples 10, 11. Page 154 // 1 + 2 +3+4+…+n long sum1 ( int n) // n additions { long S=0; for (int i=1; i<=n; i++) S+= i; return S; } // 1 addition, 1 multiplication, 1 division long sum2 (int n) { return ((long)n) * (n+1)/2; }
  • 29. Summations…. Theorem 1- (Summation of geometric series) See the proofs in page 155
  • 30. Some Useful Summation Formulae See example 15, page 157
  • 31. Cardinality  Cardinality = number of elements in a set.  The sets A and B have the same cardinality if and only if there is a one-to-one correspondence from A to B  A set that is either finite or has the same cardinality as the set of positive integers is called countable.  A set that is not countable is called uncountable.  When a infinite set S is countable, we denote the cardinality of S is |S|= ‫א‬0 (aleph null)  For example, || ‫א‬0 because  is countable and infinite but  is uncountable and infinite, and we say ||2 ‫א‬0
  • 32. Examples p.159, 160 sets countable uncountable cardinality {a, b, …, z}, {x| x5 -3x2 – 11 = 0}, …   < {0, 2, 4, …, }   ‫א‬0 N, Z+, Z, Q, Z Z, …   ‫א‬0 {x| 0 < x < 1}, R,…   2‫א‬0
  • 33. Summary  Sets  Set operations  Functions  Sequences  Summations

Editor's Notes

  1. GEORG CANTOR (1845-1 918), the father of set theory.
  2. No confusion between two sets {} and . The first set has one element, the second set has no element.
  3. If the set S has n elements, then the power set P(S) has 2n elements. No confusion between “subsets” and “element” when dealing with a power set. Every “subset” of S is an “element” of P(S) (the power set of S).
  4. The word “ordered” is important. That means, (a , b) and (b, a) are not equal unless a = b. In general, AB is different from BA. Note that if A or B is empty, then AB and BA are also empty. A subset R of the Cartesian product AB is called a relation from A to B. We will study relations in the Chapter 8.
  5. - The difference of A and B is also called the complement of B with respect to A.
  6. Note that some students forget using De Morgan Laws to form complements of sets. They sometimes make similar errors in propositional logic, such as, incorrectly, that (p  q)  p  q.
  7. - The universal set U is represented by the string 1111111111
  8. Suppose that two sets A and B are represented by the strings ai and bj. The string ci representing the union of A and B can be found as: for all values of i, if ai = bi =0 then ci = 0 else ci = 1. The string ci representing the intersection of A and B can be found as: for all values of i, if ai = bi =1 then ci = 1 else ci = 0. The string ci representing the complement of A can be found as: ci = 1-ai.
  9. The function f: A B is not A, it is not B, it is not an element of A or B. It is not an action on just one element of A. The function f: A B means that f is a rule that apply to every element of A and in each case yield EXACTLY ONE result in B. The function f: R R, f(x) = x2 is a many-to-one action, but f: R R, f(x) = ±x is not a function (one-to-many action).
  10. f: →  : f(x) = 1/(x-1)2 + 5x is not a function because f cannot apply to 1. f: →  : f(x) = (2x+5)2/(7-2x) is a function. Note that domain of the function is . So, 7-2x is nonzero.
  11. - Floor and ceiling functions always produce integers.
  12. On-to-one function is a function that all images are different. One-to-one: a b (a  b  f(a)  f(b))  a b (f(a) = f(b)  a = b). Not one-to-one: a b (a  b  f(a) = f(b)).
  13. f: A  B is onto if yBxA (f(x) = y). f: A  B is not onto if yBxA (f(x)  y).
  14. Note that f-1 is NOT 1/f, which is defined by (1/f) = 1/f(x). For example, if f(x) = 2x + 3 then (1/f)(x) = 1/(2x+3), but f-1(x) = (x-3)/2
  15. - If a function f is invertible and f-1 is the inverse function of f, then (ff-1)(x) = x and (f-1f)(x) = x.
  16. - The function f:{0, 1, 2, 3, …}  {0, 2, 4, 6, …}, f(m) = 2m is a bijection. So, {0, 1, 2, 3, …} has the same cardinality as {0, 2, 4, 6, …}.
  17. - Cardinalities of some countable/uncountable sets.