ECE-548 Sequential Machine Theory

advertisement
Morphisms of State Machines
Sequential Machine Theory
Prof. K. J. Hintz
Department of Electrical and Computer
Engineering
Lecture 8
Updated and adapted by Marek
Perkowski
Notation
A relation

A function

A binary operation called multiplication
A binary operation called addition
Therefore

For all

There exists

Proper subset

Subset


+
Free SemiGroup
The free semigroup generated by the set 
+
is the set of all strings (words) from 
where
 =
 symbols 
This is equivalent to I *
String or Word
Given
 = a nonempty set
then
a string is a finite sequence of elements from 
e.g .,
 1 2 ,  2 4 ,  1 7 , etc.
Concatenation
Given
, a nonempty set
and
 1  n ,  1'  m'  
then
 1  n   1'  m'  
 1   n 1'  m'  
is the concatenat ion of two strings
Partition of a Set
• Properties
  A   p | p  P  A  
and,
a) p are disjoint,
b)
 p  A,
i
c) pi  
• pi are called “pi-blocks” of a partition, (A)
Types of Relations
•
•
•
•
•
Partial, Binary, Single-Valued System
Groupoid
SemiGroup
Monoid
Group
Partial Binary Single-Valued
If
R :S S  S
i.e.,   s1 , s2 , s3 R
such that
R is a partial function
i.e., s3 is unique  single - valued
and
 s1 , s2  S  S
i.e., proper subset  partial & D  R   S
Groupoid
• Closed Binary Operation
• Partial, Binary, Single-Valued System with
 s1, s2   S
i.e., D  R   S
• It is defined on all elements of S x S
• Not necessarily surjective
SemiGroup
• An Associative Groupoid
– Binary operation, e.g., multiplication
– Closure
– Associative
a  bc    ab  c  a, b, cS
• Can be defined for various operations, so
sometimes written as
 S,  
Closed Binary Operation
• Division Is Not a Closed Binary Operation
on the Set of Counting Numbers
6/3 = 2 = counting number
2/6 = ? = not a counting number
• Division Is Closed Over the Set of Real
Numbers.
Monoid
Semigroup With an Identity Element, e.
 aA
ea  a
ae  a
ee  e
Group
Monoid With an Inverse
e, a, b  A
1
a  a  e  identity element or unit element
e must be the same e as defined in monoid
i.e.,
a e  a
‘Morphisms’
Homomorphism (J&J)
“A correspondence of a set D (the domain)
with a set R (the range) such that each
element of D determines a unique element
of R [single-valued] and each element of R
is the correspondent of at least one element
of D.“
and...
Homomorphism
“If operations such as multiplication, addition,
or multiplication by scalars are defined for
D and R, it is required that these
correspond...”
and...
Homomorphism
“If D and R are groups (or semigroups) with
the operation denoted by * and
x corresponds to x’ and
y corresponds to y’
then
x * y must correspond to x’ * y’ “
Product of Correspondence = Correspondence of product
Homomorphism
Homomorphism
• Correspondence must be
– Single-valued: therefore at least a partial
function
– Surjective: each y in the R has at least one x in
the D
– Non-Injective: not one-to-one else isomorphism
Endomorphism
• A ‘morphism’ which maps back onto itself
• The range, R, is the same set as the domain,
D, e.g., the real numbers.
‘morphism’
R=D
SemiGroup Homomorphism
Given semigroups
 D,   and  R, + 
and a function
f :D  R
then
f is a semigroup homomorphi sm
iff
f  x   f  y  f  x  y 
SemiGroup Homomorphism
SmGp. HmMphsm. Example*
let D = e, g, g 2 ,, g 7 with multiplica tion, 
and R = 0,1, 2, 3  with addition, +
f (e) = 0
f (g) = 1
f ( g2 ) = 2
f ( g3 ) = 3
f  g 4  0
f  g 5  1
f  g 6  2
f  g 7  3
*Larsen, Intro to Modern Algebraic Concepts, p. 53
SmGp. HmMphsm. Example*
Is the relation
• single-valued?
– Each symbol of D maps to only one symbol of R
• surjective?
– Each symbol of R has a corresponding element in D
• not-injective?
– e and g4 correspond to the same symbol, 0
SmGp. HmMphsm. Example*
Do the results of operations correspond?
e. g., let
x  g2
then
x  y = g6
 
f g6  2
and
y  g4
 
same
f g4   0
f g2  + f g4  = 2 + 0 = 2
f g2  2
Monoid Homomorphism
Given semigroups with identity elements
 D,   and  R, + 
and a function
f :D  R
then
f is a monoid homomorphi sm
iff
f  x   f  y   f  x  y  and f  e   e'
Isomorphism
• An Isomorphism Is a Homomorphism
Which Is Injective
• Injective: One-to-One Correspondence
– A relation between two sets such that pairs can
be removed, one member from each set until
both sets have been simultaneously exhausted
SemiGroup Isomorphism
Injective Homomorphism
Isomorphism Example*
• Define two groupoids
– non-associative semigroups
– groups without an inverse or identity element
• SG1:
• SG2:
*Ginzberg, pg 10
A1 = { positive real numbers }
*1 = multiplication = *
A2 = { positive real numbers }
*2 = addition = +
Isomorphism Example
then
  log is an isomorphis m
since
  xy     x     y 
log  xy   log  x   log  y 
SemiGroup Isomorphism
Machine Isomorphisms
• Input-output isomorphism, but usually
abbreviated to just isomorphism
• An I/O isomorphism exists between two
machines, M1 and M2 if there exists a triple
   , , 
where
 , ,
and . . .
are bijective (required for isom.)
Machine Isomorphisms
 : S1  S2
 : I1  I 2
 : O2  O1 note the reverse order of the subscripts
such that
 sS1
  i1   i2
   1  s1 , i1     2    s1 ,  i1  
1  s1 , i1      2    s1 ,  i1     o1
and
Machine Isomorphisms
Interpret  1  s1 , i1 
1  s1 , i1 

x1  1 y1  z1

x2  2 y 2  z 2
therefore
 1 with
1 with
 S  I  and  S  is a semigroup
 S  I  and  O is a semigroup
where
M1 =  S1 , I1 , O1 ,  1 , 1

M2 =  S 2 , I 2 , O2 ,  2 ,  2

Machine State Isomorphism
Machine Output Isomorphism
Homo- vice Iso- Morphism
Reduction Homomorphism
• Shows behavioral equivalence between
machines of different sizes
• Allows us to only concern ourselves with
minimized machines (not yet decomposed,
but fewest states in single machine)
• If we can find one, we can make a
minimum state machine
Homo- vice Iso- Morphism
Isomorphism
• Shows equivalence of machines of
identical, but not necessarily minimal, size
• Shows equivalence between machines with
different labels for the inputs, states, and/or
outputs
Block Diagram Isomorphism
2
I1
I2

I1
2
M2
M1
 1 1
O2

O1
O1
Block Diagram Isomorphism
Block Diagram Isomorphism
  s1   s2
  s1   s2
O1    O2

O1     2  s2 , i2  
=    2    s1 ,  i1   
which is the same as the preceding state
diagram and block diagram definitions
therefore M1 and M2 are Isomorphic to each
other
Machine Information
• Since the Inputs and Outputs Can Be
Mapped Through Isomorphisms Which Are
Independent of the State Transitions, All of
the State Change Information Is Maintained
in the Isomorphic Machine
• Isomorphic Machines Produce Identical
Outputs
Output Equivalence
Let  : M 1  M 2
i.e., an I/O isomorphis m
then  s  S1
and  x  I1*
the output strings of M 1 are equivalent to the output
strings of  - M 2 - 
1*  s1 , x   *    s1 , x
which is

=  *   2*  s2 ,  *  x

Identity Machine Isomorphism
 id : M 1  M 2
Let
 : SS
 : II
 : O O
i.e., all elements of the isomorphis m are identity functions
Inverse Machine Isomorphism
Let
    , ,   : M 1  M 2
then
 1    1 , 1 ,  1  : M 2  M 1
For there to exists a  1
 , ,  must be bijective, i.e., injective and surjective
Machine Equivalence
Let M 1 , M 2 , M 3 be isomorphic machines
then,
M M
reflexive
M1  M 2  M 2  M1
symmetric
M 1  M 2 and M 2  M 3  M 1  M 3 transitive
which we recognize as the properties of an equivalence
relationship, i. e., machine isomorphism is an
equivalence relationship defined on M
Machine Homomorphism
Let
    , ,   : M1  M2
then  is an I/O Homorphis m of M1 into M2
iff
 : S1  S2
i.e., many to one
 : I1  I 2
 : O2  O1
note reverse order of subscripts
are functions  sS1 , i I1 , oO2
and 
Machine Homomorphism
 2    s ,  i       1 s, i  
   2    s ,  i     1  s, i 
• If alpha is injective, then have isomorphism
– “State Behavior” assignment, M 1  M 2
– “Realization” of M1
• If alpha not injective
– “Reduction Homomorphism” M 1 < M 2
Behavioral Equivalence
Two machines, M1 and M2 are behavioral ly
equivalent
iff
I1  I 2
O1  O2
and
R  S1  S 2
for which 
Behavioral Equivalence
D  R   S1
R  R   S2
and if
s1 R s2
then  x I1 *
1*  s1 , x    2*  s2 , x 
Download