{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4-solutions-final

hw4-solutions-final - Ans 1 Its the set consisting of 0s...

This preview shows pages 1–3. Sign up to view the full content.

Ans 1) It’s the set consisting of 0s and 1 where the number of ones is equal to the number of blocks of zeroes. Ones are never consecutive. All strings end with 1 and begin with 0. There can be odd as well as even blocks of zeroes. The relationship between the (2n-1)th and the (2n)th block of zeros is that the latter has twice the number of zeros as the prior block. The relationship between the (2n)th and the (2n+1)th block is that the latter has one more zero than the prior numbered block. The shortest string is 01. A few strings {01, 0101, 010 2 10 3 10 6 1, 010 2 10 3 10 6 10 7 10 14 1, ...} The last string -- 010 2 10 3 10 6 10 7 10 14 1 is the string with 6 blocks. Ans 2) a) h(0120) = aabbaa b) h(21120) = baababbaa c) h(L) = a(ab)*ba d) h(L) = a+abba e) Inv_h(ababa) = {022,110,102} f) Inv_h(L) = L(02*) U L(1*02*) Ans 3) Consider any language L over alphabets {a,b} Define homomorphism h1 as below h1(a) = a h1(a’) = a h1(b) = b consider the regular language L1 defined by the regular expression (a+b)*a’ Define homomorphism h2 as below h2(a) = a h2(a’) = є h2(b) = b

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
is for intersection
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}