+ All Categories
Home > Documents > MELJUN CORTES Automata Lecture Review of Important Concepts 1

MELJUN CORTES Automata Lecture Review of Important Concepts 1

Date post: 07-Aug-2018
Category:
Upload: meljun-cortes-mbampa
View: 213 times
Download: 0 times
Share this document with a friend

of 7

Transcript
  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    1/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 1 of 15

    TOPIC TITLE: Set Theory, Functions, and Relations

    Specific Objectives:

     At the end of the topic session, the students are expected to:

    Cognit ive:

    1. Explain what sets are.2. Define the different terminologies related to sets such as

    subsets, infinite sets, empty sets, etc.3. Identify and correctly use the different notations of set theory.4. Apply the different operations performed on sets such as union,

    intersection, complement, Cartesian product, etc.5. Use the set-builder notation to describe sets.

    6. Explain how power sets are formed.7. Differentiate sets from sequences.8. Define function.9. Identify the domain and range of a given function.10. Describe a binary relation.11. Identify if a given relation is reflexive, symmetric, and transitive.12. Identify if a given relation is an equivalence function.

    Affective:

    1. Listen to others with respect.2. Participate in class discussions actively.

    MATERIALS/EQUIPMENT:

    o  topic slideso  OHP

    TOPIC PREPARATION:

    o  Have the students review whatever topics were discussed duringthe previous semesters.

    o  Prepare the slides to be presented in class.o  It is imperative for the instructor to incorporate various kinds of

    teaching strategies while discussing the suggested topics. o  Prepare additional examples on the topic to be presented. 

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    2/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 2 of 15

    Set TheoryPage 1 of 26

    Review of Set Theory

    Sets

     A set  is a collection of objects such as numbers, letters, symbols, or other sets.These objects are called the members  or elements  of the set.

    For example:

    If set A = {0, 2, 4, 8, 16}, then the members or elements of set  A are 0, 2, 4, 8,and 16.

    It’s also possible to have other sets as members of sets such as B = {{1, 2}, {3, 4,5}, {6, 7, 8, 9}}. The members of set B are the sets {1, 2}, {3, 4, 5}, and {6, 7, 8,9}

    [Page 1 of 26] 

    Set MembershipPage 2 of 26

    In sets, the ordering and repetition of the members are not important. Thismeans that the set {1, 2, 3} is the same as the set {2, 3, 1}. As long as two setshave the same elements, they are considered the same.

    Similarly, the set {1, 2, 3, 2} is the same as the set {1, 2, 3}. Since the element 2appeared twice in the first set, then one of them can be removed withoutaffecting the set.

    Set Membership

    The symbol is used to denote membership in a set while the symbol is usedto denote non-membership in a set.

    For example:

     Assume that set A = {0, 2, 4, 8, 16}. Since 8 is a member of set A, then it can bewritten as 8  A (read as “8 is a member of set  A”). Similarly, since 7 is not amember of set A, then 7  A (“7 is not a member of set A”).

    [Page 2 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    3/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 3 of 15

    SubsetsPage 3 of 26

    Subsets

    For two sets A and B, B is a subset of  A if every member of B is also a memberof A.

    Set B is a subset of set A is denoted by B   A.

    For example:

    If set A = {0, 2, 4, 8, 16} and set B = {2, 8}, then B A since all the elements of B are in set A.

    Take note that a set is a subset of itself ( A   A). This is due to the fact thatevery element is present in itself.

    [Page 3 of 26]

    Infinite Set and Empty SetPage 4 of 26

    Infinite Set

     An infinite set is a set that has infinitely many members.

     As an example, the set of integers Z  = {…, -3, -2, -1, 0, 1, 2, 3, …} is an infiniteset. The set of natural numbers N  = {0, 1, 2, 3, …} is also an infinite set.   [Theellipses (…) indicate extension of the sequence using the pattern.] 

    Empty Set

     An empty set (or the null set) is a set that contains no members.

    If set A is an empty set, it is written as A = { } or A = .

    Take note that the empty set is a subset of any other set. This is because thereare no elements in the empty set that are not in any other set.

    [Page 4 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    4/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 4 of 15

    Union and Intersection of SetsPage 5 of 26

    Union and Intersection of Sets 

    The union  of two sets A and B is obtained by forming a single set that containsall the elements in A and B.

    The union of sets A and B is written as A  B.

    For example:

    Set A = {1, 2, 3, 4}

    Set B = {3, 4, 5, 6}

    The union of sets A and B is obtained by combining the elements of both setsthereby resulting to {1, 2, 3, 4, 3, 4, 5, 6}. Since the elements 3 and 4 werewritten twice, the duplicates may be eliminated. So,

     A  B = {1, 2, 3, 4, 5, 6}

    [Page 5 of 26]

    Union and Intersection of Sets(continuation)Page 6 of 26

    Union and Intersection of Sets (continuation) 

    The intersect ion  of two sets  A  and B  is obtained by forming a single set thatcontains all the elements that are in both A and B.

    The intersection of sets A and B is written as A  B.

    For example:

    Set A = {1, 2, 3, 4}

    Set B = {3, 4, 5, 6}

    The intersection of sets  A and B is obtained by getting the elements that arecommon to both sets thereby resulting in

     A  B = {3, 4}

    If A  B = (they have no common elements), then sets A and B are said to bedisjoint .

    For example:

    Set A = {1, 2, 3, 4}

    Set B = {5, 6, 7, 8}

     A  B =

    [Page 6 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    5/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 5 of 15

    Complement of SetsPage 7 of 26

    The Complement of Sets 

     Assume set  A is a subset of set B ( A  B). The complement  of  A with respectto B is the set of all elements in B that are not in A.

    The complement of set A is written as Ā or A . 

    In this context, the bigger set (set B in this case) is referred to as the superset oruniverse.

    For example:

    Set A = {3, 4}Set B = {1, 2, 3, 4, 5, 6}

    Since the elements 1, 2, 5, and 6 are the elements of B that are not in A, thenthe complement of set A with respect to the assumed superset B is:

     A = {1, 2, 5, 6}

    [Page 7 of 26]

    Set-Builder NotationPage 8 of 26

    Set-Builder Notation

    The set-bui lder n otat ion   is used to describe a set containing elements thathave a certain property or follow a certain rule. Instead of listing down eachelement of the set as is usually done, there are times when simply “describing” the elements of the set would be more practical.

    The following designations are used in conjunction with the set-builder notation:

    N  = set of natural numbers

    Z  = set of all integers

    R  = set of all real numbers

    [Page 8 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    6/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 6 of 15

    Set-Builder Notation (continuation)Page 9 of 26

    Set-Builder Notation (continuation)

    For example:

     A = { x    x   Z , 10

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    7/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 7 of 15

    Power SetsPage 11 of 26

    Power Sets 

    Recall that a set may contain other sets. With that, the power set of A is definedas the set of all subsets of set A.

    The power set of A is written as P ( A) or 2 A

    .

    For example:

    Let set A = {1, 2, 3}.

    The power set may obtained by first forming all possible subsets of set A.These are:

    (the empty set is a subset of any set){1}{2}{3}{1, 2}

    {1, 3}{2, 3}{1, 3}{1, 2, 3} (a set is a subset of itself}

    The power set of A is therefore: 

    P ( A) = { , {1}, {2}, {3}, {1,2}, {2, 3}, {1, 3}, {1, 2, 3}}

    [Page 11 of 26]

    Sequences and TuplesPage 12 of 26

    Sequences and Tuples 

    Recall that in sets, the ordering and repetition of the members are not important.So the set {1, 2, 3} is the same as the set {2, 3, 1}.

    Sequences are similar to sets except for the fact that the ordering and repetitionof the members in sequences are important.

    This means that the sequence {1, 2, 3} is different from the sequence {2, 3, 1}since the ordering in which the members are listed is significant.

    Similarly, the sequence {1, 2, 3, 2} is different from the sequence {1, 2, 3}because repetition in sequences is likewise important.

    [Page 12 of 26] 

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    8/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 8 of 15

    Sequences and Tuples(continuation)Page 13 of 26

    Sequences and Tuples (continuation)

    Like sets, sequences may be finite and infinite. Finite sequences are calledtuples .

    More specifically, a sequence with k  elements is a k -tuple.

    For example:

    The sequence {1, 2, 3} is a 3-tuple while the sequence {a, b} is a 2-tuple.

     A 2-tuple is often called a pair .

    [Page 13 of 26]

    Cartesian Products of SetsPage 14 of 26

    Cartesian Products of Sets

    The Cartesian Produc t , or  Cross Produc t  of two sets A and B, is the set of all2-tuples or pairs wherein the first element of a pair is a member of set  A and thesecond element of a pair is a member of set  B.

    The Cartesian product of sets A and B is written as A  B.

    Examples: Let set A = {1, 2} and set B = {x, y}

    The Cartesian product of A and B ( A  B) can be obtained by first forming

    all possible pairs wherein the first element of a pair is a member of set  A and the second element of a pair is a member of set B. These are:

    {1, x}{1, y}{2, x}{2, y}

    Therefore:  A  B = {{1, x}, {1, y}, {2, x}, {2, y}}

    The Cartesian product of B and A (B   A) can be obtained by first formingall possible pairs wherein the first element of a pair is a member of set  B and the second element of a pair is a member of set A. These are:

    {x, 1}{x, 2}{y, 1}{y, 2}

    Therefore: B   A = {{x, 1}, {x, 2}, {y, 1}, {y, 2}}

    Note that the order when taking the Cartesian product is significant. In general, A  B is not the same as B   A.

    [Page 14 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    9/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 9 of 15

    Cartesian Products of Sets(continuation)Page 15 of 26

    Cartesian Products of Sets (continuation)

    More examples: Let set A = {1, 2, 3} and set B = {x, y}

    The Cartesian product of A and B ( A  B) can be obtained by first forming

    all possible pairs wherein the first element of a pair is a member of set  A and the second element of a pair is a member of set B. These are:

    {1, x}{1, y}{2, x}{2, y}{3, x}{3, y}

    Therefore:  A  B = {{1, x}, {1, y}, {2, x}, {2, y}, {3, x}, {3, y}}

    The Cartesian product of B and A (B   A) can be obtained by first formingall possible pairs wherein the first element of a pair is a member of set  B 

    and the second element of a pair is a member of set A. These are:

    {x, 1}{x, 2}{x, 3}{y, 1}{y, 2}{y, 3}

    Therefore:B   A = {{x, 1}, {x, 2}, {x, 3}, {y, 1}, {y, 2}, {y, 3}}

    The Cartesian product of A and A ( A   A) can be obtained by first formingall possible pairs wherein the first and the second elements of a pair areboth from set A. These are:

    {1, 1}{1, 2}{1, 3}{2, 1}{2, 2}{2, 3}{3, 1}{3, 2}{3, 3}

    Therefore: A   A = {{1, 1}, {1, 2}, {1, 3}, {2, 1}, {2, 2}, {2, 3}, {3, 1}, {3, 2}, {3, 3}}

    The Cartesian product of B and B (B  B) can be obtained by first formingall possible pairs wherein the first and the second elements of a pair areboth from set B. These are:

    {x, x}{x, y}{y, x}{y, y}

    Therefore:B  B = {{x, x}, {x, y}, {y, x}, {y, y}}

    [Page 15 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    10/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 10 of 15

    Cartesian Products of Sets(continuation)Page 16 of 26

    Cartesian Products of Sets (continuation)

    The Cartesian product can be extended to more than two sets. Generally, theCartesian product of k  sets A1, A2 , …, Ak , is the set of all k -tuples (a1, a2 , …, ak )where ai    Ai .

    For example: Let set A = {1, 2, 3}, set B = {x, y}, and set C  = {$, %}

    The Cartesian product of A, B, and C  ( A  B  C ) can be obtained by firstforming all possible 3-tuples wherein the first element is a member of set  

     A, the second element of is a member of set  B, and the third element ofis a member of set C .  These are:

    {1, x, $}{1, x, %}{1, y, $}{1, y, %}{2, x, $}{2, x, %}

    {2, y, $}{2, y, %}{3, x, $}{3, x, %}{3, y, $}{3, y, %}

    Therefore:

     A  B  C  = {{1, x, $}, {1, x, %}, {1, y, $}, {1, y, %}, {2, x, $}, {2, x, %},{2, y, $}, {2, y, %}, {3, x, $}, {3, x, %}, {3, y, $}, {3, y, %}}

    The Cartesian product of C , B, and C  (C   B  C ) can be obtained by firstforming all possible 3-tuples wherein the first element is a member of set  C , the second element of is a member of set B, and the third element ofis a member of set C  again. These are:

    {$, x, $}{$, x, %}{$, y, $}{$, y, %}{%, x, $}{%, x, %}{%, y, $}{%, y, %}

    Therefore:

    C   B  C  = {{$, x, $}, {$ , x, %}, {$, y, $}, {$, y, %}, {%, x, $}, {% , x, %},{%, y, $}, {%, y, %}}

    [Page 16 of 26] 

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    11/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 11 of 15

    FunctionsPage 17 of 26

    Functions and Relations 

    Functions

     A funct ion   is an object that defines a basic input-output relationship between

    two quantities. A function accepts an input value and produces an output basedon some pre-defined rule.

    Functions are usually written as f ( x ) = y . For a function f , if the input is x  then theoutput is y . 

    Examples:

    Given a function: f ( x ) = x  + 1, if the input x  = 2, then the output is f ( x ) = 3.

    Given a function f ( x ) = x2, if the input x  = 2, then the output is f ( x ) = 4.

    [Page 17 of 26]

    Functions (continuation)Page 18 of 26

    Functions (continuation)

     Always remember that for any given function, the same input always producesthe same output. It is possible though for two different inputs to produce thesame output.

    The set of all possible values the input of a function can take on is called thedomain  of the function. In other words, the domain is the set of all values thatthe function can accept as input and still operate correctly.

    The set of all possible output values of a function is called the range   of thefunction.

    For example:

    For the function f ( x ) = x  + 1, the domain and range is the set of all real numbers.

    For the function f ( x ) =  x 2, the domain is the set of all real numbers while the

    range is the set of non-negative real numbers. This is because the output is thesquare of the input and it will never be negative.

    [Page 18 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    12/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 12 of 15

    Functions (continuation)Page 19 of 26

    Functions (continuation)

     A function is also called a mapping   because for each input value, acorresponding output value is produced. So an output value is mapped orassociated to an input value.

    For example:

    For the function f ( x ) = x  + 1, if x  = 2, then f ( x ) = 3.

    It can then be said that the function f ( x ) maps the input 2 to the output 3.The function also maps 3 to 4, 4 to 5, 5 to 6, etc.

    Therefore, a function is some rule that associates to each element in its domainsome element in its range.

    For example, the function f ( x ) =  x 2 maps each real number to its square (2 is

    mapped to 4, 3 is mapped to 9, 4 is mapped to 16, etc.)

    [Page 19 of 26]

    Binary RelationsPage 20 of 26

    Binary Relations 

     A binary relation  from set A to set B is the set of ordered pairs { x , y } where x A and y   B.

    The ordered pair { x , y } is in a relation R   if element  x   is related to element y  asdefined by R .

    For example:

    Let A = {3, 4, 5, 6, 7, 8, 9} and B = {1, 2, 3}.

    Getting the Cartesian product  A  x B  gives all possible ordered pairswhere the first element is from set  A and the second element is from setB.

     A x B = {{3, 1}, {3, 2}, {3, 3}, {4, 1}, {4, 2}, {4, 3}, {5, 1}, {5, 2}, {5, 3},{6, 1}, {6, 2}, {6, 3}, {7, 1}, {7, 2}, {7, 3}, {8, 1}, {8, 2}, {8, 3},{9, 1}, {9, 2}, {9, 3}}

    Now if the relation R  is defined as x  = y 2 (this means the first element of

    the ordered pair, x , is the square of the second element, y ) the relation R  will be:

    R  = {{4, 2}, {9, 3}}

    Because these are the only pairs that satisfy the relation (the firstelement is the square of the second element).

    If the ordered pair { x , y } R , then we write a xRy .

    [Page 20 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    13/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 13 of 15

    Binary Relations (continuation)Page 21 of 26

    Binary Relations (continuation)

     A binary relation may involve only one set, A. If that is the case, then the relationis simply a relation on set A.

    For example:

    Let set A = {1, 2, 3}.

    Getting the Cartesian product  A  x B  gives all possible ordered pairswhere both the first and second elements are from set  A.

     A x A = {{1, 1}, {1, 2}, {1, 3}, {2, 1}, {2, 2}, {2, 3}, {3, 1}, {3, 2}, {3, 3}}

    If R  is defined as  x  

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    14/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 14 of 15

    Properties of Binary Relations(continuation)Page 23 of 26

    Properties of Binary Relations (continuation)

     A relation R   on set  A  is symmetr ic   if for every  x, y A,  xRy   implies yRx . Inother words, the relation is symmetric if the two elements of all ordered pairs thatsatisfy the relation can be interchanged.

    For example:

    The relation “is equal to” is symmetric since x  = y  implies that y  = x .

    However, the relation “is less than” is not symmetric since 1 < 2 does notimply 2 < 1.

    The relation “is a sibling of ” is symmetric since if John is a sibling ofPeter, then it implies that Peter is a sibling of John.

    [Page 23 of 26]

    Properties of Binary Relations(continuation)Page 24 of 26

    Properties of Binary Relations (continuation)

     A relation R  on set  A is t ransi t ive  if for every  x, y , z A,  xRy  and yRz   implies xRz .

    For example:

    The relation “is less than” is transitive since if 1 < 2 and 2 < 3, then it

    implies that 1 < 3.

    However, the relation “is the square of ” is not transitive since 16 is thesquare of 4 and 4 is the square of 2 does not imply that 16 is the squareof 2.

    The relation “is taller than” is transitive since if John is taller than Peterand Peter is taller than Paul, then it implies that John is taller than Paul.

    [Page 24 of 26]

  • 8/21/2019 MELJUN CORTES Automata Lecture Review of Important Concepts 1

    15/15

     

    Theory of Computation (With Automata Theory)

    Review of Important Concepts *Property o f STIPage 15 of 15

    Properties of Binary Relations(continuation)Page 25 of 26

    Properties of Binary Relations (continuation)

     A binary relation R   is an equiv alence relation   if R  is reflexive, symmetric, andtransitive.

    For example:

    Is the relation “looks the same as”  an equivalence relation?

    To determine if a relation is an equivalence relation, one must check firstif the relation is reflexive, symmetric, and transitive.

    [Page 25 of 26]

    Properties of Binary Relations(continuation)Page 26 of 26

    Properties of Binary Relations (continuation)

    The relation “looks the same as” is reflexive since any person looks the same ashimself (the relation can be applied to the same person).

    It is symmetric since if John looks the same as Peter then it implies that Peterlooks the same as John.

    It is transitive since if John looks the same as Peter and Peter looks the same asPaul, then it implies that John looks the same as Paul.

    Since the relation “looks the same as” is reflexive, symmetric, and transitive, it istherefore an equivalence relation.

    [Page 26 of 26]


Recommended