text stringlengths 128 2.05k |
|---|
If [MATH] , then [MATH] and [MATH] are distinguishable by [MATH] So suppose [MATH] , and set [MATH] Observe that: 1. For all [MATH] , we have [MATH] |
2. For all [MATH] , since [MATH] , we have [MATH] Since [MATH] and [MATH] both fix [MATH] , it follows that: 1. If we are in states [MATH] and [MATH] and apply [MATH] , we reach [MATH] and [MATH] where [MATH] is the unique element of [MATH] equivalent to [MATH] modulo [MATH] |
2. If we are in states [MATH] and [MATH] and apply [MATH] , we reach [MATH] and [MATH] , where [MATH] is the unique element of [MATH] equivalent to [MATH] modulo [MATH] |
Let [MATH] and [MATH] Apply [MATH] to the states to reach [MATH] and [MATH] , where [MATH] is the unique element of [MATH] equivalent to [MATH] modulo [MATH] We claim that we can now distinguish [MATH] and [MATH] by applying [MATH] for some value [MATH] |
We choose [MATH] to be the least integer such that [MATH] Clearly if such a [MATH] exists, then [MATH] distinguishes the states, so we just have to show that [MATH] exists. Suppose for a contradiction that [MATH] does not exist. Observe then that |
[MATH] for all [MATH] Otherwise, we can choose a minimal [MATH] so that [MATH] then we necessarily have [MATH] , since the only way we can have [MATH] is if [MATH] . It follows then that we can take [MATH] Now, set [MATH] Since |
[MATH] for all [MATH] , it follows that [MATH] is the unique element of [MATH] equivalent to [MATH] modulo [MATH] Indeed, each application of [MATH] subtracts [MATH] (modulo [MATH] ) from the component where the bit tuples differ, and since we always have [MATH] the states are never mapped to the same state by the [MAT... |
[EQUATION] Since [MATH] , we have [EQUATION] So in fact [MATH] This is a contradiction, and so the integer [MATH] exists. Thus if we set [MATH] , the states [MATH] and [MATH] are distinguished by [MATH] (note that both [MATH] and [MATH] fix the second component [MATH] ). \qed |
Factor Matching Let [MATH] and [MATH] be regular languages over an alphabet [MATH] We want to find the worst-case state complexity of the set [MATH] of all the words of [MATH] that have words of [MATH] as factors. More formally, [MATH] |
Proposition 8 For [MATH] if [MATH] and [MATH] then [MATH] Proof 7 The language [MATH] is the two-sided ideal [MATH] . It is known that the state complexity of [MATH] is at most [MATH] |
Thus the complexity of the intersection with [MATH] is at most [MATH] \qed To prove the bound is tight, we construct a witness that meets the bound. Let [MATH] be accepted by the DFA [MATH] , where [MATH] [MATH] and [MATH] is defined by the transformations [MATH] |
and [MATH] This DFA is minimal because the shortest word in [MATH] accepted by state [MATH] is [MATH] It turns out that [MATH] and its dialect [MATH] act as witnesses in the case of factor matching. We denote the language of [MATH] by [MATH] ; the DFA [MATH] is shown in Figure Let [MATH] Then the language accepted by t... |
[EQUATION] Now we have [EQUATION] The new generator of the two-sided ideal is [MATH] Before we prove that the bound is tight, we describe a DFA for the language [MATH] . We will use binary [MATH] -tuples which we denote by [MATH] |
Definition 9 Define the following DFA: [EQUATION] where [MATH] for all [MATH] , and [EQUATION] In other words, if [MATH] , input [MATH] shifts [MATH] one position to the left cyclically; input [MATH] shifts the tuple to the left, losing the leftmost component and replacing [MATH] by 1 if [MATH] Finally, |
[MATH] sends the state to [MATH] if [MATH] and [MATH] , and all inputs are the identity on [MATH] DFA [MATH] is shown in Figure Proposition 10 |
All the states of [MATH] are reachable and pairwise distinguishable. Proof 8 Consider a state [MATH] , and view it as the binary representation of a number [MATH] Then [MATH] is reachable as in the proof of Proposition and [MATH] is reached by applying |
[MATH] to any state that has [MATH] We note that if a state [MATH] has [MATH] , then [MATH] accepts the word [MATH] Define [MATH] As in Proposition , each binary (that is, non- [MATH] state has a unique binary representation, and so each of these states has a unique [MATH] , which is a subset of all words accepted by [... |
\qed In the example of Figure , we have [MATH] [MATH] [MATH] [MATH] [MATH] [MATH] [MATH] Recall that the two-sided ideal [MATH] is [MATH] , that is, [MATH] |
Lemma 11 [MATH] is isomorphic to the minimal DFA of [MATH] Proof 9 First we prove that each state of [MATH] accepts [MATH] , and thus [MATH] accepts [MATH] Since [MATH] accepts [MATH] , it also accepts |
[MATH] . In binary states of the form [MATH] , applying [MATH] “loads” a 1 into [MATH] Then after applying a word from [MATH] , the resulting state will either be a binary state where [MATH] , or [MATH] . If the current state is [MATH] , then no matter what inputs are applied, the word will be accepted, and hence [MATH... |
[MATH] will either shift the 1 back to [MATH] or move to [MATH] if another 1 in the state is shifted to [MATH] and [MATH] is applied. Therefore, applying a word from |
[MATH] from a state where [MATH] will result in either a binary state where [MATH] or [MATH] , and applying a word from [MATH] from one of those states will result in [MATH] , so |
[MATH] is accepted. Therefore, [MATH] We now show that [MATH] . First, we observe that every word in [MATH] has a length of at least [MATH] and at least two [MATH] s: a [MATH] to load a 1 into [MATH] [MATH] letters to shift the 1 to [MATH] , and a [MATH] |
to move to [MATH] . Let [MATH] be a word in [MATH] , where each [MATH] . Suppose that the [MATH] -th letter of [MATH] is what first causes a transition to [MATH] ; in other words, [MATH] and [MATH] . The remaining letters in [MATH] [MATH] , do not matter since they cannot cause a transition away from [MATH] , so we onl... |
[MATH] Now the rest of the argument is similar to the proof of Lemma Letter [MATH] of [MATH] must be a [MATH] Look at letter [MATH] . If this letter is a [MATH] , then [MATH] |
is in [MATH] , and so [MATH] is in [MATH] , and we are done. If the letter [MATH] is an [MATH] , we keep jumping back [MATH] letters at a time until we find a [MATH] In other words, we choose [MATH] as small as possible such that [MATH] If no such [MATH] exists, then as in the proof of Lemma , one can show that [MATH] ... |
[MATH] with [MATH] and that [MATH] is not accepted. So [MATH] must exist, and therefore [MATH] is in [MATH] , which implies [MATH] |
\qed We can now prove the following theorem: Theorem 12 For [MATH] if [MATH] and [MATH] then [MATH] and this bound is tight if the cardinality of [MATH] is at least 2. |
Proof 10 The upper bound follows from Proposition To prove that the upper bound is tight, we show that all states in the direct product [MATH] are reachable and pairwise distinguishable. |
Reachability. Let [MATH] denote the state set of [MATH] , and let [MATH] denote the initial state of [MATH] . The initial state of the direct product is [MATH] . Every state of the form [MATH] , where [MATH] , is reachable by [MATH] . We observe that [MATH] and [MATH] (where [MATH] is the transition function of [MATH] ... |
Distinguishability. As before, to simplify the notation, we write [MATH] for the transformation induced by [MATH] in the relevant DFA. |
First, we note a few facts about [MATH] 1. The word [MATH] sends every state to [MATH] 2. Suppose [MATH] and [MATH] are states. Define the function [MATH] as follows: |
[EQUATION] Suppose we have two distinct states in [MATH] [MATH] and [MATH] Case 1. [MATH] . Assume that [MATH] ; if not, apply [MATH] to send both to [MATH] |
[MATH] and [MATH] can be distinguished by [MATH] Case 2. [MATH] (so [MATH] ). Assume that [MATH] ; if not, apply [MATH] to send either [MATH] or [MATH] to [MATH] Then we have the states [MATH] and [MATH] Let us define [MATH] ; the two states can be distinguished by [MATH] |
\qed Subsequence Matching Let [MATH] and [MATH] be regular languages over an alphabet [MATH] We are interested in finding the worst-case state complexity of the set [MATH] of all the words of [MATH] that contain words in [MATH] as subsequences. The set of all words which contain words in [MATH] as subsequences can be c... |
Theorem 13 For [MATH] if [MATH] and [MATH] , then [MATH] , and this bound is tight if [MATH] Proof 11 Okhotin proved that if [MATH] , then [MATH] has state complexity at most [MATH] , and this bound is tight. Okhotin’s witness is the DFA [MATH] , where [MATH] and [MATH] ; the alphabet size [MATH] cannot be reduced. |
It follows that if [MATH] and [MATH] , then the state complexity of [MATH] is at most [MATH] We define [MATH] as a slight modification of Okhotin’s witness, with [MATH] letters instead of [MATH] Define [MATH] where [MATH] [MATH] as before, and [MATH] See Figure 10 Let [MATH] be the language of [MATH] |
For [MATH] we use the language of the DFA [MATH] where [MATH] for [MATH] and [MATH] See Figure 11 Let [MATH] be a minimal DFA for the shuffle [MATH] with state set [MATH] and initial state [MATH] Note that all states of [MATH] are reachable from [MATH] , and pairwise distinguishable from each other, using words over [M... |
Consider the direct product [MATH] , which recognizes [MATH] . The states of the direct product have the form [MATH] where [MATH] is a state of [MATH] and [MATH] is a state of [MATH] The initial state of the direct product is [MATH] . By words over [MATH] |
we can reach all states of the form [MATH] for [MATH] . Then by words over [MATH] we reach all states [MATH] for all [MATH] and [MATH] . So all [MATH] states of the direct product are reachable. |
For distinguishability, consider two distinct states [MATH] and [MATH] . The final state set of the direct product is [MATH] Suppose [MATH] Since [MATH] is minimal, it has at most one empty state. Hence one of [MATH] or [MATH] can be mapped to a final state by some word [MATH] over [MATH] . If we have states [MATH] and... |
Now suppose [MATH] ; then we must have [MATH] Apply [MATH] to reach states [MATH] and [MATH] By minimality of [MATH] , there is a word over [MATH] that distinguishes [MATH] and [MATH] ; this word also distinguishes [MATH] and [MATH] \qed |
The following proposition shows that the alphabet size of our witness cannot be reduced: an alphabet of [MATH] letters is optimal for this operation. |
Proposition 14 Let [MATH] and [MATH] be regular languages with [MATH] and [MATH] , both over an alphabet [MATH] of size less than [MATH] If [MATH] , then [MATH] |
Proof 12 To prove this, we need to understand the structure of the minimal DFA for [MATH] Okhotin proved that if [MATH] recognizes [MATH] , then the NFA [MATH] , where [MATH] , recognizes [MATH] We can obtain a minimal DFA |
[MATH] for [MATH] by determinizing and minimizing this NFA. It follows that we can view the states of [MATH] as subsets of [MATH] , and, if [MATH] is a subset of [MATH] then |
[MATH] in [MATH] To simplify the notation, write [MATH] for [MATH] and [MATH] for [MATH] ; so the previous equation can be written as [MATH] |
Consider the direct product of [MATH] with an arbitrary [MATH] -state DFA. Assume without loss of generality that the DFA [MATH] for [MATH] has state set [MATH] and initial state [MATH] , and the arbitary [MATH] -state DFA has state set [MATH] and initial state [MATH] Then the initial state of the direct product is [MA... |
Now, we mimic Okhotin’s argument from Lemma 4.4 in Notice that in the NFA [MATH] , we have [MATH] for all [MATH] Thus every reachable subset of states in this NFA contains the initial state [MATH] Additionally, if two subsets [MATH] and [MATH] in the NFA [MATH] both contain a final state, then they are indistinguishabl... |
Consider subsets of states in [MATH] of the form [MATH] for [MATH] and [MATH] non-final; there are [MATH] such sets, since there is only one accepting state. Since [MATH] for all [MATH] , the only way we can reach a set [MATH] is by a self-loop on [MATH] , or by a direct transition from a smaller set. But the only smal... |
Now, we know one letter induces a self-loop on [MATH] , so it is not useful for reaching states of the form [MATH] We have at most [MATH] letters that do not induce a self-loop on [MATH] , so we can reach at most [MATH] sets of the form [MATH] . Since there are [MATH] such sets, at least one set must be unreachable, an... |
Matching a Pattern Consisting of a Single Word We now consider the case where the pattern [MATH] consists of a single nonempty word [MATH] Note that if the state complexity of |
[MATH] is [MATH] , then [MATH] is of length [MATH] Throughout this entire section, we fix [MATH] , where [MATH] for [MATH] Let [MATH] and for [MATH] , let [MATH] We write [MATH] for the set of all prefixes of [MATH] |
7.1 Matching a Single Prefix Theorem 15 Suppose [MATH] and [MATH] If [MATH] is a non-empty word, [MATH] and [MATH] then we have [EQUATION] |
Furthermore, these upper bounds are tight. Remark 16 When [MATH] (that is, [MATH] and [MATH] are languages over a unary alphabet), the tight upper bound [MATH] actually holds in all eight cases we consider in this paper. This is because if [MATH] is a language over a unary alphabet [MATH] , then the ideals [MATH] [MATH... |
Proof 13 We first derive upper bounds for the two cases of [MATH] Upper Bounds: Let [MATH] , where [MATH] , be a DFA accepting [MATH] Let [MATH] and let the minimal DFA of [MATH] be [MATH] Here [MATH] is the only final state, and [MATH] is the empty state. Define [MATH] as follows: for [MATH] , we set |
[EQUATION] Also define [MATH] for all [MATH] Let the state reached by [MATH] in [MATH] be [MATH] ; we construct a DFA [MATH] that accepts [MATH] As shown in Figure 12 , let |
[MATH] , where [MATH] is defined as follows: for [MATH] and [MATH] [EQUATION] Recall that in a DFA [MATH] , if state [MATH] is reached from the initial state by a word [MATH] , then the language of [MATH] is equal to the quotient of [MATH] by [MATH] Thus the language of state [MATH] is the quotient of [MATH] by [MATH] ... |
[MATH] is the set of all words of [MATH] that begin with [MATH] , as required. It follows that the state complexity of [MATH] is less than or equal to [MATH] . If [MATH] , all the [MATH] are empty and state [MATH] is not needed. Hence the state complexity of [MATH] is less than or equal to [MATH] in this case. |
Lower Bound, [MATH] Let [MATH] and [MATH] Let [MATH] and let [MATH] be the language of the DFA [MATH] , where [MATH] is defined by [MATH] , and |
[MATH] Let [MATH] be the DFA shown in Figure 13 for the language [MATH] Obviously [MATH] has [MATH] states and they are all reachable. Since the shortest word accepted from any state is distinct from that of any other state, all the states are pairwise distinguishable. Hence [MATH] and [MATH] constitute witnesses that ... |
Lower Bound, [MATH] Let [MATH] and [MATH] Let [MATH] and let [MATH] be the language of the DFA [MATH] where [MATH] is defined by [MATH] and [MATH] , and [MATH] Construct the DFA [MATH] |
for the language [MATH] as is shown in Figure 14 It is clear that all the states are reachable and distinguishable by their shortest accepted words. |
\qed 7.2 Matching a Single Suffix Let [MATH] . We introduce some notation: 1. [MATH] means [MATH] is a proper prefix of [MATH] , and [MATH] means [MATH] is a prefix of [MATH] |
2. [MATH] means [MATH] has [MATH] as a proper suffix, and [MATH] means [MATH] has [MATH] as a suffix. 3. If [MATH] and [MATH] , we say [MATH] is a bridge from [MATH] to [MATH] or that [MATH] |
connects [MATH] to [MATH] We also denote this by [MATH] 4. [MATH] means that [MATH] is the longest bridge from [MATH] to [MATH] That is, [MATH] , and whenever [MATH] we have [MATH] Equivalently, [MATH] is the longest suffix of [MATH] that is also a prefix of [MATH] |
We will readily use the following properties of these relations: 1. For [MATH] , we have [MATH] 2. For [MATH] , we have [MATH] 3. |
If [MATH] and [MATH] starts with [MATH] and [MATH] , then [MATH] starts with [MATH] 4. If [MATH] and [MATH] ends with [MATH] and |
[MATH] then [MATH] ends with [MATH] 5. If [MATH] and [MATH] and [MATH] , then [MATH] 6. If [MATH] and [MATH] and [MATH] , then [MATH] |
Proposition 17 If the state complexity of [MATH] is [MATH] , then the state complexity of [MATH] is [MATH] Proof 14 Let [MATH] be the DFA with transitions defined as follows: for all [MATH] and [MATH] , we have [MATH] That is, [MATH] is defined to be the maximal-length bridge from [MATH] to [MATH] , or equivalently, th... |
We observe that every state [MATH] is reachable from [MATH] by the word [MATH] , and that each state [MATH] is distinguished from all other states by [MATH] It remains to be shown that |
[MATH] In the following, for convenience, we simply write [MATH] rather than [MATH] We claim that for [MATH] , we have [MATH] . That is, the defining property of the transition function extends nicely to words. Recall that the extension of [MATH] to words is defined inductively in terms of the behavior of [MATH] on let... |
We prove this claim by induction on [MATH] If [MATH] , this is clear. Now suppose [MATH] for some [MATH] and [MATH] , and that [MATH] Let [MATH] and let [MATH] We want to show that [MATH] |
First we show that [MATH] We know [MATH] , so it remains to show that [MATH] Since [MATH] , by definition we have [MATH] Since [MATH] , we have [MATH] In particular, [MATH] and thus [MATH] Thus [MATH] as required. |
Next, we show that whenever [MATH] , we have [MATH] If [MATH] , this is immediate, so suppose [MATH] Since [MATH] , and [MATH] is non-empty, it follow that [MATH] ends with [MATH] Thus [MATH] Since [MATH] , we have [MATH] Additionally, [MATH] , so [MATH] Since [MATH] , we have [MATH] Since [MATH] and [MATH] and [MATH] ... |
[MATH] and [MATH] as required. Now, we show that [MATH] accepts the language [MATH] Suppose [MATH] and write [MATH] . The initial state of [MATH] is [MATH] We have [MATH] , that is, [MATH] is the longest suffix of [MATH] that is also a prefix of [MATH] But this longest suffix is simply [MATH] itself, which is the final... |
\qed Our next goal is to establish an upper bound on the state complexity of [MATH] The upper bound in this case is quite complicated to derive. Suppose [MATH] has state complexity [MATH] and [MATH] has state complexity at most |
[MATH] for [MATH] and [MATH] Let [MATH] be the [MATH] -state DFA for [MATH] defined in Proposition 17 , and let [MATH] be an [MATH] -state DFA for [MATH] with state set [MATH] , transition function [MATH] , and final state set [MATH] The direct product [MATH] with final state set [MATH] recognizes [MATH] We claim that ... |
Since [MATH] has [MATH] states and [MATH] has [MATH] states, there are at most [MATH] reachable states. It will suffice show that for each word [MATH] with [MATH] , there exists a word [MATH] and a state [MATH] such that [MATH] is indistinguishable from [MATH] This gives [MATH] states that are each indistinguishable fr... |
We choose [MATH] so that [MATH] . In other words, [MATH] is the longest suffix of [MATH] that is also a proper prefix of [MATH] To find [MATH] , first observe that there exists a non-final state [MATH] and a state [MATH] such that [MATH] . Indeed, if no such states existed, then for all states [MATH] , the state [MATH]... |
Lemma 18 If [MATH] and [MATH] , or if [MATH] , then [MATH] Proof 15 Let [MATH] , so that [MATH] Let [MATH] , so that [MATH] We claim [MATH] To see that [MATH] , note that [MATH] , so [MATH] Thus [MATH] , but [MATH] , which implies [MATH] and so [MATH] To see that [MATH] , we consider six cases: |
1. [MATH] . Then [MATH] , so clearly [MATH] 2. [MATH] Then [MATH] Since [MATH] , we have [MATH] and thus [MATH] 3. [MATH] and [MATH] Since [MATH] , we can write [MATH] with [MATH] non-empty. Since [MATH] , we have [MATH] Now, note that [MATH] has length at most [MATH] , and this length is attained if and only if |
[MATH] and [MATH] We are assuming that either [MATH] or [MATH] in either case [MATH] This means [MATH] and it follows that [MATH] Thus [MATH] Since [MATH] , it follows that [MATH] , implying [MATH] This contradicts the assumption that [MATH] , so this case cannot occur. |
4. [MATH] and [MATH] Since [MATH] , we have [MATH] , and thus [MATH] Also, since [MATH] we have [MATH] Since [MATH] , it follows that [MATH] Then [MATH] , but we have [MATH] , so [MATH] and thus [MATH] |
5. [MATH] and [MATH] Since [MATH] and [MATH] is non-empty, we can write [MATH] Then [MATH] Also, since [MATH] we have [MATH] , and so [MATH] It follows that [MATH] Since [MATH] we have [MATH] , and thus [MATH] This contradicts the assumption that [MATH] , so this case cannot occur. |
6. [MATH] If [MATH] , this is impossible. If [MATH] , this can only occur if [MATH] , but we are assuming [MATH] . So this case cannot occur. |
This shows that [MATH] , and thus [MATH] That is, [MATH] \qed Lemma 19 If [MATH] , then [MATH] Proof 16 First we prove the following fact: [MATH] If [MATH] , this is immediate, so assume [MATH] Since [MATH] , the word [MATH] is non-empty and thus [MATH] ends with [MATH] We can write [MATH] Since [MATH] in particular we... |
[MATH] , and so [MATH] Also, since [MATH] , we have [MATH] It follows that [MATH] Since [MATH] , we have [MATH] Thus [MATH] as required. |
Now, let [MATH] Then [MATH] We have [MATH] , and thus [MATH] Thus [MATH] Also, since [MATH] and [MATH] , we have [MATH] This implies [MATH] It follows that [MATH] Since [MATH] , we have [MATH] |
We noted above that [MATH] , and we also have [MATH] Since [MATH] , it follows that [MATH] Hence [MATH] Since [MATH] , we have [MATH] So [MATH] , but both words are prefixes of [MATH] , so in fact [MATH] as required. \qed |
We can now establish the upper bound. Proposition 20 Suppose [MATH] and [MATH] If [MATH] is non-empty, [MATH] , and [MATH] , then we have [MATH] |
Proof 17 It suffices to prove that states [MATH] and [MATH] are indistinguishable for [MATH] We proceed by induction on the value [MATH] |
The base case is [MATH] , that is, [MATH] Our states are [MATH] and [MATH] By Lemma 18 , we have [MATH] for all [MATH] . Thus non-empty words cannot distinguish the states. But recall that [MATH] is a non-final state, so the states we are trying to distinguish are both non-final, and thus the empty word does not distin... |
Now, suppose [MATH] , that is, [MATH] Assume that states [MATH] and [MATH] are indistinguishable. We want to show that [MATH] and [MATH] are indistinguishable. Since [MATH] , both states are non-final, and thus the empty word cannot distinguish them. By Lemma 18 , if [MATH] . then [MATH] for all [MATH] . So only words ... |
This establishes an upper bound of [MATH] on the state complexity of [MATH] Next, we prove this bound is tight. Theorem 21 Suppose [MATH] and [MATH] There exists a non-empty word [MATH] and a language [MATH] , with [MATH] and [MATH] , such that [MATH] |
Proof 18 Let [MATH] and let [MATH] Let [MATH] be the DFA for [MATH] Let [MATH] be the language accepted by the DFA [MATH] with state set [MATH] , alphabet [MATH] , initial state [MATH] , final state set [MATH] , and transformations [MATH] and [MATH] |
We show that [MATH] has [MATH] reachable and pairwise distinguishable states. For reachability, for [MATH] and [MATH] , we can reach [MATH] from the initial state [MATH] by the word [MATH] For distinguishability, note that all [MATH] states in column [MATH] are indistinguishable, and so collapse to one state under the ... |
7.3 Matching a Single Factor Proposition 22 If the state complexity of [MATH] is [MATH] , then the state complexity of [MATH] is [MATH] |
Proof 19 Let [MATH] be the DFA with transitions defined as follows: for all [MATH] and [MATH] , we have [MATH] Recall from Proposition 17 that [MATH] recognizes [MATH] We modify [MATH] to obtain a DFA [MATH] that accepts [MATH] as follows. Let [MATH] , where [MATH] is defined as follows for each [MATH] |
[MATH] for [MATH] , and [MATH] Note that [MATH] is minimal: state [MATH] can be reached by the word [MATH] , and states [MATH] and [MATH] with [MATH] are distinguished by [MATH] . It remains to show that [MATH] accepts [MATH] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.