Download Introduction to Discrete Structures Instructional Material

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Abuse of notation wikipedia , lookup

Large numbers wikipedia , lookup

Big O notation wikipedia , lookup

Mathematics wikipedia , lookup

History of mathematics wikipedia , lookup

Infinity wikipedia , lookup

List of first-order theories wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

History of mathematical notation wikipedia , lookup

Non-standard analysis wikipedia , lookup

Arithmetic wikipedia , lookup

Ethnomathematics wikipedia , lookup

Principia Mathematica wikipedia , lookup

Addition wikipedia , lookup

Foundations of mathematics wikipedia , lookup

Computability theory wikipedia , lookup

Elementary mathematics wikipedia , lookup

Set theory wikipedia , lookup

Discrete mathematics wikipedia , lookup

Order theory wikipedia , lookup

Naive set theory wikipedia , lookup

Transcript
2013
Introduction to Discrete Structures
Instructional Material
Anna Loretta Q. Capanang
College of Information and Communications
Technology
6/3/2013
Table of Contents
Introduction to Discrete Structures .............................................................................................................. 3
Learning Objectives:.................................................................................................................................. 3
Pre-Activity ................................................................................................................................................ 4
Terminologies........................................................................................................................................ 5
What is Discrete Structures?..................................................................................................................... 6
Importance of Discrete Structures............................................................................................................ 6
Activity - The Boat is Sinking! .................................................................................................................... 7
Activity – Let’s play cards!......................................................................................................................... 8
Sets ................................................................................................................................................................ 9
Set Terminologies ................................................................................................................................. 9
Set Notation Symbols to Remember ...................................................................................................... 10
Parts of a Set Notation ............................................................................................................................ 10
Review of Mathematical Terminologies ............................................................................................. 12
Drills and Exercises.................................................................................................................................. 13
Venn Diagrams ........................................................................................................................................ 14
Matching Venn Diagrams .................................................................................................................... 15
Reading Venn Diagrams ...................................................................................................................... 16
Operations of a Set ................................................................................................................................. 17
Test Your understanding on Set Operations ....................................................................................... 19
General Laws on Sets .............................................................................................................................. 19
Proving Set Identities Exercise: ........................................................................................................... 20
Proving Using Venn Diagrams ............................................................................................................. 21
Proving Using Membership Table ....................................................................................................... 22
References .............................................................................................................................................. 23
Prepared by: Capanang, Anna Loretta Q.
2
Introduction to Discrete Structures
Learning Objectives:

Cultivate clear thinking and creative problem solving.

Thoroughly train in the construction and understanding of mathematical proofs.
Exercise common mathematical arguments and proof strategies.

Cultivate a sense of familiarity and ease in working with mathematical notation and
common concepts in discrete mathematics.

Teach the basic results in number theory, set theory, logic, combinatorics, and graph
theory.

Introduction of a number of case studies involving problems of Computer Technology.

Have fun in solving.
Prepared by: Capanang, Anna Loretta Q.
3
Pre-Activity
Aim


To evaluate the students ability to analyze simple counting situations in our daily lives
To assess the students’ critical thinking skills
Activity Scenario Instructions
Get 7 individuals to form the party. There are 3 girls and 4 boys in the
group. One of the girls will be the birthday celebrant. The rest are
visitors. It is a European party and it is customary to shake the hands
of the house owner before entering their premises. Let the class
observe how many handshakes the birthday celebrant did when
inviting her visitors in her house. Then allow each visitor to shake the
hands of the other visitors. Ask the class how many handshakes were
there in all.
The answer is 21. Explain that the handshake of two persons is considered as one not two.
Counting the possibilities, there will be 6+5+4+3+2+1 = 21 handshakes in all. The 7th person’s
handshake will no longer be counted since all his handshakes with the other 6 person in the
group are already counted earlier.
Next, allow the birthday celebrant to be seated on the first chair and let the visitors be seated
on the first chair and let the visitors be seated in a chair they wish to. Ask how many seating
arrangements can be done by the 6 visitors will seat anywhere?
The answer is 720. The first chair from the birthday celebrant can have 6 choices who among
the visitors can sit on it; the second chair can have 5 choices who among the rest of the visitors
can sit if the first seat is occupied, and so on. Counting it, there will be 6 x 5 x 4 x 3 x 2 x 1 = 720
possible ways to seat the visitors in 6 chairs or simply 6! = 720.
Prepared by: Capanang, Anna Loretta Q.
4
Terminologies
Discrete
Adjective. Invidually separated and distinct. It is the opposite of continous.
Synonyms. Separate, detached, distinct, abstract
Structure
It is a fundamental, tangible or intangible notion referring to the recognition, observation,
nature, and permanence of patterns and relationships of entities.
Noun. The arrangement of and relations between the parts or elements of something complex.
Verb. Construct or arrange according to a plan; give a pattern or organization to.
Synonyms.
Noun. Construction, building, fabric, frame, edifice
Verb. Construct, build, organize
Prepared by: Capanang, Anna Loretta Q.
5
What is Discrete Structures?
Discrete Structures is the study of mathematical structures that are fundamentally discrete
rather than continous. It deals with objects that come in discrete bundle. It uses a range of
techniques, some of which is seldom found in its continuous counterpart.
Importance of Discrete Structures
Discrete Structures plays a key role in Computer Science and Technology. Whether you are
designing a digital circuit, a computer program or a new programming language, you need it to
be able to reason about the design -- its correctness, robustness and dependability. It is the
mathematics underlying almost all of computer science. Here are a few examples:






Designing high-speed networks and message routing paths.
Finding good algorithms for sorting.
Performing web searches.
Analyzing algorithms for correctness and efficiency
Formalizing security requirements
Designing cryptographic protocols.
It uses a range of techniques, some of which is seldom found in its continuous counterpart.
Prepared by: Capanang, Anna Loretta Q.
6
Activity - The Boat is Sinking!
Aim:




To apply the concepts of discrete structures in sets and subsets
To illustrate sets and subsets
To understand the different ways one can put up a set or a subset
To understand the different processes or operations involved in a set
Instructions:
Announce out loud to the group: THE BOAT IS SINKING, GROUP YOURSELVES INTO:
a.
b.
c.
d.
e.
Five
One
Four
None
Three
Change the rules by announcing categorical groupings: THE BOAT IS SINKING, GROUP
YOURSELVES ACCORDING TO:
a.
b.
c.
d.
Height
Weight
Complexion
Gender
Learning Outcomes:
Students will learn to associate mathematics in our daily lives such as sets theory. They will also
realize that mathematics is in every aspect of our lives. And that our daily tasks involves critical
thinking in different levels.
Prepared by: Capanang, Anna Loretta Q.
7
Activity – Let’s play cards!
Aim:




To apply the concepts of discrete structures in sets and subsets
To illustrate sets and subsets
To understand the different ways one can put up a set or a subset
To understand the different processes or operations involved in a set
Instructions:
Group the class into 4 or 5 members each. Each group must have a deck of cards (52 playing
cards). The task is to identify how many ways can you classify a set present in a deck of 52
cards. Identify the set using roster notation or set-builder notation.
Roster Notation:
H = {1 of Hearts, 2 of Hearts, …, King of Hearts}
Set-Builder Notation:
H = {x| x ∈ of the suit of hearts}
Possible Outcomes might be:







A set of hearts/diamonds/clubs/spades
A set of counting numbers from 2 to 9
A set of odd/even numbers between 2 and 9
A set of royal flush
A set of prime numbers between 2 and 9
A set of red/black cards
A set of Jacks/Queens/Kings/Aces
Prepared by: Capanang, Anna Loretta Q.
8
Sets
A set is a well-defined collection of things. It is a collection of distinct finite or infinite objects. It
is denoted by a capital letter. A set is unordered and may be grouped according to a specific set
of rules. It may contain an empty or null set, subset, proper set and other type of sets.
Figure 1 Example of Sets
Set Terminologies
Elements
These are the distinct objects that form a set.
Cardinality of sets
It pertains to the number of elements in a set.
Equality of sets
When sets contain exactly the same quantity of elements, then they are equal sets.
Finite sets
A set with countable elements are called finite sets.
Infinite sets
A set which elements are possible to list out is called an infinite set.
Disjoint sets
When sets do not have any element in common, then they are referred to as disjoint sets.
Power set
Prepared by: Capanang, Anna Loretta Q.
9
When a set contains all subsets of a set, it is called a power set.
Figure 2 Set Terminology Table
Set Notation Symbols to Remember
Parts of a Set Notation
Figure 3 A ⊂ B
Prepared by: Capanang, Anna Loretta Q.
10
Prepared by: Capanang, Anna Loretta Q.
11
Review of Mathematical Terminologies
Natural Numbers
The positive integers (whole numbers) 1, 2, 3, etc., and sometimes zero as well
Counting Numbers
The natural numbers are the ordinary counting numbers 1, 2, 3, ... (sometimes zero is
also included)
Whole Numbers
A number without fractions; an integer
Integers
A whole number; a number that is not a fraction
Rational Numbers
An integer or a fraction
Irrational Numbers
A real number that cannot be expressed as a rational number, i.e., roots of a number
Real Numbers
Any rational or irrational number
Number Line
A line on which numbers are marked at intervals, used to illustrate simple numerical
operations.
Prepared by: Capanang, Anna Loretta Q.
12
Drills and Exercises
1. What are the subsets of {1,2,3,4}? How many subsets are there in total?
Answer:
, {1}, {2}, {3}, {4}, {1,3}, {2,4}, {1,2,3,4}
There are 8 subsets.
Explanation:
 A set always contains an empty set.
 Each element of a set can be a subset of the set.
 There are two possible subsets pertaining to odd and even numbers
 All elements of the set belong to a subset of the set.
2. How many subsets does {apple, fig, mango} have?
Answer:
, {apple}, {fig}, {mango}, {apple, fig, mango}
Explanation:
 A set always contains an empty set.
 Each element of a set can be a subset of the set.
 All elements of the set belong to a subset of the set.
3. A, B and C are sets such that A is a subset of B and B is a subset of C. Which of the
following statements must always be true?
a. B is a subset of A
c. C is a subset of A
b. C is a subset of B
d. A is a subset of C
Answer: D
Explanation:
 D will always be true because A is contained within B and where B is contained
within C.
Prepared by: Capanang, Anna Loretta Q.
13
4. P is the set of factors of 5. Q is the set of factors of 25. R is the set of factors of 125.
Which one of the following is false?
a. 𝑃 ⊂ 𝑄
c. 𝑅 ⊂ 𝑃
b. 𝑄 ⊂ 𝑅
d. 𝑃 ⊂ 𝑅
Answer: C
Explanation:
 Because R is the power set and P is the smallest subset of R.
5. A is the set factor of 12. Which one of the following is not a member of A?
a. 5
b. 4
c. 6
d. 3
Answer: A
Explanation: A = {1,2,3,4,6,12}
Venn Diagrams
A Venn diagram is a diagram using circles to represent sets, with the position and overlap of the
circles indicating the relationships between the sets.
Figure 4 An example of a Venn Diagram
Venn diagrams are useful for demonstrating general relationships between sets.
Prepared by: Capanang, Anna Loretta Q.
14
Matching Venn Diagrams
Use the table to find the Venn diagram that matches.
1. The table below shows the result of a survey of 22 people who were asked what sports
they played. Which Venn diagram best represents the information in the table?
Answer: A
Explanation:




B is not the diagram since people who plays soccer would total to 19 instead of 17.
C is not the diagram since there would only be 15 soccer players and 5 tennis players.
D is not the diagram because there would be 19 soccer players and 9 tennis players.
A is the solution because it represents the exact and actual quantity of people playing the
two sports.
Try to answer the next problem
The table below shows the result of 36 people who owned at least one car and one truck.
Which Venn diagram best represents the information in the table?
Prepared by: Capanang, Anna Loretta Q.
15
Reading Venn Diagrams
Use the Venn diagram to answer the questions.
Answer:
1.
2.
3.
4.
5.
How many socks were white and stripes?
How many socks were white?
How many socks had stripes but were not white?
How many socks were either white or had stripes, but not both?
How many socks had stripes?
10
27
15
32
25
Try to answer the next problem
1.
2.
3.
4.
5.
How many people like baseball?
How many people like both baseball and basketball?
How many people did not like both baseball and basketball?
How many people like only basketball?
How many people like only baseball?
Prepared by: Capanang, Anna Loretta Q.
16
Operations of a Set
Sets can be combined in a number of different ways to produce another set. This is what we call
set operations.
Figure 5 Diagram of Set Operations
The common set operations are union, intersection, difference, and complement.
Prepared by: Capanang, Anna Loretta Q.
17
Union
The union of sets A and B, denoted by A ∪ B , is the set defined as
A∪B={x|x∈A∪x∈B}
The union of A and B is the set we get by combining all elements in A and B into a single set.
Example 1: If A = {1, 2, 3} and B = {4,5}, then A ∪ B = {1, 2, 3, 4, 5}.
Example 2: If A = {1, 2, 3} and B = {1, 2, 4, 5}, then A ∪ B = {1, 2, 3, 4, 5}.
Note that elements are not repeated in a set.
Intersection
The intersection of sets A and B, denoted by A ∩ B , is the set defined as
A∩ B={x|x∈A ∩ x∈B}
The intersection of A and B is the set of elements that are both in A and B.
Example 3: If A = {1, 2, 3} and B = {1, 2, 4, 5} , then A ∩ B = {1, 2}.
Example 4: If A = {1, 2, 3} and B = {4, 5} , then A ∩ B = ∅.
Difference
The difference of sets A from B, denoted by A - B , is the set defined as
A-B={x|x∈A∩x∉B}
The difference of A and B sets is a set where the elements come from A and not from B.
Example 5: If A = {1, 2, 3} and B = {1, 2, 4, 5}, then A - B = {3}.
Example 6: If A = {1, 2, 3} and B = {4, 5}, then A - B = {1, 2, 3}.
Note that in general A - B ≠ B – A.
Complement
For a set A, the difference U - A , where U is the universe, is called the complement of A and it is
denoted by
. Thus
is the set of everything that is not in A.
Prepared by: Capanang, Anna Loretta Q.
18
Test Your understanding on Set Operations
Let A={a,b,c,d} and B={a,b,c,d,e,f} and answer the following questions:
1. A ∪ B
2. A ∩ B
3. A – B
4. B – A
̅
5. A
General Laws on Sets
Let all sets referred to below be subsets of a universal set U.
Prepared by: Capanang, Anna Loretta Q.
19
Proving Set Identities Exercise:
Prove the following identities, stating carefully which of the set laws you are using at each stage of the
proof.
(a) B ∪ (ø ∩ A) = B
(d) (A ∩ B) ∪ (A ∩ B ' ) = A
(b) (A ′ ∩ U) ′ = A
(e) (A ∩ B) ∪ (A ∪ B ' ) ′ = B
(c) (C ∪ A) ∩ (B ∪ A) = A ∪ (B ∩ C)
(f) A ∩ (A ∪ B) = A
Answer:
Prepared by: Capanang, Anna Loretta Q.
20
Proving Using Venn Diagrams
Prove that
Solution:
Prepared by: Capanang, Anna Loretta Q.
21
Proving Using Membership Table
Determine the truth value of X  (Y  Z )  ( X  Y )  ( X  Z ).
Solution:
Prepared by: Capanang, Anna Loretta Q.
22
References
Doyle. Set and Subsets. USA: Dartmouth University. Retrieved: June 3, 2013.
http://www.math.dartmouth.edu/~doyle/docs/finite/fm2/scan/2.pdf
Grimaldi, R.P. (2004). Discrete and Combinatorial Mathematics (5th Ed.). USA:Pearson.
Rossen, Kenneth H. (2012). Discrete Mathematics and Its Applications (7th ed). USA: McGraw Hill
Set Operations. USA: Old Dominion University. Retrieved: May 29, 2013.
http://www.cs.odu.edu/~toida/nerzic/level-a/set/set_operations.html
Discrete Mathematics. (2013). USA: WikiBooks. Set Theory Exercises. Retrieved: May 29, 2013.
http://en.wikibooks.org/wiki/Discrete_Mathematics/Set_theory/
Set Theory Identities. USA: Brown University. Retrieved: May 29, 2013.
http://cs.brown.edu/courses/cs022/docs/sets.pdf
VanderVoot, L. (2011). Set Theory. USA: St. Lawrence University. Retrieved: June 3, 2013.
http://myslu.stlawu.edu/~svanderv/chaptwo.pdf
Weiss, William A.R. (2008). An Introduction to Set Theory. Canada: Toronto University. Retrieved: May
31, 2013. http://www.math.toronto.edu/weiss/set_theory.pdf
Prepared by: Capanang, Anna Loretta Q.
23