Generating All Circular Shifts by Context-Free Grammars in Chomsky Normal Form

Size: px
Start display at page:

Download "Generating All Circular Shifts by Context-Free Grammars in Chomsky Normal Form"

Transcription

1 Generating All Circular Shifts by Context-Free Grammars in Chomsky Normal Form Peter R.J. Asveld Department of Computer Science, Twente University of Technology P.O. Box 217, 7500 AE Enschede, the Netherlands Abstract Let {a 1,a 2,...,a n } be an alphabet of n symbols and let C n be the language of circular shifts of the word a 1 a 2 a n ; so C n = {a 1 a 2 a n 1 a n, a 2 a 3 a n a 1,...,a n a 1 a n 2 a n 1 }. We discuss a few families of context-free grammars G n (n 1) in Chomsky normal form such that G n generates C n. The grammars in these families are investigated with respect to their descriptional complexity, i.e., we determine the number of nonterminal symbols ν(n) and the number of rules π(n) of G n as functions of n. These ν and π happen to be functions bounded by low-degree polynomials, particularly when we focus our attention to unambiguous grammars. Finally, we introduce a family of minimal unambiguous grammars for which ν and π are linear. Keywords: context-free grammar, Chomsky normal form, permutation, circular shift, descriptional complexity, unambiguous grammar. 1 Introduction In [2] we considered context-free grammars G n (n 1) in Chomsky normal form that generate the finite language L n consisting of all permutations over the alphabet Σ n = {a 1, a 2,...,a n }. A few families {G n } n 1 of such grammars for {L n } n 1 have been studied in [2] with respect to their grammatical complexity; more precisely, the number of nonterminal symbols ν(n) and the number of production rules π(n) of G n have been determined as functions of n. In this paper we restrict ourselves to a subset of specific permutations over Σ n, viz. to the so-called circular or cyclic shifts. Assuming a linear order on Σ n, e.g., a 1 < a 2 < < a n, the set C n of circular shifts (also called cyclic shifts) over Σ n is

2 2 Peter R.J. Asveld C n = {a 1 a 2 a n 1 a n, a 2 a 3 a n a 1, a 3 a 4 a 1 a 2,...,a n a 1 a n 2 a n 1 }. So C n is obtained from the word a 1 a 2 a n by repetitively moving the first symbol to the right-hand end of the string. Clearly, C n contains n strings, which is much less than the n! elements of L n [7, 12]. Considered as a set of permutations of a 1 a 2 a n the set C n forms a cyclic subgroup of order n of the symmetric group S n over Σ n (i.e., the group of all permutations over the alphabet Σ n ). And there are (n 1)! of such isomorphic subgroups of order n of S n, each of which is induced by a linear order a 1 < a p(2) < a p(3) < < a p(n) on Σ n, where p is a permutation of 2, 3,..., n; cf. also the notion of circular successor in Section 2 below, and 6.1 of [7]. As in [2] we will discuss some families of grammars {G n } n 1 in Chomsky normal form for {C n } n 1 and investigate the descriptional complexity of these G n s in terms of the complexity measures ν(n) and π(n). Contrary to the families in [2] where the complexity measures ν(n) and π(n) were bounded by exponential functions, in this paper these measures are bounded by polynomial functions of low degree. The structure of this paper resembles the one of [2] to some extent. So firstly, in Section 2 we consider some preliminaries on notation and terminology. Section 3 is devoted to some elementary properties of grammars G n in Chomsky normal form that generate C n. Section 4 consists of a direct approach based on the set of (circularly) ordered strings over the terminal alphabet Σ n of G n. In Section 5 we consider a slight modification of this family which results in a family of context-free grammars in Chomsky normal form with less productions than the ones in Section 4 (provided n 3). Section 6 is devoted to unambiguous grammars (in Chomsky normal form) for C n ; these grammars turn out to be rather simple in terms of the descriptional complexity measures ν(n) and π(n). In Section 7 we consider a family of unambiguous grammars in Chomsky normal form that is minimal with respect to the descriptional complexity measures ν(n) and π(n) in an obvious sense. For this minimal family of grammars, these complexity measures turn out to be linear functions in n. Finally, Section 8 contains some concluding remarks. 2 Preliminaries We assume the reader to be familiar with the rudiments of discrete mathematics, especially with combinatorics; for standard texts on these subjects we refer to [7, 12]. For a finite set X, we denote the cardinality (the number of elements) of X by #X. Basic concepts, terminology and notation from formal language theory can be found in e.g. [9]. We will denote the empty word by λ. As usual, the length of the word x will be denoted by x. For each word w over Σ, we denote by A(w) the set of all symbols from Σ that really do occur in w. Formally, A(λ) =, and A(ax) = {a} A(x) for each a Σ and x Σ. This mapping is extended to languages L over Σ by A(L) = {A(w) w L}. Recall that a λ-free context-free grammar G = (V, Σ, P, S) is in Chomsky normal form if P N (N {S}) 2 N Σ where N = V Σ. For each context-free grammar G = (V, Σ, P, S), let L(G, A) be the language over Σ defined by L(G, A) = {w Σ A w}.

3 Generating All Circular Shifts 3 Thus for the language L(G) generated by G, we have L(G) = L(G, S). Note that, if G is in Chomsky normal form, then L(G, A) is a nonempty language for each A in N. Throughout this paper, we use Σ n to denote an alphabet of n different symbols a 1, a 2,...,a n (n 1) provided with the linear order a 1 < a 2 < < a n. In [2] subsets of Σ n and the power set of Σ n played a principal part in generating all permutations by context-free grammars in Chomsky normal form. However, in generating all circular shifts we need (sets of) subwords of a 1 a 2 a n a 1 a n 1. Intuitively, Fk n is the set of all subwords of length k (1 k n) that obey the circular succession relation on Σ n defined by: a i a j if and only if either (i) i < n and j = i + 1 or (ii) i = n and j = 1. Note that is not a transitive relation; as its name suggests it is rather a kind of successor relation. Returning to the definition of Fk n, we formally define for each k (1 k n), the set Fk n by F n k = {x Σ n u, v Σ n : uxv = a 1a 2 a n a 1 a 2 a k 1 ; x = k} and the partial unions Q n m by Q n m = m k=1 F n k (1 m n). Then we obviously have C n = F n n = Q n n Q n n 1, #F n k = n (1 k n), #Qn m = mn and #C n = #F n n = n; note that #Qn n #Qn n 1 = n2 (n 1)n = n as well. Example 2.1. For n = 3, we have Σ 3 = {a 1, a 2, a 3 }, F1 3 = Σ 3, F2 3 = {a 1 a 2, a 2 a 3, a 3 a 1 } and F3 3 = C 3 = {a 1 a 2 a 3, a 2 a 3 a 1, a 3 a 1 a 2 }. Clearly, L 3 C 3 = {a 1 a 3 a 2, a 2 a 1 a 3, a 3 a 2 a 1 }. Finally, we remark that C n can also be characterized in terms of the circular closure operator c on languages which is defined by c(l) = {w 2 w 1 w 1 w 2 L} for each language L [6]. Then C n can be written as C n = c({a 1 a 2 a n }). 3 Elementary Properties In this section we first recall some properties of grammars that generate L n (the finite language of all permutations over Σ n ). From [2] we quote the following results. Proposition 3.1. Let G n = (V n, Σ n, P n, S n ) is a context-free grammar in Chomsky normal form that generates L n, and let N n be defined by N n = V n Σ n. (1) For each nonterminal A in N n, the language L(G n, A) is a nonempty subset of an isomorphic copy M k of the language L k for some k (1 k n). Consequently, each string z in L(G n, A) has length k, z consists of k different symbols, and A(z) = A(L(G n, A)). (2) Let A and B be nonterminal symbols in N n. If L(G n, A) L(G n, B), then A(L(G n, A)) = A(L(G n, B)). (3) If A BC is a rule in G n, then A(L(G n, B)) A(L(G n, C)) = and A(L(G n, B)) A(L(G n, C)) = A(L(G n, A)). Proposition 3.1(2) suggested the following equivalence relation on N n : A and B from N n are called equivalent if x = y for some x L(G n, A) and some y L(G n, B). The corresponding equivalence classes are {E n,k } n k=1. Thus N n is the union of the n equivalence

4 4 Peter R.J. Asveld classes E n,1, E n,2,, E n,n with E n,i E n,j = for i j. The number of elements #E n,k of the equivalence class E n,k will be denoted by D(n, k) (1 k n) in the sequel. Example 3.2. Consider Σ 3 = {a 1, a 2, a 3 } and the grammar G P 3 = (V 3, Σ 3, P 3, A 123 ) with V 3 = {A 123, A 12, A 13, A 23, A 1, A 2, A 3 } and P 3 consists of A 123 A 1 A 23 A 2 A 13 A 13 A 2 A 23 A 1 A 3 A 12, A 12 A 1 A 2 A 2 A 1, A 13 A 1 A 3 A 3 A 1, A 23 A 2 A 3 A 3 A 2, A 1 a 1, A 2 a 2 and A 3 a 3. Then L(G P 3 ) = L 3, E 3,3 = {A 123 }, E 3,2 = {A 12, A 13, A 23 }, E 3,1 = {A 1, A 2, A 3 }, and hence D(3, 3) = 1 and D(3, 2) = D(3, 1) = 3. In the proof of Proposition 3.1 we only used the fact that each word in L(G n ) is a permutation [2]. So if we require that G n generates C n rather than L n, Proposition 3.1 still applies. Next we will see what happens when we restrict our attention to circular shifts rather than to arbitrary permutations over Σ n ; cf. Proposition 3.4 for which we need the following auxiliary result. Lemma 3.3. Let X be a nonempty proper subalphabet of Σ n with #X = l (1 l < n). Then there exists at most one word x with A(x) = X such that x satisfies the circular succession relation. And if X = {b 1, b 2,...,b l }, then x = b p(1) b p(2) b p(l) provided there exists a permutation p of {1, 2,..., l} such that b p(1) b p(2) b p(l). Proof. If X = {b}, then x = b and the statement holds trivially. In case X consists of l (2 l < n) elements we check whether we can find a permutation p of {1, 2,..., l} such that b p(1) b p(2) b p(l). If we succeed, then x = b p(1) b p(2) b p(l) is the only word that satisfies the circular succession relation, since l < n. If such a permutation does not exist, then there is no such x. Proposition 3.4. Let G n = (V n, Σ n, P n, S n ) be a context-free grammar in Chomsky normal form that generates C n, and let N n be defined by N n = V n Σ n. (1) For each A in N n {S n }, the language L(G n, A) is a singleton. (2) Let A and B be nonterminal symbols in N n {S n }. If L(G n, A) L(G n, B), then L(G n, A) = L(G n, B). (3) If A BC is a rule in G n, with L(G n, B) = {b 1 b 2 b k } and L(G n, C) = {c 1 c 2 c l }, then b k c 1. Consequently, if L(G n, B) Fk n and L(G n, C) Fl n, then L(G n, A) Fk+l n. Proof. (1) Since G n is in Chomsky normal form, each nonterminal A is useful: so there is a derivation S n ϕaψ + ϕx A ψ + x where x is a circular shift, ϕψ λ, A(x) = Σ n, and A(x A ) is a nonempty proper subalphabet of Σ n. Hence, by Lemma 3.3, L(G n, A) contains at most one word over Σ n, and as L(G n, A) is nonempty, L(G n, A) is a singleton. Now (2) is a direct consequence of (1), Proposition 3.1(2) and Lemma 3.3. Finally, (3) easily follows from Proposition 3.1(3) and Lemma 3.3. Example 3.5. Consider the context-free grammar G 3 = (V 3, Σ 3, P 3, S 3 ) with V 3 = {S 3, A 12, A 23, A 31, A 1, A 2, A 3 } and P 3 consists of S 3 A 12 A 3 A 23 A 1 A 31 A 2, A 12 A 1 A 2, A 13 A 1 A 3, A 23 A 2 A 3, A 1 a 1, A 2 a 2 and A 3 a 3.

5 Generating All Circular Shifts 5 Then L(G 3 ) = C 3, E 3,3 = {S 3 }, E 3,2 = {A 12, A 23, A 31 }, E 3,1 = {A 1, A 2, A 3 }, and hence D(3, 3) = 1 and D(3, 2) = D(3, 1) = 3. As S 3 A 23 A 1 is in P 3, L(G 3, A 23 ) = {a 2 a 3 }, L(G 3, A 1 ) = {a 1 } and a 3 a 1. For a context-free grammar G n we use as descriptional complexity measures the number ν(n) of nonterminal symbols and the number π(n) of production rules of G n ; so ν(n) = #N n and π(n) = #P n. As in [2] we will view both ν and π as functions of n. For a more general and thorough treatment of descriptional complexity issues in relation to contextfree grammars and their languages we refer to [8, 10, 11, 5, 3, 1, 4]. In [2] we also introduced another descriptional complexity measure, viz. the total number of left-most derivations δ(n), i.e., δ(n) = #{S n L x x L(G n)}, where L denotes the leftmost derivation relation. Clearly, this measure makes sense when we generate a finite language by means of a grammar with bounded ambiguity. Example 3.6. (1) For the grammar G P 3 of Example 3.2, we have ν P(3) = 7, π P (3) = 12 and δ P (3) = 3! = 6, since G P 3 is unambiguous [2]. (2) Similarly, for the unambiguous grammar G 3 of Example 3.5, we have ν(3) = 7, π(3) = 9 and δ(3) = 3. When we consider a family of grammars {G n } n 1 for {C n } n 1 in the sequel, we always assume that the first element G 1 = (V 1, Σ 1, P 1, S 1 ) satisfies N 1 = {S 1 } and P 1 = {S 1 a 1 }. Then ν(1) = π(1) = δ(1) = 1 whereas for n 2, ν(n) = n k=1 D(n, k) n+1, π(n) n+2 and δ(n) n. 4 A Straightforward Approach According to the previous section an obvious way to generate the language C n is to provide G n with nonterminal symbols A x such that if x = k < n, then L(G n, A x ) = {x} with x Q n n 1 and A x E n,k. The words from C n = Q n n Q n n 1 are treated differently: they should be derived from S n. So there are productions S n A x A y for all nonempty words x and y with xy C n, while E n,n = {S n }. Definition 4.1. The family {G 0 n } n 1 is given by {(V n, Σ n, P n, S n )} n 1 with for n 2, N n = V n Σ n = {S n } {A x x Q n n 1}, P n = {S n A x A y xy C n ; x, y Σ + n } {A xy A x A y xy Q n n 1; x, y Σ + n } {A a a a Σ n }. Of course, S n is the only nonterminal from G 0 n that generates more than a single string provided n 2. Viz. #L(G 0 n, S n) = #C n = n and #L(G 0 n, A) = 1 for each A in N n {S n }; cf. Proposition 3.4. In the sequel we will slightly change our notation in order to reduce the number of subscript levels: if x = a j a k, we will write A j k for A x instead of A aj a k ; cf. Examples 3.2 and 3.5 above. In this way the set of indices {1, 2,..., n} inherits the linear order of the alphabet Σ n ; a similar remark applies with respect to the -relation. Example 4.2. For n = 3, Definition 4.1 yields the grammar G 0 3 = (V 3, Σ 3, P 3, S 3 ) with

6 6 Peter R.J. Asveld N 3 = {S 3, A 12, A 23, A 31, A 1, A 2, A 3 } and P 3 = {S 3 A 1 A 23 A 12 A 3 A 2 A 31 A 23 A 1 A 3 A 12 A 31 A 2, A 12 A 1 A 2, A 23 A 2 A 3, A 31 A 3 A 1, A 1 a 1, A 2 a 2, A 3 a 3 }. Now E 3,3 = {S 3 }, E 3,2 = {A 12, A 23, A 31 }, E 3,1 = {A 1, A 2, A 3 }, D(3, 3) = 1 and D(3, 2) = D(3, 1) = 3. Thus ν 0 (3) = 7, π 0 (3) = 12 and δ 0 (3) = 6. Proposition 4.3. For the family {G 0 n} n 1 of Definition 4.1 we have (1) D(n, n) = 1 and D(n, k) = n with 1 k < n, (2) ν 0 (n) = n 2 n + 1, (3) π 0 (n) = 1 2 n3 1 2 n2 + n, (4) δ 0 (1) = 1 and for n 2, δ 0 (n) = n 2 n. Proof. The definitions of N n and P n in Definition 4.1 imply that for n 2, ν 0 (n) = #N n = 1 + #Q n n 1 = 1 + (n 1)n = n 2 n + 1, while π 0 (n) = h 0 (n) + h 1 (n) + h 2 (n) with h 0 (n) = #{S n A x A y xy C n ; x, y Σ + n }, h 1 (n) = #{A xy A x A y xy Q n n 1 ; x, y Σ+ n }, and h 2 (n) = #{A a a a Σ n }. Clearly, h 0 (n) = n(n 1) and h 2 (n) = n, whereas h 1 (n) = n 1 k=2 (k 1) n = 1n(n 1)(n 2). 2 Consequently, π 0 (n) = n(n 1) + 1n(n 1)(n 2) + n = n3 1 2 n2 + n. G n generates n strings, each of which can be obtained (by a left-most derivation) in n 1 ways provided n 2; hence δ 0 (n) = n(n 1). 5 An Improvement The family {G 1 n} n 1 to be introduced in this section, is obtained from {G 0 n} n 1 by reducing the number of rules in the following way. If A BC is a production of G 1 n, then we restrict the form of this rule by requiring that L(G 1 n, B) = {x} with x = 1. This idea originates from generating L n by regular grammars; cf. [2] for details and examples. Definition 5.1. The family {G 1 n} n 1 is given by {(V n, Σ n, P n, S n )} n 1 with for n 2, N n = V n Σ n = {S n } {A x x Q n n 1 }, P n = {S n A x A y xy C n ; x Σ n } {A xy A x A y xy Q n n 1 ; x Σ n, y Σ + n } {A a a a Σ n }. Example 5.2. In case n = 3 we obtain from Definition 5.1 the grammar G 1 3 = (V 3, Σ 3, P 3, S 3 ) with N 3 = {S 3, A 12, A 23, A 31, A 1, A 2, A 3 } and P 3 = {S 3 A 1 A 23 A 2 A 31 A 3 A 12, A 12 A 1 A 2, A 23 A 2 A 3, A 31 A 3 A 1, A 1 a 1, A 2 a 2, A 3 a 3 }. Again we have E 3,3 = {S 3 }, E 3,2 = {A 12, A 23, A 31 }, E 3,1 = {A 1, A 2, A 3 }, D(3, 3) = 1, D(3, 2) = D(3, 1) = 3 and ν 1 (3) = 7. But now π 1 (3) = 9 and δ 1 (3) = 3. Proposition 5.3. For the family {G 1 n } n 1 of Definition 5.1 we have (1) D(n, n) = 1 and D(n, k) = n with 1 k < n, (2) ν 1 (n) = n 2 n + 1,

7 Generating All Circular Shifts 7 (3) π 1 (n) = n 2, (4) δ 1 (n) = n. Proof. As in the proof of Proposition 4.3 we still have for n 2, ν 1 (n) = n 2 n + 1. Again we write π 1 (n) for n 2 as π 1 (n) = h 0 (n) + h 1 (n) + h 2 (n) with h 0 (n) = #{S n A x A y xy C n ; x Σ n }, h 1 (n) = #{A xy A x A y xy Q n n 1 ; x Σ n, y Σ + n }, and h 2 (n) = #{A a a a Σ n }. Then still we have h 2 (n) = n, but now h 0 (n) = n and h 1 (n) = #(Q n n 1 F1 n ) = #Q n n 1 #F 1 n = n(n 1) n = n2 2n. Hence π 1 (n) = n + n 2 2n + n = n 2. Again, the grammars G 1 n generate n strings, but now there is only a single (left-most) derivation for each word in L(G 1 n ); therefore we have δ 1(n) = n. Although the number of nonterminal symbols did not change (viz. ν 1 (n) = ν 0 (n)), we have improved upon the number of production rules. In this regard the G 1 n s are superior to the G 0 n s of Definition 4.1, because for n 3, we have the strict inequality π 1 (n) = n 2 < 1 2 n3 1 2 n2 + n = π 0 (n). 6 Families of Unambiguous Grammars In the previous section we saw that the family {G 1 n} n 1 is a slight improvement upon {G 0 n } n 1; so it might be considered as a first step toward a family {G n } n 1 of minimal grammars. When we discuss minimality of grammars, the first question is: With respect to which measure are the G n s minimal? Obvious candidates are, of course, the measures ν, π or δ, but also combined measures as the sum or the product of ν and π (or any monotonically increasing function in ν and π) may be considered as well. Comparing Definitions 4.1 and 5.1 together with Propositions 4.3 and 5.3, suggests that the first step toward a family of minimal grammars is to avoid ambiguity or, equivalently, to require that δ(n) = n. Lemma 6.1. Let {G n } n 1 be a family of grammars in Chomsky normal form that generates the language family {C n } n 1. If δ(n) = n, then π(n) = ν(n) + n 1. Proof. As G n is in Chomsky normal form, each nonterminal is useful. Thus for each A in N n {S n } there is at least one production. By Proposition 3.4(1), we have #L(G n, A) = #{x A } = 1. So assuming that there is more than one rule for A in P n yields two or more left-most derivations for x A. Since these derivations of x A are used as left-most subderivations of some x in C n, there are two or more left-most derivations of x; hence δ(n) > n. Consequently, for each A in N n {S n }, there is exactly one rule in P n. For S n we have that n rules are necessary and sufficient to generate the n words of C n = L(G n, S n ) because δ(n) = n. Hence π(n) = ν(n) 1 + n. Note that this result applies to {G 1 n} n 1 but not to {G 0 n} n 1 ; cf. Propositions 4.3 and

8 8 Peter R.J. Asveld 5.3. However, {G 1 n} n 1 is not the only family satisfying this equality; viz. Definition 6.2. The family {G 2 n } n 1 is given by {(V n, Σ n, P n, S n )} n 1 with N 2 = V 2 Σ 2 = {S 2, A 1, A 2 } and P 2 = {S 2 A 1 A 2 A 2 A 1, A 1 a 1, A 2 a 2 }, and for n 3, N n = V n Σ n = {S n } {A a a Σ n } {A x x F n 2 } M n with for m 2, M 2m = {A x x F 2m 2m 2 F 2m 2m 4 F 2m 2 }, and M 2m 1 = {A x x F 2m 1 2m 3 F 2m 1 2m 5 F 2m 1 3 }, P n = {S n A x A y xy C n ; x F n 2 } {A xy A x A y A xy M n, x F n 2 } {A xy A x A y xy F n 2, x, y Σ n} {A a a a Σ n }. If A BC is a rule in G 1 n, then L(G 1 n, B) consists of a single string of length one; in G 2 n we have L(G2 n, B) = {w B} with w B = 2. Example 6.3. For the case n = 5 we obtain from Definition 6.2 the grammar G 2 5 = (V 5, Σ 5, P 5, S 5 ) with N 5 = {S 5, A 1, A 2, A 3, A 4, A 5, A 12, A 23, A 34, A 45, A 51 } M 5 with M 5 = {A 123, A 234, A 345, A 451, A 512 }, and P 5 = {S 5 A 12 A 345 A 23 A 451 A 34 A 512 A 45 A 123 A 51 A 234, A 123 A 12 A 3, A 234 A 23 A 4, A 345 A 34 A 5, A 451 A 45 A 1, A 512 A 51 A 2, A 12 A 1 A 2, A 23 A 2 A 3, A 34 A 3 A 4, A 45 A 4 A 5, A 51 A 5 A 1, A 1 a 1, A 2 a 2, A 3 a 3, A 4 a 4, A 5 a 5 }. The equivalence classes are E 5,5 = {S 5 }, E 5,4 =, E 5,3 = {A 123, A 234, A 345, A 451, A 512 }, E 5,2 = {A 12, A 23, A 34, A 45, A 51 } and E 5,1 = {A 1, A 2, A 3, A 4, A 5 }. Now we have ν 2 (5) = 16 < 21 = ν 1 (5) and π 2 (5) = 20 < 25 = π 1 (5) which indicates that {G 1 n } n 1 is not minimal. In order to show the next results concisely we need a function that indicates whether its argument is even or odd: we will use the binary mod-operation. This operation should not be confused with the congruence relation a b (mod m). Proposition 6.4. For the family {G 2 n } n 1 of Definition 6.2, we have (1) D(n, n) = 1, D(n, 1) = D(n, 2) = n, and for 3 k < n, D(n, k) = if k n (mod 2) then n else 0, (2) ν 2 (1) = 1 and for n 2, ν 2 (n) = 1 2 n2 + 1 n (n mod 2) + 1, 2 (3) π 2 (n) = 1 2 n2 + n + 1 n (n mod 2), 2 (4) δ 2 (n) = n. Proof. From Definition 6.2, Proposition 6.4(1) easily follows. Then for even n with n 3, we have ν 2 (n) = 1 + 2n + n 2 k=4 D(n, k) = 1 + 2n + 1(n 4)n = n For odd n with n 3, this yields ν 2 (n) = 1 + 2n + n 2 k=3 D(n, k) = 1 + 2n + 1(n 3)n = n2 + 1n

9 Generating All Circular Shifts 9 Combining these two cases results in ν 2 (n) = 1 2 n2 + 1 n (n mod 2) + 1 for n 3. Finally, 2 Lemma 6.1 implies Proposition 6.4(3). From Propositions 5.3 and 6.4 it follows that for n 4, we have ν 1 (n) > ν 2 (n) and, consequently, π 1 (n) > π 2 (n); for smaller values of n we have equality in both cases. Of course, we may proceed in this way by defining families {G k n} n 1 (k 3) with the property that if A BC is a rule of G k n, then L(Gk n, B) consists of a single word of length k. However, the definitions of such families become more complicated as k increases (cf. Definitions 6.2 and 5.1) and, in addition, we have to define the grammars G k 1, Gk 2,...,Gk k explicitly (e.g., in terms of G j i for some j < k). And probably we are still left with ν k(n) and π k (n) being functions in Θ(n 2 ). 7 A Family of Minimal Grammars Our quest for a family {G n } n 1 of minimal grammars that generate {C n } n 1 is directed by the following two observations. Firstly, as remarked earlier, results from Sections 4 and 5 suggest that avoiding ambiguity is a major contribution. Then δ reaches its minimum value (i.e., δ(n) = n) and by Lemma 6.1 and its proof we may concentrate on minimizing ν(n): as a consequence π(n) will reach its minimum value as well. The second observation concerns the definition of minimality in this context. From the last remark in Section 3 it follows that ν(n), π(n), δ(n) Ω(n). So the following definition is an obvious choice. Definition 7.1. Let {G n } n 1 be a family of context-free grammars in Chomsky normal form that generates {C n } n 1. Then the family {G n } n 1 is called minimal if (1) each G n (n 1) is an unambiguous grammar, and (2) the number ν(n) of nonterminal symbols of G n satisfies ν(n) Θ(n). Next we will show that there exists a family that meets these conditions. Definition 7.2. The family {G n } n 1 is given by {(V n, Σ n, P n, S n )} n 1 with for n 2, N n = V n Σ n = {S n, A 1, A 2,...,A n } {A 12 k 1 < k < n} {A k(k+1) n 1 < k < n}, P n = {S n A 1 A 23 n } {S n A k(k+1) n A 12 (k 1) 1 < k n} {A 12 k A 12 (k 1) A k 1 < k < n} {A k(k+1) n A k A (k+1) n 1 < k < n} {A k a k 1 k n}. Example 7.3. For n = 5, Definition 7.2 yields the grammar G 5 = (V 5, Σ 5, P 5, S 5 ) with N 5 = {S 5, A 1, A 2, A 3, A 4, A 5, A 12, A 123, A 1234, A 45, A 345, A 2345 } with P 5 = {S 5 A 1 A 2345 A 2345 A 1 A 345 A 12 A 45 A 123 A 5 A 1234, A 1234 A 123 A 4, A 123 A 12 A 3, A 12 A 1 A 2, A 2345 A 2 A 345, A 345 A 3 A 45, A 45 A 4 A 5, A 1 a 1, A 2 a 2, A 3 a 3, A 4 a 4, A 5 a 5 }. Now the equivalence classes are E 5,5 = {S 5 }, E 5,4 = {A 1234, A 2345 }, E 5,3 = {A 123, A 345 }, E 5,2 = {A 12, A 45 } and E 5,1 = {A 1, A 2, A 3, A 4, A 5 }.

10 10 Peter R.J. Asveld Consequently, we have ν (5) = 12 and π (5) = 16; the fact that G 5 is unambiguous implies that δ (5) = 5. Proposition 7.4. For the family {G n } n 1 of Definition 7.2 we have (1) D(n, n) = 1, D(n, 1) = n, and D(n, k) = 2 with 1 < k < n, (2) ν (1) = 1 and for n 2, ν (n) = 3n 3, (3) π (1) = 1 and for n 2, π (n) = 4n 4, (4) δ (n) = n. Proof. It is a routine matter to verify that L(G n) = C n and that G n is unambiguous for n 1. Definition 7.2 implies ν (n) = #N n = n (n 2) = 3n 3 provided that n 2. The other statements follow from Lemma 6.1 and Definition 7.2. Corollary 7.5. The family {G n } n 1 of Definition 7.2 is minimal. Since both ν (n) and π (n) are linear in n, we have for i = 0, 1, 2 that ν (n) < ν i (n) and π (n) < π i (n) for all n 5. 8 Concluding Remarks In the previous sections we discussed a few ways of generating the languages {C n } n 1 of circular shifts by context-free grammars {G n } n 1 in Chomsky normal form. The family {G 0 n} n 1 is as straightforward as Definition 4.1 in [2]; {G 1 n} n 1 is inspired by Definition 5.4 in [2], whereas for {G 2 n } n 1 there is no immediate analogue in [2]. On the other hand the family {G n} n 1 reflects the main idea of Definition 7.1 of [2]: in that Definition a grammatical transformation is used to define the family inductively. The interested reader may compare G n and G n+1 and infer a transformation to define {G n } n 1 inductively. ν(n) π(n) δ(n) G 0 n n 2 n n3 1 2 n2 + n n 2 n G 1 n n 2 n + 1 n 2 n G 2 n 1 2 n2 + 1 n (n mod 2) n2 + n + 1 n (n mod 2) n 2 G n 3n 3 4n 4 n Table 1: Complexity measures. We compared these grammar families with respect to their descriptive complexity measures ν(n), π(n) and δ(n). These measures turned out to be bounded by low-degree polynomial functions. In case of unambiguous grammars, i.e., when δ(n) = n, there is a simple relation between ν(n) and π(n); cf. Lemma 6.1. A summary of our results for

11 Generating All Circular Shifts 11 n 2 is in Table 1. Going downwards in this table means an improvement of at least one complexity measure, provided n 5. The last family in this table {G n } n 1 is minimal in the sense of Definition 7.1; cf. Corollary 7.5. Whether it is also minimal in an absolute sense (i.e., does there exist a family of unambiguous grammars with ν(n) < 3n 3 and, consequently, with π(n) < 4n 4 for n large enough?) is a difficult open problem. First of all, the coefficient 3 is rather small, and any progress must be made by economizing in the 2n 4 elements of n 1 k=2 E n,k, since D(n, n) = 1 and D(n, 1) = n because E n,n = {S n } and E n,1 = {A 1, A 2,...,A n }, respectively. E.g., a straightforward divideand-conquer approach (usually to be considered as very efficient; cf. Proposition 8.3 in [2]) yields a grammar family with for n = 2 m (m 2), D(n, n) = 1, D(n, 2 l ) = n, for 0 l < m = log 2 n, and D(n, k) = 0, otherwise, which results in ν(n) = n log 2 n + 1. Of course, this is not an improvement with respect to ν (n) of Proposition 7.4. Secondly, and more importantly, determining the minimum number of context-free productions (regardlessly whether they are in Chomsky normal form) needed to generate a finite language is a notoriously difficult problem. For discussions, simple examples and complicated (partial) results we refer to [5, 4, 3, 1] and in particular to [13]. In Section 1 we noticed that viewed as a set of permutations of a 1 a 2 a n the set C n forms a cyclic subgroup of order n of the symmetric group S n over Σ n. We conclude this section with a few trivial subgroups of S n : I n = {a 1 a 2 a n } the identity permutation; R n = {a 1 a 2 a n 1 a n, a n a n 1 a 2 a 1 } an element and its reversal; T n = {a 1 a 2 a 3 a n, a 2 a 1 a 3 a n } an element and the result of transposing its first two symbols. We leave it as an exercise to the interested reader to construct families of unambiguous grammars for these language families for which the following holds (n 2). X n ν X (n) π X (n) δ X (n) ν X (2) ν X (n + 1) π X (2) π X (n + 1) I n 2n 1 2n ν I (n) π I (n) + 2 R n 3n 3 3n ν R (n) π R (n) + 3 T n 2n 1 2n 2 3 ν T (n) π T (n) + 2 The last four columns in this table show the recurrence relations by which ν X (n) and π X (n) are defined.

12 12 Peter R.J. Asveld References 1. B. Alspach, P. Eades & G. Rose, A lower-bound for the number of productions for a certain class of languages, Discrete Appl. Math. 6 (1983) P.R.J. Asveld, Generating all permutations by context-free grammars in Chomsky normal form, Theoret. Comput. Sci. 354 (2006) An earlier version appeared in: F. Spoto, G.S. Scollo & A. Nijholt (eds.): Proc. Algebraic Methods in Language Processing (AMiLP 2003), 3rd AMAST Workshop on Language Processing, Verona, Italy, August 2003, pp ; ISSN W. Bucher, A note on a problem in the theory of grammatical complexity, Theoret. Comput. Sci. 14 (1981) W. Bucher, H.A. Maurer & K. Culik II, Context-free complexity of finite languages, Theoret. Comput. Sci. 28 (1984) W. Bucher, H.A. Maurer, K. Culik II & D. Wotschke, Concise description of finite languages, Theoret. Comput. Sci. 14 (1981) J. Dassow, On the circular closure of languages, EIK 15 (1979) R.L. Graham, D.E. Knuth & O. Patashnik, Concrete Mathematics (1989), Addison- Wesley, Reading, MA. 8. J. Gruska, Some classifications of context-free languages, Inform. Contr. 14 (1969) M.A. Harrison, Introduction to Formal Language Theory (1978), Addison-Wesley, Reading, MA. 10. V.A. Iljuškin, The complexity of the grammatical description of context-free languages, Dokl. Akad. Nauk SSSR 203 (1972) / Soviet Math. Dokl. 13 (1972) A. Kelemenová, Complexity of normal form grammars, Theoret. Comput. Sci. 28 (1984) C.L. Liu, Introduction to Combinatorial Mathematics (1968), McGraw-Hill, New York, etc. 13. Z. Tuza, On the context-free production complexity of finite languages, Discrete Appl. Math. 18 (1987)

Generating All Circular Shifts by Context-Free Grammars in Greibach Normal Form

Generating All Circular Shifts by Context-Free Grammars in Greibach Normal Form Generating All Circular Shifts by Context-Free Grammars in Greibach Normal Form Peter R.J. Asveld Department of Computer Science, Twente University of Technology P.O. Box 17, 7500 AE Enschede, the Netherlands

More information

Generating All Permutations by Context-Free Grammars in Chomsky Normal Form

Generating All Permutations by Context-Free Grammars in Chomsky Normal Form Generating All Permutations by Context-Free Grammars in Chomsky Normal Form Peter R.J. Asveld Department of Computer Science, Twente University of Technology P.O. Box 217, 7500 AE Enschede, the Netherlands

More information

Generating All Permutations by Context-Free Grammars in Chomsky Normal Form

Generating All Permutations by Context-Free Grammars in Chomsky Normal Form Generating All Permutations by Context-Free Grammars in Chomsky Normal Form Peter R.J. Asveld Department of Computer Science, Twente University of Technology P.O. Box 217, 7500 AE Enschede, the Netherlands

More information

A Fuzzy Approach to Erroneous Inputs in Context-Free Language Recognition

A Fuzzy Approach to Erroneous Inputs in Context-Free Language Recognition A Fuzzy Approach to Erroneous Inputs in Context-Free Language Recognition Peter R.J. Asveld Department of Computer Science, Twente University of Technology P.O. Box 217, 7500 AE Enschede, The Netherlands

More information

Left-Forbidding Cooperating Distributed Grammar Systems

Left-Forbidding Cooperating Distributed Grammar Systems Left-Forbidding Cooperating Distributed Grammar Systems Filip Goldefus a, Tomáš Masopust b,, Alexander Meduna a a Faculty of Information Technology, Brno University of Technology Božetěchova 2, Brno 61266,

More information

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction Math 4 Summer 01 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information

Congruence Classes of 2-adic Valuations of Stirling Numbers of the Second Kind

Congruence Classes of 2-adic Valuations of Stirling Numbers of the Second Kind 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 16 (2013), Article 13.3.6 Congruence Classes of 2-adic Valuations of Stirling Numbers of the Second Kind Curtis Bennett and Edward Mosteig Department

More information

Isomorphisms between pattern classes

Isomorphisms between pattern classes Journal of Combinatorics olume 0, Number 0, 1 8, 0000 Isomorphisms between pattern classes M. H. Albert, M. D. Atkinson and Anders Claesson Isomorphisms φ : A B between pattern classes are considered.

More information

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations Page 1 Definitions Tuesday, May 8, 2018 12:23 AM Notations " " means "equals, by definition" the set of all real numbers the set of integers Denote a function from a set to a set by Denote the image of

More information

Spanning and Independence Properties of Finite Frames

Spanning and Independence Properties of Finite Frames Chapter 1 Spanning and Independence Properties of Finite Frames Peter G. Casazza and Darrin Speegle Abstract The fundamental notion of frame theory is redundancy. It is this property which makes frames

More information

Section 1 (closed-book) Total points 30

Section 1 (closed-book) Total points 30 CS 454 Theory of Computation Fall 2011 Section 1 (closed-book) Total points 30 1. Which of the following are true? (a) a PDA can always be converted to an equivalent PDA that at each step pops or pushes

More information

Blackhole Pushdown Automata

Blackhole Pushdown Automata Fundamenta Informaticae XXI (2001) 1001 1020 1001 IOS Press Blackhole Pushdown Automata Erzsébet Csuhaj-Varjú Computer and Automation Research Institute, Hungarian Academy of Sciences Kende u. 13 17, 1111

More information

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School Basic counting techniques Periklis A. Papakonstantinou Rutgers Business School i LECTURE NOTES IN Elementary counting methods Periklis A. Papakonstantinou MSIS, Rutgers Business School ALL RIGHTS RESERVED

More information

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31 Contents 1 Lecture 1: Introduction 2 2 Lecture 2: Logical statements and proof by contradiction 7 3 Lecture 3: Induction and Well-Ordering Principle 11 4 Lecture 4: Definition of a Group and examples 15

More information

MINIMAL GENERATING SETS OF GROUPS, RINGS, AND FIELDS

MINIMAL GENERATING SETS OF GROUPS, RINGS, AND FIELDS MINIMAL GENERATING SETS OF GROUPS, RINGS, AND FIELDS LORENZ HALBEISEN, MARTIN HAMILTON, AND PAVEL RŮŽIČKA Abstract. A subset X of a group (or a ring, or a field) is called generating, if the smallest subgroup

More information

Independence of certain quantities indicating subword occurrences

Independence of certain quantities indicating subword occurrences Theoretical Computer Science 362 (2006) 222 231 wwwelseviercom/locate/tcs Independence of certain quantities indicating subword occurrences Arto Salomaa Turku Centre for Computer Science, Lemminkäisenkatu

More information

Parikh s theorem. Håkan Lindqvist

Parikh s theorem. Håkan Lindqvist Parikh s theorem Håkan Lindqvist Abstract This chapter will discuss Parikh s theorem and provide a proof for it. The proof is done by induction over a set of derivation trees, and using the Parikh mappings

More information

c 1998 Society for Industrial and Applied Mathematics Vol. 27, No. 4, pp , August

c 1998 Society for Industrial and Applied Mathematics Vol. 27, No. 4, pp , August SIAM J COMPUT c 1998 Society for Industrial and Applied Mathematics Vol 27, No 4, pp 173 182, August 1998 8 SEPARATING EXPONENTIALLY AMBIGUOUS FINITE AUTOMATA FROM POLYNOMIALLY AMBIGUOUS FINITE AUTOMATA

More information

FINITE ABELIAN GROUPS Amin Witno

FINITE ABELIAN GROUPS Amin Witno WON Series in Discrete Mathematics and Modern Algebra Volume 7 FINITE ABELIAN GROUPS Amin Witno Abstract We detail the proof of the fundamental theorem of finite abelian groups, which states that every

More information

Aperiodic languages and generalizations

Aperiodic languages and generalizations Aperiodic languages and generalizations Lila Kari and Gabriel Thierrin Department of Mathematics University of Western Ontario London, Ontario, N6A 5B7 Canada June 18, 2010 Abstract For every integer k

More information

Topological groups with dense compactly generated subgroups

Topological groups with dense compactly generated subgroups Applied General Topology c Universidad Politécnica de Valencia Volume 3, No. 1, 2002 pp. 85 89 Topological groups with dense compactly generated subgroups Hiroshi Fujita and Dmitri Shakhmatov Abstract.

More information

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS chapter MORE MATRIX ALGEBRA GOALS In Chapter we studied matrix operations and the algebra of sets and logic. We also made note of the strong resemblance of matrix algebra to elementary algebra. The reader

More information

Theory of Computation 1 Sets and Regular Expressions

Theory of Computation 1 Sets and Regular Expressions Theory of Computation 1 Sets and Regular Expressions Frank Stephan Department of Computer Science Department of Mathematics National University of Singapore fstephan@comp.nus.edu.sg Theory of Computation

More information

2. Prime and Maximal Ideals

2. Prime and Maximal Ideals 18 Andreas Gathmann 2. Prime and Maximal Ideals There are two special kinds of ideals that are of particular importance, both algebraically and geometrically: the so-called prime and maximal ideals. Let

More information

arxiv: v2 [math.nt] 4 Jun 2016

arxiv: v2 [math.nt] 4 Jun 2016 ON THE p-adic VALUATION OF STIRLING NUMBERS OF THE FIRST KIND PAOLO LEONETTI AND CARLO SANNA arxiv:605.07424v2 [math.nt] 4 Jun 206 Abstract. For all integers n k, define H(n, k) := /(i i k ), where the

More information

IMA Preprint Series # 2066

IMA Preprint Series # 2066 THE CARDINALITY OF SETS OF k-independent VECTORS OVER FINITE FIELDS By S.B. Damelin G. Michalski and G.L. Mullen IMA Preprint Series # 2066 ( October 2005 ) INSTITUTE FOR MATHEMATICS AND ITS APPLICATIONS

More information

Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 3

Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 3 Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 3 3. (a) Yes; (b) No; (c) No; (d) No; (e) Yes; (f) Yes; (g) Yes; (h) No; (i) Yes. Comments: (a) is the additive group

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

Series of Error Terms for Rational Approximations of Irrational Numbers

Series of Error Terms for Rational Approximations of Irrational Numbers 2 3 47 6 23 Journal of Integer Sequences, Vol. 4 20, Article..4 Series of Error Terms for Rational Approximations of Irrational Numbers Carsten Elsner Fachhochschule für die Wirtschaft Hannover Freundallee

More information

NOTES ON FINITE FIELDS

NOTES ON FINITE FIELDS NOTES ON FINITE FIELDS AARON LANDESMAN CONTENTS 1. Introduction to finite fields 2 2. Definition and constructions of fields 3 2.1. The definition of a field 3 2.2. Constructing field extensions by adjoining

More information

and this makes M into an R-module by (1.2). 2

and this makes M into an R-module by (1.2). 2 1. Modules Definition 1.1. Let R be a commutative ring. A module over R is set M together with a binary operation, denoted +, which makes M into an abelian group, with 0 as the identity element, together

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

Introduction to Metalogic 1

Introduction to Metalogic 1 Philosophy 135 Spring 2012 Tony Martin Introduction to Metalogic 1 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: (i) sentence letters p 0, p 1, p 2,... (ii) connectives,

More information

Permutation groups/1. 1 Automorphism groups, permutation groups, abstract

Permutation groups/1. 1 Automorphism groups, permutation groups, abstract Permutation groups Whatever you have to do with a structure-endowed entity Σ try to determine its group of automorphisms... You can expect to gain a deep insight into the constitution of Σ in this way.

More information

How to Pop a Deep PDA Matters

How to Pop a Deep PDA Matters How to Pop a Deep PDA Matters Peter Leupold Department of Mathematics, Faculty of Science Kyoto Sangyo University Kyoto 603-8555, Japan email:leupold@cc.kyoto-su.ac.jp Abstract Deep PDA are push-down automata

More information

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Lecture Notes 1 Basic Concepts of Mathematics MATH 352 Ivan Avramidi New Mexico Institute of Mining and Technology Socorro, NM 87801 June 3, 2004 Author: Ivan Avramidi; File: absmath.tex; Date: June 11,

More information

Generalized Pigeonhole Properties of Graphs and Oriented Graphs

Generalized Pigeonhole Properties of Graphs and Oriented Graphs Europ. J. Combinatorics (2002) 23, 257 274 doi:10.1006/eujc.2002.0574 Available online at http://www.idealibrary.com on Generalized Pigeonhole Properties of Graphs and Oriented Graphs ANTHONY BONATO, PETER

More information

Grammars (part II) Prof. Dan A. Simovici UMB

Grammars (part II) Prof. Dan A. Simovici UMB rammars (part II) Prof. Dan A. Simovici UMB 1 / 1 Outline 2 / 1 Length-Increasing vs. Context-Sensitive rammars Theorem The class L 1 equals the class of length-increasing languages. 3 / 1 Length-Increasing

More information

THE ABSOLUTE MORDELL-LANG CONJECTURE IN POSITIVE CHARACTERISTIC. 1. Introduction

THE ABSOLUTE MORDELL-LANG CONJECTURE IN POSITIVE CHARACTERISTIC. 1. Introduction THE ABSOLUTE MORDELL-LANG CONJECTURE IN POSITIVE CHARACTERISTIC THOMAS SCANLON Abstract. We describe intersections of finitely generated subgroups of semi-abelian varieties with subvarieties in characteristic

More information

Boolean Algebras. Chapter 2

Boolean Algebras. Chapter 2 Chapter 2 Boolean Algebras Let X be an arbitrary set and let P(X) be the class of all subsets of X (the power set of X). Three natural set-theoretic operations on P(X) are the binary operations of union

More information

Part V. 17 Introduction: What are measures and why measurable sets. Lebesgue Integration Theory

Part V. 17 Introduction: What are measures and why measurable sets. Lebesgue Integration Theory Part V 7 Introduction: What are measures and why measurable sets Lebesgue Integration Theory Definition 7. (Preliminary). A measure on a set is a function :2 [ ] such that. () = 2. If { } = is a finite

More information

arxiv:math/ v1 [math.co] 2 Oct 2002

arxiv:math/ v1 [math.co] 2 Oct 2002 PARTIALLY ORDERED GENERALIZED PATTERNS AND k-ary WORDS SERGEY KITAEV AND TOUFIK MANSOUR arxiv:math/020023v [math.co] 2 Oct 2002 Matematik, Chalmers tekniska högskola och Göteborgs universitet, S-42 96

More information

ON HIGHLY PALINDROMIC WORDS

ON HIGHLY PALINDROMIC WORDS ON HIGHLY PALINDROMIC WORDS Abstract. We study some properties of palindromic (scattered) subwords of binary words. In view of the classical problem on subwords, we show that the set of palindromic subwords

More information

0 Sets and Induction. Sets

0 Sets and Induction. Sets 0 Sets and Induction Sets A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a A to denote that a is an element of the set

More information

Continued fractions for complex numbers and values of binary quadratic forms

Continued fractions for complex numbers and values of binary quadratic forms arxiv:110.3754v1 [math.nt] 18 Feb 011 Continued fractions for complex numbers and values of binary quadratic forms S.G. Dani and Arnaldo Nogueira February 1, 011 Abstract We describe various properties

More information

Languages, regular languages, finite automata

Languages, regular languages, finite automata Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,

More information

arxiv: v1 [math.co] 3 Nov 2014

arxiv: v1 [math.co] 3 Nov 2014 SPARSE MATRICES DESCRIBING ITERATIONS OF INTEGER-VALUED FUNCTIONS BERND C. KELLNER arxiv:1411.0590v1 [math.co] 3 Nov 014 Abstract. We consider iterations of integer-valued functions φ, which have no fixed

More information

CHAPTER 0 PRELIMINARY MATERIAL. Paul Vojta. University of California, Berkeley. 18 February 1998

CHAPTER 0 PRELIMINARY MATERIAL. Paul Vojta. University of California, Berkeley. 18 February 1998 CHAPTER 0 PRELIMINARY MATERIAL Paul Vojta University of California, Berkeley 18 February 1998 This chapter gives some preliminary material on number theory and algebraic geometry. Section 1 gives basic

More information

Insertion operations: closure properties

Insertion operations: closure properties Insertion operations: closure properties Lila Kari Academy of Finland and Mathematics Department 1 Turku University 20 500 Turku, Finland 1 Introduction The basic notions used for specifying languages

More information

Hanoi Graphs and Some Classical Numbers

Hanoi Graphs and Some Classical Numbers Hanoi Graphs and Some Classical Numbers Sandi Klavžar Uroš Milutinović Ciril Petr Abstract The Hanoi graphs Hp n model the p-pegs n-discs Tower of Hanoi problem(s). It was previously known that Stirling

More information

CPS 220 Theory of Computation

CPS 220 Theory of Computation CPS 22 Theory of Computation Review - Regular Languages RL - a simple class of languages that can be represented in two ways: 1 Machine description: Finite Automata are machines with a finite number of

More information

Set theory and topology

Set theory and topology arxiv:1306.6926v1 [math.ho] 28 Jun 2013 Set theory and topology An introduction to the foundations of analysis 1 Part II: Topology Fundamental Felix Nagel Abstract We provide a formal introduction into

More information

Context-Free and Noncontext-Free Languages

Context-Free and Noncontext-Free Languages Examples: Context-Free and Noncontext-Free Languages a*b* is regular. A n B n = {a n b n : n 0} is context-free but not regular. A n B n C n = {a n b n c n : n 0} is not context-free The Regular and the

More information

Power of controlled insertion and deletion

Power of controlled insertion and deletion Power of controlled insertion and deletion Lila Kari Academy of Finland and Department of Mathematics 1 University of Turku 20500 Turku Finland Abstract The paper investigates classes of languages obtained

More information

Application of Logic to Generating Functions. Holonomic (P-recursive) Sequences

Application of Logic to Generating Functions. Holonomic (P-recursive) Sequences Application of Logic to Generating Functions Holonomic (P-recursive) Sequences Johann A. Makowsky Faculty of Computer Science, Technion - Israel Institute of Technology, Haifa, Israel http://www.cs.technion.ac.il/

More information

Linear conjunctive languages are closed under complement

Linear conjunctive languages are closed under complement Linear conjunctive languages are closed under complement Alexander Okhotin okhotin@cs.queensu.ca Technical report 2002-455 Department of Computing and Information Science, Queen s University, Kingston,

More information

A NOTE ON RETRACTS AND LATTICES (AFTER D. J. SALTMAN)

A NOTE ON RETRACTS AND LATTICES (AFTER D. J. SALTMAN) A NOTE ON RETRACTS AND LATTICES (AFTER D. J. SALTMAN) Z. REICHSTEIN Abstract. This is an expository note based on the work of D. J. Saltman. We discuss the notions of retract rationality and retract equivalence

More information

Context Free Grammars

Context Free Grammars Automata and Formal Languages Context Free Grammars Sipser pages 101-111 Lecture 11 Tim Sheard 1 Formal Languages 1. Context free languages provide a convenient notation for recursive description of languages.

More information

Lecture Notes on Inductive Definitions

Lecture Notes on Inductive Definitions Lecture Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 28, 2003 These supplementary notes review the notion of an inductive definition and give

More information

Algebras with finite descriptions

Algebras with finite descriptions Algebras with finite descriptions André Nies The University of Auckland July 19, 2005 Part 1: FA-presentability A countable structure in a finite signature is finite-automaton presentable (or automatic)

More information

Topology Proceedings. COPYRIGHT c by Topology Proceedings. All rights reserved.

Topology Proceedings. COPYRIGHT c by Topology Proceedings. All rights reserved. Topology Proceedings Web: http://topology.auburn.edu/tp/ Mail: Topology Proceedings Department of Mathematics & Statistics Auburn University, Alabama 36849, USA E-mail: topolog@auburn.edu ISSN: 0146-4124

More information

Computing the rank of configurations on Complete Graphs

Computing the rank of configurations on Complete Graphs Computing the rank of configurations on Complete Graphs Robert Cori November 2016 The paper by M. Baker and S. Norine [1] in 2007 introduced a new parameter in Graph Theory it was called the rank of configurations

More information

Chapter 1. Measure Spaces. 1.1 Algebras and σ algebras of sets Notation and preliminaries

Chapter 1. Measure Spaces. 1.1 Algebras and σ algebras of sets Notation and preliminaries Chapter 1 Measure Spaces 1.1 Algebras and σ algebras of sets 1.1.1 Notation and preliminaries We shall denote by X a nonempty set, by P(X) the set of all parts (i.e., subsets) of X, and by the empty set.

More information

Some decision problems on integer matrices

Some decision problems on integer matrices Some decision problems on integer matrices Christian Choffrut L.I.A.F.A, Université Paris VII, Tour 55-56, 1 er étage, 2 pl. Jussieu 75 251 Paris Cedex France Christian.Choffrut@liafa.jussieu.fr Juhani

More information

Automorphism groups of wreath product digraphs

Automorphism groups of wreath product digraphs Automorphism groups of wreath product digraphs Edward Dobson Department of Mathematics and Statistics Mississippi State University PO Drawer MA Mississippi State, MS 39762 USA dobson@math.msstate.edu Joy

More information

Pushdown Automata (2015/11/23)

Pushdown Automata (2015/11/23) Chapter 6 Pushdown Automata (2015/11/23) Sagrada Familia, Barcelona, Spain Outline 6.0 Introduction 6.1 Definition of PDA 6.2 The Language of a PDA 6.3 Euivalence of PDA s and CFG s 6.4 Deterministic PDA

More information

Coloring k-trees with forbidden monochrome or rainbow triangles

Coloring k-trees with forbidden monochrome or rainbow triangles Coloring k-trees with forbidden monochrome or rainbow triangles Julian Allagan & Vitaly Voloshin Department of Mathematics, University of North Georgia, Watkinsville, Georgia email: julian.allagan@ung.edu

More information

NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS

NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS CARRIE E. FINCH AND LENNY JONES Abstract. Let G be a finite group and let x G. Define the order subset of G determined by x to be the set of all elements in

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 10: CF, PDAs and Beyond Greibach Normal Form I We want to show that all context-free

More information

CS481F01 Prelim 2 Solutions

CS481F01 Prelim 2 Solutions CS481F01 Prelim 2 Solutions A. Demers 7 Nov 2001 1 (30 pts = 4 pts each part + 2 free points). For this question we use the following notation: x y means x is a prefix of y m k n means m n k For each of

More information

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007)

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007) Löwenheim-Skolem Theorems, Countable Approximations, and L ω 0. Introduction David W. Kueker (Lecture Notes, Fall 2007) In its simplest form the Löwenheim-Skolem Theorem for L ω1 ω states that if σ L ω1

More information

Measures. 1 Introduction. These preliminary lecture notes are partly based on textbooks by Athreya and Lahiri, Capinski and Kopp, and Folland.

Measures. 1 Introduction. These preliminary lecture notes are partly based on textbooks by Athreya and Lahiri, Capinski and Kopp, and Folland. Measures These preliminary lecture notes are partly based on textbooks by Athreya and Lahiri, Capinski and Kopp, and Folland. 1 Introduction Our motivation for studying measure theory is to lay a foundation

More information

Notes on ordinals and cardinals

Notes on ordinals and cardinals Notes on ordinals and cardinals Reed Solomon 1 Background Terminology We will use the following notation for the common number systems: N = {0, 1, 2,...} = the natural numbers Z = {..., 2, 1, 0, 1, 2,...}

More information

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic 11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic Bezout s Lemma Let's look at the values of 4x + 6y when x and y are integers. If x is -6 and y is 4 we

More information

PALINDROMIC AND SŪDOKU QUASIGROUPS

PALINDROMIC AND SŪDOKU QUASIGROUPS PALINDROMIC AND SŪDOKU QUASIGROUPS JONATHAN D. H. SMITH Abstract. Two quasigroup identities of importance in combinatorics, Schroeder s Second Law and Stein s Third Law, share many common features that

More information

GROUPS. Chapter-1 EXAMPLES 1.1. INTRODUCTION 1.2. BINARY OPERATION

GROUPS. Chapter-1 EXAMPLES 1.1. INTRODUCTION 1.2. BINARY OPERATION Chapter-1 GROUPS 1.1. INTRODUCTION The theory of groups arose from the theory of equations, during the nineteenth century. Originally, groups consisted only of transformations. The group of transformations

More information

Mathematical Logic (IX)

Mathematical Logic (IX) Mathematical Logic (IX) Yijia Chen 1. The Löwenheim-Skolem Theorem and the Compactness Theorem Using the term-interpretation, it is routine to verify: Theorem 1.1 (Löwenheim-Skolem). Let Φ L S be at most

More information

Ramsey Theory. May 24, 2015

Ramsey Theory. May 24, 2015 Ramsey Theory May 24, 2015 1 König s Lemma König s Lemma is a basic tool to move between finite and infinite combinatorics. To be concise, we use the notation [k] = {1, 2,..., k}, and [X] r will denote

More information

A product of γ-sets which is not Menger.

A product of γ-sets which is not Menger. A product of γ-sets which is not Menger. A. Miller Dec 2009 Theorem. Assume CH. Then there exists γ-sets A 0, A 1 2 ω such that A 0 A 1 is not Menger. We use perfect sets determined by Silver forcing (see

More information

ON PARTITIONS SEPARATING WORDS. Formal languages; finite automata; separation by closed sets.

ON PARTITIONS SEPARATING WORDS. Formal languages; finite automata; separation by closed sets. ON PARTITIONS SEPARATING WORDS Abstract. Partitions {L k } m k=1 of A+ into m pairwise disjoint languages L 1, L 2,..., L m such that L k = L + k for k = 1, 2,..., m are considered. It is proved that such

More information

Posets, homomorphisms and homogeneity

Posets, homomorphisms and homogeneity Posets, homomorphisms and homogeneity Peter J. Cameron and D. Lockett School of Mathematical Sciences Queen Mary, University of London Mile End Road London E1 4NS, U.K. Abstract Jarik Nešetřil suggested

More information

Finite Presentations of Pregroups and the Identity Problem

Finite Presentations of Pregroups and the Identity Problem 6 Finite Presentations of Pregroups and the Identity Problem Alexa H. Mater and James D. Fix Abstract We consider finitely generated pregroups, and describe how an appropriately defined rewrite relation

More information

Prime and irreducible elements of the ring of integers modulo n

Prime and irreducible elements of the ring of integers modulo n Prime and irreducible elements of the ring of integers modulo n M. H. Jafari and A. R. Madadi Department of Pure Mathematics, Faculty of Mathematical Sciences University of Tabriz, Tabriz, Iran Abstract

More information

Supplementary Notes on Inductive Definitions

Supplementary Notes on Inductive Definitions Supplementary Notes on Inductive Definitions 15-312: Foundations of Programming Languages Frank Pfenning Lecture 2 August 29, 2002 These supplementary notes review the notion of an inductive definition

More information

Yunhi Cho and Young-One Kim

Yunhi Cho and Young-One Kim Bull. Korean Math. Soc. 41 (2004), No. 1, pp. 27 43 ANALYTIC PROPERTIES OF THE LIMITS OF THE EVEN AND ODD HYPERPOWER SEQUENCES Yunhi Cho Young-One Kim Dedicated to the memory of the late professor Eulyong

More information

Combinatorial Interpretations of a Generalization of the Genocchi Numbers

Combinatorial Interpretations of a Generalization of the Genocchi Numbers 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 7 (2004), Article 04.3.6 Combinatorial Interpretations of a Generalization of the Genocchi Numbers Michael Domaratzki Jodrey School of Computer Science

More information

(1) A frac = b : a, b A, b 0. We can define addition and multiplication of fractions as we normally would. a b + c d

(1) A frac = b : a, b A, b 0. We can define addition and multiplication of fractions as we normally would. a b + c d The Algebraic Method 0.1. Integral Domains. Emmy Noether and others quickly realized that the classical algebraic number theory of Dedekind could be abstracted completely. In particular, rings of integers

More information

SUBLATTICES OF LATTICES OF ORDER-CONVEX SETS, III. THE CASE OF TOTALLY ORDERED SETS

SUBLATTICES OF LATTICES OF ORDER-CONVEX SETS, III. THE CASE OF TOTALLY ORDERED SETS SUBLATTICES OF LATTICES OF ORDER-CONVEX SETS, III. THE CASE OF TOTALLY ORDERED SETS MARINA SEMENOVA AND FRIEDRICH WEHRUNG Abstract. For a partially ordered set P, let Co(P) denote the lattice of all order-convex

More information

A Hilton-Milner-type theorem and an intersection conjecture for signed sets

A Hilton-Milner-type theorem and an intersection conjecture for signed sets A Hilton-Milner-type theorem and an intersection conjecture for signed sets Peter Borg Department of Mathematics, University of Malta Msida MSD 2080, Malta p.borg.02@cantab.net Abstract A family A of sets

More information

Continuity. Chapter 4

Continuity. Chapter 4 Chapter 4 Continuity Throughout this chapter D is a nonempty subset of the real numbers. We recall the definition of a function. Definition 4.1. A function from D into R, denoted f : D R, is a subset of

More information

Chap. 7 Properties of Context-free Languages

Chap. 7 Properties of Context-free Languages Chap. 7 Properties of Context-free Languages 7.1 Normal Forms for Context-free Grammars Context-free grammars A where A N, (N T). 0. Chomsky Normal Form A BC or A a except S where A, B, C N, a T. 1. Eliminating

More information

The commutation with ternary sets of words

The commutation with ternary sets of words The commutation with ternary sets of words Juhani Karhumäki Michel Latteux Ion Petre Turku Centre for Computer Science TUCS Technical Reports No 589, March 2004 The commutation with ternary sets of words

More information

Definitions, Theorems and Exercises. Abstract Algebra Math 332. Ethan D. Bloch

Definitions, Theorems and Exercises. Abstract Algebra Math 332. Ethan D. Bloch Definitions, Theorems and Exercises Abstract Algebra Math 332 Ethan D. Bloch December 26, 2013 ii Contents 1 Binary Operations 3 1.1 Binary Operations............................... 4 1.2 Isomorphic Binary

More information

Parity Versions of 2-Connectedness

Parity Versions of 2-Connectedness Parity Versions of 2-Connectedness C. Little Institute of Fundamental Sciences Massey University Palmerston North, New Zealand c.little@massey.ac.nz A. Vince Department of Mathematics University of Florida

More information

Gaussian Random Fields

Gaussian Random Fields Gaussian Random Fields Mini-Course by Prof. Voijkan Jaksic Vincent Larochelle, Alexandre Tomberg May 9, 009 Review Defnition.. Let, F, P ) be a probability space. Random variables {X,..., X n } are called

More information

A LOWER BOUND FOR THE SIZE OF A MINKOWSKI SUM OF DILATES. 1. Introduction

A LOWER BOUND FOR THE SIZE OF A MINKOWSKI SUM OF DILATES. 1. Introduction A LOWER BOUND FOR THE SIZE OF A MINKOWSKI SUM OF DILATES Y. O. HAMIDOUNE AND J. RUÉ Abstract. Let A be a finite nonempty set of integers. An asymptotic estimate of several dilates sum size was obtained

More information

Newton, Fermat, and Exactly Realizable Sequences

Newton, Fermat, and Exactly Realizable Sequences 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 8 (2005), Article 05.1.2 Newton, Fermat, and Exactly Realizable Sequences Bau-Sen Du Institute of Mathematics Academia Sinica Taipei 115 TAIWAN mabsdu@sinica.edu.tw

More information

Isotropic matroids III: Connectivity

Isotropic matroids III: Connectivity Isotropic matroids III: Connectivity Robert Brijder Hasselt University Belgium robert.brijder@uhasselt.be Lorenzo Traldi Lafayette College Easton, Pennsylvania 18042, USA traldil@lafayette.edu arxiv:1602.03899v2

More information

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009 Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009 Our main goal is here is to do counting using functions. For that, we

More information

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers. MATH 4 Summer 011 Elementary Number Theory Notes on Mathematical Induction Principle of Mathematical Induction Recall the following axiom for the set of integers. Well-Ordering Axiom for the Integers If

More information