Teaching perspectives of the Frobenius coin problem of two denominators

Let $a,b$ be positive, relatively prime, integers. Our goal is to characterize, in an elementary way, all positive integers $c$ that can be expressed as a linear combination of $a,b$ with non-negative integer coefficients and discuss the teaching perspectives of our methods.


Introduction
In order to contribute to the creation of didactical situations that could increase the active involvement of undergraduate students in the course of Number Theory and at the same time offer them the possibility to develop their own solving strategies, we study the well-known Frobenius coin problem for two denominators.Our experience suggests that problems like the one above, which can be reduced to solving a Diophantine equation and are essentially open-ended problems (in the sense that may have several paths to resolution), can really initiate the feeling of engagement in the participants and help them to upgrade their problem-solving skills [5].
In parallel the mathematical elaboration aims into guiding the students to discovering known proofs of the problem themselves, using various approaches, with encouragement and strategic guidance from the instructor.

Motivation and notation
Number Theory is a mathematical tradition with a long history and its own peculiar and always attractive problems.The peculiarity of the problems of Number Theory consists in a rather strange character; while these problems appear most of the time as understandable in their formulation by a high school student, their solution often requires knowledge of so-called "advanced mathematics" -or at least of algebra taught in the first years of mathematics departments-and sometimes may even be unattainable (except in special cases) by the mathematical community.At the same time, the same problems are usually empirically explorable by simple arithmetic operations, done from memory or with the help of a simple computer program.This makes it easier to explore special cases and to refute any incorrect conjectures or, conversely, to strengthen the belief in the truth of some carefully formulated claims following the negations, following Lakatos' heuristic epistemological model for mathematics [3].
The last possibility constitutes, in our opinion, the main epistemological advantage of Number Theory over the other branches of elementary mathematics, in terms of introducing students to the actual proof process.For, as Popper [4] and Lakatos [3] have demonstrated, in the Philosophy of Science the logic of scientific discovery cannot be separated from the logic of proof or justification.More specifically, in order to determine whether students are able to solve simple word problems that require basic knowledge of Number Theory and Algebra, entering into an elementary proof process, we suggest the following tasks: Task 1.The well-known Frobenius coin problem for two denominators.
(1) Which is the largest monetary amount that cannot be obtained using only coins of 3 and 7 units?(2) Which is the largest monetary amount that cannot be obtained using only coins of 12 and 25 units?(3) Taking into consideration the two cases above, can you guess what the largest monetary amount that cannot be obtained using only coins of a and b units, where gcd(a, b) = 1, might be? (4) Prove by mathematical induction (or by any other method you consider appropriate) that the largest monetary amount that cannot be obtained using only coins of a and b units, where gcd(a, b) = 1, is ab − (a + b).For a more comprehensive presentation of the coin problem we refer the interested reader to the excellent textbook of Alfonsín [1] and the references therein.Also, we note that the problem of interest can be generalized by admitting an arbitrary number of denominators in an obvious way.However, the complexity of the resulting problem increases, in such a way, that even the computing f a,b,c (for three denominators) is extremely complicated and it widely accepted that a closed formula for this number is out of reach, see [1].So, due to the large complexity of the case of more than two denominators, we will restrict ourselves to the simplest case of two denominators.
To be more precise, we suggest methods, based on known proofs, whose goal is to guide students into discovering the existence of f a,b , into computing f a,b and into characterizing C a,b , instead of immediately provide a formal proof.Towards this end, we will use three different approaches, one based on elementary number theory, one based on geometry and one using a newly discovered inductive method.

Mathematical elaboration
It is clear that we will be working with the linear Diophantine equation where, we assume that 0 < a, b and gcd(a, b) = 1.We shall also assume that d ≥ 0, since we are interested in finding positive integer solutions of Eq. ( 3) and it is clear that the case d < 0 is impossible.We will first focus on the number theoretic approach and then on the geometric one and we note that these approaches are inspired by the first and third proof of [1, Theorem 2.1.1]respectively.Last but not least, we will attempt to heuristically communicate a recently discovered inductive proof [2].We note that [1] contains four proofs of this theorem.We chose to only present the first and the third one, as the second seems to contain a mistake 1 and the fourth one incorporates analytic concepts whose direct relation with the problem may be clear to university freshmen.In all cases, we assume that the students are aware of the following celebrated result from Number Theory: Theorem 3.1 (Bézout's identity).Let a, b ∈ Z with c = gcd(a, b).There exist some x ′ , y ′ ∈ Z, such that ax ′ + by ′ = c.
We note that one such pair (x ′ , y ′ ) can be identified with the Euclidean algorithm.Also, it is obvious that Theorem 3.1 implies that Eq. ( 3) is solvable.In particular, Theorem 3.1 implies that ax ′ + by ′ = 1 for some x ′ , y ′ , hence, a(dx However it is neither guaranteed that the numbers x 0 , y 0 are both positive, nor that the solution is unique.In fact, the students can easily observe, with the help of easy examples, that the former is sometimes true and the latter is not true at all.Next, we will identify the full set of solutions.Towards this goal, let (x 1 , y 1 ) and (x 2 , y 2 ) be two solutions of Eq. ( 3).We observe that: Further, it is not hard to check, that for every k ∈ Z, the pair (x − kb, y + ka) is a solution of Eq. (3).We have established the following: 1 In particular, it is based on the statement that there exist positive integers x, y, such that ax + by = 1, which is clearly not true.

Number theoretic approach.
A couple of key observations that derive from Proposition 3.2 are the following: (1) It is clear that Eq. ( 3) admits a non-negative solution, if x is non-negative, but as small as possible and y turns out to be also non-negative.( 3.2.Geometric approach.For this approach, we will be working on the Cartesian plane.On the plane, the problem in question, translates into whether the line L d : d = ax + by meets the lattice Λ := {(x, y) : x, y ∈ Z} in the first quadrant or in one of the positive semi-axes.Note that Proposition 3.2 ensures that L d and Λ meet at an infinite number of points (for fixed d), while it is clear that every point of Λ is contained in some line L d (for some d).Furthermore, since a, b, d are all assumed to be non-negative, the line L d intersects the first quadrant and the axes at a segment, that is, the number of points in question will be finite.Also, the line L d does not pass through the fourth quadrant, thus not both coordinates of the points of L d can be negative.Some additional observations that will help the students into understanding the problem more deeply are the following: (1) For fixed a and b, the various lines L d (where d ∈ Z ≥0 ) form an infinite family of parallel lines.(2) As d grows, the line segment, where this line intersects with the first quadrant and the axis, also grows in length.This means that, intuitively, for higher values of d, the corresponding line should contain more desired points.Although this argument is not entirely strict (nor true) it still point towards the existence of f a,b .(3) As a and b grow larger, the line segment, where L d intersects with the first quadrant and the axis, shrinks in length.This means, intuitively, that it should be more difficult to have common points with Λ.As a result the number f a,b (if it exists) should probably be an increasing function of both a and b.
As a verification of these observations, it may be helpful to demonstrate these facts with explicit examples, or rather encourage students to experiment on their own and make their own conjectures, with the help of a computer program such as GeoGebra.For example, see Figures 1 and 2.  Next, we proceed with the existence of f a,b .Following Proposition 3.2, if (x 0 , y 0 ) is a solution of Eq. ( 3), then d ∈ C a,b if, for some k, the point (x 0 − kb, y 0 + ka) is in the first quadrant, or on some axis.Since this point cannot lie in the fourth quadrant, this is equivalent with for some k ∈ Z.The latter immediately yields an easy characterization of C a,b .
In particular, d ∈ C a,b if and only if there exist some integer k in the interval [−y 0 /a, x 0 /b] (or the interval [x 0 /b, −y 0 /a] if −y 0 /a > x 0 /b), where (x 0 , y 0 ) is a solution of Eq. ( 3).Further, we observe that this condition is always satisfied when We have, so far, obtained a characterization of C a,b and the facts that f a,b exists and that f a,b < ab.Having obtained these, we are left with the computation of f a,b .
Towards this end, it may be useful to employ computers as a mean to visualize the problem, using various appropriate choices of a and b, taking all d ≤ ab, since the case d > ad is settled, see Figures 1 and 2. In particular, the instructor is advised to proceed to the following key observations: (1) The line L ab does not have common points with Λ in the first quadrant, but one with each axis, namely A(0, a) and B(b, 0).This is fairly easy to also explain theoretically.(2) The lines right below L ab appear to have exactly one point in common with Λ in the first quadrant.(3) The first line that coincides with Λ only in the second and the third quadrant seems to always be L ab−a−b .In addition, among the points that this line shares with Λ are C(b−1, −1) and D(−1, a−1).These facts are, again, fairly easy to theoretically explain.The above observations, not only suggest Eq. ( 2), but also suggest that the following classic geometric result could prove useful.Theorem 3.3 (Pick's theorem).Suppose that a polygon has its vertices in Λ.If I is the number of points of Λ interior to the polygon and B is the number of points of Λ on its boundary and A is the area of the polygon, then (4) The teacher is advised to bring Theorem 3.3 to the students' attention at this point.It is natural to apply Theorem 3.3 on the parallelogram ABCD, then, using the notation of the statement of Theorem 3.3, we easily deduce that B = 4 and A = a + b, thus Eq. ( 4) implies I = a + b − 1, in other words, the number of points of Λ that are interior to ABCD coincide with the number of lines L d (for ab − a − b < d < ab) that run through ABCD.Additionally, note that all these points lie within the first quadrant and that the point (x, y) belongs to the line L ax+by (with ab + by ∈ Z ≥0 ).Next, assume that the line L d , with ab − (a + b) < d < ab, contains two interior lattice points of ABCD, say (x 1 , y 1 ) and (x 2 , y 2 ).Then However, given that 0 < x 1 , x 2 < b and 0 < y 1 , y 2 < a the above is possible only if (x 1 , y 1 ) = (x 2 , y 2 ), a contradiction.It follows that every line L d , with ab − (a + b) < d < ab, contains at most one internal lattice point of ABCD.All the above facts, combined with the pigeonhole principle, imply that there is an one-to-one correspondence between internal lattice points of ABCD and the lines L d , with ab − (a + b) < d < ab.Eq. ( 2) follows.
3.3.Inductive approach.Last, but not least, an inductive approach could be a welcome addition.For a formal presentation of the proof that we outline here, we refer the reader to the authors' recent work [2].In this approach, the students can be encouraged to write a computer script that could, given appropriate a and b, check whether d ∈ C a,b for d within a reasonable range, or perform this experiment by hand.For example, see Tables 1 and 2, that we compiled using the GeoGebra software.This should lead to a safe guess of the number f a,b for this particular choice of a and b.
After repeating the aforementioned procedure for a respectable number of choices for a and b, the students may be able to notice a pattern, perhaps with some hints from the teacher/instructor with questions of the form: -Does f a,b appear to be larger or smaller than ab? -Does f a,b appear to be larger or smaller than ab − a? -Does f a,b appear to be larger or smaller than ab − 2a? -. . .Eventually, the students should recognize the pattern and guess Eq. ( 2).Then, proving Eq. ( 2) can be an intriguing exercise.It is suggested to first observe that Proposition 3.2 implies the existence of two "minimal" pairs (x 1 , y 1 ) and (x 2 , y 2 ), with x 1 , y 2 > 0 and y 1 , x 2 < 0 and ax 1 + by 1 = ax 2 + by 2 = 1.These expressions of 1 are special, so we will call them minimal unit expressions.
The idea is that, given an expression (5) d = ax 0 + by 0 , with x 0 , y 0 ≥ 0, a promising strategy, in order to obtain a nice expression for d + 1 would be adding a minimal unit expression to Eq. ( 5), as these expressions seem to be those that will cause the "least" damage to the non-negativity of x 0 , y 0 .In other words, at least one of these expressions should preserve their precious nonnegativity, of course, given that d is large enough.With this overall strategy in mind, the instructor can proceed to the technical part.It is advised to split it into four parts at this point: ( .Notice that, since y 1 < 0, the only option is, in fact, to add the second minimal unit expression, that is, The students should, after studying Proposition 3.2, be in position to understand why both factors of a and b above are non-negative.(3) Show that one of the expressions for i = 1, 2, has non-negative coefficients for both a and b.This should provide some insight into how the induction step works.(4) Show, using induction, that if where i = 1 or 2 and both coefficients of a and b are non-negative, then is such that both coefficients of a and b are non-negative, for j = 1 or j = 2, for any k ≥ ab − a − b + 2. The induction should be on k and the first step is already proven above.

Further work
Should the students show enough interest on the Frobenius coin problem and one of the aforementioned approaches, the instructor can try to harden the problem further, by asking the students the following question: For fixed, relatively prime, a, b ∈ Z >0 and d ∈ C a,b , how many pairs (x, y) ∈ Z 2 ≥0 are there such that d = ax + by? Equivalently, in how many ways can we obtain d momentary units with coins of values a and b (with the usual restrictions on a and b)?A closer observation to the aforementioned approaches, should provide the students enough insight to tackle this extension of the Frobenius coin problem and even solve it!

Conclusive remarks
Basic Number Theory, that is the theoretical preoccupation with the properties of integers and the equivalence classes of modulo, has been practically eliminated from secondary education (at least in Greek education system) and does not seem to attract the interest of researchers in Mathematics Education, while at the same time the relevant knowledge is used only as a prerequisite for mathematical competitions and Mathematics Olympiads.As much of the teaching research seems to have been aimed, in recent years, at new ways of formalizing and evaluating cognitive concepts, one explanation for this lack of interest could be that Number Theory is not easily formalized, as it moves simultaneously in the logic of discovery and that of proof, and its reasoning is largely based on common sense, which is not easily standardize.However, taking into consideration our recent experience [5], we believe that students are inclined to think intuitively, discover patterns, and give reasons on problems in basic Number Theory, such as those suggested above.A future study based on a teaching intervention utilizing tasks such as those presented in Section 2, could explore this possibility in detail.

( 2 )
If (x, y) is a solution of Eq. (3), then ax+by = d ⇒ x ≡ d•a −1 (mod b), that is, the smallest non-negative value for x is the number x (d) that satisfies 0 ≤ x (d) < b and x (d) ≡ d • a −1 (mod b).Further, observe that, since d takes arbitrary values, x (d) can in fact take any value within the described range.From these observations, we get that the worst case scenario is for (x (d) , y (d) ) = (b − 1, −1) to be a solution and this occurs exactly when d = ab − a − b.Eq. (2) follows.In addition, we obtain an easy characterization of C a,b .In particular, given a, b ∈ Z >0 , with gcd(a, b) = 1 and some 0 ≤ d < ab − a − b, we can check whether d ∈ C a,b as follows: (1) Compute x (d) as the unique number such that 0 ≤ x (d) < b and x (d) ≡ d • a −1 (mod b).

1 )
Show that ab − a − b ̸ ∈ C a,b .(2) Show that ab − a − b + 1 ∈ C a,b , by adding the suitable minimal unit expression to ab − a − b = a(b − 1) + b(−1) ≥0 : d = ax + by for some x, y ∈ Z ≥0 } and identifying the largest integer that is not in this set.This integer is known as the Frobenius number and we denote it by f a,b .Regarding this number, it is well-known that (1)k 2. Given the equation(1)5x + 8y = d, with unknowns x, y and parameter d ∈ Z ≥0 .Find the maximum value of the parameter d for which Eq. (1) is impossible in Z ≥0 , i.e., there is no pair