Frobenius Number
   HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the
coin A coin is a small object, usually round and flat, used primarily as a medium of exchange or legal tender. They are standardized in weight, and produced in large quantities at a mint in order to facilitate trade. They are most often issued by ...
problem (also referred to as the Frobenius coin problem or Frobenius problem, after the
mathematician A mathematician is someone who uses an extensive knowledge of mathematics in their work, typically to solve mathematical problems. Mathematicians are concerned with numbers, data, quantity, mathematical structure, structure, space, Mathematica ...
Ferdinand Frobenius) is a
mathematical problem A mathematical problem is a problem that can be represented, analyzed, and possibly solved, with the methods of mathematics. This can be a real-world problem, such as computing the orbits of the planets in the Solar System, or a problem of a more ...
that asks for the largest
monetary Money is any item or verifiable record that is generally accepted as payment for goods and services and repayment of debts, such as taxes, in a particular country or socio-economic context. The primary functions which distinguish money are: med ...
amount that cannot be obtained using only coins of specified denominations. For example, the largest amount that cannot be obtained using only coins of 3 and 5 units is 7 units. The solution to this problem for a given set of coin denominations is called the Frobenius number of the set. The Frobenius number exists as long as the set of coin denominations is
setwise coprime In number theory, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equiva ...
. There is an explicit formula for the Frobenius number when there are only two different coin denominations, x and y , where the greatest common divisor of these two numbers is 1: xy-x-y. If the number of coin denominations is three or more, no explicit formula is known. However, for any fixed number of coin denominations, there is an
algorithm In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
for computing the Frobenius
number A number is a mathematical object used to count, measure, and label. The most basic examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual numbers can ...
in
polynomial time In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations p ...
(in the logarithms of the coin denominations forming an input). No known algorithm is polynomial time in the ''number'' of coin denominations, and the general problem, where the number of coin denominations may be as large as desired, is
NP-hard In computational complexity theory, a computational problem ''H'' is called NP-hard if, for every problem ''L'' which can be solved in non-deterministic polynomial-time, there is a polynomial-time reduction from ''L'' to ''H''. That is, assumi ...
.


Statement

In mathematical terms, the problem can be stated: :Given positive
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
s a_1,a_2,\dots,a_nsuch that gcd(a_1,a_2,\dots,a_n)=1, find the largest integer that ''cannot'' be expressed as an integer
conical combination Given a finite number of vectors x_1, x_2, \dots, x_n in a real vector space, a conical combination, conical sum, or weighted sum''Convex Analysis and Minimization Algorithms'' by Jean-Baptiste Hiriart-Urruty, Claude Lemaréchal, 1993, pp. 101, 102 ...
of these numbers, i.e., as a sum: k_1a_1+k_2a_2+\dots+k_na_n :where k_1,k_2,\dots,k_n are non-negative integers. This largest integer is called the Frobenius number of the set \, and is usually denoted by g(a_1,a_2,\dots,a_n) The existence of the Frobenius number depends on the condition that the greatest common divisor (GCD) is equal to 1. Indeed, the potential sums are multiples of the GCD in all cases. Hence, if it is not 1, then there are always arbitrarily large numbers that cannot be obtained as sums. For example, if you had two types of coins valued at 6 cents and 14 cents, the GCD would equal 2, and there would be no way to combine any number of such coins to produce a sum which was an
odd number In mathematics, parity is the property of an integer of whether it is even or odd. An integer is even if it is divisible by 2, and odd if it is not.. For example, −4, 0, and 82 are even numbers, while −3, 5, 23, and 69 are odd numbers. The ...
; additionally,
even numbers In mathematics, parity is the property of an integer of whether it is even or odd. An integer is even if it is divisible by 2, and odd if it is not.. For example, −4, 0, and 82 are even numbers, while −3, 5, 23, and 69 are odd numbers. The ...
2, 4, 8, 10, 16 and 22 (less than ''m=24'') could not be formed, either. On the other hand, whenever the GCD equals 1, the set of integers that cannot be expressed as a conical combination of \ is bounded according to Schur's theorem, and therefore the Frobenius number exists.


Frobenius numbers for small ''n''

A closed-form solution exists for the coin problem only where ''n'' = 1 or 2. No closed-form solution is known for ''n'' > 2.


''n'' = 1

If n=1, then we must have a_1=1 so that all natural numbers can be formed.


''n'' = 2

If n=2, the Frobenius number can be found from the formula g(a_1, a_2) = a_1a_2-a_1-a_2, which was discovered by
James Joseph Sylvester James Joseph Sylvester (3 September 1814 – 15 March 1897) was an English mathematician. He made fundamental contributions to matrix theory, invariant theory, number theory, partition theory, and combinatorics. He played a leadership ...
in 1882. Sylvester also demonstrated for this case that there are a total of N(a_1, a_2) = (a_1-1)(a_2-1)/2 non-representable (positive) integers. Another form of the equation for g(a_1, a_2) is given by Skupień in this proposition: If a_1,a_2 \in \mathbb and \gcd(a_1, a_2) = 1 then, for each n \ge (a_1-1)(a_2-1), there is exactly one pair of nonnegative integers \rho and \sigma such that \sigma < a_1 and n = \rho a_1 +\sigma a_2. The formula is proved as follows. Suppose we wish to construct the number n \ge (a_1-1)(a_2-1). Since \gcd(a_1, a_2) = 1, all of the integers n - j a_2 for j=0,1,\ldots,a_1-1 are mutually distinct modulo a_1. Thus any integer m must be congruent modulo a_1 to one of these residues; in particular, taking m = a_1 there is a unique value of j=\sigma \ge 0 and a unique integer t, such that a_1 = n - \sigma a_2 + ta_1 . Rearranging, we have a nonnegative integer \rho = 1-t so that n = \rho a_1 +\sigma a_2. Indeed, \rho\ge 0 because \rho a_1 = n - \sigma a_2 \ge (a_1-1)(a_2-1) - (a_1 -1)a_2 = -a_1 + 1 > (-1)a_1. To show that exactly half of the integers 0, 1, \ldots, ab - a - b are representable as non-negative integer linear combinations, one first shows that if the integer k \in ,ab-a-b/math> is representable, then N - k is not representable, where N = ab-a-b. One then shows that the converse is true as well: if k is not representable, then N-k is representable. To show this, use the fact that \gcd(a,b) = 1 , which allows us to write k = xa + yb . Reducing and re-arranging the coefficients by adding multiples of ab as necessary, we can assume 0 \le x < b (in fact, this x is the unique such x satisfying the equation and inequalities). Similarly we take u, v satisfying N - k = ua + vb and 0 \le u < b. Now we can add these equations to write N = (u+x)a + (y+v)b which, using N = ab-a-b yields ab-b(1+y+v) = a(x+u+1). The integer x+u+1 is positive, because x,u \ge 0. In fact, since the left-hand side of ab-b(1+y+v) = a(x+u+1) is divisible by b, and (a,b)=1, we must have that x+u+1 is divisible by b. Yet x,u \le b-1 , so x+u+1 \le 2b-1 , so that x + u + 1 = b . Substituting this into ab-b(1+y+v) = a(x+u+1) and subtracting ab from both sides yields b(1+y+v)=0. So 1+y+v = 0. This implies that y+v = -1, which means that exactly one of y or v is negative. If y is negative, then v \ge 0 , which means that N-k = ua + vb is representable; the case when v is negative entails that k is representable. Thus for any non-negative integer k \in ,ab-a-b, we know that exactly one of k or (ab-a-b)-k is representable (and these are distinct, because ab-a-b must be odd as the integers a,b are relatively prime). This shows that half of the integers in the given range are representable; since there are (ab-a-b+1) = (a-1)(b-1) integers in the range ,ab-a-b, this gives the desired result.


''n'' = 3

Formulae and fast algorithms are known for three numbers though the calculations can be very tedious if done by hand. Simpler lower and upper bounds for Frobenius numbers for ''n'' = 3 have also been determined. The asymptotic lower bound due to Davison :f(a_1, a_2, a_3) \equiv g(a_1, a_2, a_3) + a_1 + a_2 + a_3 \geq \sqrt is relatively sharp. (f here is the ''modified Frobenius number,'' which is the greatest integer not representable by ''positive'' integer linear combinations of a_1, a_2, a_3.) The asymptotic average behaviour of f for three variables is also known as: :f(a_1, a_2, a_3) \sim \frac8\sqrt,


Wilf's conjecture

In 1978, Wilf conjectured that given coprime integers a_1, and their Frobenius number F, we have :d\geq\frac, where g denotes the number of all non-representable positive integers. In 2015, an asymptotic version of this was proven by Moscariello and Sammartano.


Frobenius numbers for special sets


Arithmetic sequences

A simple formula exists for the Frobenius number of a set of integers in an
arithmetic sequence An arithmetic progression or arithmetic sequence is a sequence of numbers such that the difference from any succeeding term to its preceding term remains constant throughout the sequence. The constant difference is called common difference of that ...
. Given integers ''a'', ''d'', ''w'' with gcd(''a'', ''d'') = 1: : g(a,a+d,a+2d,\dots,a+wd)=\left(\left\lfloor\frac\right\rfloor\right)a+d(a-1) The n=2 case above may be expressed as a special case of this formula. In the event that a > w^2-3w+1 , we can omit any subset of the elements a+2d, a+3d, ..., a+(w-3)d, a+(w-2)d from our arithmetic seq,e and the formula for the Frobenius number remains the same.


Geometric sequences

There also exists a closed form solution for the Frobenius number of a set in a
geometric sequence A geometric progression, also known as a geometric sequence, is a mathematical sequence of non-zero numbers where each term after the first is found by multiplying the previous one by a fixed number called the ''common ratio''. For example, the s ...
. Given integers ''m'', ''n'', ''k'' with gcd(''m'', ''n'') = 1: : g(m^k,m^n,m^n^2,\dots,n^k)=n^(mn-m-n)+\frac. : A simpler formula that also displays symmetry between the variables is as follows. Given positive integers a,b,k, with \gcd(a,b)=1, let A_k(a,b) = \. Then : g(A_k(a,b))=_(a,b) - _k(a,b) - (a^ + b^), : where _k(a,b) denotes the sum of all integers in A_k(a,b).


Examples and applications


McNugget numbers

One special case of the coin problem is sometimes also referred to as the McNugget numbers. The McNuggets version of the coin problem was introduced by Henri Picciotto, who placed it as a puzzle in Games Magazine in 1987, and included it in his algebra textbook co-authored with Anita Wah. Picciotto thought of the application in the 1980s while dining with his son at McDonald's, working out the problem on a napkin. A McNugget number is the total number of
McDonald's McDonald's Corporation, doing business as McDonald's, is an American Multinational corporation, multinational fast food chain store, chain. As of 2024, it is the second largest by number of locations in the world, behind only the Chinese ch ...
Chicken McNuggets Chicken McNuggets are a type of chicken nuggets sold by the international fast food restaurant chain McDonald's. They consist of small pieces of reconstituted boneless chicken meat that have been battered and deep fried. Chicken McNuggets w ...
in any number of boxes. In the
United Kingdom The United Kingdom of Great Britain and Northern Ireland, commonly known as the United Kingdom (UK) or Britain, is a country in Northwestern Europe, off the coast of European mainland, the continental mainland. It comprises England, Scotlan ...
, the original boxes (prior to the introduction of the
Happy Meal A Happy Meal is a kids' meal usually sold at the American fast food Chain store#Restaurant chain, restaurant chain McDonald's since June 1979. A small toy or book is included with the food, both of which are usually contained in a red cardboard b ...
–sized nugget boxes) were of 6, 9, and 20 nuggets. According to Schur's theorem, since 6, 9, and 20 are (setwise)
relatively prime In number theory, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equiv ...
, any sufficiently large integer can be expressed as a (non-negative, integer)
linear combination In mathematics, a linear combination or superposition is an Expression (mathematics), expression constructed from a Set (mathematics), set of terms by multiplying each term by a constant and adding the results (e.g. a linear combination of ''x'' a ...
of these three. Therefore, there exists a largest non–McNugget number, and all integers larger than it are McNugget numbers. Namely, every positive integer is a McNugget number, with the finite number of exceptions: : 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 22, 23, 25, 28, 31, 34, 37, and 43 . Thus the largest non–McNugget number is 43. The fact that any integer larger than 43 is a McNugget number can be seen by considering the following
integer partition In number theory and combinatorics, a partition of a non-negative integer , also called an integer partition, is a way of writing as a summation, sum of positive integers. Two sums that differ only in the order of their summands are considered ...
s :44 = 6 + 6 + 6 + 6 + 20 :45 = 9 + 9 + 9 + 9 + 9 :46 = 6 + 20 + 20 :47 = 9 + 9 + 9 + 20 :48 = 6 + 6 + 9 + 9 + 9 + 9 :49 = 9 + 20 + 20 Any larger integer can be obtained by adding some number of 6s to the appropriate partition above. A straightforward check demonstrates that 43 McNuggets can indeed ''not'' be purchased, as: # boxes of 6 and 9 alone cannot form 43 as these can only create multiples of 3 (with the exception of 3 itself); # including a single box of 20 does not help, as the required remainder (23) is also not a multiple of 3; and # more than one box of 20, complemented with boxes of size 6 or larger, obviously cannot lead to a total of 43 McNuggets. Since the introduction of the 4-piece Happy Meal–sized nugget boxes, the largest non–McNugget number is 11. In countries where the 9-piece size is replaced with the 10-piece size, there is no largest non–McNugget number, as any odd number cannot be made.


Other examples

In
rugby union Rugby union football, commonly known simply as rugby union in English-speaking countries and rugby 15/XV in non-English-speaking world, Anglophone Europe, or often just rugby, is a Contact sport#Terminology, close-contact team sport that orig ...
, there are four types of scores: penalty goal (3 points), drop goal (3 points), try (5 points) and converted try (7 points). By combining these, any points total is possible except 1, 2, or 4. In
rugby sevens Rugby sevens (commonly known simply as sevens, and originally seven-a-side rugby) is a variant of rugby union in which teams are made up of seven players playing seven-minute halves, instead of the usual 15 players playing 40-minute halves. R ...
, although all four types of scoring are permitted, attempts at penalty goals are rare, and drop goals are almost unknown. This means that team scores almost always consist of multiples of tries(5 points) and converted tries (7 points). The following scores (in addition to 1, 2, and 4) cannot be made from multiples of 5 and 7 and so are almost never seen in sevens: 3, 6, 8, 9, 11, 13, 16, 18 and 23. By way of example, none of these scores was recorded in any game in the 2014-15 Sevens World Series. Similarly, in
American football American football, referred to simply as football in the United States and Canada and also known as gridiron football, is a team sport played by two teams of eleven players on a rectangular American football field, field with goalposts at e ...
, the only way for a team to score exactly one point is if a
safety Safety is the state of being protected from harm or other danger. Safety can also refer to the control of recognized hazards in order to achieve an acceptable level of risk. Meanings The word 'safety' entered the English language in the 1 ...
is awarded against the opposing team when they attempt to convert after a touchdown (which in this case has a value of 6). As 2 points are awarded for safeties from regular play, and 3 points are awarded for
field goal A field goal (FG) is a means of scoring in gridiron football. To score a field goal, the team in possession of the ball must place kick, or drop kick, the ball through the goal, i.e., between the uprights and over the crossbar. Consequently, ...
s, all scores other than 1–0, 1–1, 2–1, 3–1, 4–1, 5–1 and 7–1 are possible.


Shellsort time complexity

The
Shellsort Shellsort, also known as Shell sort or Shell's method, is an in-place algorithm, in-place comparison sort. It can be understood as either a generalization of sorting by exchange (bubble sort) or sorting by insertion (insertion sort). The method s ...
algorithm is a sorting algorithm whose time complexity is currently an
open problem In science and mathematics, an open problem or an open question is a known problem which can be accurately stated, and which is assumed to have an objective and verifiable solution, but which has not yet been solved (i.e., no solution for it is kno ...
. The worst case complexity has an upper bound which can be given in terms of the Frobenius number of a given sequence of positive integers.


Least live weight problem

Petri nets A Petri net, also known as a place/transition net (PT net), is one of several mathematical modeling languages for the description of distributed systems. It is a class of discrete event dynamic system. A Petri net is a directed bipartite grap ...
are useful for modeling problems in
distributed computing Distributed computing is a field of computer science that studies distributed systems, defined as computer systems whose inter-communicating components are located on different networked computers. The components of a distributed system commu ...
. For specific kinds of Petri nets, namely conservative weighted circuits, one would like to know what possible "states" or "markings" with a given weight are "live". The problem of determining the least live weight is equivalent to the Frobenius problem.


Terms in expanded power of a polynomial

When a univariate polynomial is raised to some power, one may treat the exponents of the polynomial as a set of integers. The expanded polynomial will contain powers of x greater than the Frobenius number for some exponent (when GCD=1), e.g., for (1 + x^6 + x^7)^n the set is ' which has a Frobenius number of 29, so a term with x^ will never appear for any value of n but some value of n will give terms having any power of x greater than 29. When the GCD of the exponents is not 1, then powers larger than some value will only appear if they are a multiple of the GCD, e.g. for (1+x^9+x^)^n, powers of 24, 27,... will appear for some value(s) of n but never values larger than 24 that are not multiples of 3 (nor the smaller values, 1-8, 10-14, 16, 17, 19-23).


See also

* Postage stamp problem *
Change-making problem The change-making problem addresses the question of finding the minimum number of coins (of certain denominations) that add up to a given amount of money. It is a special case of the integer knapsack problem, and has applications wider than just ...
*
Sylver coinage Sylver coinage is a mathematical game for two players, invented by John H. Conway. The two players take turns naming positive integers that are not the sum of nonnegative multiples of previously named integers. The player who names 1 loses. For i ...
*
Numerical semigroup In mathematics, a numerical semigroup is a special kind of a semigroup. Its underlying set is the set of all nonnegative integers except a finite number of integers and the binary operation is the operation of addition of integers. Also, the integ ...


Notes


References


Further reading

*{{cite journal , last1 = Tuenter , first1 = Hans J. H. , doi = 10.1016/j.jnt.2005.06.015 , title = The Frobenius problem, sums of powers of integers, and recurrences for the Bernoulli numbers , journal = Journal of Number Theory , volume = 117 , issue = 2 , pages = 376–386 , date=April 2006, doi-access = free , mr = 2213771 , zbl = 1097.11010


External links


How to order 43 Chicken McNuggets – Numberphile
Diophantine equations Recreational mathematics