A Note on Rational Succession Rules

Enrica Duchi

Dipartimento di Sistemi e Informatica, Via Lombroso 6/17 50134 Firenze, Italy

               duchi@dsi.unifi.it

Andrea Frosini Dipartimento di Matematica, Via del Capitano, 15 53100 Siena, Italy

                frosini@unisi.it

Renzo Pinzani

Dipartimento di Sistemi e Informatica, Via Lombroso 6/17

50134 Firenze, Italy

              pinzani@dsi.unifi.it

Simone Rinaldi Dipartimento di Matematica, Via del Capitano, 15 53100 Siena, Italy

                rinaldi@unisi.it

Abstract

Succession rules having a rational generating function are usually called rational succession rules. In this note we discuss some problems concerning rational succession rules, and determine a simple method to pass from a rational generating function to a rational succession rule, both defining the same number sequence.

1 Introduction

A succession rule is a formal system defined by an axiom (a), a ∈ ℕ^{+}, and a set of productions

{(k_{t}) ⇝ (e_{1}(k_{t}))(e_{2}(k_{t})) ⋯ (e_{k_{t}}(k_{t})) : t ∈ ℕ},

where e_{i} : ℕ^{+} ⟶ ℕ^{+}, which explains how to derive the successors (e_{1}(k)), (e_{2}(k)), …, (e_{k_{t}}(k)) of any given label (k), k ∈ ℕ^{+}. In general, for a succession rule Ω, we use the more compact notation:

Ω : \{ \begin{matrix}(a) \\ (k) ⇝ (e_{1}(k)) (e_{2}(k)) ⋯ (e_{k}(k)). \end{matrix}  (1)

The labels (a), (k), (e_{i}(k)) of Ω are assumed to contain only positive integers. The rule Ω can be represented by means of a generating tree, that is, a rooted tree whose vertices are labelled with the labels of Ω: (a) is the label of the root, and each node labelled (k) has k children labelled by e_{1}(k), …, e_{k}(k) respectively, according to the production of (k) defined in (1). A succession rule Ω defines a sequence of positive integers (f_{n})_{n≥0}, where f_{n} is the number of the nodes at level n in the generating tree defined by Ω. By convention the root is at level 0, so f_{0} = 1. The function f_{Ω}(x) = ∑_{n≥0} f_{n}x^{n} is the generating function determined by Ω.

Succession rules are closely related to a method for the enumeration and generation of combinatorial structures, called the ECO method. For further details and examples about succession rules and the ECO method we refer to [BDLPP]; in [FPPR] the authors study succession rules from an algebraic point of view.

Two rules are equivalent if they have the same generating function. A succession rule is finite if it has a finite number of labels and productions; for example, the rule

\{ \begin{matrix}(2) \\ (2) ⇝ (2)(3) \\ (3) ⇝ (2)(3)(3), \end{matrix}  (2)

defining odd-index Fibonacci numbers 1, 2, 5, 13, 34, 89, 233, … (sequence A001519 in [SL]) is finite and it is equivalent to

\{ \begin{matrix}(2) \\ (k) ⇝ (2)^{k−1}(k + 2), \end{matrix}  (3)

which is not finite.

Figure 1 depicts the first levels of the generating trees associated with the rules in (2) and (3).

According to our definition, two labels containing the same integer k are allowed to have a different production. If this happens we distinguish those labels using some indices (or colors, see Example 1). A succession rule is called rational, algebraic or trascendental according to the generating function type. Rational succession rules are the subject of this note (see also [GFGT], [FPPR]).

Below we list some classes of generating functions:

Figure 1: The first levels of two equivalent generating trees.

- R is the set of rational generating functions of integer sequences (Z-rational functions, using the notation in [SS]);

- R^{+} is the set of rational generating functions of positive integer sequences;

- REG is the set of generating functions of regular languages;

- S is the set of rational generating functions of succession rules;

- F is the set of generating functions of finite succession rules.

Summarizing the results in [SS], [FPPR] we obtain the following scheme:

REG ⊂ F ⊂ ⊆  R^{+} _{⊂} R S ⊂

The classes R, REG, and F are decidable, while R^{+} is not decidable. In [FPPR] is conjectured that F = S, i.e., every rational rule is equivalent to a finite one.

This note proposes a simple tool to pass from a rational generating function (i.e., a linear recurrence relation) defining a non-decreasing sequence of positive integers to a succession rule defining the same sequence. The results extend those in [GFGT].

Furthermore our technique provides interesting combinatorial interpretations (in terms of generating trees) for sequences that are defined by a linear recurrence relation, using an approach different from that in [BDFR] and [BR].

As an application of our method, we give a simple solution to a problem proposed by Jim Propp on the mailing list “domino” (1999), where he asked for the combinatorial interpretation of the sequence 1, 1, 1, 2, 3, 7, 11, 26, … (sequence A005246 in [SL]) defined by the linear recurrence relation:

\{ \begin{matrix}f_{0} = 1, f_{1} = 1, f_{2} = 1, f_{3} = 2 \\ f_{n} = 4f_{n−2} − f_{n−4}. \end{matrix}

2 Two term linear recurrences.

We start by considering two-term linear recurrences:

f_{n} = h_{1}f_{n−1} + h_{2}f_{n−2}, h_{1}, h_{2} ∈ ℤ

with initial conditions f_{0} = 1, f_{1} = s_{0} ∈ ℕ^{+}. The positivity of the sequence is ensured by the additional conditions h_{1} ∈ ℕ^{+}, and h_{1} + h_{2} > 0.

Proposition 1 The succession rule

Ω = \{ \begin{matrix}(s_{0}) \\ (k) ⇝ (1)^{k−1} (ϕ(k)) , \end{matrix}

with ϕ(k) = (h_{1} − 1)k + h_{2} + 1, defines the sequence (f_{n})_{n≥0}.

Proof. We have f_{0} = 1 and f_{1} = s_{0}. Let k_{1}, k_{2}, …, k_{f_{n−2}} be the labels at level n − 2 of the generating tree of Ω. Then, for n ≥ 2,

f_{n} = k_{1} + k_{2} + ⋯ + k_{f_{n−2}} − f_{n−2} + (h_{1} − 1)(k_{1} + k_{2} + ⋯ + k_{f_{n−2}}) + f_{n−2}(h_{2} + 1).

Consequently we have

f_{n} = f_{n−1} − f_{n−2} + (h_{1} − 1)f_{n−1} + f_{n−2}(h_{2} + 1) = h_{1}f_{n−1} + h_{2}f_{n−2} n ≥ 2.

A succession rule defining the sequence (f_{n})_{n≥0} can however have a more general form, such as:

Ω_{2} = \{ \begin{matrix}(s_{0}) \\ (k) ⇝ (c)^{k−1} (ϕ(k)) \end{matrix}

where c, s_{0} ∈ ℕ^{+}, ϕ(k) = (h_{1} − c)k + h_{2} + c, and the positivity of the labels is ensured by the following conditions:

(i) if c ≤ s_{0} then 1 ≤ c ≤ h_{1} and ((h_{1} − c)c + h_{2} + c) > 0;

(ii) if c > s_{0} then s_{0} ≤ c ≤ h_{1} and ((h_{1} − c)s_{0} + h_{2} + c) > 0.

3 Linear recurrences with more than two terms.

In this section we consider the general case of linear recurrences defining non-decreasing sequences of positive integers, and we give the explicit form of succession rules defining such sequences.

For the sake of simplicity, let us start by studying the case of three term recurrences of the form

f_{n} = h_{1}f_{n−1} + h_{2}f_{n−2} + h_{3}f_{n−3},

with f_{−1} = 0, f_{0} = 1, f_{1} = s_{0} ∈ ℕ^{+}, where h_{1} ∈ ℕ^{+} and h_{2}, h_{3} ∈ ℤ.

On the other hand, let us consider the rule

Ω_{3} = \{ \begin{matrix}(s_{0}) \\ (k) ⇝ (c)^{k−1} (ϕ^{0}(k)) & k = s_{0}, c \\ (k) ⇝ (c)^{k−1} (ϕ^{1}(k)) \end{matrix}

where c ∈ ℕ^{+}, and

\begin{matrix}ϕ^{0}(k) = (h_{1} − c)k + h_{2} + c, \\ ϕ^{1}(k) = (h_{1} − c)k + h_{2} + h_{3} + c. \end{matrix}

The following conditions easily ensure that the labels of Ω_{3} are positive and, as a consequence, the sequence defined by Ω_{3} is positive and non-decreasing.

(i) If c ≤ s_{0} then 1 ≤ c ≤ h_{1}, (ϕ^{0}(c)) > 0 and ϕ^{1} (ϕ^{0}(c)) > 0.

(ii) If c > s_{0} then s_{0} ≤ c ≤ h_{1}, (ϕ^{0}(s_{0})) > 0 and ϕ^{1} (ϕ^{0}(s_{0})) > 0.

Proposition 2 The succession rule Ω_{3} defines the sequence (f_{n})_{n≥0}.

Proof. We can easily verify that f_{0} = 1, f_{1} = s_{0} and f_{2} = h_{1}s_{0} + h_{2}. For n ≥ 3 the number of occurrences of the label c at level n − 3 is equal to f_{n−2} − f_{n−3}, so we obtain

f_{n} = cf_{n−1} −cf_{n−3} +(h_{1} −c)f_{n−1} +(h_{2} +h_{3} +c)f_{n−3} −c (f_{n−2} −f_{n−3})+(h_{2} +c)(f_{n−2} −f_{n−3}),

which simplifies to f_{n} = h_{1}f_{n−1} + h_{2}f_{n−2} + h_{3}f_{n−3} for n ≥ 3.

Example 1 The sequence (f_{n})_{n≥0} satisfying the recurrence relation

f_{n} = 3f_{n−1} − 2f_{n−2} + f_{n−3},

with f_{1} = 0, f_{0} = 1, f_{1} = 2, is defined by the succession rule

\{ \begin{matrix}(2) \\ (1) ⇝ (1) \\ (2) ⇝ (1)(3) \\ (k) ⇝ (1)^{k−1}(2k) & k ≥ 3. \end{matrix}

In the sequel we will extend the statement of Proposition 2 to the general case of linear recurrences.

Let us consider the rule

Ω_{j} = { (s_{0}) ; (k) ⇝ (c)^{k−1} (ϕ^{0}(k))  k = s_{0}, c ; (k) ⇝ (c)^{k−1} (ϕ^{1}(k))  k = ϕ^{0}(s_{0}), ϕ^{0}(c) ; (k) ⇝ (c)^{k−1} (ϕ^{2}(k))  k = ϕ^{1} (ϕ^{0}(s_{0})), ϕ^{1} (ϕ^{0}(c)) ; ⋮ ; (k) ⇝ (c)^{k−1} (ϕ^{j−3}(k)) k = { ϕ^{j−4}(ϕ^{j−5}(⋯ ϕ^{1}(ϕ^{0}(x)))) : x = s_{0}, c } ; (k) ⇝ (c)^{k−1} (ϕ^{j−2}(k)) ,

where c, s_{0}, h_{1} ∈ ℕ^{+}, h_{2}, h_{3}, …, h_{j} ∈ ℤ, and

ϕ^{m}(k) = (h_{1} − c)k + ∑_{i=1}^{m+1} h_{i+1} + c, m = 0, …, j − 2.

The following conditions determine the positivity of the labels of Ω_{j}:

(i) if c ≤ s_{0} then 1 ≤ c ≤ h_{1}, ϕ^{i−2} (ϕ^{i−1}(⋯ ϕ^{0}(c))), i = 2, …, j;

(ii) if c > s_{0} then s_{0} ≤ c ≤ h_{1}, ϕ^{i−2} (ϕ^{i−1}(⋯ ϕ^{0}(s_{0}))), i = 2, …, j.

Theorem 1 The succession rule Ω_{j} defines the non-decreasing positive sequence satisfying the recurrence relation:

f_{n} = h_{1}f_{n−1} + h_{2}f_{n−2} + ⋯ + h_{j}f_{n−j},

with initial conditions f_{i} = 0, i = −j + 2, …, −1, f_{0} = 1, and f_{1} = s_{0}.

Proof. Analogous to that of Proposition 2.

Example 2 (i) NSW numbers (sequence A002315 in [SL]) are defined by the recurrence relation:

f_{n} = 6f_{n−1} − f_{n−2}, f_{0} = 1, f_{1} = 7.

These numbers count the total area under elevated Schröder paths [PP, BSS]. According to Theorem 2, the succession rule defining these numbers is

\{ \begin{matrix}(7) \\ (k) ⇝ (1)^{k−1}(5k) \end{matrix}

(ii) Self-avoiding walks of length n, contained in the strip {0, 1} × [−∞, ∞], are counted by the sequence {f_{n}} that satisfies a linear recurrence relation [Z]:

\begin{matrix}f_{0} = 1, f_{1} = 3, f_{2} = 6, f_{3} = 12, f_{4} = 20, f_{5} = 36, f_{6} = 58, f_{7} = 100, \\ f_{n} = f_{n−1} + 3f_{n−2} + 2f_{n−3} − 3f_{n−4} + f_{n−5} + f_{n−6} & n > 7. \end{matrix} (4)

For simplicity we change the initial conditions into the following:

\begin{matrix}f_{−i} = 0, & i = 1, …, 5 \\ f_{0} = 1. \end{matrix}

Then the succession rule obtained applying Theorem 1 is

\{ \begin{matrix}(1) \\ (1) ⇝ (4) \\ (3) ⇝ (1)^{2}(\overline{4}) \\ (4) ⇝ (1)^{3}(6) \\ (\overline{4}) ⇝ (1)^{3}(5) \\ (5) ⇝ (1)^{4}(5) \\ (6) ⇝ (1)^{5}(3). \end{matrix}

For clarity’s sake, we want to point out that the label (4) is produced by ϕ^{0}(c), and it is subject to the rule involving ϕ^{1}, while the label (\overline{4}) is subject to the rule involving ϕ^{4}.

Finally, we remark that a rule defining the original number sequence can be simply obtained by adding some other productions, in order to satisfy the initial conditions.

Example 3 Now we are able to give a succession rule for the number sequence 1, 1, 1, 2, 3, 7, 11, 26, …, defined in the first part of the paper. Omitting for simplicity the initial constant terms we have

\{ \begin{matrix}(2) \\ (2) ⇝ (1)(2) \\ (1) ⇝ (4) \\ (4) ⇝ (1)^{3}(\overline{1}) \\ (3) ⇝ (1)^{2}(\overline{1}) \\ (\overline{1}) ⇝ (3). \end{matrix}

Succession rules with negative labels. Theorem 2 clearly does not involve the whole set R of rational generating functions. Moreover, as we already remarked, the problem of establishing if a rational generating function defines a non-negative sequence of integers is undecidable, and then if we want to treat the whole set of rational generating functions we have to allow labels of the rules to contain negative values. Under this hypothesis a succession rule defines a sequence of integer numbers (f_{n})_{n≥0}, not necessarily positive, where the term f_{n} is given by the number of positive labels minus the number of negative labels at level n of the generating tree.

Recently we investigated the relationship between rational generating functions and succession rules with negative labels (briefly generalized succession rules) by applying the same tools that we used in the first part of the paper. Furthermore we determined an algorithm to pass from a rational generating function to a generalized succession rule. However this algorithm has a rather complex description, and moreover it does not give an answer to the conjecture F = S. Therefore, for the sake of simplicity, we only present the following examples.

Example 4 Let us consider the number sequence 1, 2, −10, 22, −26, −10, 134, …, defined by the recurrence relation

\begin{matrix}f_{0} = 1, f_{1} = 2, \\ f_{n} = −3f_{n−1} − 4f_{n−2} & n > 1. \end{matrix}

The succession rule defining this sequence is

\{ \begin{matrix}(4) \\ (k) ⇝ (1)^{k−1}(−2k − 1) \\ (−k) ⇝ (−1)^{k−1}(2k + 1). \end{matrix}

Example 5 Odd-index Fibonacci numbers with alternating sign, 1, −2, 5, −13, 34, −89, …, are defined by the recurrence relation

\begin{matrix}f_{0} = 1, f_{1} = −2, \\ f_{n} = −3f_{n−1} − f_{n−2} & n > 1. \end{matrix}

A succession rule defining this sequence is

\{ \begin{matrix}(2) \\ (k) ⇝ (−1)^{k−1}(−2k) \\ (−k) ⇝ (1)^{k−1}(2k). \end{matrix}

We point out that the rule (5) is very similar to (3), which defines the odd-indexed Fibonacci numbers.

References

[GFGT] C. Banderier, M. Bousquet-Mélou, A. Denise, P. Flajolet, D. Gardy, and D. Gouyou-Beauchamps, Generating functions for generating trees, Discrete Math. 246 (2002), 29–55.

[BDFR] E. Barcucci, A. Del Lungo, A. Frosini, and S. Rinaldi, A technology for reverseengineering a combinatorial problem from a rational generating function, Adv. Appl. Math. 26 (2001), 129–153.

[BR] E. Barcucci and S. Rinaldi, Some linear recurrences and their combinatorial interpretation by means of regular languages, Theor. Comp. Sci. 255 (2001), 679–686.

[BSS] J. Bonin, L. Shapiro, and R. Simion, Some q-analogues of the Schröder numbers arising from combinatorial statistics on lattice paths, J. Statistical Planning and Inference 34 (1993) 35–55.

[BDLPP] E. Barcucci, A. Del Lungo E. Pergola, and R. Pinzani, ECO: a methodology for the enumeration of combinatorial objects, J. Difference Eq. Appl. 5 (1999), 435–490.

[FPPR] L. Ferrari, E. Pergola, R. Pinzani, and S. Rinaldi, An algebraic characterization of the set of succession rules, Theor. Comp. Sci. 281 (2002), 351–367.

[PP] E. Pergola and R. Pinzani, A combinatorial interpretation of the Area of Schröder paths, Electronic J. Combinatorics 6 (1999), #R40.

   http://www.combinatorics.org/Volume 6/Abstracts/v6i1r40.html

[SL] N. J. A. Sloane The On-Line Encyclopedia of Integer Sequences,

   http://www.research.att.com/~njas/sequences/index.html.

[SS] A. Salomaa and M. Soittola, Automata-Theoretic Aspects of Formal Power Series, Springer-Verlag, 1978.

[Z] D. Zeilberger, Self-avoiding walks, the language of science, and Fibonacci numbers, J. Stat. Inference and Planning 54 (1996) 135–138.

2000 Mathematics Subject Classification: 05A15 . Keywords: succession rules, generating trees, rational generating functions

(Concerned with sequences \underline{A001519} \underline{A005246} \underline{A002315}.)

Received December 23, 2002; revised version received April 22, 2003. Published in Journal of Integer Sequences April 24, 2003.

Return to Journal of Integer Sequences home page.