ArticleslgStudy

mathematics

Coin problem

Coin problem is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Coin problem rather than just read about it. In short: 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. For example, the largest amount that cannot be obtained using only coins of 3 and 5 units is 7 units.

Coin problem — main illustration
Coin problem — illustration

Key takeaways

  • Coin problem belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Coin problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Coin problem from memory before moving on to harder problems.

Reference excerpt

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. 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, 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 for computing the Frobenius number in polynomial time (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.

Statement In mathematical terms, the problem can be stated:

Given positive integers a1,a2,…,ansuch that gcd(a1,a2,…,an)=1, find the largest integer that cannot be expressed as an integer conical combination of these numbers, i.e., as a sum: k1a1+k2a2+⋯+knan where k1,k2,…,kn are non-negative integers. This largest integer is called the Frobenius number of the set {a1,a2,…,an}, and is usually denoted by g(a1,a2,…,an) 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 {a1,a2,…,an} 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 a1=1 so that all natural numbers can be formed.

n = 2 If n=2, the Frobenius number can be found from the formula g(a1,a2)=a1a2−a1−a2, which was discovered by James Joseph Sylvester in 1882. Sylvester also demonstrated for this case that there are a total of N(a1,a2)=(a1−1)(a2−1)/2 non-representable (positive) integers. Another form of the equation for g(a1,a2) is given by Skupień in this proposition: If a1,a2∈ℕ and gcd⁡(a1,a2)=1 then, for each n≥(a1−1)(a2−1), there is exactly one pair of nonnegative integers ρ and σ such that σ<a1 and n=ρa1+σa2. The formula is proved as follows. Suppose we wish to construct the number n≥(a1−1)(a2−1). Since gcd⁡(a1,a2)=1, all of the integers n−ja2 for j=0,1,…,a1−1 are mutually distinct modulo a1. Thus any integer m must be congruent modulo a1 to one of these residues; in particular, taking m=a1 there is a unique value of j=σ≥0 and a unique integer t, such that a1=n−σa2+ta1. Rearranging, we have a nonnegative integer ρ=1−t so that n=ρa1+σa2. Indeed, ρ≥0 because ρa1=n−σa2≥(a1−1)(a2−1)−(a1−1)a2=−a1+1>(−1)a1. To show that exactly half of the integers 0,1,…,ab−a−b are representable as non-negative integer linear combinations, one first shows that if the integer k∈[0,ab−a−b] 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≤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≤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≥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≤b−1, so x+u+1≤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≥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∈[0,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 [0,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(a1,a2,a3)≡g(a1,a2,a3)+a1+a2+a3≥3a1a2a3 is relatively sharp. (f here is the modified Frobenius number, which is the greatest integer not representable by positive integer linear combinations of a1,a2,a3.) The asymptotic average behaviour of f for three variables is also known as:

f(a1,a2,a3)∼8πa1a2a3,

Wilf's conjecture In 1978, Wilf conjectured that given coprime integers a1<a2<...<ad, and their Frobenius number F, we have

d≥F+1F+1−g, 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. Given integers a, d, w with gcd(a, d) = 1:

… excerpt ends here. Continue reading the full article.

Illustrations

Coin problem illustration
Coin problem illustration
Coin problem: Frobenius coin problem with 2-pence and 5-pence coins visualised as graphs:
Sloping lines denote graphs of 2x+5y=n where n is the total in pence, and x and y are the non-negative number of 2p and 5p coins, respectively.
A point on a line gives a combination of 2p and 5p for its given total (green).
Multiple points on a line imply multiple possible combinations (blue).
Only lines with n = 1 or 3 have no points (red).
Frobenius coin problem with 2-pence and 5-pence coins visualised as graphs: Sloping lines denote graphs of 2x+5y=n where n is the total in pence, and x and y are the non-negative number of 2p and 5p coins, respectively. A point on a line gives a combination of 2p and 5p for its given total (green). Multiple points on a line imply multiple possible combinations (blue). Only lines with n = 1 or 3 have no points (red).
Coin problem: A box of 20 Chicken McNuggets
A box of 20 Chicken McNuggets

Worked examples

Example 1 — a first encounter with Coin problem

Start with the simplest possible case. Write down what Coin problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Coin problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Coin problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Coin problem

In research
Coin problem appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Coin problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Coin problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Diophantine equations, Mathematical problems, Recreational mathematics, so understanding it makes those chapters shorter.
In everyday life
Look for Coin problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Coin problem” →

How to study Coin problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Coin problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Coin problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Coin problem in simple terms?

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. For example, t…

Why does Coin problem matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Coin problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Coin problem.

Tags

  • Diophantine equations
  • Mathematical problems
  • Recreational mathematics

Keep exploring