


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper are: Deterministic, Machine, Update Table, Update Function, State Machine, Bisimilar, Completing
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



EECS 20. Midterm No. 1 Solution, February 23, 2000.
a
b
d
{1} / 1
c
{1} / 0
{1} / 0 {1} / 1
where
Inputs = f 1 ; absent g and Outputs = f 0 ; 1 ; absent g
(a) Is this machine deterministic or nondeterministic? Answer: Deterministic. (b) Give the up date 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 b elow: Answer:
e f
{1} / 1
{1} / 0
(d) Give the bisimulation relation. Answer: The bisimulation relation is S = f(a; e); (b; f ); (c; e); (d; f )g; or equivalently, S 0 = f(e; a); (e; b); (f ; c); (f ; d)g;
a
b
c
0
0
0
1
1
1
Consider the following relations, all subsets of X X :
F 0 = f(x 1 ; x 2 ) j there is an arc going from x 1 to x 2 with a 0 g F 1 = f(x 1 ; x 2 ) j there is an arc going from x 1 to x 2 with a 1 g F 0 and 1 = f(x 1 ; x 2 ) j there are two arcs going from x 1 to x 2 , one with a 0 and one with a 1 g F 0 or 1 = f(x 1 ; x 2 ) j there is an arc going from x 1 to x 2 with a 0 or one with a 1 g
(a) Give the elements of the four relations. Answer: F 0 = f(a; b); (b; c); (c; a)g F 1 = f(a; a); (b; b); (c; c)g F 0 and 1 = ; F 0 or 1 = f(a; b); (b; c); (c; a); (a; a); (b; b) ; (c ; c )g (b) Which of the four relations are the graph of a function of the form f : X! X? List all that are such a graph. Answer: F 0 and F 1.
(b) Supp ose Y is given by
Y = [f 1 ; ; 100 g! Reals ] (Thus, the function f takes a natural numb er and returns a sequence of length 100, while the function g takes a sequence of length 100 and returns a real numb er.) Supp ose further that g is given by: for all y 2 Y ,
g (y ) =
i=
y (i) = y (1) + y (2) + + y (100);
and f by: for all x 2 Nats and z 2 f 1 ; ; 100 g, (f (x))(z ) = cos (2 z =x): (Thus, x gives the p erio d of a cosine waveform, and f gives 100 samples of that waveform.) Give a one-line Matlab expression that evaluates (g f )(x) for any x 2 Nats. Assume the value of x is already in a Matlab variable called x. Answer: sum(cos(2pi[1:100]/x)) (c) Find (g f )(1). Answer: 100