Question: ( XC ) Parsing a Star Language. Let = { 0 , 1 } and let C be a finite set of strings in *

(XC) Parsing a Star Language. Let ={0,1} and let C be a finite set of strings in **. We say
that C forms a unique code if there is no string in C** that can be formed in two different ways as a
concatenation of strings in C.
(a) A prefix code is a finite set x of nonempty strings such that no string in x is a proper prefix
of any other. Prove that any prefix code is a unique code. A suffix code is defined similarly -
prove that any suffix code is a unique code.
(b) Find an example of a finite language that is not a prefix code, suffix code or unique code.
(c) Let S1=C-1C??{}, and for all positive i, let Si+1 be the language C-1SiSiC-1, where x-1Y
is defined as in Problem 7. Prove that if C is a unique code, then there must exist Si=SjCiSiCO?inSiCi with
Si=Sj. Prove that ifCis not a unique code, then there must be some i with either SiCO?
orinSi.
(d) Explain how we can use this fact to test whether an arbitrary Cis a unique code.
 (XC) Parsing a Star Language. Let ={0,1} and let C be

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!