Coin problem

from Wikipedia, the free encyclopedia
A pile of coins
A price of 3 cents cannot be paid with just 2 and 5 cent coins without change, but any higher price can.

The coin problem (also known as the Frobenius problem ) from the field of number theory asks which natural numbers can be written in the form , where up to are given relatively prime numbers and the coefficients up to should be chosen as natural numbers (including 0). More precisely, the question is asked about the largest number that cannot be written in this form; it is called the Frobenius number .

The problem goes back to Ferdinand Georg Frobenius , the name comes from the clear formulation of the question, which prices can be paid with a given set of coins with the values to . The event was James Joseph Sylvester in 1884 completely solve, for more numbers, however, it seems to be no simple formula.

Related to this is the postage stamp problem .

background

If the numbers to are not prime but have a common factor , all numbers that can be written as are also divisible by. In this case, there cannot be a largest number that cannot be written in the desired form.

If, on the other hand, the numbers to are coprime as required, then according to Bézout's lemma there is a representation with whole numbers to . If you multiply this equation , you get a representation for every natural number, but with whole coefficients instead of natural ones. However, if it is sufficiently large, all coefficients can be chosen as natural numbers. The question of how big must be is precisely the problem of coins. The largest number that can be written for given or not with non-negative coefficients is often referred to as and called the Frobenius number.

Set of New Years Eve

In the event the following Sylvester attributed theorem gives the answer: Are and two relatively prime natural numbers, it is the largest number that is not in the form of non-negative integers and can write .

The proof consists of two parts: on the one hand it has to be shown that all numbers can be written larger than in the desired form, on the other hand it has to be proven that there is no such representation.

So be first . According to the preliminary remark, there are at least whole numbers and with . If you put and , there is also a representation. With a suitable choice of so can . B. o d. A. be accepted. The following applies to the associated :

Since is divisible by , it is therefore not negative , as desired.

The second part is a contradiction proof : If such a representation were, so would . The left side and the first summand on the right side are divisible by, so the second summand must also be a multiple of . Since and are relatively prime, a multiple of and as a positive number should be at least . It would be analogous that the right side would have at least the same size , which is a contradiction. Consequently, it can not be represented with non-negative coefficients.

Representations with more than two numbers

There is no known formula for that produces the largest non-representable number, and it is likely that there is no closed formula either. Instead, there are a number of estimates, formulas for special cases and algorithms with different runtime behavior.

Estimates

In this case , the estimate is known as the lower bound.

Of Issai Schur estimate comes that provides an upper bound.

Special cases

For the case and , and with pairwise prime numbers , and holds . This was a task at the 1983 International Mathematical Olympiad .

Also known is the Frobenius number for arithmetic and geometric sequences of any length. If and are coprime, then:

For coprime numbers and for the geometric sequence with quotient :

Algorithms

Many algorithms for the coin problem are based on graphs . For this, the equation is modulo considered so . A weighted digraph is constructed on the knot , where there is an arc from the knot to the knot if and only if there is a ( ) with , the weight of the arc . It can be shown that the Frobenius number can be obtained by looking for the shortest path from 0 to for all nodes and determining the length of the longest of these paths. Then is the Frobenius number . With the help of the Dijkstra algorithm , the Frobenius number can thus be easily calculated. If you also use the special symmetry properties of the graph, you can develop faster algorithms.

Ravi Kannan developed an algorithm that calculates the Frobenius number for each fixed in polynomial time (based on to ). The general problem, that is, even if it is variable, is, however, NP-difficult .

example

The graph shows the numbers from 0 to 5, which are connected by arrows: From 0 a red arrow leads to 2, from there one to 4, from there back to 0. There are also from 1 to 3, from 3 to 5 and from 5 to 1 red arrows.  There is a blue double arrow between 0 and 3, as well as between 1 and 4, and between 2 and 5.
The graph for the McNugget problem. The blue arches weigh 9 each, the red 20 each.

A common example is the McNugget numbers. The question is how many Chicken McNuggets you can buy if you put them together from the classic packaging sizes of 6, 9 and 20 pieces. The estimates provide that . The exact number can be easily determined; the method with the aid of the graph is used here as an example. This one has six knots. The arcs that belong to the number 9 are shown in blue and divide the nodes into three pairs, the red arcs belong to the number 20 and form two groups of three. Overall, the graph is strongly connected because the numbers are relatively prime. The shortest paths from node 0 result (only one of several options is always given):

  • 0 → 2 → 4 → 1 (length )
  • 0 → 2 (length 20)
  • 0 → 3 (length 9)
  • 0 → 2 → 4 (length )
  • 0 → 2 → 5 (length )

The longest of these paths has the length , hence the following applies . The graph also provides a possible representation for every number that can be represented. If you want about 47 Chicken McNuggets, you look for the shortest path from 0 to 5. This consists of a blue and a red arc, so you should first buy a pack of 9 and a pack of 20 Chicken McNuggets. For the remaining 18, take three 6-packs.

Individual evidence

  1. Matthias Beck, Shelemyahu Zacks: Refined upper bounds for the linear Diophantine Problem of Frobenius. In: Advances in Applied Mathematics. Vol. 32, 2004. pp. 454-467. doi: 10.1016 / S0196-8858 (03) 00055-1
  2. a b Dale Beihoffer, Jemimah Hendry, Albert Nijenhuis, Stan Wagon: Faster algorithms for Frobenius numbers. In: Electronic Journal of Combinatorics. Vol 12, 2005. ( online )
  3. 3. Task of the IMO 1983 ( online )
  4. ^ Jorge Ramírez Alfonsín: The Diophantine Frobenius problem. Oxford University Press, 2005. pp. 59f.
  5. ^ Darren C. Ong, Vadim Ponomarenko: The Frobenius Number of Geometric Sequences. In: INTEGERS: the Electronic Journal of Combinatorial Number Theory Vol. 8, 1, 2008. ( online )
  6. ^ Ravi Kannan: Lattice translates of a polytope and the Frobenius problem. In: Combinatorica. Vol. 12, 2nd pp. 161-177. doi: 10.1007 / BF01204720

Web links