In mathematics, the coin problem (also referred to as the Frobenius coin problem or Frobenius problem, after the mathematician Ferdinand Frobenius) is a mathematical problem that asks for the largest monetary amount that cannot be obtained using only coins of specified denominations. [1] 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.
There is an explicit formula for the Frobenius number when there are only two different coin denominations, and , where the greatest common divisor of these two numbers is 1: . 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 for computing the Frobenius number in polynomial time (in the logarithms of the coin denominations forming an input). [2] 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. [3] [4]
In mathematical terms, the problem can be stated:
This largest integer is called the Frobenius number of the set , and is usually denoted by
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; additionally, even numbers 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.
A closed-form solution exists for the coin problem only where n = 1 or 2. No closed-form solution is known for n > 2. [4]
If , then we must have so that all natural numbers can be formed.
If , the Frobenius number can be found from the formula , which was discovered by James Joseph Sylvester in 1882. [5] [nb 1] Sylvester also demonstrated for this case that there are a total of non-representable (positive) integers.
Another form of the equation for is given by Skupień [8] in this proposition: If and then, for each , there is exactly one pair of nonnegative integers and such that and .
The formula is proved as follows. Suppose we wish to construct the number . Since , all of the integers for are mutually distinct modulo . Thus any integer must be congruent modulo to one of these residues; in particular, taking there is a unique value of and a unique integer , such that . Rearranging, we have a nonnegative integer so that . Indeed, because .
To show that exactly half of the integers are representable as non-negative integer linear combinations, one first shows that if the integer is representable, then is not representable, where .
One then shows that the converse is true as well: if is not representable, then is representable. To show this, use the fact that , which allows us to write . Reducing and re-arranging the coefficients by adding multiples of as necessary, we can assume (in fact, this is the unique such satisfying the equation and inequalities).
Similarly we take satisfying and . Now we can add these equations to write which, using yields . The integer is positive, because . In fact, since the left-hand side of is divisible by , and , we must have that is divisible by . Yet , so , so that . Substituting this into and subtracting from both sides yields . So . This implies that , which means that exactly one of or is negative. If is negative, then , which means that is representable; the case when is negative entails that is representable.
Thus for any non-negative integer , we know that exactly one of or is representable (and these are distinct, because must be odd as the integers are relatively prime). This shows that half of the integers in the given range are representable; since there are integers in the range , this gives the desired result.
Formulae [9] and fast algorithms [10] 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
is relatively sharp. [11] ( here is the modified Frobenius number, which is the greatest integer not representable by positive integer linear combinations of .)
The asymptotic average behaviour of for three variables is also known as: [12]
In 1978, Wilf conjectured that given coprime integers , and their Frobenius number , we have
where denotes the number of all non-representable positive integers. [13] In 2015, an asymptotic version of this was proven by Moscariello and Sammartano. [14]
A simple formula exists for the Frobenius number of a set of integers in an arithmetic sequence. [15] Given integers a, d, w with gcd(a, d) = 1:
The case above may be expressed as a special case of this formula.
In the event that , we can omit any subset of the elements from our arithmetic seq,e and the formula for the Frobenius number remains the same. [16]
There also exists a closed form solution for the Frobenius number of a set in a geometric sequence. [17] Given integers m, n, k with gcd(m, n) = 1:
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, [19] and included it in his algebra textbook co-authored with Anita Wah. [20] 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 Chicken McNuggets in any number of boxes. In the United Kingdom, the original boxes (prior to the introduction of the Happy Meal–sized nugget boxes) were of 6, 9, and 20 nuggets.
According to Schur's theorem, since 6, 9, and 20 are (setwise) relatively prime, any sufficiently large integer can be expressed as a (non-negative, integer) linear combination 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:
Total | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
+0 | 0:0,0,0 | 1: — | 2: — | 3: — | 4: — | 5: — |
+6 | 6:1,0,0 | 7: — | 8: — | 9:0,1,0 | 10: — | 11: — |
+12 | 12:2,0,0 | 13: — | 14: — | 15:1,1,0 | 16: — | 17: — |
+18 | 18:3,0,0 | 19: — | 20:0,0,1 | 21:2,1,0 | 22: — | 23: — |
+24 | 24:4,0,0 | 25: — | 26:1,0,1 | 27:3,1,0 | 28: — | 29:0,1,1 |
+30 | 30:5,0,0 | 31: — | 32:2,0,1 | 33:4,1,0 | 34: — | 35:1,1,1 |
+36 | 36:6,0,0 | 37: — | 38:3,0,1 | 39:5,1,0 | 40:0,0,2 | 41:2,1,1 |
+42 | 42:7,0,0 | 43: — | 44:4,0,1 | 45:6,1,0 | 46:1,0,2 | 47:3,1,1 |
+48 | 48:8,0,0 | 49:0,1,2 | 50:5,0,1 | 51:7,1,0 | 52:2,0,2 | 53:4,1,1 |
+54 | 54:9,0,0 | 55:1,1,2 | 56:6,0,1 | 57:8,1,0 | 58:3,0,2 | 59:5,1,1 |
A possible set of combinations of boxes for a total of 0 to 59 nuggets. Each triplet denotes the number of boxes of 6, 9 and 20, respectively. |
Thus the largest non–McNugget number is 43. [21] The fact that any integer larger than 43 is a McNugget number can be seen by considering the following integer partitions
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:
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.
In rugby union, 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, 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, the only way for a team to score exactly one point is if a safety 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 goals, all scores other than 1–0, 1–1, 2–1, 3–1, 4–1, 5–1 and 7–1 are possible.
The Shellsort algorithm is a sorting algorithm whose time complexity is currently an open problem. 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.
Petri nets are useful for modeling problems in distributed computing. 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.
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 greater than the Frobenius number for some exponent (when GCD=1), e.g., for the set is {6, 7} which has a Frobenius number of 29, so a term with will never appear for any value of but some value of will give terms having any power of 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 , powers of 24, 27,... will appear for some value(s) of but never values larger than 24 that are not multiples of 3 (nor the smaller values, 1-8, 10-14, 16, 17, 19-23).
In number theory, an arithmetic, arithmetical, or number-theoretic function is generally any function f(n) whose domain is the positive integers and whose range is a subset of the complex numbers. Hardy & Wright include in their definition the requirement that an arithmetical function "expresses some arithmetical property of n". There is a larger class of number-theoretic functions that do not fit this definition, for example, the prime-counting functions. This article provides links to functions of both classes.
In complex analysis, an entire function, also called an integral function, is a complex-valued function that is holomorphic on the whole complex plane. Typical examples of entire functions are polynomials and the exponential function, and any finite sums, products and compositions of these, such as the trigonometric functions sine and cosine and their hyperbolic counterparts sinh and cosh, as well as derivatives and integrals of entire functions such as the error function. If an entire function has a root at , then , taking the limit value at , is an entire function. On the other hand, the natural logarithm, the reciprocal function, and the square root are all not entire functions, nor can they be continued analytically to an entire function.
In mathematics, the Euclidean algorithm, or Euclid's algorithm, is an efficient method for computing the greatest common divisor (GCD) of two integers, the largest number that divides them both without a remainder. It is named after the ancient Greek mathematician Euclid, who first described it in his Elements . It is an example of an algorithm, a step-by-step procedure for performing a calculation according to well-defined rules, and is one of the oldest algorithms in common use. It can be used to reduce fractions to their simplest form, and is a part of many other number-theoretic and cryptographic calculations.
In number theory, a multiplicative function is an arithmetic function f(n) of a positive integer n with the property that f(1) = 1 and whenever a and b are coprime.
In mathematics, a divisor of an integer also called a factor of is an integer that may be multiplied by some integer to produce In this case, one also says that is a multiple of An integer is divisible or evenly divisible by another integer if is a divisor of ; this implies dividing by leaves no remainder.
In probability theory, Chebyshev's inequality provides an upper bound on the probability of deviation of a random variable from its mean. More specifically, the probability that a random variable deviates from its mean by more than is at most , where is any positive constant and is the standard deviation.
In additive number theory, the Schnirelmann density of a sequence of numbers is a way to measure how "dense" the sequence is. It is named after Russian mathematician Lev Schnirelmann, who was the first to study it.
In mathematics, a Dirichlet series is any series of the form where s is complex, and is a complex sequence. It is a special case of general Dirichlet series.
In mathematics, and specifically in number theory, a divisor function is an arithmetic function related to the divisors of an integer. When referred to as the divisor function, it counts the number of divisors of an integer. It appears in a number of remarkable identities, including relationships on the Riemann zeta function and the Eisenstein series of modular forms. Divisor functions were studied by Ramanujan, who gave a number of important congruences and identities; these are treated separately in the article Ramanujan's sum.
In combinatorial mathematics, the necklace polynomial, or Moreau's necklace-counting function, introduced by C. Moreau, counts the number of distinct necklaces of n colored beads chosen out of α available colors, arranged in a cycle. Unlike the usual problem of graph coloring, the necklaces are assumed to be aperiodic, and counted up to rotation, but without flipping over. This counting function also describes the dimensions in a free Lie algebra and the number of irreducible polynomials over a finite field.
In mathematics, in particular functional analysis, the singular values of a compact operator acting between Hilbert spaces and , are the square roots of the eigenvalues of the self-adjoint operator .
In group theory, restriction forms a representation of a subgroup using a known representation of the whole group. Restriction is a fundamental construction in representation theory of groups. Often the restricted representation is simpler to understand. Rules for decomposing the restriction of an irreducible representation into irreducible representations of the subgroup are called branching rules, and have important applications in physics. For example, in case of explicit symmetry breaking, the symmetry group of the problem is reduced from the whole group to one of its subgroups. In quantum mechanics, this reduction in symmetry appears as a splitting of degenerate energy levels into multiplets, as in the Stark or Zeeman effect.
In mathematics, a variational inequality is an inequality involving a functional, which has to be solved for all possible values of a given variable, belonging usually to a convex set. The mathematical theory of variational inequalities was initially developed to deal with equilibrium problems, precisely the Signorini problem: in that model problem, the functional involved was obtained as the first variation of the involved potential energy. Therefore, it has a variational origin, recalled by the name of the general abstract problem. The applicability of the theory has since been expanded to include problems from economics, finance, optimization and game theory.
In the field of mathematics, norms are defined for elements within a vector space. Specifically, when the vector space comprises matrices, such norms are referred to as matrix norms. Matrix norms differ from vector norms in that they must also interact with matrix multiplication.
In mathematics, a natural number a is a unitary divisor of a number b if a is a divisor of b and if a and are coprime, having no common factor other than 1. Equivalently, a divisor a of b is a unitary divisor if and only if every prime factor of a has the same multiplicity in a as it has in b.
In mathematics, the theory of optimal stopping or early stopping is concerned with the problem of choosing a time to take a particular action, in order to maximise an expected reward or minimise an expected cost. Optimal stopping problems can be found in areas of statistics, economics, and mathematical finance. A key example of an optimal stopping problem is the secretary problem. Optimal stopping problems can often be written in the form of a Bellman equation, and are therefore often solved using dynamic programming.
In 1998 Gerhard Frey firstly proposed using trace zero varieties for cryptographic purpose. These varieties are subgroups of the divisor class group on a low genus hyperelliptic curve defined over a finite field. These groups can be used to establish asymmetric cryptography using the discrete logarithm problem as cryptographic primitive.
In number theory, an average order of an arithmetic function is some simpler or better-understood function which takes the same values "on average".
In mathematics, low-rank approximation refers to the process of approximating a given matrix by a matrix of lower rank. More precisely, it is a minimization problem, in which the cost function measures the fit between a given matrix and an approximating matrix, subject to a constraint that the approximating matrix has reduced rank. The problem is used for mathematical modeling and data compression. The rank constraint is related to a constraint on the complexity of a model that fits the data. In applications, often there are other constraints on the approximating matrix apart from the rank constraint, e.g., non-negativity and Hankel structure.
In mathematics and theoretical computer science, a pattern is an unavoidable pattern if it is unavoidable on any finite alphabet.
{{cite journal}}
: CS1 maint: multiple names: authors list (link)