Frobenius Coin-Exchange Generating Functions
Leonardo Bardomero, Matthias Beck

TL;DR
This paper explores generating functions related to the Frobenius coin-exchange problem, providing closed-form solutions for cases with two parameters and for integers with exactly k representations, advancing understanding of integer representability.
Contribution
It derives closed-form generating functions for the Frobenius problem and for integers with exactly k representations, extending previous results and offering new formulas and corollaries.
Findings
Closed-form generating function for two-parameter Frobenius problem
Explicit formula for integers with exactly k representations
Wide-ranging corollaries for integer representability
Abstract
We study variants of the \emph{Frobenius coin-exchange problem}: given positive relatively prime parameters, what is the largest integer that cannot be represented as a nonnegative integral linear combination of the given integers? This problem and its siblings can be understood through generating functions with 0/1 coefficients according to whether or not an integer is representable. In the 2-parameter case, this generating function has an elegant closed form, from which many corollaries follow, including a formula for the Frobenius problem. We establish a similar closed form for the generating function indicating all integers with exactly representations, with similar wide-ranging corollaries.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Frobenius Coin-Exchange Generating Functions
Leonardo Bardomero
and
Matthias Beck
Department of Mathematics
San Francisco State University
San Francisco, CA 94132
U.S.A.
[josebardomero,becksfsu]@gmail.com
(Date: 13 May 2019, to appear in the American Mathematical Monthly)
Abstract.
We study variants of the Frobenius coin-exchange problem: Given positive relatively prime parameters, what is the largest integer that cannot be represented as a nonnegative integral linear combination of the given integers? This problem and its siblings can be understood through generating functions with 0/1 coefficients according to whether or not an integer is representable. In the 2-parameter case, this generating function has an elegant closed form, from which many corollaries follow, including a formula for the Frobenius problem. We establish a similar closed form for the generating function indicating all integers with exactly representations, with similar wide-ranging corollaries.
Key words and phrases:
Linear Diophantine problem of Frobenius, coin-exchange problem, Frobenius number, generating function.
2010 Mathematics Subject Classification:
Primary 11D07; Secondary 05A15, 05A17.
We thank Federico Ardila, Yitwah Cheung, two anonymous referees, and the Monthly editors for insightful comments about this work.
1. The Story
Imagine we replace the penny in the US currency coins by a 7-cent coin. One might argue that the resulting new coin system is a bit less practical than the old, but it is also more (mathematically) interesting: now there are some cent amounts (such as 3 and 8 cents) that cannot be made up using our coins. On the other hand, it is a charming exercise—because 5 and 7 happen to be relatively prime—that every sufficiently large amount of money can be changed; in fact, there are twelve cent amounts that cannot be made up with 5- and 7-cent coins, the largest being 23 cents. (The simple fact that 5 and 7 are relatively prime is crucial—if the greatest common divisor of our coin denominations were , we could not change any amount that is not a multiple of .)
Naturally, nothing stops us (mathematicians) from generalizing this setting, and so for fixed positive relatively prime integers , (that is, ), we say that a nonnegative integer is -representable if
[TABLE]
for some . Let be the set of all positive integers that are not -representable. Because are relatively prime, is finite, and so three natural questions about this set are:
- •
What is the largest number in ?
- •
What is the cardinality of ?
- •
What is the sum of all elements in ?
The first question is the linear Diophantine problem of Frobenius (it has many alternative names, such as the coin-exchange problem and the chicken nuggets problem), and its solution is called the Frobenius number of the parameter set . One of the appealing aspects of the Frobenius problem and its variants is that they can be easily explained. There are many reasons to be interested in the set for fixed ; the mathematical basis is the semigroup generated by , and then . For details about the Frobenius problem, including numerous applications, we recommend two classic Monthly articles [15, 23] and the monograph [18].
Our three questions about are, in general, wide open, but they have strikingly simple answers for :
- •
;
- •
;
- •
.
The first two formulas go back to at least Sylvester; his paper [21] gives both and a clear indication that he knew . The third formula is much younger and seems to have first been proved by Brown–Shiue [7]. One can derive all three formulas at once from the following generating function identity.
Theorem 1**.**
Given relatively prime positive integers and , let . Then
[TABLE]
Theorem 1 seems to have first been proved by Székely–Wormald [22] and independently by Sertöz–Özlük [19]; its usefulness to our three original questions were noticed already in the aforementioned [7]: namely, we observe that
[TABLE]
is a polynomial disguised as a rational function, and since
- •
equals the degree of ,
- •
, and
- •
,
the formulas stated above can be computed by a (patient) calculus student. Theorem 1 is at the heart of this article, and in the interest of self-containment, we will give a proof below. It is a curious fact—and one that is the subject of the Monthly papers [8, 14]—that we have the alternative form
[TABLE]
where denotes the th cyclotomic polynomial.
Our goal is to extend the machinery provided by Theorem 1 and its consequences to a recent variant of the Frobenius problem that has attracted some attention in the research community. Namely, we consider the set consisting of all integers with exactly representations in the form (1), and ask for
- •
the largest number in ,
- •
the cardinality of , and
- •
the sum of all elements in .
These are, naturally, hard questions, but there are again answers for , both proved in [4]:111 The formula for appears differently in [4]; the difference stems from considering positive vs. nonnegative integers.
- •
- •
for .
Our main contribution is the following generalization of Theorem 1, which will, among other things, allow us to add the missing third bulleted item to the above list.
Theorem 2**.**
Given relatively prime positive integers and , let consist of all integers with more than representations in the form with . Then
[TABLE]
Consequently, for , the polynomial indicating all integers with exactly representations is
[TABLE]
Naturally, this theorem gives an alternative proof for the above formulas for (by computing the degree of ) and (by computing ), and because , Theorem 2 yields:
Corollary 3**.**
Let and be relatively prime positive integers and . Then
But Theorem 2 reveals more, namely, that the integers in (for ) are aligned in a highly structured way, as we may write
[TABLE]
Figure 1 illustrates how the sets are intertwined.
As an analogue to computing higher moments in statistics, it is natural to ask for higher power sums, or at least their nature. To this extent, we define
[TABLE]
and offer Theorem 4 below involving the Bernoulli polynomials , defined as usual through
[TABLE]
(see, e.g., [5, Section 2.4]). The first few Bernoulli polynomials are
[TABLE]
The crucial property of Bernoulli polynomials that we will need is (see, e.g., [5, Lemma 2.3])
[TABLE]
Theorem 4**.**
Let and be relatively prime positive integers, , and . Then
[TABLE]
This generalizes the above results for (which is the case ) and (the case ), and it gives the asymptotic statement that is a polynomial in of degree with leading coefficient .
There are other concepts and results hidden in our generating functions. To give a taste, we recall that consists of all integers with more than representations in the form (1), for general . Thus consists of all nonnegative integers with at most representations. We define
- •
as the maximal integer in ;
- •
as the cardinality of ;
- •
as the sum of all elements in .
In words, is the largest integer with at most representations, is the number of integers with at most representations, and is the sum of all integers with at most representations.
The following result can be proved directly from the first part of Theorem 2. (We note that the formulas for and are not new.)
Corollary 5**.**
Let and be relatively prime positive integers and . Then
- •
;
- •
;
- •
**
We remark that holds only for ; in fact, for general these two invariants can differ quite a bit [3, 20].
2. Proofs
Proof of Theorem 1.
Let
[TABLE]
the number of representations of in terms of and . By a simple geometric series argument,
[TABLE]
We claim that
[TABLE]
and so, in particular, any integer belongs to . There are several ways to prove (5), for example, by considering the set
[TABLE]
Then (because ), and indeed, if , then , which follows from basic number theory (and here the condition is vitally important). Thus, for , the set contains at most one element. For , we have the implication , by replacing with . Moreover, the set difference contains precisely one point, and (5) follows.
By (5),
[TABLE]
Theorem 1 follows now with (4). ∎
Proof of Theorem 2.
We proceed by induction on ; the base case is Theorem 1. For the induction step, assume that
[TABLE]
Now (5) implies for and
[TABLE]
(we stress once more that this heavily depends on and being relatively prime), and so by induction hypothesis,
[TABLE]
The formula for now follows from the fact that . ∎
Proof of Theorem 4.
We start by noting that the operator is very useful in studying our power sums, as
[TABLE]
and thus
[TABLE]
The operator satisfies the same product rule as the derivative, and so by (2),
[TABLE]
and thus
[TABLE]
We finish by substituting for the expressions in the last two parentheses using (3). ∎
3. Musings about
The reader might have noticed the striking similarities between the rational generating function in Theorem 1 and that in (4); however, this is an artifact of the case . While it is true that the general counting function
[TABLE]
comes with the generating function
[TABLE]
and also that
[TABLE]
for some polynomial , the form of is simple only for . At any rate, Denham [10] discovered the remarkable fact that for , the polynomial has either or terms. He gave semi-explicit formulas for , from which one can deduce a semi-explicit formula for the Frobenius number . This formula was independently found by Ramírez-Alfonsín [17]. Denham’s theorem implies that the Frobenius number in the case is quickly computable, which was previously known [9, 11, 12]. Bresinsky [6] proved that for , there is no absolute bound for the number of terms in , in sharp contrast to Denham’s theorem.
On the computational side, Barvinok–Woods [2] proved that for fixed , the rational generating function (6) can be written as a short sum of rational functions; in particular, (6) can be efficiently computed when is fixed. A corollary of this fact is that the Frobenius number can be efficiently computed when is fixed, a theorem originally due to Kannan [13]. The analogous result for the generalized Frobenius numbers is due to Aliev–De Loera–Louveaux [1]. On the other hand, Ramírez-Alfonsín [16] proved that trying to efficiently compute the Frobenius number is hopeless if is left as a variable.
As a final note, while our results give a clear picture what kind of functions to expect for —e.g., is linear in and is quadratic in —it is unclear to us how this generalizes to . Some basic structural results would undoubtedly shed new light on generalized Frobenius numbers and their relatives.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Aliev, I., De Loera, J. A., Louveaux, Q. (2016). Parametric polyhedra with at least k 𝑘 k lattice points: their semigroup structure and the k 𝑘 k -Frobenius problem. Beveridge, A., Griggs, J. R., Hogben, L., Musiker, G., Tetal, P., eds. Recent Trends in Combinatorics . IMA Volumes in Mathematics 159. Cham: Springer, pp. 753–778.
- 2[2] Barvinok, A., Woods, K. (2003). Short rational generating functions for lattice point problems. J. Amer. Math. Soc. 16(4): 957–979.
- 3[3] Beck, M., Kifer, C. (2011). An extreme family of generalized Frobenius numbers. Integers . 11(A 24): 6 pp.
- 4[4] Beck, M., Robins, S. (2004). A formula related to the Frobenius problem in two dimensions. Chudnovsky, D., Chudnovsky, G., Nathanson, M., eds. Number theory (New York, 2003) . New York: Springer, pp. 17–23.
- 5[5] Beck, M., Robins, S. (2015). Computing the Continuous Discretely: Integer-point Enumeration in Polyhedra . 2nd ed. New York: Springer.
- 6[6] Bresinsky, H. (1975). Symmetric semigroups of integers generated by 4 4 4 elements. Manuscripta Math. 17(3): 205–219.
- 7[7] Brown, T. C., Shiue, P. J.-S. (1993). A remark related to the Frobenius problem. Fibonacci Quart. 31(1): 32–36.
- 8[8] Carlitz, L. (1966). The number of terms in the cyclotomic polynomial F p q ( x ) subscript 𝐹 𝑝 𝑞 𝑥 F_{pq}(x) . Amer. Math. Monthly . 73: 979–981.
