Homework 4

advertisement
Homework 4
Due 11/07/00
Exercise 1
Let X be a non-empty set and d a function d : X X ! < (< is the set of real numbers),
such that 8x; y; z 2 X :
1. d(x; y) = d(y; x)
2. d(x; y) = 0 if and only if x = y
3. d(x; y) 0
4. d(x; y) + d(y; z ) d(x; z )
Then, d is called a metric on X and (X; d) is a metric space.
a) Dene a metric d on X = <.
b) Prove that the Cantor metric dened on the set S of n-tuples of signals (signals and tags
are dened in the paper A Denotational Framework for Comparing Models of Computation
by Lee and Sangiovanni-Vincentelli) as
d(s; s ) = supf 21 : s(t) 6= s (t); t 2 [0; 1)g
n
0
0
t
is an ultrametric (d is an ultrametric, if satises also max(d(s; s ); d(s ; s )) d(s; s ) in
addition to (1)(2)(3)(4)).
0
0
00
00
Exercise 2
Let P and Q be ordered sets. A map ' : P ! Q is said to be:
{ order-preserving (or monotonic) if x y in P implies '(x) '(y) in Q
{ order-embedding if x y in P if and only if '(x) '(y) in Q
{ order-isomorphism if it is an order-embedding mapping P onto Q (A map
f:P !Q
is onto (or surjective) if for every y 2 Q, there exists an element x 2 P , such that
f (x) = y).
a) Let IN be the set of natural numbers and N0 = IN [ f0g. The partial order on N0
is dened as follows: 8m; n 2 N0 ; m n if and only if 9k 2 N0 such that km = n (e.g.
3 6; 4 12).
1
Consider the ordered sets P and Q s.t. P = Q = (N0 ; ), is the map ' : P ! Q dened as
'(x) = 2x monotonic? Is '(x) = x + 3 monotonic?
b) Let }(IN) be the powerset of IN, consisting of all subsets of IN and the partial order on
}(IN) dened as: 8A; B 2 }(N ); A B if and only if A B .
Consider the ordered sets P and Q s.t. P = Q = (}(IN); ), is the map ' dened as:
8
>
< 1 if 1 2 U;
'(U ) = > 2 if 2 2 U and 1 2= U;
: 0 otherwise:
monotonic?
c) Let X = f1; 2; :::ng. Consider two ordered sets (}(X ); ) and (P ; ), where P = f0; 1g
and is dened as (x1 ; x2 ; :::x ) (y1 ; y2 ; :::y ) if and only if 8i x y in P .
Consider the map ' : }(X ) ! 2 dened as '(A) = (e1 ; e2 ; :::e ) where
(
e = 10 ifif ii 22= A;
A:
n
n
n
n
i
i
n
i
Show that ' is an order-isomorphism.
Exercise 3 Let P be a set. A partial order on P is a binary relation on P such that for all
x; y; z 2 P :
{ xx
{ if x y and y x, then x = y
{ if x y and y z , then x z
An ordered set P is a chain if for all x; y 2 P , either x y or y x.
a) Dene on IN such that (IN; ) is a chain.
b) Dene on IN such that (IN; ) is not a chain.
c) Let P and Q be ordered sets and P Q their cartesian product. Is the binary relation dened as
(x1 ; x2 ) (y1 ; y2 ) if x1 < y1 or (x1 = y1 and x2 y2 )
a partial order on P Q?
2
Exercise 4
Using the Tagged Signal Model (dened in the paper A Denotational Framework for Comparing Models of Computation by Lee and Sangiovanni-Vincentelli), model the lter
o(n) = k1 i(n) + k2 o(n ; 1)
where n is the index of the samples, k1 and k2 are given coecients. Assume that an initial
token (event) o(0) is present and is used by the k2 multiplier in the rst iteration.
Dene all the processes in Figure 1 and the composite process of all the processes and connections.
I
s0
s1
*k1
s2
s3
+
s10
s4
s9
s5
d
s8
*k2
s6
s7
Figure 1: Filter o(n) = k1 i(n) + k2 o(n ; 1)
3
O
Download