Unformatted text preview: EECS 20. Midterm No. 1 Solution, February 23, 2000.
1. 40 points. Consider the state machine below
{1} / 1 {1} / 0 b a c d {1} / 0 {1} / 1 where
Inputs = 1; absent
f g and Outputs = 0; 1; absent
f g a Is this machine deterministic or nondeterministic?
Answer:
Deterministic.
b Give the update table.
Answer:
The update function is given by:
state next state, output
1
absent
a
b,1 a,absent
b
c,0 b,absent
c
d,1 c,absent
d
a,0 d,absent
c Find a deterministic state machine that is bisimilar to this one and has only two
states Give it as a state transition diagram by completing the diagram below:
Answer:
{1} / 1 e f
{1} / 0 1 d Give the bisimulation relation.
Answer:
The bisimulation relation is
S = a; e; b; f ; c; e; d; f ;
or equivalently,
S = e; a; e; b; f; c; f; d ;
f 0 g f g 2. 30 points. Let X = a; b; c represent a set of circles in the following picture:
f g 1
0 b 1 0
a c
0
1 Consider the following relations, all subsets of X X :
F0
F1
F0and1
F0or1 =
=
=
= x1 ; x2
x1 ; x2
x1 ; x2
x1 ; x2 f j f j f j f j there is an arc going from x1 to x2 with a 0
there is an arc going from x1 to x2 with a 1
there are two arcs going from x1 to x2 , one with a 0 and one with a 1
there is an arc going from x1 to x2 with a 0 or one with a 1
g
g g g a Give the elements of the four relations.
Answer:
F0 = a; b; b; c; c; a
F1 = a; a; b; b; c; c
F0and1 =
F0or1 = a; b; b; c; c; a; a; a; b; b; c; c
b Which of the four relations are the graph of a function of the form f : X
List all that are such a graph.
Answer: F0 and F1 .
f g f g ;
f g 2 ! X? c Are the following assertions true or false?
F0and1 = F0 F1
F0or1 = F0 F1
Answer:
Both are true.
3. 20 points Consider all state machines with
Inputs = 1; 2; absent States = a; b; c; d : f f g and Outputs = 1; 2; absent
f g g Assume all these state machines stutter, as usual, when presented with the stuttering
input, absent .
a Give a state machine B that simulates all of these state machines. You will lose
points if your machine is more complicated than it needs to be.
b Give the simulation relation. Answer
{1,2}/1 e
{1,2, absent}/ absent
{1,2}/2 The simulation relation is
S = fa; e; b; e; c; e; d; eg: 4. 30 points Consider the functions
g: Y ! Reals and f : Nats ! Y: where Y is a set.
a Draw a block diagram for g f , with one block for each of g and f , and label
the inputs and output of the blocks with the domain and range of g and f .
Nats Y f 3 g Reals b Suppose Y is given by
Y = 1; ; 100
Reals
Thus, the function f takes a natural number and returns a sequence of length
100, while the function g takes a sequence of length 100 and returns a real
number.
Suppose further that g is given by: for all y Y ,
f gy = g ! X yi = y1 + y2 + 2 100 i=1 + y100; and f by: for all x Nats and z 1; ; 100 ,
f xz = cos2z=x:
Thus, x gives the period of a cosine waveform, and f gives 100 samples of that
waveform. Give a oneline Matlab expression that evaluates g f x for any
x Nats . Assume the value of x is already in a Matlab variable called x.
Answer:
2 2 f 2 sumcos2*pi* 1:100 x c Find g f 1.
Answer: 100 4 g ...
View
Full Document
 Spring '08
 Ayazifar
 Electrical Engineering, 1 g, 3 g, 0 g

Click to edit the document details