Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Solutions to Homework 1 - System Theory | ENEE 660, Assignments of Electrical and Electronics Engineering

Material Type: Assignment; Professor: Baras; Class: SYSTEM THEORY; Subject: Electrical & Computer Engineering; University: University of Maryland; Term: Fall 2008;

Typology: Assignments

Pre 2010

Uploaded on 07/01/2009

peaceful-lion
peaceful-lion 🇺🇸

4 documents

1 / 8

Toggle sidebar

Related documents


Partial preview of the text

Download Solutions to Homework 1 - System Theory | ENEE 660 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity! 1 Electrical and Computer Engineering Department University of Maryland College Park ENEE 660 System Theory Fall 2008 Professor John S. Baras Solutions to Homework Set #1 the binary representation. Let us suppose that #U∗/EXB is finite and equals n. Then let r be a Fibonacci (in binary) number with binary string length larger than n. We can find such a Fibonacci number no matter what n is because the recursion shows that Fibonacci numbers can be arbitrarily large. Then we can write r as r = wvz where w, v, z are binary numbers. If vi is concatenation i times, then wviz will also be in the Fibonacci sequence for all i, because the states have to cycle through a “loop” since the input string length is longer than n. Consider r = wvz and r′ = wviz. Let nw, nv, nz be the value of w, v and z treated as binary numbers. The numerical value of r is nw2|z|+|v| + nv2|z| + nz and that of r′ is nw2|z|+i|v| + nv2|z| (1 + 2|v| + · · ·+ 2(i−1)|v|) + nz Then both r, r′ are Fibonacci. And r′ is Fibonacci for all i. Clearly given the recursion that Fibonacci numbers satisfy this cannot be true. Given any n, I can find i for which the recursion will not be satisfied. However, given the recursion it will become clear in a couple of lectures in the course that I can indeed realize this sequence using a two dimensional linear system. But the two dimensional linear system uses infinite number of states as an automaton. (b) We want to examine if the sequence of prime numbers P = {2, 3, 5, 7, 11, 13, · · ·} is realizable. We formulate the problem as follows. First we represent each prime number in binary representation. This gives us the set of strings of 0’s and 1’s, beginning with a 1, whose value is interpreted as the binary representation of a prime. So let U = {0, 1}, consider U∗ R = {u ∈ U∗, first element of u is 1 , u is the binary representation of a prime} 2 is the string 10 3 is the string 11 5 is the string 101 7 is the string 111 11 is the string 1011 13 is the string 1101 etc.etc.    This set of strings from U∗ form R Take as output set Y = {0, 1}. We can now state the problem as: Has the I/O map: 2 x0 = [0] = input strings with 4ν 1′s x1 = [1] = input strings with 4ν + 1 1′s x2 = [11] = input strings with 4ν + 2 1′s x3 = [111] = input strings with 4ν + 3 1′s where ν is an arbitrary integer. Now the Nerode equivalence relation of fΣ is actually a congruence. Indeed, if u1Efu2 we have   n1∑ i=1 u1i   mod 4 =   n2∑ k=1 u2k   mod 4. Let v, w be strings of length nv, nw respectively. Then fΣ(vu1w) =   nv∑ k=1 vk + n1∑ i=1 u1i + nw∑ `=1 w`   mod 4 =   nv∑ k=1 vk + n2∑ i=1 u2i + nw∑ `=1 w`   mod 4 = fΣ(vu2w) . Therefore, the Nerode and Myhill equivalence classes coincide! So, the Nerode and Myhill realiza- tions coincide as well! The state transition map is a([x], u) = [xu] = [x] + [u] where addition is mod 4. Recall from above that [u] = # of 1’s in the string u. The read-out map is c([x], u) = [x] + [u] . The number of output values is equal to the number of states. Diagramatically, we have 0,2 0,11,1 1,21,0 0,0 0,3 1,3 x x x x0 1 23 The construction for counting 1’s mod 5 is identical. We now have 5 states instead of 4. Yes, the Myhill semigroup is a group. Namely, the additive group Z5. Similarly, for any integer p, counting ones mod p leads to a machine with Myhill semigroup Zp (additive). 5 Problem 5 The input-output map of the system is fI/O = XL with U = {a, b}∗ and Y = {0, 1}. Here, L is the set {anbn : n = 1, 2, · · ·}. The criterion for realizability of this map by a finite state machine is that the set of Nerode equivalence classes must be finite. We want to show that there are infinite number of Nerode equivalence classes. Indeed, we claim that ak and an are in different Nerode equivalence classes for k 6= n. Here, by ak we understand a · · · a︸ ︷︷ ︸ k . Now, recall that akEfa n ⇐⇒ f(akw) = f(anw) for all w²U . Let w = bk. Then, f(akbk) = 1, while f(anbk) = 0. So ak is not Nerode equivalent to an for k 6= n. Therefore, there are an infinite number of Nerode equivalence classes. Problem 6 We let U = R, Y = R, X = R. The parameter set is {0, 1, 2, 3, · · ·}, i.e. discrete time. The next state transition map is ϕ(t + 1; t, x, λ) = λx + pt+1 , and the readout map is τ(t, x, λ) = δt,n+1x(t) where δi,j is the Kronecker delta symbol. To represent the Horner rule we initialize the machine at x(0) = 0. Solving for the state sequence in Horner’s rule gives x(t) = t−1∑ i=0 λipt−i which is a convolution! So in matrix notation   x(1) x(2) ... x(n + 1)   =   1 0 · · · 0 λ 1 0 . . . 0 ... λ 1 . . . ... λn λn−1 · · · λ 1     p1 p2 ... pn+1   The optimality of Horner’s rule is discussed in A. Borodin’s “Horner’s rule is uniquely optimal”, in Theory of Machines and Computations (1971), A. Kohavi and A. Paz (editors). ¿From the last 6 computation, we deduce that Horner’s rule is the optimal first order recursion to compute the product of a Toeplitz matrix of the above form with any vector! The input-output map of the system here is the map which associates to a given value(s) of s the corresponding value(s) of the polynomial. Clearly, if we compute the value of the polynomial naively (non-recursively) we will need (n + (n − 1) + · · · + 1) multiplications ( = n(n+1)2 ) and n additions. The use of recursions reduces the number of multiplications. Note that when we consider the simultaneous evaluation of the value of the polynomial for several values of λ, the reduction obtained by the Horner rule is even more dramatic. Recursions are equivalent to introducing “memory” in the computational algorithm. Horner’s rule requires just a scalar as the state. In this sense, the recursion utilizes the minimum memory, i.e. one state variable only. Because of the structure of the dynamics this leads to optimality with respect to number of additions and multiplications, but this is tricky to prove. Problem 7 You can find more details about Strassen’s algorithm in V. Strassen, “Gaussian Elimination is not Optimal”, Numerische Math, Vol. 13, pp. 354-356 (1969). Let A = [ a11 a12 a21 a22 ] , B = [ b11 b12 b21 b22 ] , C = AB = [ c11 c12 c21 c22 ] Naive multiplication requires 8 multiplications. Strassen’s algorithm is: Let z1 = (a11 + a22)(b11 + b22) 1 multiplication z2 = (a21 + a22)b11 1 multiplication z3 = a11(b12 − b22) 1 multiplication z4 = (a11 + a12)b22 1 multiplication z5 = a22(−b11 + b21) 1 multiplication z6 = (−a11 + a21)(b11 + b12) 1 multiplication z7 = (a12 − a22)(b21 + b22) 1 multiplication Now verify that c11 = z1 + z5 − z4 + z7 c12 = z3 + z4 c21 = z2 + z5 c22 = z1 − z2 + z3 + z6 You have used only 7 multiplications. In return, you have used many more additions. Since multiplications are more costly i.e. take more time, people are interested in reducing the number of multiplications. You can also verify that the algorithm works without assuming commutativity 7
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved