10
“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 1 — #1 Journal of Cellular Automata, Vol. 0, pp. 1–10 ©2009 Old City Publishing, Inc. Reprints available directly from the publisher Published by license under the OCP Science imprint, Photocopying permitted by license only a member of the Old City Publishing Group Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle David J. Ettestad 1 and Joaquin O. Carbonara 2 1 Dept of Physics, State University of New York, College at Buffalo, 1300 Elmwood Av, Buffalo NY 14222, USA 2 Dept of Mathematics, State University of New York, College at Buffalo, 1300 Elmwood Av, Buffalo NY 14222, USA Received: August 24, 2008. Accepted: November 18, 2008. In 1992 Barry Cipra posed an interesting combinatorial counting problem. In essence, it asks for the number S k,σ of configurations possible if a circular arrangement of k cups, each having σ stones, is modified by applying a particular transition rule that changes the distribution of stones. Carbonara and Green (1998) studied the integer sequence S k,1 (a.k.a. S k ) and presented a recursive formula for it: S k = 2S 2 r +1 + 2 r j S d +1 + d 2 r 2 r +1 where k = 2 r + 1 + d> 2, r 0 and 0 <d 2 r . We note that this system is a finite Cellular Automaton. Taking advantage of previous work by Ettestad and Carbonara where properties of this CA are studied, we present here two non-recursive formulas for S k,1 , one of which involves the number of odd entries in the first n k rows of Pascal’s triangle. Keywords: Cellular Automata, Combinatorics, Enumerative Combinatorics, Number Theory, Statistical mechanics. 1 INTRODUCTION In [1] Carbonara and Green study a family of integer sequences S k,σ motivated by a counting problem first posed by Barry Cipra [2]. We call our version of this problem the Cups and Stones Counting Problem (CSCP for short). Combinatorially, the CSCP can be stated as follows. E-mail: [email protected] 1

David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

  • Upload
    irokk

  • View
    10

  • Download
    1

Embed Size (px)

Citation preview

Page 1: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 1 — #1

Journal of Cellular Automata, Vol. 0, pp. 1–10 ©2009 Old City Publishing, Inc.Reprints available directly from the publisher Published by license under the OCP Science imprint,Photocopying permitted by license only a member of the Old City Publishing Group

Formulas for the Number of Statesof an Interesting Finite Cellular Automaton

and a Connection to Pascal’s Triangle

David J. Ettestad1

and Joaquin O. Carbonara2

1Dept of Physics, State University of New York, College at Buffalo,1300 Elmwood Av, Buffalo NY 14222, USA

2Dept of Mathematics, State University of New York, College at Buffalo,1300 Elmwood Av, Buffalo NY 14222, USA

Received: August 24, 2008. Accepted: November 18, 2008.

In 1992 Barry Cipra posed an interesting combinatorial counting problem.In essence, it asks for the number Sk,σ of configurations possible if acircular arrangement of k cups, each having σ stones, is modified byapplying a particular transition rule that changes the distribution of stones.Carbonara and Green (1998) studied the integer sequence Sk,1 (a.k.a. Sk)and presented a recursive formula for it: Sk = 2S2r+1 + 2r−j Sd+1 +d2r − 2r+1 where k = 2r + 1 + d > 2, r ≥ 0 and 0 < d ≤ 2r . Wenote that this system is a finite Cellular Automaton. Taking advantage ofprevious work by Ettestad and Carbonara where properties of this CA arestudied, we present here two non-recursive formulas for Sk,1, one of whichinvolves the number of odd entries in the first nk rows of Pascal’s triangle.

Keywords: Cellular Automata, Combinatorics, Enumerative Combinatorics,Number Theory, Statistical mechanics.

1 INTRODUCTION

In [1] Carbonara and Green study a family of integer sequences Sk,σ motivatedby a counting problem first posed by Barry Cipra [2]. We call our versionof this problem the Cups and Stones Counting Problem (CSCP for short).Combinatorially, the CSCP can be stated as follows.

∗E-mail: [email protected]

1

Page 2: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 2 — #2

2 D. J. Ettestad and J. O. Carbonara

The Cups and Stones Counting problem (CSCP): Given an Initial config-uration and a Transition rule that modifies the initial configuration, count thenumber of different configurations possible up to circular rearrangement� .Initial configuration: Arrange in a circle k cups, each having σ stones withone of the cups marked as a special cup (which we call the root). Obtain thenext configuration by applying the following transition rule. Transition rule(T.r.): Pick up all the stones in the root. Distribute them one cup at a time ina clockwise fashion going around the circle of cups, until all stones that werepicked up are reallocated. The last cup to receive a stone on each applicationof the T.r. becomes the root in the resulting configuration. Notation: we denoteby Sk,σ the number of different configurations in the CSCP where the Initialconfiguration has k cups, each having σ stones.

It is convenient to encode the number of stones and the cups on a matrixMk,σ so that row i in Mk,σ corresponds to the ith state of the lattice.

To obtain Mk,σ , we must first number the cups. Let the root in the firstconfiguration be cup one and then number the remaining cups consecutivelyin a clockwise direction. Mk,σ (i, j) is the number of stones in cup j in the ithconfiguration. Thus each column of Mk,σ corresponds to a particular cup andeach row of Mk,σ corresponds to a particular configuration. Note that Mk,σ

has k columns and Sk,σ rows. To keep track of the location of the root wewill underline the entry in each row corresponding to the root. We show anexample in Figure 1.

In this work we are only concerned with the case σ = 1. From now on fixσ to be 1, denote Mk,1 simply by Mk , and Sk,1 by Sk .

2 HOW CSCP IS A ONE DIMENSIONAL CA

At first glance it may seem that the CSCP is not a 1D Cellular Automaton(as the ones described in [3] and [4]). In Figure 1, for instance, we can seethat (ignoring the underline) a row of three ones (remember we are thinkingof it as circular), produces three different outcomes. That is (1, 1, 1) → 2,(1, 1, 1) → 0 and (1, 1, 1) → 1.

However, a simple rewriting of the system shows that in fact it is a CellularAutomaton. Note the following properties of the CSCP:

1. Unless the root has all the stones, it will be empty on the nextconfiguration.

�The original problem posed by Cipra did not identify configurations up to circular rearrangement,but it is easy to convert the formulas from one statement of the problem to the other (See Corollary 2in [5]).

Page 3: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 3 — #3

A Cellular Automaton & Pascal’s Triangle 3

k = 3, σ = 1

S3,1 = 5

Darker circle ≡ Special cup ≡ Underlined entry

11

1

02

1

10

2

00

30

1

2≡

1 1 10 2 11 0 20 1 20 0 3

= M3,1

NOTATION: the special cup will be referred to as the root

FIGURE 1Cups and stones counting problem.

2. Each of the other cups will get one stone if their clockwise distance tothe root is less than or equal to the number of stones in the root, and nostones otherwise.

In order to keep track of the clockwise distance to the root, we rename thestates as ordered pairs. Given a CSCP configuration (i.e. a row from Mk,1) ,

a1, a2, . . . , ar−1, ar , ar+1, . . . , ak

we rewrite it as

(a1, s + 1), (a2, s + 2), . . . , (ar−1, k − 1)(ar , 0), (ar+1, 1), . . . , (ak, s)

where s = k − r . That is, the set Q of states consists of ordered pairs, wherethe root has 0 as the second term. We define the neighborhood u of any cell tobe the entire set (since all cells can affect all other cells at each time step.)

Let δ(i, 0) equal 1 if i = 0 and 0 otherwise. Now define

aroot =∑

(a,i)∈u

a · δ(i, 0)

i.e. aroot is the number of stones in the root. Then the transformation rule is

f (a, i) =

(0, k − a) if i = 0 and a < k

(1, 0) if i = 0 and a = k

(a + 1, Modk(i − aroot)) if i > 0 and aroot ≥ i

(a, i − aroot) if i > 0 and aroot < i

For simplicity, in the remaining part of the paper, we will revert back tothe notation for CSCP used in the introduction.

Page 4: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 4 — #4

4 D. J. Ettestad and J. O. Carbonara

3 THE CSCP MATRIX MK THAT REPRESENTS THE CSCPCELLULAR AUTOMATON

The basic building blocks in this counting problem are the matrices Mk wherek = 2n + 1, for all non-negative integers n. In [5], Ettestad and Carbonaradescribe the structure of Mk in detail. This cellular automaton has manyproperties. For example, the following matrix (taken from [1]) shows theconfigurations where the root is in cup 1 in the matrix Mk for k = 33. In it,the distribution of 0’s is identical to the distribution of 0’s in the SierpinskiGasket.

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 21 0 0 1 3 0 0 1 3 0 0 1 3 0 0 1 3 0 0 1 3 0 0 1 3 0 0 1 3 0 0 1 31 0 0 0 4 0 0 0 4 0 0 0 4 0 0 0 4 0 0 0 4 0 0 0 4 0 0 0 4 0 0 0 41 0 0 0 0 1 1 1 5 0 0 0 0 1 1 1 5 0 0 0 0 1 1 1 5 0 0 0 0 1 1 1 51 0 0 0 0 0 2 0 6 0 0 0 0 0 2 0 6 0 0 0 0 0 2 0 6 0 0 0 0 0 2 0 61 0 0 0 0 0 0 1 7 0 0 0 0 0 0 1 7 0 0 0 0 0 0 1 7 0 0 0 0 0 0 1 71 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 81 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 9 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 91 0 0 0 0 0 0 0 0 0 2 0 2 0 2 0 10 0 0 0 0 0 0 0 0 0 2 0 2 0 2 0 101 0 0 0 0 0 0 0 0 0 0 1 3 0 0 1 11 0 0 0 0 0 0 0 0 0 0 1 3 0 0 1 111 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 121 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 13 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 131 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 14 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 141 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 151 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 161 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 171 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 181 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 0 0 1 3 0 0 1 3 0 0 1 191 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 4 0 0 0 4 0 0 0 201 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 5 0 0 0 0 1 1 1 211 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 6 0 0 0 0 0 2 0 221 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 0 1 231 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 241 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 251 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 2 0 2 0 261 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 0 0 1 271 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 0 0 0 281 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 291 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 301 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 311 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32

The Sierpinski Gasket is generated by the 1D automaton usually denotedR102 (see [4]). R102 and the matrix M33 shown above have the same dis-tribution of non-zero terms, if we flip M33 vertically and eliminate the firstcolumn.

Note that R102 is not reversible (as many CA’s are), while CSCP isreversible. Also, from the vertically flipped R102 we can get the CSCP matrixby relabeling the consecutive non-zero entries in each column in a consecutiveway. Details about the connection between CSCP and R102 as well as other1D CA are beyond the scope of this paper. Nevertheless, such connection canbe derived from CSCP properties (see [5]), and will be explored in detail infuture work.

Page 5: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 5 — #5

A Cellular Automaton & Pascal’s Triangle 5

FIGURE 2R102 and the reduced M33.

In [1] there is a closed formula for the number of states of the CSCP CAwhen k = 2r+1 + 1 for some positive integer r:

Sk = 2r+2 − 3r+1 + 4r+1 (1)

They also present a recursive formula for the number of states of this cellularautomaton. Here we show two non-recursive formulas for the number of statesof this CA.

4 NON-RECURSIVE FORMULAS FOR NUMBER OF STATESOF THE CSCP CA

4.1 A formula that follows from the properties of the CSCP CA (see [5])To find a non-recursive form for a general k, we started by considering the casek = N(2n) + 1, where N is a positive integer and n is a non-negative integer.A careful analysis of the structure and fractal properties of the correspondingmatrix Mk (see [5] for such properties) led to a non-recursive form for Sk . Wethen let n = 0, and obtained a general non-recursive formula for Sk . We provesuch formula by comparing it with the recursive formula obtained in [1].

Theorem 1. Let k = N + 1. Let N = ∑wi=1 2εi be the binary expansion of N

(ε1 > ε2 > ε3 . . .). Then:

Sk =

2r+2 − 3r+1 + 4r+1 if N = 2r+1

r ∈ I+

(k + 1)2ε1+1 − 2w∑

i=1

3εi 2(ε1−εi )−(i−1) Otherwise(2)

Proof. We will show that our formula satisfies Carbonara and Green’srecursive formula, which is as follows (see [1]):

Page 6: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 6 — #6

6 D. J. Ettestad and J. O. Carbonara

Let k = 2r + 1 + d > 2 where r ≥ 0 and 0 < d ≤ 2r . Let j be theunique integer such that 2j−1 < d ≤ 2j . By direct computation we seethat S1 = 1 and S2 = 2. Then for k ≥ 3,

Sk = 2S2r+1 + 2r−j Sd+1 + d2r − 2r+1 (3)

In order to show that the two formulas are equivalent, we first need tocompare the notations. Clearly N = 2r + d and ε1 = r (unless d = 2r , inwhich case ε1 = r + 1). There are three cases we need to consider:

1. Case 1: When d = 2j = 2r

2. Case 2: When d = 2j < 2r

3. Case 3: When d < 2j

We’ll show that Equation (2) satisfies Equation (3) in all three cases:

1. Case 1: Both formulas clearly give: Sk = 2r+2 − 3r+1 + 4r+1

2. Case 2: In this case N = 2r + 2j , so ε1 = r and ε2 = j . We plug thesevalues into Equation (2) and Equation (3), and compare to show theyare equal:

(2r + 2j + 2)2r+1 − 2[3r20 + 3j 2r−j−1]?= 2(2r+1 − 3r + 4r ) + 2r−j (2j+1 − 3j + 4j ) + (2j )2r − 2r+1

22r+1 + 2j+r+1 + 2r+2 − 3r2 − 3j 2r−j

?= 2r+2 − 3r2 + 22r+1 + 2r+1 − 3j 2r−j + 2r+j + 2r+j − 2r+1

22r+1 + 2j+r+1 + 2r+2 − 3r2 − 3j 2r−j

= 2r+2 − 3r2 + 22r+1 − 3j 2r−j + 2r+j+1

3. Case 3: Since d is strictly less then 2j , the highest power in the binaryrepresentation of d will be 2j−1. Let d = ∑w′

i=1 2ε′i . Then ε′

1 = j − 1while ε1 = r . Since N = 2r + d then we have that w′ = w − 1and ε′

i = εi+1. Again, we plug these values into Equation (2) andEquation (3), and compare to show they are equal:

(2r + d + 2)2r+1 − 2w∑

i=1

3εi 2(r−εi )−(i−1)

?= 2(2r+1 − 3r + 4r ) + 2r−j

[(d + 2)2j − 2

w′∑i=1

3ε′i 2(ε′1−ε′

i)−(i−1)

]+ d2r − 2r+1

22r+1 + d2r+1 + 2r+2 − 2

[3r 20 +

w∑i=2

3εi 2(r−εi )−(i−1)

]

?= 2r+2 − 3r 2 + 22r+1 + d2r + 2r+1 − 2r−j 2w∑

m=2

3εm 2(j−1−εm)−(m−2) + d2r − 2r+1

Page 7: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 7 — #7

A Cellular Automaton & Pascal’s Triangle 7

simplifying this gives

−2w∑

i=2

3εi 2(r−εi )−(i−1) = −2w∑

m=2

3εm2(r−1−εm)−(m−2)

Thus Equation (2) and Equation (3) are equal in all three cases, and ourformula holds true. �

4.2 David Callan’s formulaDavid Callan conjectured the following formula for Sk (See [6]):

Theorem 2. Let Sk be defined as above. Then

Sk = 4t − 3t − (n − 2)2t + a(n) (4)

where t and n are determined (uniquely) by expressing k as 2t + 1 − n with0 ≤ n < 2t−1 and a(n) is the total number of odd entries in the first n rowsof Pascal’s triangle. Equivalently, it counts the number of 1’s in the SierpinskiGasket.

Proof. Equating our formula to Callan’s formula gives a formula for a(n).We’ll then show this is equivalent to a known formula for a(n). This willshow both that Callan’s formula is correct and give another formula for a(n).

First of all, if k = 2t + 1, Callan’s formula and ours both give Sk =2t+1 − 3t + 4t provided we define a(0) = 0.

Now assume k is not of the form 2t + 1. Equating the two formulas for Sk

and solving for a(n) gives:

a(n) = (k + 1)2ε1+1 − 2w∑

i=1

3εi 2(ε1−εi )−(i−1) − 4t + 3t + (n − 2)2t

Since k = N + 1 in our formula and k = 2t + 1 − n in Callan’s formula,N + n = 2t . In Callan’s formula, n < 2t−1, so n < N . Finally, since weassumed that k is not of the form 2t + 1, we know n > 0 and N < 2t .Since N = ∑w

i=1 2εi , ε1 = t − 1. Substituting for k and t gives:

a(n) = (2ε1+1 − n + 2)2ε1+1 − 2w∑

i=1

3εi 2(ε1−εi )−(i−1) − 4ε1+1

+ 3ε1+1 + (n − 2)2ε1+1

= 3ε1+1 − 2w∑

i=1

3εi 2(ε1−εi )−(i−1) (5)

The formula we have found has ε1, . . . , εw on the right hand side. To evaluatethe function for a given n, find a corresponding k (and hence N ), which in turn

Page 8: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 8 — #8

8 D. J. Ettestad and J. O. Carbonara

generates ε1, . . . , εw, which are then used in the formula. It is important tonote that in Callan’s expression for k (i.e. k = 2t + 1 − n with 0 ≤ n <

2t−1), if 2p−1 ≤ n < 2p, then a fixed n corresponds to all the k’s in the setCn

k = {2p+α + 1 − n|α is a positive integer}. For example, k = 7, k = 15and k = 31 correspond to n = 2 since 7 = 23 + 1 − 2, 15 = 24 + 1 − 2and 31 = 25 + 1 − 2. It is easy to see that for the smallest k in the set Cn

k ,ε1 = p. Denote by ε1,n the ε1 corresponding to the smallest k in Cn

k . ThenCn

k = {2ε1,n+α + 1 − n|α is a positive integer}.

Claim 1. The function a(n) from Equation (5) is well defined.

Proof of Claim 1. Fix n, and consider the set Cnk defined above. We will show

that a(n) is the same regardless which value of k is chosen.We’ll use induction on α. Let α′ = α + 1. Now consider the binary rep-

resentations of the corresponding N ′ and N . The only difference is that therepresentation for N ′ has one extra 1 to the left. This means that w′ = w + 1,ε′

1 = ε1 + 1 and for i > 1, ε′i = εi−1. Then a(n) using α′ is given by:

3ε′1+1 − 2

w′∑j=1

3ε′j 2(ε′

1−ε′j )−(j−1)

= 3ε1+2 − 2[3ε′1 20 +

w′∑j=2

3ε′j 2(ε′

1−ε′j )−(j−1)]

= 3ε1+2 − 2[3ε1+1 +w+1∑j=2

3εj−12((ε1+1)−(εj−1))−(j−1)]

= 3ε1+1 − 2w+1∑j=2

3εj−12(ε1−(εj−1))−(j−2)

= 3ε1+1 − 2w∑

i=1

3εi 2(ε1−εi )−(i−1)

which equals a(n) using α. Note that we let i = j − 1 to obtain the lastline.

Therefore our formula is independent of the value of k from Cnk used. �

If the above formula for a(n) is equivalent to the known formula for a(n),then Callan’s formula is true. According to Stolarski (see [7]), if n = ∑v

j=1 2δj

is the binary expansion of n, (δ1 > δ2 > δ3 . . .) then

a(n) =v∑

j=1

3δj 2j−1 (6)

Page 9: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 9 — #9

A Cellular Automaton & Pascal’s Triangle 9

To show that the two formulas for a(n) are equivalent, we set equalEquation (5) and Equation (6) to obtain:

w∑i=1

f (i) +v∑

j=1

g(j) = 3ε1+1 = 3t (7)

where f (i) = 3εi 2(ε1−εi )−(i−1)+1 and g(j) = 3δj 2j−1 .Let k be the smallest element in Cn

k and N = k − 1. Since N + n = 2t =2ε1+1 and N > n, where N = ∑w

i=1 2εi , and n = ∑vj=1 2δj , the binary forms

of N and n must have the following properties (Note: by column x we meanthe coefficient for 2x in the binary expansion).

1. δv = εw

2. Both have zeroes in columns (0 to δv − 1 = εw − 1).

3. Both have a one in column (δv = εw).

4. They have different digits in each of the columns (δv+1 to δ1).

5. N has a one in column (δ1 + 1 = ε1) while n has no digit there at all.

Example 1. Let k = 5577. Then N = 5576, n = 2616, or in binary

N = 1010111001000n = 101000111000

In this example v = 5, w = 6, δv = 3, εw = 3, δ1 = 11 and ε1 = 12. Notethat N + n = 8192 = 213.

Note that for each “1” in the binary expression of n there is a correspondingterm in the sum

∑vj=1 g(j) and for each “1” in N there is a term in the sum∑w

i=1 f (i).

Claim 2. For any l,∑

i:εi≤δlf (i) + ∑

j :δj ≤δlg(j) = 3δl+12l−1

Proof of Claim 2. We’ll use induction on l. We’ll let l decrease from v to 1.Note that this means the column number is increasing.

For l = v, there’s only one term in each sum: f (w) and g(v). Clearlyg(v) = 3δv 2v−1. Now f (w) = (2)3εw 2(ε1−εw)−(w−1). Upon examination,(ε1 − εw) − (w − 1) equals the number of zeroes in N to the left of the εw

column, which also equals the number of ones in n to the left of the δv column,which is simply v − 1. Since εw = δv , then f (w) = 3δv 2v . Adding this tog(v) gives 3δv+12v−1 as claimed.

Page 10: David J. Ettestad and Joaquin O. Carbonara- Formulas for the Number of States of an Interesting Finite Cellular Automaton and a Connection to Pascal’s Triangle

“JCA” — “JCA-0043” — 2009/7/22 — 11:12 — page 10 — #10

10 D. J. Ettestad and J. O. Carbonara

Now assume it’s true for l. We’ll show it’s true for l − 1.∑

i:εi≤δ(l−1)

f (i) +∑

j :δj ≤δ(l−1)

g(j)

= ∑

i:εi≤δl

f (i) +∑

j :δj ≤δl

g(j)

+

∑i:δl<εi≤δ(l−1)

f (i) +∑

j :δl<δj ≤δl−1

g(j)

= 3δl+12l−1 +∑

i:δl<εi≤δ(l−1)

(2)3εi 2(ε1−εi )−(i−1) + g(l − 1)

By the same reasoning as above, (ε1 − εi) − (i − 1) equals l − 1, giving:

3δl+12l−1 +∑

i:δl<εi≤δ(l−1)

3εi 2l + g(l − 1)

= 3δl+12l−1 + (3δ(l−1) − 3δl+1)2l−1 + 3δl−1 2l−2

= 3δ(l−1)+12l−2 = 3δ(l−1)+12(l−1)−1 �

In particular, the sum of all terms in columns (0 to δ1) is 3δ1+121−1 =3δ1+1 = 3ε1 .

Finally we need to add f (1) which is 3ε1 2. This gives 3ε1+1, which provesEquation (7). This shows that the two formulas for a(n) are equivalent, whichalso shows that Callan’s formula is correct. �

REFERENCES

[1] Carbonara, J., and Green,A. Enumerative questions on rooted weighted necklaces. Advancesin Applied Mathematics 21 (1998), 405–423.

[2] Cipra, B. Proposed problem 1388. Mathematics Magazine 65(1) (1992), 56.

[3] Adamatzky A. Identification of Cellular Automata, Taylor and Francis, 1994.

[4] Ilachinski A. Cellular Automata: A Discrete Universe, World Scientific, 2002.

[5] Ettestad, D. and Carbonara, J. Fractal properties of the matrix for the cups and stonescounting problem. International Journal of Pure and Applied Mathematics 29(1) (2006),81–106.

[6] Callan, D., Personal communication.

[7] Stolarsky, K. B. Power and exponential sums of digital sums related to binomial coerricientparity. SIAM J. Appl. Math. 32(4) (1977), 717.