Jonathan Chappelon

Akihiro Matsuura

On generalized Frame-Stewart numbers

Keywords: multi-peg Tower of Hanoi, Tower of Hanoi on graphs, Frame-Stewart numbers, generalized Frame-Stewart numbers, recurrence relations, smooth numbers. MSC2010: 11A99, 68R05

 based on the the following recurrence relation:

In this paper, we generalize this recurrence relation to

for two sequences of arbitrary positive integers (p i ) i≥3 and (q i ) i≥3 and we show that the sequence of differences

, with α i ≥ 0 for all i, arranged in nondecreasing order. We also apply this result to analyze recurrence relations for the Tower of Hanoi problems on several graphs.

Introduction

The Tower of Hanoi problem was introduced by Édouard Lucas in 1883 [START_REF] Lucas | Récréation Mathématiques[END_REF] for the case of 3 pegs and n disks of different sizes. Initially, n disks are placed on one of the 3 pegs with the largest at the bottom. Then, at each time one of the topmost disks is moved to a peg with a larger disk on the top or to an empty peg. The goal of the problem is to transfer all the disks from the initial peg to the peg of destination with the minimum number of moves. A simple recursive argument shows that 2 n -1 moves are necessary and sufficient to carry 1 out this task. This Tower of Hanoi problem was then extended to the case of 4 pegs by Dudeney in 1907 [START_REF] Dudeney | The Reve's Puzzle, The Canterbury Puzzles (and Other Curious Problems)[END_REF] and to arbitrary k ≥ 3 pegs by Stewart in 1939 [START_REF] Stewart | Advanced problem 3918[END_REF]. In 1941, Frame [START_REF] Frame | Solution to advanced problem 3918[END_REF] and Stewart [START_REF] Stewart | Solution to advanced problem 3918[END_REF] independently proposed algorithms which achieve the same numbers of moves for the k-peg Tower of Hanoi problem with k ≥ 4 pegs. Klavžar et al. [START_REF] Klavžar | On the Frame-Stewart algorithm for the multipeg Tower of Hanoi problem[END_REF] showed that seven different approaches to the k-peg Tower of Hanoi problem, including those by Frame and Stewart, are all equivalent, that is, achieve the same numbers of moves. Thus, these numbers are called the Frame-Stewart numbers [START_REF] Klavžar | Simple explicit formula for the Frame-Stewart numbers[END_REF].

Somewhat surprisingly, the optimal solution for the multi-peg Tower of Hanoi problem with k ≥ 4 pegs is not known yet. So far, the best upper bounds are achieved by the Frame-Stewart numbers and the best lower bounds are obtained by Chen et al. [START_REF] Chen | On the Frame-Stewart conjecture about the Towers of Hanoi[END_REF]. Since the upper bounds are believed to be optimal, they are called the "presumed optimal" solution.

The Stewart's recursive algorithm for the k-peg Tower of Hanoi problem is summarized as follows. For integer t such that 1 ≤ t ≤ n, 1. recursively transfer a pile of n -t smallest disks from the first peg to a temporary peg using k pegs;

2. transfer the remaining pile of t largest disks from the first peg to the final peg using k -1 pegs, ignoring the peg occupied by the n -t smallest disks;

3. recursively transfer the pile of n -t smallest disks from the temporary peg to the final peg using k pegs.

The algorithm chooses the integer t such that the number of moves 2

• S k (n -t) + S k-1 (t)
is minimized. Thus, the Frame-Stewart numbers S k (n) satisfy the following recurrence relations:

S k (n) = min 1≤t≤n 2 • S k (n -t) + S k-1 (t) , for n ≥ 1, k ≥ 4, S 3 (n) = 2 n -1,
for n ≥ 1, and S k (0) = 0, for k ≥ 3.

When k = 4 for instance, S 4 (n) is obtained by the following simple formula:

S 4 (n) -S 4 (n -1) = 2 i-1 , for i 2 < n ≤ i + 1 2 ,
where i 2 is the binomial coefficient equal to i(i -1)/2. In the general case k ≥ 4, S k (n) is obtained by several different approaches, e.g., [START_REF] Frame | Solution to advanced problem 3918[END_REF][START_REF] Klavžar | On the Frame-Stewart algorithm for the multipeg Tower of Hanoi problem[END_REF][START_REF] Klavžar | Simple explicit formula for the Frame-Stewart numbers[END_REF][START_REF] Majumdar | Generalized multi-peg Tower of Hanoi problem[END_REF][START_REF] Stewart | Solution to advanced problem 3918[END_REF].

In [START_REF] Matsuura | Analysis of recurrence relations generalized from the 4-peg Tower of Hanoi[END_REF], the following general recurrence relation was considered to clarify the combinatorial structure latent in the recurrence relation for S k (n) and to cope with the recurrence relations for the Tower of Hanoi on graphs in which pegs are placed on vertices of a given graph and disks are only moved along the edges:

T(n) = min 1≤t≤n α • T(n -t) + β • (2 t -1)
, for n ≥ 1, and T(0) = 0, where α and β are arbitrary positive integers. It was shown that the sequence of differences (T(n) -T(n -1)) n≥1 consists of numbers of the form β

• 2 i • α j , with i, j ≥ 0, arranged in nondecreasing order. When α = 3, 2 i • α j increases as 1, 2, 3, 2 2 , 2 • 3, 2 3 , 3 2 , 2 2 • 3, 2 4 , 2 • 3 2 , • • • .
These numbers are called "3-smooth numbers" [START_REF] Sloane | The On-Line Encyclopedia of Integer Sequences[END_REF] and have been studied extensively in number theory, in relation to the distribution of prime numbers [START_REF] Hardy | On the normal number of prime factors of a number n[END_REF] and to new number representations [START_REF] Blecksmith | 3-smooth representations of integers[END_REF][START_REF] Erdős | Problem Q814[END_REF]. The formulation and analysis of T(n), however, has some defects such that (i) it is only focused on the 4-peg case with no consideration for the general case k ≥ 3; and (ii) even in the 4-peg case, term 2 i • α j consists of constant 2 and parameter α, which might admit further generalization.

In this paper, we fully generalize the recurrence relations for the previous S k (n) and T (n) and obtain the exact formulas. Namely, we define the following recurrence relations for two sequences of arbitrary positive integers (p i ) i≥3 and (q i ) i≥3 :

G k (n) = min 1≤t≤n p k • G k (n -t) + q k • G k-1 (t) , for n ≥ 1, k ≥ 4, G 3 (n) = p 3 • G 3 (n -1) + q 3 , for n ≥ 1, and G k (0) = 0, for k ≥ 3.
Then, we show that the sequence of differences (G k (n) -G k (n -1)) n≥1 consists of numbers of the form ( k i=3 q i ) • ( k i=3 p i α i ), with α i ≥ 0 for all i, arranged in nondecreasing order. In other words, we show the following theorem.

Theorem 1. For every positive integer n and for two sequences of arbitrary positive integers (p i ) i≥3 and (q i ) i≥3 , we have

G k (n) = q • n j=1 u k j
where q = k i=3 q i and u k j is the jth term of the sequence u k j j≥1 of integers k i=3 p i α i , with α i ≥ 0 for all i, arranged in nondecreasing order.

We call G k (n) the generalized Frame-Stewart numbers. Note that G k (n) is equal to S k (n) when (p i , q i ) = (2, 1) for all i ≥ 3 and G 4 (n) is equal to T(n) when (p 3 , q 3 ) = (2, 1) and (p 4 , q 4 ) = (α, β).

The remaining of the paper is organized as follows. In Section 2, we show some basic properties of the sequence u k j j≥1 defined from (p i ) i≥3 . In Section 3, we prove Theorem 1, the main result of this paper. In Section 4, application of these numbers in obtaining upper bounds of the number of moves for the Tower of Hanoi problem on several graphs is provided.

Basic results on smooth number sequences

Let (p i ) i≥3 be a sequence of positive integers. We consider the sequence u k j j≥1 of all the integers of the form k i=3 p i α i , where α i ≥ 0 for all i, arranged in nondecreasing order. For instance, for (p 3 , p 4 ) = (2, 2) and (p 3 , p 4 ) = (2, 3), the first few terms of (u

4 j ) j≥1 are (1, 2, 2, 2 2 , 2 2 , 2 2 , 2 3 , • • • ) and (1, 2, 3, 2 2 , 2 • 3, 2 3 , 3 2 , • • • ), respectively.
When there is some i 0 such that p i 0 is equal to 1, then by definition u k j j≥1 is the constant sequence of 1's, for every k ≥ i 0 . We note that u k j j≥1 is closely related to smooth numbers which have been explored extensively in number theory. A positive integer is called B-smooth if none of its prime factors are greater than a positive integer B. The sequence u k j j≥1 then consists of B-smooth numbers for B = max 3≤i≤k {p i }.

In this section, we restrict to the case where all the p i 's are greater than 1 and prove a simple lemma on a certain "recursive" structure of the smooth number sequence u k j j≥1 , which will be used to prove Theorem 1 in the next section.

Lemma 1. Let k ≥ 4 and let (f k (j)) j≥1 be the sequence of positive integers defined by

f k (1) = 1 and f k (j) = min l > f k (j -1) u k l = u k-1 j for j ≥ 2. Then, for every integer n such that f k (j) < n < f k (j + 1), we have u k n = p k • u k n-j . Proof. If f k (j +1) = f k (j)+1, then the lemma is trivial. Suppose now that f k (j +1)-f k (j) ≥ 2 and let n be a positive integer such that f k (j) < n < f k (j + 1). First, consider a term k i=3 p i α i of the sequence (u k l ) l≥1 . If α k = 0, then k i=3 p i α i = k-1 i=3 p i α i belongs to (u k f k (l) ) l≥1 by definition of (f k (l)) l≥1 . Otherwise, if α k ≥ 1, then k i=3 p i α i = p k • p k α k -1 • k-1 i=3 p i α i belongs to (p k • u k l ) l≥1 . Now, since f k (j) < n < f k (j + 1), it follows that u k f k (j) ≤ u k n < u k f k (j+1)
by the growth of the sequence (u k l ) l≥1 . We deduce that

u k l 1 ≤ l ≤ n u k f k (l) l ≥ 1 = u k f k (l) 1 ≤ l ≤ j .
Therefore, since a term of u k l l≥1 belongs to

u k f k (l) l≥1
or to p k • u k l l≥1 , we obtain the following decomposition

u k l 1 ≤ l ≤ n = u k f k (l) 1 ≤ l ≤ j p k • u k l 1 ≤ l ≤ n -j .
This decomposition with the maximality of u k n leads to

u k n = max u k l 1 ≤ l ≤ n = max max u k f k (l) 1 ≤ l ≤ j , max p k • u k l 1 ≤ l ≤ n -j = max u k f k (j) , p k • u k n-j . Since the hypothesis f k (j) < n < f k (j + 1) implies that u k n belongs to p k • u k l l≥1 , this completes the proof that u k n = p k • u k n-j .

Proof of Theorem 1

Let G 1 k (n) denotes the special case of G k (n) associated with arbitrary sequence (p i ) i≥3 and with the constant sequence (q i ) i≥3 with q i = 1 for i ≥ 3. There exists a simple relationship between numbers G k (n) and G 1 k (n).

Proposition 1. For every nonnegative integer n and for every sequence of integers (q i ) i≥3 , we have

G k (n) = q • G 1 k (n), where q = k i=3 q i .
Proof. By double induction on k ≥ 3 and n ≥ 0. For k = 3, we can prove by simple induction on n that G 3 (n) = q 3 • G 1 3 (n) for all n. For n = 0, we have G k (0) = q • G 1 k (0) = 0 for all k. Suppose now that the result is true for k -1 and all n ≥ 0, and for k and all l ≤ n -1. By the recursive definition of G k (n) and by the assumption of induction, we obtain

G k (n) = min 1≤t≤n {p k • G k (n -t) + q k • G k-1 (t)} = min 1≤t≤n p k • k i=3 q i • G 1 k (n -t) + q k • k-1 i=3 q i • G 1 k-1 (t) = k i=3 q i • min 1≤t≤n p k • G 1 k (n -t) + G 1 k-1 (t) = q • G 1 k (n). By Proposition 1, it is sufficient to prove Theorem 1 for G 1 k (n) instead of G k (n). Now, we show at which argument G 1 k (n) = min 1≤t≤n p k • G 1 k (n -t) + G 1 k-1 (t) takes its minimum. Lemma 2.
Let n be a positive integer. Suppose that

p i > 1 for all 3 ≤ i ≤ k. Suppose also that ∆G 1 i (l) = G 1 i (l) -G 1 i (l -1) = u i l for 3 ≤ i ≤ k -1 and l ≥ 1 and that ∆G 1 k (l) = u k l for 1 ≤ l ≤ n -1. Let j be the integer such that f k (j) ≤ n < f k (j + 1). Then, for 1 ≤ t ≤ n, G 1 k,n (t) = p k • G 1 k (n -t) + G 1 k-1 (t) takes its minimum at t = j. Proof. Since G 1 k,n (t + 1) -G 1 k,n (t) = p k • G 1 k (n -t -1) + G 1 k-1 (t + 1) -p k • G 1 k (n -t) -G 1 k-1 (t) = -p k • (G 1 k (n -t) -G 1 k (n -t -1)) + (G 1 k-1 (t + 1) -G 1 k-1 (t)) = -p k • ∆G 1 k (n -t) + ∆G 1 k-1 (t + 1)
for every 1 ≤ t ≤ n -1, it follows by hypothesis that

G 1 k,n (t + 1) -G 1 k,n (t) = -p k • u k n-t + u k-1 t+1 for 1 ≤ t ≤ n -1.
First, when 1 ≤ t ≤ j -1, the growth of the sequences u k l l≥1 and u k-1 l l≥1 yields the following inequalities

u k n-t ≥ u k n-j+1 ≥ u k f k (j)-j+1 , u k-1 t+1 ≤ u k-1 j = u k f k (j) . Let m = min {l ≥ 0 | f k (j + l + 1) -f k (j + l) ≥ 2}. Such m always exists. By definition of f k (j + l), we have f k (j + l) = f k (j) + l for 0 ≤ l ≤ m and f k (j + m) < f k (j) + m + 1 < f k (j + m + 1
). So we deduce from Lemma 1 that

u k f k (j)+m+1 = p k • u k (f k (j)+m+1)-(j+m) = p k • u k f k (j)-j+1 . Thus, G 1 k,n (t + 1) -G 1 k,n (t) = -p k • u k n-t + u k-1 t+1 ≤ -u k f k (j)+m+1 + u k f k (j) ≤ 0 for 1 ≤ t ≤ j -1. Therefore, G 1 k,n (t) ≥ G 1 k,n (j
) for all 1 ≤ t ≤ j. Similarly, when j ≤ t ≤ n -1, we have

u k n-t ≤ u k n-j ≤ u k f k (j+1)-j-1 , u k-1 t+1 ≥ u k-1 j+1 = u k f k (j+1) . Let m = min {l ≥ 0 | f k (j -l + 1) -f k (j -l) ≥ 2}.
If such m does not exist, then n = f k (j) = j and we already know that G 1 k,n (t) takes its minimum at t = j. Suppose now that the integer m exists. By definition of f k (j -l + 1), we have

f k (j -l + 1) = f k (j + 1) -l for 0 ≤ l ≤ m and f k (j -m) < f k (j + 1) -m -1 < f k (j -m + 1). So we deduce from Lemma 1 that u k f k (j+1)-m-1 = p k • u k (f k (j+1)-m-1)-(j-m) = p k • u k f k (j+1)-j-1 . Thus, G 1 k,n (t + 1) -G 1 k,n (t) = -p k • u k n-t + u k-1 t+1 ≥ -u k f k (j+1)-m-1 + u k f k (j+1) ≥ 0 for j ≤ t ≤ n -1. Therefore, G 1 k,n (t) ≥ G 1 k,n (j) for all j ≤ t ≤ n. Consequently, G 1 k,n (
t) takes its minimum at t = j. We are now ready to prove the main result of this paper.

Proof of Theorem 1. From Proposition 1, it is sufficient to prove that

G 1 k (n) = n j=1 u k j
for every positive integer n. We divide into different cases depending on the values of the terms of the sequence (p i ) i≥3 . Case 1: if p i > 1 for all 3 ≤ i ≤ k. We proceed by double induction on k ≥ 3 and n ≥ 1. For k = 3, it is clear that G 1 3 (1) = 1 and, by induction on n ≥ 1, that ∆G

1 3 (n) = G 1 3 (n) -G 1 3 (n -1) = p 3 • (G 1 3 (n -1) -G 1 3 (n -2)) = p n-1 3 = u 3 n for all n ≥ 2. It is also clear that, for arbitrary k, G 1 k (1) = 1 = u k 1 . Now assume that ∆G 1 i (l) = u i l for all 3 ≤ i ≤ k -1 and all l ≥ 1 and that ∆G 1 k (l) = u k l for all 1 ≤ l ≤ n -1. Then, we show that ∆G 1 k (n) = u k n holds.
For n, there exists some j ≥ 1 such that f k (j) ≤ n < f k (j + 1). It is divided into two subcases: when n = f k (j) (Subcase 1.1) and when f k (j) < n < f k (j + 1) (Subcase 1.2). Subcase 1.1: for n = f k (j). We obtain

∆G 1 k (n) = G 1 k (f k (j)) -G 1 k (f k (j) -1) = G 1 k,f k (j) (j) -G 1 k,f k (j)-1 (j -1) (since f k (j -1) ≤ f k (j) -1 < f k (j) and by Lemma 2) = p k • (G 1 k (f k (j) -j) -G 1 k ((f k (j) -1) -(j -1))) + G 1 k-1 (j) -G 1 k-1 (j -1) = ∆G 1 k-1 (j) = u k-1 j (by assumption of induction) = u k f k (j) (by definition of f k (j)) = u k n .
Thus, the proof is shown in this case.

Subcase 1.2: for f k (j) < n < f k (j + 1). We obtain

∆G 1 k (n) = G 1 k (n) -G 1 k (n -1) = G 1 k,n (j) -G 1 k,n-1 (j) (since f k (j) ≤ n -1 < f k (j + 1) and by Lemma 2) = p k • (G 1 k (n -j) -G 1 k (n -1 -j)) + G 1 k-1 (j) -G 1 k-1 (j) = p k • ∆G 1 k (n -j) = p k • u k n-j (by assumption of induction) = u k n (by Lemma 1).
Thus, the proof is shown in this case, and this completes the proof of Case 1.

(l) = l for 1 ≤ l ≤ n -1. By definition, G 1 k (n) = min 1≤t≤n G 1 k (n -t) + G 1 k-1 (t) = min 1≤t≤n (n -t) + G 1 k-1 (t) . Since p i > 1 for all 3 ≤ i ≤ k -1, we know that G 1 k-1 (l) = l j=1 u k-1 j for l ≥ 1 from Case 1. It is clear that u k-1 j ≥ 1 for all 1 ≤ j ≤ l. Therefore, we have G 1 k-1 (l) ≥ l for l ≥ 1. So G 1 k,n (t) = (n -t) + G 1 k-1 (t) takes its minimum at t = 1 and G 1 k (n) = (n -1) + 1 = n as announced.
Subcase 2.2: for k > m. We proceed by double induction on k ≥ m and n ≥ 1. We know that G 1 m (l) = l for all l ≥ 1 from Subcase 2.1. We also know that G 1 i (1) = 1 for all i ≥ 3. Now, assume that G 1 k-1 (l) = l for all l ≥ 1 and that G 1 k (l) = l for all 1 ≤ l ≤ n -1. We obtain

G 1 k (n) = min 1≤t≤n G 1 k (n -t) + G 1 k-1 (t) = min 1≤t≤n {(n -t) + t} = n.
This concludes the proof of Case 2, and thus the proof of Theorem 1.

Corollary 1. Let k ≥ 4 and j ≥ 1. For every integer n such that

f k (j) ≤ n < f k (j + 1), G k (n) = p k • G k (n -j) + q k • G k-1 (j).
Proof. From Proposition 1, Theorem 1 and Lemma 2.

We end this section in considering the special case where p i = p ≥ 1 for all i.

Proposition 2. Let p i = p ≥ 1 for all 3 ≤ i ≤ k. Then, for all integers j ≥ 0 and n ≥ 1

such that k + j -3 k -2 < n ≤ k + j -2 k -2 ,
u k n = p j and G 1 k (n) can be computed as follows:

G 1 k (n) = j-1 m=0 k + m -3 k -3 p m + n - k + j -3 k -2 p j .
Proof. Let j be a nonnegative integer. First, we can determine C j the number of values of n such that u k n = p j . Then, since C j corresponds to the number of ways to distribute j identical balls into k -2 distinct urns or the number of ways of partitioning j into k -2 ordered non-negative summands, we have

C j = (k -2) + j -1 (k -2) -1 = k + j -3 k -3 .
Now let D j be the number of values of n such that u k n < p j . Here we have

D j = j-1 m=0 C m = j-1 m=0 k + m -3 k -3 = k + j -3 k -2 .
It follows that u k n = p j exactly when D j < n ≤ D j + C j = D j+1 , that is, when

k + j -3 k -2 < n ≤ k + j -3 k -2 + k + j -3 k -3 = k + j -2 k -2
as claimed. This leads to the equality, for

D j < n ≤ D j+1 , G 1 k (n) = j-1 m=0 C m • p m + (n -D j ) • p j = j-1 m=0 k + m -3 k -3 p m + n - k + j -3 k -2 p j .

Application: the Tower of Hanoi on graphs

Let G = (V, E) be a simple graph with the set of vertices V = {v 1 , . . . , v k } and the set of edges E. A k-peg Tower of Hanoi problem can be considered on G: the k pegs are placed on the vertices v 1 , . . . , v k and transfer of disks is allowed between the pegs v i and v j only if there is an edge between v i and v j . The original k-peg Tower of Hanoi problem then corresponds to the Tower of Hanoi problem on the complete graph K k . The cases of k = 3 and k = 4 are illustrated in Figure 1. The main application of the generalized Frame-Stewart numbers is in giving upper bounds of the number of moves for the Tower of Hanoi problem on some simple graphs. For the Tower of Hanoi problem on the complete graph with k ≥ 3 vertices and n ≥ 0 disks, we retrieve the Frame-Stewart numbers S k (n) stated in Section 1. In the sequel of this section, we consider other special cases where G is the path graph P 3 or the star graph S k .

On the path graph P 3

The following theorem shows that the optimal number of moves for the Tower of Hanoi problem on the path graph P 3 is given by the generalized Frame-Stewart numbers. Theorem 2. Consider the Tower of Hanoi problem on P 3 , as depicted in Figure 2. The minimum number of moves to transfer n ≥ 1 disks

• from peg 1 to peg 3 is G 3 (n) = 2 • n-1 i=0 3 i , where (p 3 , q 3 ) = (3, 2); • from peg 1 to peg 2 is G 1 3 (n) = n-1 i=0 3 i
, where (p 3 , q 3 ) = (3, 1). Though the fact of this theorem is rather well-known (e.g., see [START_REF] Sapir | The Tower of Hanoi with forbidden moves[END_REF]), we present a short proof to see the connection with the generalized Frame-Stewart numbers.

Proof. We begin with the transfer between peg 1 and peg 3. In order to move the biggest disk from peg 1 to peg 3, we have to first move it from peg 1 to peg 2 and so the n -1 smallest disks must be on peg 3. The n -1 smallest disks are transferred from peg 1 to peg 3 in G 3 (n -1) moves. Then, we move the biggest disk from peg 1 to peg 2. In order to move this disk to peg 3, we transfer the n -1 smallest disks from peg 3 to peg 1 in G 3 (n -1) moves. Finally, we put the biggest disk from peg 2 to peg 3 in 1 move and the n -1 smallest disks from peg 1 to peg 3 in G 3 (n -1) moves. The total number of moves for n disks is then 3 • G 3 (n -1) + 2, which corresponds to G 3 (n) as announced. Since this is the best possible, G 3 (n) is the optimal number of moves.

For the transfer between peg 1 and peg 2, as before, in order to move the biggest disk from peg 1 to peg 2, we have to first transfer the n -1 smallest disks from peg 1 to peg 3. As proved above, the minimum number of moves to do this is G 3 (n -1). Moreover, we know that G 3 (n -1) = 2 • G 1 3 (n -1) by Proposition 1. Then, after moving the biggest disk from peg 1 to peg 2, the n -1 smallest disks are transferred from peg 3 to peg 2. It is done in G 1 3 (n -1) moves. Thus, we conclude that the minimum number of moves for transferring n disks from peg 1 to peg 2 is 3 • G 1 3 (n -1) + 1 as announced.

On the star graph S k

We end this section by considering the Tower of Hanoi problem on the star graph S k with k vertices and k -1 edges. For k = 3, the graph S 3 corresponds to the path graph P 3 . The star graphs for k = 4 and k = 5 are depicted in Figure 3. Stockmeyer [START_REF] Stockmeyer | Variations on the four-post Tower of Hanoi puzzle[END_REF] considered the Tower of Hanoi problem on the star graph S 4 , where all the n disks are transferred from one leaf of the graph to another leaf (for instance, the problem of transferring disks in the minimal number of moves from peg 2 to peg 3 in Figure 3). He described a recursive algorithm which achieved a good (seemingly the best) upper bound; thus, called it the "presumed optimal" algorithm. Here, we generalize this algorithm to the star graph S k for arbitrary k ≥ 3 and show that disks can be transferred from one leaf to another in G k (n) moves. Theorem 3. Let k ≥ 3 be an integer. Consider the Tower of Hanoi problem on the star graph S k in which n ≥ 1 disks are transferred from one leaf of the graph to another leaf. Then, an upper bound on the minimal number of moves to solve this problem is given by the generalized Frame-Stewart number G k (n), where (p 3 , q 3 ) = (3, 2) and (p i , q i ) = (2, 1) for 4 ≤ i ≤ k.

Proof. By induction on k of S k . When k = 3, as noted before, the star graph S 3 corresponds to the path graph P 3 . So by Theorem 2, G 3 (n), where (p 3 , q 3 ) = (3, 2), is the minimum number of moves to transfer n disks from peg 2 to peg 3. For k ≥ 4 and n = 1, we can transfer one disk from peg 2 to peg 3 in only G k (1) = 2 moves. Suppose now that the result is true for any number of disks up to S k-1 and until n -1 disks for S k . Then, n disks are recursively transferred from peg 2 to peg 3 as follows. For some integer t such that 1 ≤ t ≤ n,

• transfer the n -t smallest disks from peg 2 to peg k in G k (n -t) moves;

• consider the remaining k -1 pegs and the subgraph obtained after deleting the vertex of peg k, which is the star graph S k-1 , and transfer the t largest disks from peg 2 to peg 3 in G k-1 (t) moves;

• transfer the n -t smallest disks from peg k to peg 3 in G k (n -t) moves.

We choose the integer t such that the number of moves 2 • G k (n -t) + G k-1 (t) is minimized. Thus, the number of moves of this algorithm is min 1≤t≤n 2 • G k (n -t) + G k-1 (t) , which is, by the assumption of induction, equal to G k (n) with (p 3 , q 3 ) = (3, 2) and (p i , q i ) = (2, 1) for 4 ≤ i ≤ k. This completes the proof of Theorem 3.

• Akihiro Matsuura, School of Science and Engineering, Tokyo Denki University Ishizaka, Hatoyama-cho, Hiki, 350-0394, Japan e-mail: matsu@rd.dendai.ac.jp

Case 2 :

 2 if p i = 1 for some 3 ≤ i ≤ k. Let m = min {3 ≤ i ≤ k | p i = 1}. It is further divided into two subcases: when k = m (Subcase 2.1) and when k > m (Subcase 2.2). Subcase 2.1: for k = m. If k = m = 3, then p 3 = 1. In this case, it is clear that G 1 3 (n) = n for all n ≥ 1. If k = m ≥ 4, that is, if p k = 1 and p i > 1 for all 3 ≤ i ≤ k -1, we proceed by induction on n ≥ 1. For n = 1, we have G 1 k (1) = 1. Then assume that G 1 k

Figure 1 :

 1 Figure 1: The original Tower of Hanoi problem with 3 pegs (K 3 ) and 4 pegs (K 4 ).

1 2 3 Figure 2 :

 32 Figure 2: The path graph P 3 .

Figure 3 :

 3 Figure 3: The star graphs S 4 and S 5 .

Acknowledgements

The authors would like to thank the two anonymous reviewers for the time they spent on the reading of our manuscript and for the comments they posted, especially for the simpler proof of Proposition 2 that one of the reviewers suggested us.

Authors' Address: