<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{notation}[theorem]{Notation}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf 
Addition Chains Meet Postage Stamps:\\
\vskip .1in
Reducing the Number of Multiplications
}
\vskip 1cm
\large
Jukka Kohonen and Jukka Corander \\
Department of Mathematics and Statistics\\
P. O. Box 68\\
FI-00014 University of Helsinki\\
Finland \\
\href{mailto:jukka.kohonen@helsinki.fi}{\tt jukka.kohonen@helsinki.fi}\\
\href{mailto:jukka.corander@helsinki.fi}{\tt jukka.corander@helsinki.fi}\\
\end{center}

\newcommand\nbar{{\overline{n}}}

\begin{abstract}
  We introduce {\em stamp chains}.  A stamp chain is a finite set of
  integers that is both an addition chain and an additive 2-basis,
  i.e., a solution to the postage stamp problem.  We provide a simple
  method for converting known postage stamp solutions of length $k$
  into stamp chains of length $k+1$.  Using stamp chains, we construct
  an algorithm that computes $u(x^i)$ for $i=1,\ldots,n$ in less than
  $n-1$ multiplications, if $u$ is a function that can be computed at
  zero cost, and if there exists another zero-cost function $v$ such
  that $v(a,b) = u(ab)$.  This can substantially reduce the
  computational cost of repeated multiplication, as illustrated by
  application examples related to matrix multiplication and data
  clustering using subset convolution.  In addition, we report the
  extremal postage stamp solutions of length $k=24$.
\end{abstract}


\section{Introduction}
\label{sec:introduction}
An addition chain is an increasing sequence of integers starting
from~1, where each subsequent element is a sum of two earlier elements
(not necessarily distinct).  Addition chains are well known for their
use in repeated multiplication to compute $x^n$. For example, the
chain $1,2,3,6,12,15$ shows how $x^{15}$ is computed with five
multiplications: $xx = x^2$, $x^2x = x^3$, $x^3x^3 = x^6$, $x^6x^6 =
x^{12}$, and $x^{12}x^3 = x^{15}$.

If all consecutive powers $x, x^2, \ldots, x^n$ are required, not just
the final value, then obviously $n-1$ multiplications are required.

Now suppose that the powers $x^i$ themselves are not of interest, but
instead the values $y_i = u(x^i)$, $i=1,\ldots,n$, are sought for a
given function $u$.  Let us also assume that computing $u$ is free of
cost (or negligible compared to the cost of multiplication).  Let us
further assume that given two values $a$ and $b$, there is a method
for computing $v(a,b) := u(ab)$ for free without actually performing
the multiplication $ab$.

If these assumptions hold, then it is not necessary to compute all of
the powers $x, x^2,\ldots,x^n$.  Instead, a carefully selected subset
of these powers is computed; then each $y_i$ is obtained either by
applying $u$ to one of the computed powers, or $v$ to a pair of them.
For instance, suppose that $x^5$ and $x^7$ have been computed but
$x^{12}$ has not.  Now there are two ways to obtain $y_{12}$: either
multiply $x^{12} = x^5x^7$ and evaluate $y_{12} = u(x^{12})$; or
evaluate $y_{12} = v(x^5, x^7)$ avoiding the multiplication.  The
existence of such a function $v$ is the key assumption underlying our
method of reducing the number of multiplications needed.

A straightforward application is found in matrix powers, if from each
power we only need a single element $(X^i)_{p,q} =: u(X^i)$.  Let $X$
be a large $m \times m$ matrix, and assume that its powers $X^i, X^j$
have been computed. Then the element $(X^{i+j})_{p,q} = \sum_{r=1}^m
(X^i)_{p,r} (X^j)_{r,q} = v(X^i, X^j)$ can be directly evaluated in
$O(m)$ arithmetic operations -- essentially for free, compared to the
alternative of computing the full matrix product.  Another application
related to data clustering using subset convolution is given in
Section~\ref{sec:convolution}.

This setting gives raise to the problem of how to choose a minimal
number of powers of $x$, to be computed via repeated multiplication,
such that from them all $y_1,\ldots,y_n$ are obtained through $u$ and
$v$.  Superficially, this appears like an addition chain problem;
however, for solving it we shall encounter another problem in additive
number theory, namely the {\em postage stamp problem}.

We shall start with some definitions and preliminary observations in
the next section.  In Section~\ref{sec:algorithm} we provide an
algorithm for computing $y_1,\ldots,y_n$ with the help of stamp
chains, and in Section~\ref{sec:main} we present our main result,
which shows how stamp chains can be constructed from stamp bases.  In
Section~\ref{sec:known} we show how known properties of stamp bases
imply similar properties for stamp chains, and also we report three
extremal stamp bases corresponding to $k=24$.  An illustration of the
computational benefits and some final remarks are provided in the last
two sections of the paper.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Definitions}
\label{sec:definition}
Introductory texts to addition chains are provided by Guy
\cite[pp.~168--171]{guy2004} and Knuth \cite[pp.~398--422]{knuth1969}.
For information about the postage stamp problem, see Guy
\cite[pp.~123--127]{guy2004} and Selmer \cite{selmer1986}.

\begin{notation}
  In the following, $k$ is a positive integer.  $A_k$, $B_k$ and $C_k$
  denote sets of $k$ positive integers.  Their elements will be
  indexed in increasing order starting with index 1, thus $A_k = \{a_1
  &lt; \ldots &lt; a_k\}$.  When $j&lt;k$, the $j$-{\it prefix} of~$A_k$ is
  $A_j = \{a_1,\ldots,a_j\}$.  As usual in combinatorics, $[c,d]$
  denotes the consecutive integers $\{c, c+1, \ldots, d\}$.
\end{notation}

\begin{definition}
  An integer $c$ is {\it generated} by $A_k$, if $c=a_i$ or
  $c=a_h+a_i$ for some indices $1 \le h,i \le k$.  (Note that $h=i$ is
  allowed.)
\end{definition}

\begin{definition}
  $A_k$ is an {\it addition chain} if $a_1 = 1$, and for
  $j=2,\ldots,k$, the element $a_j$ is generated by $A_{j-1}$.
\end{definition}
\begin{remark}
  In addition chain literature it is customary to start indexing from
  $a_0=1$, and not to count this zeroth element in the length of the
  chain (thus $a_0,\ldots,a_k$ is customarily defined to have length
  $k$).  We have here departed from this notation in order to ensure
  compatibility with the established notation for postage stamps.
  For the same reason we have used a set notation, instead of the
  more usual tuple notation.
\end{remark}

\begin{definition}
  $A_k$ is a {\it stamp basis} for $n$, if every integer in $[1,n]$
  is generated by $A_k$.  The {\it range} of $A_k$, denoted by
  $n(A_k)$, is the largest $n$ such that $A_k$ generates $[1,n]$.  The
  elements of a stamp basis are called {\it stamps}.
\end{definition}

\begin{remark}
  In a stamp basis $a_1$ must be $1$, since otherwise $1$ is not
  generated.
\end{remark}

\begin{definition}
  The {\it range} of $k$, denoted by $n(k)$, is the largest range
  attained by stamp bases of length $k$.  An {\it extremal stamp
    basis} is one that attains this maximum.
\end{definition}

A stamp basis may be interpreted as a set of $k$ postage stamp
denominations, such that any integral postage fare up to $n$ can be
paid by attaching at most 2 stamps on an envelope.  The problem of
finding optimal bases is known as the {\em postage stamp problem}.  A
stamp basis is also known in the literature as an {\em additive
  2-basis}.  More generally, if $h$ stamps are allowed on the
envelope, the set of stamp denominations is called an {\em $h$-basis}
and the largest $n$ attained is called the {\em $h$-range}.  In this
work we consider exclusively the case $h=2$.


\begin{definition}
  A {\it stamp chain} for $n$ is a set of integers that is both an
  addition chain, and a stamp basis for $n$.
\end{definition}

\begin{definition}
  The maximum range among $k$-length stamp chains is denoted by
  $\nbar(k)$.  An {\it extremal stamp chain} (of length $k$) is one
  that attains this maximum.
\end{definition}

\begin{example}
  $A_5 = \{1,2,4,8,16\}$ is an addition chain, and in fact a
  minimal-length addition chain ending at 16.  It is not a
  particularly good postage stamp basis: its range is only $6$, since
  it does not generate $7$.
\end{example}

\begin{example}
  $B_5 = \{1,3,5,7,8\}$ is an extremal stamp basis of length 5, and has
  range $n(B_5)=16$.  However, it is not an addition chain, since for
  example $5$ is not generated by the prefix $\{1,3\}$.
\end{example}

\begin{example}
  $C_5 = \{1,2,4,6,7\}$ is a stamp chain of length 5, and has range
  $n(C_5)=14$.  As a stamp chain, it is extremal: no stamp chain of
  length 5 has range greater than 14.  The proof of this extremality
  follows from theorems that will be established in
  Section~\ref{sec:main}.
\end{example}

\begin{remark}
  Since any stamp chain is also a stamp basis, it follows that
  $\nbar(k) \le n(k)$.  The inequality may be strict, as seen in the
  previous two examples.
\end{remark}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Multiplication algorithm}
\label{sec:algorithm}

We now return to the task outlined in the introduction.  Given an
initial value~$x$, a positive integer $n$, an associative binary
operation (multiplication), and the zero-cost functions $u$ and $v$
such that $v(a,b)=u(ab)$, the task is to compute $y_1,\ldots,y_n$,
where $y_i = u(x^i)$.

The straightforward method computes all powers $x^2,\ldots,x^n$ and
uses $n-1$ multiplications.  To improve upon this, let $k &lt; n$, and
let us perform $k-1$ multiplications with results $x^{a_j}$, where
$j=2,\ldots,k$.  Without loss of generality, we may assume that the
exponents $a_j$ are distinct and in increasing order, otherwise some
multiplications could be eliminated or rearranged.  The set $A_k =
\{a_1 &lt; \ldots &lt; a_k\}$, with $a_1=1$, will be called a {\it
  multiplication plan}.

We now have two requirements for the choice of the multiplication plan
$A_k$:
\begin{enumerate}
\item $A_k$ must be an addition chain.  This ensures that for each
  $j=2,\ldots,k$, the exponent $a_j$ equals $a_h+a_i$ for some $1 \le
  h,i &lt; j$, and thus $x^{a_j}$ can be computed with one multiplication
  as $(x^{a_h})(x^{a_i})$.
\item $A_k$ must be a stamp basis.  This ensures that for each integer
  $c \in [1,n]$, either $c=a_i$ or $c=a_h+a_i$ for some $h,i$, and
  thus $y_c$ can be computed at zero cost, either as $u(x^{a_i})$ or
  as $v(x^{a_h}, x^{a_i})$.
\end{enumerate}

Combining the requirements, we observe that a multiplication plan has
to be a stamp chain for $n$.  Conversely, given a $k$-length stamp
chain for $n$, the following algorithm computes $y_1,\ldots,y_n$ using
$k-1$ multiplications.  The first phase performs $k-1$ multiplications
and the second phase performs none, since it does only zero-cost
evaluations of $u$ and $v$.

\medskip
\noindent{\bf Algorithm~A}
\\{\it Phase 1.} For each $j=2,\ldots,k$, find $h,i&lt;j$ such that
$a_h+a_i=a_j$.  This is possible because $A_k$ is an addition chain.
Compute $x^{a_j} = (x^{a_h})(x^{a_i})$.
\\{\it Phase 2.} For each integer $c \in [1,n]$, either $c$ is a
stamp, or there are two stamps $a_h,a_i$ such that $c = a_h+a_i$.  In the
first case, compute $y_c = u(x^c)$.  In the second case compute $y_c =
v(x^{a_h}, x^{a_i})$.
\medskip

\begin{example}
If $y_1,\ldots,y_{14}$ are sought, the multiplication plan has to be a
stamp chain with a range at least $14$.  In the previous section we
mentioned that $C_5 = \{1,2,4,6,7\}$ is a stamp chain for 14.  Using
this stamp chain, Algorithm~A will compute $y_1,\ldots,y_{14}$ in $5-1
= 4$ multiplications as follows:
\begin{enumerate}
\item Compute $xx=x^2$, $x^2x^2=x^4$, $x^2x^4=x^6$, and $x^6x=x^7$.
\item Compute $y_1=u(x), y_2 = u(x^2), y_3 = v(x, x^2), \ldots,
  y_{14}=v(x^7, x^7)$.
\end{enumerate}
\end{example}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Constructing stamp chains}
\label{sec:main}
If $A_k$ is a stamp chain for $n$, then Algorithm~A computes the
values $y_1,\ldots,y_n$ using $k-1$ multiplications.  In order to
minimize the number of multiplications, we would like to find a stamp
chain as short as possible, with a range at least $n$.  Ideally, we
wish to identify an extremal stamp chain, since an extremal stamp
chain attains the maximum range for any given length $k$.

It may not be immediately clear how a stamp chain of a given length
could be found, other than by constructing stamp bases and checking
whether they also happen to be addition chains; or vice versa.
However, in this section we shall introduce a direct method for
converting any admissible stamp basis into a stamp chain.

\begin{definition}
  A stamp basis $A_k$ is {\it admissible} if it generates all integers
  in $[1,a_k]$.
\end{definition}

\begin{remark}
  If $A_k$ is admissible, and $1 &lt; c &lt; a_j$, then $c$ is generated by
  $A_{j-1}$.
\end{remark}

The following lemma is an already established result for stamp
bases \cite{challis1993}.
\begin{lemma}
  \label{lemma:admbasis}
  An extremal stamp basis is admissible.
\end{lemma}

A similar property holds for stamp chains.
\begin{lemma}
  \label{lemma:admchain}
  An extremal stamp chain is admissible.
\end{lemma}
\begin{proof}
  Let $A_k$ be a non-admissible stamp chain, and let $c = n(A_k)+1$,
  that is, $c$ is the smallest positive integer not generated by
  $A_k$.  It follows that $c-1$ is generated by $A_k$, and also that
  $c-1 \notin A_k$ (otherwise $c=1+(c-1)$ would be generated).  Let
  then $B_k = A_{k-1} \cup \{c-1\}$.  Now $B_k$ is a stamp basis that
  generates all integers in $[1, c]$, in particular it generates $c =
  1 + (c-1)$.  Thus $n(B_k) &gt; n(A_k)$.  Furthermore, since $c-1$ is
  generated by $A_k$ but not an element of it, it follows that $c-1 =
  a_h+a_i = b_h+b_i$ for some indices $h,i$.  Thus $B_k$ is also an
  addition chain.

  Since $B_k$ is a stamp chain with $n(B_k) &gt; n(A_k)$, it follows
  that $A_k$ is not extremal.
\end{proof}

Thus, in order to maximize the range of a stamp basis (stamp chain),
it is sufficient to consider only the admissible stamp bases (stamp
chains).

\begin{notation}
  If $A_k=\{a_1,\ldots,a_k\}$ is a set of integers and $s$ is an
  integer, then $A_k+s := \{a_1+s,\ldots,a_k+s\}$.
\end{notation}

\begin{lemma}
  \label{lemma:shift}
  If $A_k$ is a stamp basis for $n$, then $B_{k+1} = \{1\} \cup
  (A_k+1)$ is a stamp basis for $n+2$.
\end{lemma}
\begin{proof}
  Let $c \in [1, n+2]$ be arbitrary.  If $c \le 2$, then $B_{k+1}$
  generates it either as $b_1=1$, or as $b_1+b_1=1+1=2$.  If $c \ge
  3$, let $c'=c-2$.  Since $c' \in [1, n]$, there is either one stamp
  $a_h=c'$ or two stamps $a_h+a_i=c'$.  In the first case, $b_1 +
  b_{h+1} = 1 + (a_h+1) = c'+2 = c$.  In the second case,
  $b_{h+1}+b_{i+1} = (1+a_h)+(1+a_i) = c'+2 = c$.  This proves that
  $B_{k+1}$ generates $[1,n+2]$.
\end{proof}

Note that the previous lemma gives only a lower bound for the range of
the new basis (consider $A_2 = \{1,4\}$, which has $n(A_2)=2$ but
$n(B_3) = n(\{1,2,5\}) = 7 &gt; 2+2$).  However, for {\em admissible}
bases we have a stronger result in the following theorem.

\begin{theorem}
  \label{thm:main}
  If $A_k$ is an admissible stamp basis with range $n$, then $B_{k+1} =
  \{1\} \cup (A_k+1)$ is an admissible stamp chain with range $n+2$.
\end{theorem}
\begin{proof}
  By Lemma~\ref{lemma:shift}, $B_{k+1}$ is a stamp basis for $n+2$.
  Because $A_k$ is admissible, $n \ge a_k$, thus $n+2 \ge a_k+1 =
  b_{k+1}$, and $B_{k+1}$ is admissible.

  To prove that $B_{k+1}$ is also an addition chain, note first that by
  construction $b_1=1$.  Clearly $b_2 = 2 = b_1+b_1$ is generated by the
  prefix $B_1$.  Let then $3 \le j \le k+1$.  Since $A_k$ is admissible,
  $A_{j-2}$ generates $a_{j-1}-1$, and by Lemma~\ref{lemma:shift} the
  prefix $B_{j-1} = \{1\} \cup (A_{j-2}+1)$ generates $a_{j-1}+1 = b_j$.

  Finally, let us prove that $n(B_{k+1})$ does not exceed $n+2$, in
  particular, that $B_{k+1}$ does not generate $n+3$.  Since $A_k$ is
  admissible, $a_k \le n$, thus $b_{k+1} \le n+1$.  Thus $n+3 \notin
  B_{k+1}$.  Suppose then $n+3 = b_h + b_i$.  This would imply that
  $b_h, b_i &gt; 1$, and then $a_{h-1}+a_{i-1} = n+1$, contradicting the
  assumption that $n(A_k)=n$.
\end{proof}

While the construction in Theorem~\ref{thm:main} has the consequence
of extending the range of the stamp basis by 2, this is not the main
reason for the construction.  For our purposes the crucial consequence
of Theorem~\ref{thm:main} is that the new basis $B_{k+1}$ is
guaranteed to be an addition chain, even if $A_k$ is not.  This
ensures that $B_{k+1}$ can be used as a multiplication plan in
Algorithm~A.

\begin{example} 
  $A_5=\{1,3,5,7,8\}$ is an admissible stamp basis for $n=16$, but it is
  not an addition chain.  However, by Theorem~\ref{thm:main}, $B_6 =
  \{1\} \cup (A_5 + 1) = \{1,2,4,6,8,9\}$ is an admissible stamp chain
  for $n=18$.
\end{example}

Theorem \ref{thm:main} shows how to construct a stamp chain of length
$k$ from any admissible stamp basis of length $k-1$.  Conversely, we
shall prove that this construction produces {\em all} admissible stamp
chains of length $k&gt;1$.  For length $k=1$, the only stamp chain is
$B_1=\{1\}$.

\begin{theorem}
  \label{thm:converse}
  If $k&gt;1$ and $B_k$ is an admissible stamp chain with range $n$, then
  $A_{k-1} = \{b_2-1, \ldots, b_k-1\}$ is an admissible stamp basis with
  range $n-2$.
\end{theorem}
\begin{proof}
  We will first prove that $A_{k-1}$ generates all integers in
  $[1,n-2]$.  Since by assumption $B_k$ is an addition chain, its
  smallest two elements must be 1 and 2.  Thus $a_1 = b_2-1 = 1$, and
  $A_{k-1}$ generates $1$ and $2$.

  Let $c \in [3,n-2]$ be arbitrary, and let $c' = c+2$.  Since $B_k$
  is a stamp basis, $c'$ is generated either by one stamp $b_j=c'$ or
  by two stamps $b_h+b_i=c'$.  But in the first case, $c' = b_j =
  b_h+b_i$ for some $h,i &lt; j$, because $B_k$ is an addition chain.
  Thus in either case we have $c' = b_h+b_i$ for some $h,i$.  Without
  loss of generality we may assume $h \ge i$.  Now consider separately
  the possibilities $i=1$ and $i&gt;1$.

  If $i=1$, then $b_i=1$, and $c = c'-2 = b_h+b_i-2 = b_h-1 = a_{h-1}$
  is generated by a single stamp $a_{h-1}$.  Note that we have
  necessarily $h&gt;1$, so $a_{h-1}$ indeed exists.  This is because we
  have assumed that $c \ge 3$, and consequently $b_h+b_i = c' \ge 5$
  implying that $b_h \ge 4$.

  If $i&gt;1$, then $b_i&gt;1$, and $c = c'-2 = b_h+b_i-2 = (b_h-1)+(b_i-1)
  = a_{h-1}+a_{i-1}$, so $c$ is generated by the two stamps $a_{h-1}$
  and $a_{i-1}$.  Note that, by assumption, $h \ge i &gt; 1$, so the
  stamps $a_{h-1}$ and $a_{i-1}$ indeed exist.

  We have now proven that any $c \in [1, n-2]$ is generated by either
  one or two stamps from $A_{k-1}$.  In other words, $A_{k-1}$ is
  a stamp basis with range at least $n-2$.
  
  Since by assumption $n(B_k)=n$ exactly, it follows that $B_k$ does
  not generate $n+1$.  From this it follows that $b_k &lt; n$, thus
  $a_{k-1} &lt; n-1$.  Hence $A_{k-1}$ does not generate $n-1$, and the
  range is $n(A_{k-1}) = n-2$ exactly.

  Finally, since $n(A_{k-1}) = n-2 &gt; b_k-2 = a_{k-1}-1$, it follows
  that $A_{k-1}$ is admissible.
\end{proof}

By Theorems~\ref{thm:main} and \ref{thm:converse}, admissible stamp
bases of length $k$ and range $n$ are in one-to-one correspondence
with admissible stamp chains of length $k+1$ and range $n+2$.  Since
extremal stamp bases and extremal stamp chains are always admissible,
we have the following corollaries for all $k&gt;1$.

\begin{corollary}
  \label{cor:extremal}
  $B_k$ is an extremal stamp chain if and only if $B_k = \{1\} \cup
  (A_{k-1}+1)$, where $A_{k-1}$ is an extremal stamp basis.  Then also
  their ranges are related as $n(B_k) = n(A_{k-1}) + 2$.
\end{corollary}

\begin{corollary}
  \label{cor:range}
  $\nbar(k) = n(k-1) + 2$.
\end{corollary}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Some properties of stamp chains}
\label{sec:known}
Known properties of (extremal) stamp bases carry over naturally to
(extremal) stamp chains.  For example, some asymptotic lower and upper
bounds for $n(k)$ are known \cite{guy2004}:
\begin{equation*}
  \frac{2}{7} k^2 + O(k) \le n(k) \le 0.4802 k^2 + O(k).
\end{equation*}
Since $\nbar(k) = n(k-1)+2$ by Corollary~\ref{cor:range}, it follows
that also
\begin{equation*}
  \frac{2}{7} k^2 + O(k) \le \nbar(k) \le 0.4802 k^2 + O(k).
\end{equation*}
This means that for large $n$, roughly $\sqrt{(7/2) n}$
multiplications are sufficient to compute $y_1,\ldots,y_n$ through
Algorithm~A.

\begin{table}[H]
\begin{tabular}{l}
\hline
1   3   4   6  10  13  15  21  29  37  45  53  61  69  77  85  91  93  96 100 102 103 105 106 * \\
1   3   4   6  10  13  15  21  29  37  45  53  61  69  77  85  93  97  99 102 103 104 106 108 \\
1   3   4   6  10  13  15  21  29  37  45  53  61  69  77  85  93  97  99 102 103 106 108 112 \\
\hline
\end{tabular}
\caption{The extremal bases of length $24$.  The basis marked with * is symmetric.}
\label{table:newbases}
\end{table}

All extremal stamp bases of lengths $k = 1,\ldots,23$ are previously
known.  Challis and Robinson list them for $k=3,\ldots,22$
\cite[pp.~7--8]{challis2010}, and for $k=23$ in an addendum.  We have
computed the extremal stamp bases of length $k=24$, using an
exhaustive search based on the algorithm described by Challis
\cite{challis1993}.  The search took 606 CPU days on parallel 2.6~GHz
AMD~Opteron processors.  The new extremal bases have range 212, and
are shown in Table~\ref{table:newbases}.  Note that the symmetric
basis appears already in Mossige's list of symmetric bases
\cite{mossige1981}, but until now it was not known to be extremal.

Extremal stamp chains of lengths $k=2,\ldots,25$ can be constructed
from known extremal stamp bases by Corollary~\ref{cor:extremal}.
Since $\nbar(25) = n(24)+2 = 214$, these chains provide the
minimum-length multiplication plans for computing $y_1,\ldots,y_n$ for
$n \le 214$.

\begin{table}[H]
  %
  % Printed with Matlab script ADPOST_TABLE1.M
  % Stamp bases from Challis (2010)
  % Stamp chains created via Theorem 1
  %
  \centering
  \begin{tabular}{rrl|rrl}
    $k$&amp; $n(k)$ &amp; stamp basis &amp;
    $k$&amp; $\nbar(k)$ &amp; stamp chain \\
    \hline
    1 &amp;  2 &amp;   1                             &amp;   2 &amp;  4 &amp;   1  2                            \\ 
    2 &amp;  4 &amp;   1  3                          &amp;   3 &amp;  6 &amp;   1  2  4                         \\ 
    3 &amp;  8 &amp;   1  3  4                       &amp;   4 &amp; 10 &amp;   1  2  4  5                      \\ 
    4 &amp; 12 &amp;   1  3  5  6                    &amp;   5 &amp; 14 &amp;   1  2  4  6  7                   \\ 
    5 &amp; 16 &amp;   1  3  5  7  8                 &amp;   6 &amp; 18 &amp;   1  2  4  6  8  9                \\ 
    6 &amp; 20 &amp;   1  2  5  8  9 10              &amp;   7 &amp; 22 &amp;   1  2  3  6  9 10 11             \\ 
    7 &amp; 26 &amp;   1  2  5  8 11 12 13           &amp;   8 &amp; 28 &amp;   1  2  3  6  9 12 13 14          \\ 
    8 &amp; 32 &amp;   1  2  5  8 11 14 15 16        &amp;   9 &amp; 34 &amp;   1  2  3  6  9 12 15 16 17       \\ 
  \end{tabular}
  \caption{Some extremal stamp bases for $k\le 8$, and the corresponding
    extremal stamp chains for $k\le 9$.}
  \label{table:chains}
\end{table}

\begin{table}[H]
  %
  % Printed with Matlab script ADPOST_TABLE2.M
  %
  \centering
  \begin{tabular}{rr|rr|rr}
    $k$&amp; $\nbar(k)$ &amp; $k$&amp; $\nbar(k)$ &amp; $k$&amp; $\nbar(k)$ \\
    \hline
    1  &amp;   2 &amp;      11 &amp;  48 &amp;       21 &amp; 154 \\
    2  &amp;   4 &amp;      12 &amp;  56 &amp;       22 &amp; 166 \\
    3  &amp;   6 &amp;      13 &amp;  66 &amp;       23 &amp; 182 \\
    4  &amp;  10 &amp;      14 &amp;  74 &amp;       24 &amp; 198 \\
    5  &amp;  14 &amp;      15 &amp;  82 &amp;       25 &amp; 214 \\
    6  &amp;  18 &amp;      16 &amp;  94 \\
    7  &amp;  22 &amp;      17 &amp; 106 \\
    8  &amp;  28 &amp;      18 &amp; 118 \\
    9  &amp;  34 &amp;      19 &amp; 130 \\
    10 &amp;  42 &amp;      20 &amp; 142 \\
   \end{tabular}
  \caption{Known values of $\nbar$.}
  \label{table:nbar}
\end{table}

The connection between stamp bases and stamp chains is illustrated in
Table~\ref{table:chains}, which contains one extremal stamp basis for
each $k=1,\ldots,8$, and the corresponding extremal stamp chain
constructed by Corollary~\ref{cor:extremal}.  In
Table~\ref{table:nbar} we list all known values of $\nbar(k)$.  They
were computed by applying Corollary~\ref{cor:range} to the ranges of
previously known extremal stamp bases (see \cite{challis2010} and
\seqnum{A001212} in \cite{oeis})
of our new $k=24$ stamp bases.  A listing of known extremal stamp
bases and extremal stamp chains can be found in
Tables~\ref{table:allbases} and~\ref{table:allchains} at the end of
this article.

Several authors have observed that many extremal stamp bases (but not
all) are symmetric in the sense that $a_i + a_{k-i} = a_k$ for all
$i=1,\ldots,k-1$.  The corresponding extremal stamp chains are then,
by construction, symmetric in the sense that $a_i + a_{k+1-i} = a_1 +
a_k$ for all $i=1,\ldots,k$.  Symmetric stamp bases up to $k=30$ are
reported by Mossige \cite{mossige1981}.

If a stamp chain is needed for $n$ so large that no extremal stamp
basis is currently known for $n-2$, one can instead take any
admissible stamp basis and convert it into an admissible stamp chain
using Theorem~\ref{thm:main}.  Very good admissible stamp bases
(although not necessarily extremal) for up to $k=82$ and $n=2100$ are
listed by Challis and Robinson \cite[p. 6]{challis2010}.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{An application to subset convolution}
\label{sec:convolution}
The multiplication in Algorithm~A may in general be any associative
binary operation.  In the introduction a simple example related to
matrix multiplication was mentioned. Here, we consider a more detailed
application to a data clustering problem.

In previous work \cite{kohonen2013}, we have considered a class of
Bayesian probability models where $N$ items of data belong to $c$
clusters, such that $c$ is an unknown integer in the range
$1,\ldots,n$, and $n \le N$.  The exact posterior distribution for
$c$ is computed using an algorithm whose time requirement is
exponential in $N$.  The algorithm first computes a likelihood
function $f$ for each possible cluster, that is, for each subset of
$\{1,\ldots,N\}$.  This computation takes time $O(2^N)$, and its
result is a table of $2^N$ numbers.

The next, and the most time-consuming step of the algorithm is to
compute successively the values of $f_2 = f*f, f_3 = f_2 * f, \ldots,
f_n = f_{n-1} * f$, where $*$ is an operation called subset
convolution. Subset convolution takes as its input two functions, each
represented by a table of $2^N$ numbers, and computes another such
function.  The operation is associative, so for the current purposes
it is a multiplication.  A single subset convolution takes either
$O(3^N)$ or $O(2^NN^2)$ time, depending on the algorithm used.

However, to obtain the posterior probability for $c$, 
the full tables $f_1, \ldots, f_n$ are actually not needed. Instead, we only need the
last element from each table, corresponding to $f_c(U)$, where
$U=\{1,\ldots,N\}$ is the set of all data items.  Thus, it is necessary to compute the values of
$y_c = u(f_c) := f_c(U)$, for $c=1,\ldots,n$.  Furthermore, if $f_a$
and $f_b$ have been fully computed, and $c=a+b$, then the single value
$f_c(U) = (f_a * f_b)(U)$ can be computed in only $O(2^N)$ time.  Hence,
computing $v(f_a, f_b) := u(f_a * f_b)$ is also fast, compared to
performing the full subset convolution $f_a * f_b$.

Since $u$ and $v$ are much faster to compute than $*$, our aim is to find
a minimal set of values of $c$, for which the full subset convolution
$f_c$ is computed, since for these values, $y_c = u(f_c(U))$ then refers to only a
table lookup.  For other $c \in [1,\ldots,n]$, the quantity $y_c$ is
computed as $v(f_i, f_j)$, where $f_i$ and $f_j$ have been computed in
full.  The end result is that $y_1,\ldots,y_n$ are obtained with only
$k-1$ subset convolutions, where $k$ is the length of a stamp chain
for $n$.  In comparison, the straightforward algorithm performs $n-1$
subset convolutions.

To provide a concrete example, for $N=20$ and $n=20$ straightforward
multiplication performs $n-1 = 19$ subset convolutions to compute
$f_2,\ldots,f_{20}$, which takes approximately 7 minutes of CPU time
on a 2.4~GHz AMD~Opteron processor.  However, from
Table~\ref{table:chains} we find an extremal stamp chain
\begin{equation*}
  B_7 = \{1, 2, 3, 6, 9, 10, 11\},
\end{equation*}
which has range $22 \ge n$.  Using this chain and Algorithm~A, only
$6$ subset convolutions are required:
\begin{align*}
  f_2 &amp;= f * f \\
  f_3 &amp;= f_2 * f \\
  f_6 &amp;= f_3 * f_3 \\
  f_9 &amp;= f_6 * f_3 \\
  f_{10} &amp;= f_9 * f \\
  f_{11} &amp;= f_{10} * f \\
\end{align*}
Consequently, the posterior distribution for $c$ is obtained in about
one third ($6/19$) of the time required by the straightforward
algorithm.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Discussion}
The existing bodies of literature on both addition chains and on
postage stamps are substantial.  However, this far they seem to be
almost completely disjoint.  We have here explored the connection
between these two concepts, and presented a theorem establishing a
relationship between addition chains and stamp bases. The theorem
provides a way to construct an optimal procedure to perform certain
multiplicative computational operations, illustrated by an application
to data clustering using subset convolution. As a future research
topic, it would be interesting to explore possible other useful
connections between addition chains and the postage stamp problem.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Acknowledgments}
This research was funded by the ERC grant no. 239784 and AoF grant no. 251170.

The authors wish to thank the anonymous referee for invaluable
comments and corrections.

            
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Full basis and chain tables printed with Matlab script ADPOST_TABLE34.M

\begin{table}[H]
  \centering
  \small
  \setlength{\tabcolsep}{1.6pt}
  \begin{tabular}{rr|rrrrrrrrrrrrrrrrrrrrrrrrr}
    $k$ &amp; $n(k)$ &amp;&amp; \multicolumn{10}{l}{stamp basis}\\
    \hline
 1 &amp;   2 &amp;&amp;   1  \\ 
 2 &amp;   4 &amp;&amp;   1 &amp;   3  \\ 
 3 &amp;   8 &amp;&amp;   1 &amp;   3 &amp;   4  \\ 
 4 &amp;  12 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   6  \\ 
 5 &amp;  16 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   7 &amp;   8  \\ 
 6 &amp;  20 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   7 &amp;   9 &amp;  10  \\ 
 6 &amp;  20 &amp;&amp;   1 &amp;   2 &amp;   5 &amp;   8 &amp;   9 &amp;  10  \\ 
 6 &amp;  20 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   8 &amp;   9 &amp;  11  \\ 
 6 &amp;  20 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   6 &amp;  13 &amp;  14  \\ 
 6 &amp;  20 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  11 &amp;  16  \\ 
 7 &amp;  26 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  10 &amp;  12 &amp;  13  \\ 
 7 &amp;  26 &amp;&amp;   1 &amp;   2 &amp;   5 &amp;   8 &amp;  11 &amp;  12 &amp;  13  \\ 
 7 &amp;  26 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   7 &amp;   8 &amp;  17 &amp;  18  \\ 
 8 &amp;  32 &amp;&amp;   1 &amp;   2 &amp;   5 &amp;   8 &amp;  11 &amp;  14 &amp;  15 &amp;  16  \\ 
 8 &amp;  32 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   7 &amp;   9 &amp;  10 &amp;  21 &amp;  22  \\ 
 9 &amp;  40 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  11 &amp;  16 &amp;  17 &amp;  19 &amp;  20  \\ 
10 &amp;  46 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   7 &amp;  11 &amp;  15 &amp;  19 &amp;  21 &amp;  22 &amp;  24  \\ 
10 &amp;  46 &amp;&amp;   1 &amp;   2 &amp;   5 &amp;   7 &amp;  11 &amp;  15 &amp;  19 &amp;  21 &amp;  22 &amp;  24  \\ 
11 &amp;  54 &amp;&amp;   1 &amp;   3 &amp;   5 &amp;   6 &amp;  13 &amp;  14 &amp;  21 &amp;  22 &amp;  24 &amp;  26 &amp;  27  \\ 
11 &amp;  54 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  11 &amp;  16 &amp;  18 &amp;  23 &amp;  24 &amp;  26 &amp;  27  \\ 
11 &amp;  54 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   7 &amp;  11 &amp;  15 &amp;  19 &amp;  23 &amp;  25 &amp;  26 &amp;  28  \\ 
11 &amp;  54 &amp;&amp;   1 &amp;   2 &amp;   5 &amp;   7 &amp;  11 &amp;  15 &amp;  19 &amp;  23 &amp;  25 &amp;  26 &amp;  28  \\ 
12 &amp;  64 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  11 &amp;  16 &amp;  21 &amp;  23 &amp;  28 &amp;  29 &amp;  31 &amp;  32  \\ 
13 &amp;  72 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  11 &amp;  16 &amp;  20 &amp;  25 &amp;  27 &amp;  32 &amp;  33 &amp;  35 &amp;  36  \\ 
14 &amp;  80 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  35 &amp;  36 &amp;  37 &amp;  39 &amp;  40  \\ 
14 &amp;  80 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   9 &amp;  10 &amp;  15 &amp;  16 &amp;  21 &amp;  22 &amp;  24 &amp;  25 &amp;  51 &amp;  53 &amp;  55  \\ 
14 &amp;  80 &amp;&amp;   1 &amp;   2 &amp;   5 &amp;   8 &amp;  11 &amp;  14 &amp;  17 &amp;  20 &amp;  23 &amp;  24 &amp;  25 &amp;  51 &amp;  53 &amp;  55  \\ 
15 &amp;  92 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  41 &amp;  42 &amp;  43 &amp;  45 &amp;  46  \\ 
16 &amp; 104 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  44 &amp;  47 &amp;  48 &amp;  49 &amp;  51 &amp;  52  \\ 
17 &amp; 116 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  44 &amp;  50 &amp;  53 &amp;  54 &amp;  55 &amp;  57 &amp;  58  \\ 
18 &amp; 128 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  44 &amp;  50 &amp;  56 &amp;  59 &amp;  60 &amp;  61 &amp;  63 &amp;  64  \\ 
19 &amp; 140 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  44 &amp;  50 &amp;  56 &amp;  62 &amp;  65 &amp;  66 &amp;  67 &amp;  69 &amp;  70  \\ 
20 &amp; 152 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  44 &amp;  50 &amp;  56 &amp;  62 &amp;  68 &amp;  71 &amp;  72 &amp;  73 &amp;  75 &amp;  76  \\ 
21 &amp; 164 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  67 &amp;  69 &amp;  72 &amp;  76 &amp;  78 &amp;  79 &amp;  81 &amp;  82  \\ 
21 &amp; 164 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   5 &amp;   8 &amp;  14 &amp;  20 &amp;  26 &amp;  32 &amp;  38 &amp;  44 &amp;  50 &amp;  56 &amp;  62 &amp;  68 &amp;  74 &amp;  77 &amp;  78 &amp;  79 &amp;  81 &amp;  82  \\ 
21 &amp; 164 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  73 &amp;  75 &amp;  78 &amp;  79 &amp;  80 &amp;  82 &amp;  84  \\ 
21 &amp; 164 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  73 &amp;  75 &amp;  78 &amp;  79 &amp;  82 &amp;  84 &amp;  88  \\ 
22 &amp; 180 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  75 &amp;  77 &amp;  80 &amp;  84 &amp;  86 &amp;  87 &amp;  89 &amp;  90  \\ 
22 &amp; 180 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  81 &amp;  83 &amp;  86 &amp;  87 &amp;  88 &amp;  90 &amp;  92  \\ 
22 &amp; 180 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  81 &amp;  83 &amp;  86 &amp;  87 &amp;  90 &amp;  92 &amp;  96  \\ 
23 &amp; 196 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  83 &amp;  85 &amp;  88 &amp;  92 &amp;  94 &amp;  95 &amp;  97 &amp;  98  \\ 
23 &amp; 196 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  85 &amp;  89 &amp;  91 &amp;  94 &amp;  95 &amp;  96 &amp;  98 &amp; 100  \\ 
23 &amp; 196 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  85 &amp;  89 &amp;  91 &amp;  94 &amp;  95 &amp;  98 &amp; 100 &amp; 104  \\ 
24 &amp; 212 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  85 &amp;  91 &amp;  93 &amp;  96 &amp; 100 &amp; 102 &amp; 103 &amp; 105 &amp; 106  \\ 
24 &amp; 212 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  85 &amp;  93 &amp;  97 &amp;  99 &amp; 102 &amp; 103 &amp; 104 &amp; 106 &amp; 108  \\ 
24 &amp; 212 &amp;&amp;   1 &amp;   3 &amp;   4 &amp;   6 &amp;  10 &amp;  13 &amp;  15 &amp;  21 &amp;  29 &amp;  37 &amp;  45 &amp;  53 &amp;  61 &amp;  69 &amp;  77 &amp;  85 &amp;  93 &amp;  97 &amp;  99 &amp; 102 &amp; 103 &amp; 106 &amp; 108 &amp; 112  \\ 
  \end{tabular}
  \caption{Extremal stamp bases for $k=1,\ldots,24$ and their ranges.}
  \label{table:allbases}
\end{table}

\begin{table}[H]
  \centering
  \small
  \setlength{\tabcolsep}{1.35pt}
  \begin{tabular}{rr|rrrrrrrrrrrrrrrrrrrrrrrrrr}
    $k$ &amp; $\nbar(k)$ &amp;&amp; \multicolumn{10}{l}{stamp chain}\\
    \hline
 2 &amp;   4 &amp;&amp;   1 &amp;   2  \\ 
 3 &amp;   6 &amp;&amp;   1 &amp;   2 &amp;   4  \\ 
 4 &amp;  10 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5  \\ 
 5 &amp;  14 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   7  \\ 
 6 &amp;  18 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   8 &amp;   9  \\ 
 7 &amp;  22 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   8 &amp;  10 &amp;  11  \\ 
 7 &amp;  22 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   6 &amp;   9 &amp;  10 &amp;  11  \\ 
 7 &amp;  22 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   9 &amp;  10 &amp;  12  \\ 
 7 &amp;  22 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   7 &amp;  14 &amp;  15  \\ 
 7 &amp;  22 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  12 &amp;  17  \\ 
 8 &amp;  28 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  11 &amp;  13 &amp;  14  \\ 
 8 &amp;  28 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   6 &amp;   9 &amp;  12 &amp;  13 &amp;  14  \\ 
 8 &amp;  28 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   8 &amp;   9 &amp;  18 &amp;  19  \\ 
 9 &amp;  34 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   6 &amp;   9 &amp;  12 &amp;  15 &amp;  16 &amp;  17  \\ 
 9 &amp;  34 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   8 &amp;  10 &amp;  11 &amp;  22 &amp;  23  \\ 
10 &amp;  42 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  12 &amp;  17 &amp;  18 &amp;  20 &amp;  21  \\ 
11 &amp;  48 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   4 &amp;   8 &amp;  12 &amp;  16 &amp;  20 &amp;  22 &amp;  23 &amp;  25  \\ 
11 &amp;  48 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   6 &amp;   8 &amp;  12 &amp;  16 &amp;  20 &amp;  22 &amp;  23 &amp;  25  \\ 
12 &amp;  56 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   6 &amp;   7 &amp;  14 &amp;  15 &amp;  22 &amp;  23 &amp;  25 &amp;  27 &amp;  28  \\ 
12 &amp;  56 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  12 &amp;  17 &amp;  19 &amp;  24 &amp;  25 &amp;  27 &amp;  28  \\ 
12 &amp;  56 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   4 &amp;   8 &amp;  12 &amp;  16 &amp;  20 &amp;  24 &amp;  26 &amp;  27 &amp;  29  \\ 
12 &amp;  56 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   6 &amp;   8 &amp;  12 &amp;  16 &amp;  20 &amp;  24 &amp;  26 &amp;  27 &amp;  29  \\ 
13 &amp;  66 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  12 &amp;  17 &amp;  22 &amp;  24 &amp;  29 &amp;  30 &amp;  32 &amp;  33  \\ 
14 &amp;  74 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  12 &amp;  17 &amp;  21 &amp;  26 &amp;  28 &amp;  33 &amp;  34 &amp;  36 &amp;  37  \\ 
15 &amp;  82 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  36 &amp;  37 &amp;  38 &amp;  40 &amp;  41  \\ 
15 &amp;  82 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;  10 &amp;  11 &amp;  16 &amp;  17 &amp;  22 &amp;  23 &amp;  25 &amp;  26 &amp;  52 &amp;  54 &amp;  56  \\ 
15 &amp;  82 &amp;&amp;   1 &amp;   2 &amp;   3 &amp;   6 &amp;   9 &amp;  12 &amp;  15 &amp;  18 &amp;  21 &amp;  24 &amp;  25 &amp;  26 &amp;  52 &amp;  54 &amp;  56  \\ 
16 &amp;  94 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  42 &amp;  43 &amp;  44 &amp;  46 &amp;  47  \\ 
17 &amp; 106 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  45 &amp;  48 &amp;  49 &amp;  50 &amp;  52 &amp;  53  \\ 
18 &amp; 118 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  45 &amp;  51 &amp;  54 &amp;  55 &amp;  56 &amp;  58 &amp;  59  \\ 
19 &amp; 130 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  45 &amp;  51 &amp;  57 &amp;  60 &amp;  61 &amp;  62 &amp;  64 &amp;  65  \\ 
20 &amp; 142 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  45 &amp;  51 &amp;  57 &amp;  63 &amp;  66 &amp;  67 &amp;  68 &amp;  70 &amp;  71  \\ 
21 &amp; 154 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  45 &amp;  51 &amp;  57 &amp;  63 &amp;  69 &amp;  72 &amp;  73 &amp;  74 &amp;  76 &amp;  77  \\ 
22 &amp; 166 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  68 &amp;  70 &amp;  73 &amp;  77 &amp;  79 &amp;  80 &amp;  82 &amp;  83  \\ 
22 &amp; 166 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   6 &amp;   9 &amp;  15 &amp;  21 &amp;  27 &amp;  33 &amp;  39 &amp;  45 &amp;  51 &amp;  57 &amp;  63 &amp;  69 &amp;  75 &amp;  78 &amp;  79 &amp;  80 &amp;  82 &amp;  83  \\ 
22 &amp; 166 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  74 &amp;  76 &amp;  79 &amp;  80 &amp;  81 &amp;  83 &amp;  85  \\ 
22 &amp; 166 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  74 &amp;  76 &amp;  79 &amp;  80 &amp;  83 &amp;  85 &amp;  89  \\ 
23 &amp; 182 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  76 &amp;  78 &amp;  81 &amp;  85 &amp;  87 &amp;  88 &amp;  90 &amp;  91  \\ 
23 &amp; 182 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  82 &amp;  84 &amp;  87 &amp;  88 &amp;  89 &amp;  91 &amp;  93  \\ 
23 &amp; 182 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  82 &amp;  84 &amp;  87 &amp;  88 &amp;  91 &amp;  93 &amp;  97  \\ 
24 &amp; 198 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  84 &amp;  86 &amp;  89 &amp;  93 &amp;  95 &amp;  96 &amp;  98 &amp;  99  \\ 
24 &amp; 198 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  86 &amp;  90 &amp;  92 &amp;  95 &amp;  96 &amp;  97 &amp;  99 &amp; 101  \\ 
24 &amp; 198 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  86 &amp;  90 &amp;  92 &amp;  95 &amp;  96 &amp;  99 &amp; 101 &amp; 105  \\ 
25 &amp; 214 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  86 &amp;  92 &amp;  94 &amp;  97 &amp; 101 &amp; 103 &amp; 104 &amp; 106 &amp; 107  \\ 
25 &amp; 214 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  86 &amp;  94 &amp;  98 &amp; 100 &amp; 103 &amp; 104 &amp; 105 &amp; 107 &amp; 109  \\ 
25 &amp; 214 &amp;&amp;   1 &amp;   2 &amp;   4 &amp;   5 &amp;   7 &amp;  11 &amp;  14 &amp;  16 &amp;  22 &amp;  30 &amp;  38 &amp;  46 &amp;  54 &amp;  62 &amp;  70 &amp;  78 &amp;  86 &amp;  94 &amp;  98 &amp; 100 &amp; 103 &amp; 104 &amp; 107 &amp; 109 &amp; 113  \\ 
  \end{tabular}
  \caption{Extremal stamp chains for $k=2,\ldots,25$ and their ranges.}
  \label{table:allchains}
\end{table}

\begin{thebibliography}{5}
  
\bibitem{challis1993} M. F. Challis, Two new techniques for computing
  extremal $h$-bases $A_k$, {\em Computer J.} {\bf 36} (1993),
  117--126.
  
\bibitem{challis2010} M. F. Challis and J. P. Robinson, Some extremal
  postage stamp bases, {\em J. Integer Seq.} {\bf 13} (2010),
  \href{https://cs.uwaterloo.ca/journals/JIS/VOL13/Challis/challis6.html}{Article 10.2.3}.  \href{https://cs.uwaterloo.ca/journals/JIS/VOL13/Challis/challis6-new.pdf}{Addendum}, 2013.

\bibitem{guy2004} R. Guy, {\em Unsolved Problems in Number Theory},
  2nd edition, Springer-Verlag, 2004.
  
\bibitem{knuth1969} D. E. Knuth, {\em The Art of Computer
  Programming. Volume 2: Seminumerical Algorithms}, Addison--Wesley,
  1969.
  
\bibitem{kohonen2013} J. Kohonen and J. Corander, Computing exact
  clustering posteriors with subset convolution,  submitted, 2013.
Available at \url{http://arxiv.org/abs/1310.1034}.
  
\bibitem{mossige1981} S. Mossige, Algorithms for computing the
  $h$-range of the postage stamp problem, {\em Math. Comp.} {\bf 36}
  (1981), 575--582.

\bibitem{selmer1986} E. S. Selmer, {\em The local postage stamp
  problem. Part 1: general theory}, Technical report no.~42,
  Department of Pure Mathematics, University of Bergen, 1986.

\bibitem{oeis} N. J. A. Sloane, On-Line Encyclopedia of Integer Sequences,
\url{http://oeis.org}.

\end{thebibliography}

\bigskip
\hrule
\bigskip
\noindent 2000 {\it Mathematics Subject Classification}:
Primary 11B13.

\noindent \emph{Keywords: } additive basis, addition chain, matrix
multiplication, subset convolution.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences 
\seqnum{A001212} and
\seqnum{A234941}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received October 24 2013;
revised version received February 3 2014. 
Published in {\it Journal of Integer Sequences}, February 15 2014.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

                                                                                

</pre></body></html>