Unformatted text preview: Theory of Computation — CSE 105
Half-Language Solution for Problem 1.42 Idea: Sine Ä is regular, Let Å ´É ¦ Æ Õ¼ µ be a DFA recognizing Ä. The idea for recognizing ½ Ä is the following: We are given a string Ü and we need to check if there is a string Ý of equal length as Ü ¾ such that ÜÝ ¾ Ä. We want to make transitions (according to DFA Å ) on Ü while at the same time keeping track of all possible ‘backward’ steps we could take from one of accepting states of Å . Thus, if we run the ‘forward’ and the ‘backward’ transitions in synchrony, these transitions can meet at the same state if there is an equal length string Ý such that ÜÝ ¾ Ä. We use the cartesian product construction to carry out the ‘parallel’ simulation required to implement our strategy. Construction: We will now design a machine ½ Å ´É¼ ¦ Æ ¼ ×¼ ¼ µ where É¼ É ¢ É ×¼ , ×¼ is a ¾ new start state distinct from the states in É, and ¼ ´Ô Ôµ Ô ¾ É . Æ¼ is deﬁned as follows: We create transitions from the start state ×¼ to every pair of states such that the ﬁrst state is the start state Õ¼ of Å and the second state in the pair is an accepting state of Å . For every Ô ¾ , Æ ¼ ´×¼ ¯µ ´Õ¼ Ôµ For every pair of states ´´Ô Õ µ ´Ô¼ Õ ¼ µµ, and input symbol ¾ ¦, we create a transition from ´Ô Õ µ to ¼ Õ¼ µ on the symbol if the following condition holds: ´Ô ¼ ¾ ¦ such that Æ´Õ¼ ¼ µ Õ. Æ ´Ô µ Ô¼ and In other words, we create a transition between a pair of states on an input symbol if there is a forward transition between the corresponding ﬁrst states of the pair on the input symbol and there is a ‘backward’ transition between the second states on some input symbol. This completes the description of the machine ½ Å for recognizing ½ Ä. ¾ ¾ Justiﬁcation: We now want to argue that the NFA ½ Å does indeed recognize ½ Ä. ¾ ¾ ½ Consider any string Ü ¾ ½ Ä. Since Ü ¾ ¾ Ä, there exists a Ý of equal length as Ü such that ÜÝ ¾ Ä. Let ¾ ÜÝ Ù½ ¡ ¡ ¡ Ù Ù ·½ ¡ ¡ ¡ Ù¾ where Ù ¾ ¦. Let Õ¼ Õ½ Õ Õ ·½ Õ¾ be the sequence of states traversed by the machine Å when the input ÜÝ is presented. Õ¾ must be an accepting state of Å . Based on our construction of ½ Å , it is clear that ½ Å when presented with Ü can traverse thru the following sequence of ¾ ¾ states: ×¼ ´Õ¼ Õ¾ µ ´Õ½ Õ¾ ½ µ ´Õ ½ Õ ·½µ ´Õ Õ µ. Thus Ü will be accepted by ½ Å . ¾ In the other direction, consider any string Ü accepted by ½ Å . Let ×¼ ´Õ¼ Õ¾ µ ´Õ½ Õ¾ ½ µ ´Õ ½ Õ ·½ µ ´Õ Õ ¾ be an accepting sequence of states traversed by Ü in ½ Å . By our construction, Õ¾ must be an accepting ¾ state. Also input Ü will traverse thru the states Õ¼ Õ½ Õ in Å . Let Ý be the string that causes Å to traverse through the states Õ Õ ·½ Õ¾ . Such a sequence must exists by our construction and moreover the length of Ý is the same as that of Ü. Thus the sequence of states Õ¼ Õ½ Õ Õ ·½ Õ¾ is an accepting sequence of states for ÜÝ in Å . Thus ÜÝ ¾ Ä. µ 1 ...
View Full Document
- Summer '99
- U.S. state, Binary relation, Cartesian product