meljun cortes automata lecture review of important concepts 2

Upload: meljun-cortes-mbampa

Post on 07-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

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

    1/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 1 of 26

    Review of Important Concepts

    Review of Important

    Concepts

    Review of Set Theory

    Sets

    •  A set is a collection of objectssuch as numbers, letters,symbols, or other sets.

    • These objects are called themembers or  elements of theset.

    • For example:

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

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

    2/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 2 of 26

    Review of Important Concepts

    • In sets, the ordering andrepetition of the members arenot important.

    Therefore, the set {1, 2, 3} isthe same as the set {2, 3, 1}.

    Similarly, the set {1, 2, 3, 2} isthe same as the set {1, 2, 3}.

    Set Membership

    • The symbol is used todenote membership in a setwhile the symbol is used todenote non-membership in aset.

    • For example:

    If set A = {0, 2, 4, 8, 16},then 8  A while 7  A.

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

    3/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 3 of 26

    Review of Important Concepts

    Subsets

    • For two sets  A and B, B is asubset of  A, if every member of B is also a member of  A.

    • Set B is a subset of set  A is

    denoted by B A.

    • For example:

    If set A = {0, 2, 4, 8, 16} andset B = {2, 8}, then B  A.

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

    4/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 4 of 26

    Review of Important Concepts

    Infinite Set

    •  An in f in i te set  is a set thathas infinitely many members.

    • For example:

    The set of integers

    Z = {…, -2, -1, 0, 1, 2, …}

    is an infinite set.

    Empty Set

    •  An empty set  is a set thatcontains no members.

    • If set  A is an empty set, it is

    written as A = { } or   A = .

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

    5/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 5 of 26

    Review of Important Concepts

    Union and Intersection of Sets

    • The un ion of two sets A and Bis obtained by forming a singleset that contains all theelements in A and B.

    The union of sets  A and B iswritten as A B.

    For example:

    If 

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

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

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

    6/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 6 of 26

    Review of Important Concepts

    • The in tersect ion of two sets A

    and B is obtained by forming asingle set that contains all theelements that are in both  Aand B.

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

    For example:

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

    then A B = {3, 4}

    If  A B = (they have nocommon elements), then sets A and B are said to bedis jo in t .

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

    7/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 7 of 26

    Review of Important Concepts

    Complement of Sets

    •  Assume set  A is a subset of  set B ( A B). Thecomplement 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 .

    For example:

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

    then A = {1, 2, 5, 6}

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

    8/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 8 of 26

    Review of Important Concepts

    Set-Builder Notation

    • The set-builder notation isused to describe a setcontaining elements that has a

    certain property or follow acertain rule.

    The following designations areused in conjunction with theset-builder notation:

    N = set of natural numbers

    Z = set of all integers

    R = set of all real numbers

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

    9/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 9 of 26

    Review of Important Concepts

    For example:

     A = { x x Z , 1 0

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

    10/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 10 of 26

    Review of Important Concepts

    The set-builder notation is

    often used to describe infinitesets.

    Examples:

     A = { x x N , x ≥ 0}

    This is read as“Set A is the set of all x such that x is a naturalnumber and is greater thanor equal to 0.”

     A = { x x = y 2, y N }

    This is read as“Set A is the set of all x such that x is equal to y 2

    where y is a natural

    number. Set A is thereforethe set of perfect squares.”

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

    11/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 11 of 26

    Review of Important Concepts

    Power Sets

    • The power set of   A is the setof all subsets of set A.

    • The power set of   A is writtenas P ( A) o r 2 A.

    • For example:

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

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

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

    12/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 12 of 26

    Review of Important Concepts

    Sequences and Tuples

    • Sequences are similar to setsexcept for the fact that theordering and repetition of the

    members in sequences areimportant.

    • For example:

    The sequence {1, 2, 3} isdifferent from the sequence{2, 3, 1}.

    The sequence {1, 2, 3, 2} isdifferent from the sequence{1, 2, 3}.

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

    13/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 13 of 26

    Review of Important Concepts

    • Sequences may be finite or  infinite.

    • Finite sequences are calledtuples .

    •  A sequence with k elements is

    a called a k -tuple.

    For example:

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

    •  A 2-tuple is often called a pair .

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

    14/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 14 of 26

    Review of Important Concepts

    Cartesian Product of Sets

    • The Cartes ian Pro duc t  , or Cro ss Produ ct  of two sets  Aand B, is the set of all 2-tuplesor pairs wherein the first

    element of a pair is a member of set  A and the secondelement 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}

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

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

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

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

    15/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 15 of 26

    Review of Important Concepts

    Letset A = {1, 2, 3}set B = {x, y}

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

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

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

    B B = { {x, x}, {x, y},{y, x}, {y, y} }

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

    16/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 16 of 26

    Review of Important Concepts

    • Generally, the Cartesian

    product of k sets A1, A2 , …, Ak ,is the set of all k -tuples (a1, a2 ,…, ak ) where ai   Ai .

    • For example:

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

     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, %}}

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

    {%, y, %}}

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

    17/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 17 of 26

    Review of Important Concepts

    Functions and Relations

    Functions

    •  A func t ion  is an object thatdefines the relation between aknown input and the output it

    produces.

    • Functions are usually writtenas f ( x ) = y . For a function f , if the input is x then the output isy .

    • Examples:

    Given a functionf ( x ) = x + 1,

    if the input x = 2, then theoutput is f ( x ) = 3.

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

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

    18/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 18 of 26

    Review of Important Concepts

    • For any given function, thesame input always producesthe same output.

    • The set of all possible valuesthe input of a function can take

    on is called the domain of thefunction.

    • The set of all possible outputvalues of a function is calledthe range of the function.

    • For example:

    For the function f ( x ) = x + 1,the domain and range are

    the set of all real numbers.

    For the function f ( x ) = x 2,the domain is the set of allreal numbers while therange is the set of non-

    negative real numbers.

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

    19/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 19 of 26

    Review of Important Concepts

    •  A function is also called amapping .

    For example:

    For the function f ( x ) = x + 1,

    if x = 2, then f ( x ) = 3.

    It can then be said that thefunction f ( x ) maps 2 to 3.

    The function also maps3 to 4, 4 to 5, etc.

    • Therefore, a function is somerule that associates to eachelement in its domain some

    element in its range.

    For example, the functionf ( x ) =  x 2 maps each realnumber to its square.

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

    20/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 20 of 26

    Review of Important Concepts

    Binary Relations

    •  A b inary relat ion from set  Ato set B is the set of orderedpairs { x , y } where x  A andy B.

    • The ordered pair { x , y } is in arelation R  if element  x  isrelated to element y as definedby R .

    • For example:

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

    If R is defined as x = y 2, the

    relation R is:

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

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

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

    21/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 21 of 26

    Review of Important Concepts

    •  A binary relation may involveonly one set,  A. If that is thecase, then the relation issimply a relation on set A.

    • For example:

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

    If R is defined as x < y , therelation R on set A is:

    R = {{1, 2}, {1, 3}, {2, 3}}

    Take note that the other

    ordered pairs {1, 1}, {2, 1},{2, 2}, {3, 1}, {3, 2}, and {3,3} are not included in R because they do not satisfy x < y .

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

    22/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 22 of 26

    Review of Important Concepts

    Properties of Binary Relations

    •  A relation R  on set  A isref lexive if for every  x A, xRx . In other words, eachelement of set  A is related to

    itself.

    For example:

    The relation “is equal to” isreflexive.

    However, the relation“is less than” is not reflexivesince 1 < 1 is not possible.The relation cannot be

    applied to the sameelement.

    The relation “looks thesame as” is reflexive sinceany person looks like

    himself.

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

    23/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 23 of 26

    Review of Important Concepts

    •  A relation R  on set  A issymmetr ic if for every  x, y  A, xRy implies yRx .

    For example:

    The relation “is equal to” issymmetric.

    However, the relation“is less than” is notsymmetric since 1 < 2 doesnot imply 2 < 1.

    The relation “is a sibling of ”is symmetric since if John isa sibling of Peter, then itimplies that Peter is asibling of John.

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

    24/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 24 of 26

    Review of Important Concepts

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

    For example:

    The relation “is less than” istransitive since if 1 < 2 and2 < 3, then it implies that 1< 3.

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

    The relation “is taller than”is transitive since if John istaller than Peter and Peteris taller than Paul, then itimplies that John is taller

    than Paul.

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

    25/26

    Theory of Computation (With Automata Theory)

    * Property of STI 

    Page 25 of 26

    Review of Important Concepts

    •  A binary relation R  is anequ ivalence relat ion  if  R  isreflexive, symmetric, andtransitive.

    For example:

    Is the relation “looks thesame as” an equivalencerelation?

    Check if the relation isreflexive, symmetric, andtransitive.

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

    26/26

    Theory of Computation (With Automata Theory)

    It is reflexive since anyperson looks the same ashimself.

    It is symmetric since if John

    looks the same as Peterthen it implies that Peterlooks the same as John.

    It is transitive since if Johnlooks the same as Peterand Peter looks the sameas Paul, then it implies thatJohn looks the same as

    Paul.

    The relation “looks the

    same as” is therefore an

    equivalence relation.