On the Solutions of Three Variable Frobenius Related Problems Using Order Reduction Approach

This paper presents a new approach to determine the number of solutions of three variable Frobenius related problems and to find their solutions by using order reducing methods. Here, the order of a Frobenius related problem means the number of variables appearing in the problem. We present two types of order reduction methods that can be applied to the problem of finding all nonnegative solutions of three variable Frobenius related problems. The first method is used to reduce the equation of order three from a three variable Frobenius related problem to be a system of equations with two fixed variables. The second method reduces the equation of order three into three equations of order two, for which an algorithm is designed with an interesting open problem on solutions left as a conjecture.

A consequence of the theorem is that there are exactly (m−1)(n−1) 2 positive integers, which cannot be expressed in the form am + bn. The proof is based on the fact that in each pair of the form (k, (m − 1)(n − 1) − k − 1), exactly one element is expressible. There are many stories surrounding the origin of the Chicken Mc-Nugget theorem. However, the most popular by far remains that of the Chicken McNugget. Originally, McDonald's sold its nuggets in packs of 9 and 20. Thus, to find the largest number of nuggets that could not have been bought with these packs creates the Chicken McNugget Theorem (the answer worked out to be 151 nuggets). More description on the history of McNugget problem can be found, for example, in [2,12].
In the next section, we use the table to give the number of solutions of (1). The process to derive the result also suggests an order reduction algorithm. In Section 3, we will present another order reduction algorithm based on the Bézout's lemma. A conjecture about the solution structure is also given.
2 The number of solutions of (1) First, we establish the following result about the number of the solutions of (1).
We use the formula of the number of nonnegative solutions of ax + by = m given in [4] with modification for the case the nonnegative solution does not exist. Binner's formula is equivalent to the one given in Tripathi [13]. In addition, the paper [10] gives the pretty much the same idea as that used in [4].
Since 3 is a factor of the left-hand side of (12), we have Thus, we need to consider three cases for n ≡ 0, 1, 2 (mod 3), respectively, namely respectively.
Then all solutions of the equations are (x 0 + qt, y 0 − pt) for all t ∈ Z.
Since 84 ≡ 0 (mod 3), we have the number of the solutions of the equation Form the formula for p {a,b} (n) presented in the Introduction by noting a = 2, b = 3, and n = 28, we have 28 = 4 · 6 + 4 with q = 4 and r = 4 While for a = 2, b = 3, and n = 8, we have 8 = 1 · 6 + 2 with q = 1 and r = 2 satisfying 1 < r < 6. Thus The nonnegative solutions of 2x + 3y = 28 − 20z = 28 can be found from Proposition 2.3 and Euclidean algorithm as follows: The non-negative solutions of 2x + 3y = 28 − 20z = 8 are For problems for which the Euclidean algorithm is inefficient, an alternate approach is presented below. Consider the equation to be px + qy = m with the given triple (p, q, m), for which m is divisible by d = gcd(p, q), we are seeking integer solutions (x,y).
Step 1: Want a nonnegative integer solution (x 0 , y 0 ) for Step 2: Use modular arithmetic on the equation in Step 1.
Step 3: Solve the above congruence using the smallest possible nonnegative value y ′ . Substituting the value of y ′ in the equation finds x ′ . If x ′ and y ′ > 0, then, x 0 = x ′ and y 0 = y ′ . Then step 4 can be skipped.
Step 4: If x ′ < 0, then use Bezout's Lemma to obtain the first nonnegative solution(x 0 , y 0 ) from (x ′ , y ′ ) with a positive integer n such that x 0 = x ′ + nq d > 0 and y 0 = y ′ − np d > 0, where d = gcd(p, q). If no such n exists, then there are no nonnegative solutions to the problem. For example, 3x+4y = 5 does not have any nonnegative solutions.
Illustration of the algorithm is as follows. Consider 3x + 5z = 14 Note that the common divisor, d, of 3 and 5 is 1.
From Taylor's expansion, we have For smaller coefficients p, q, and ℓ, we may find N n more efficiently. For instance, if p = 1, q = 2, and ℓ = 3, then the solution number N n can be found by using the partial fraction technique shown below. Let ω = e 2πi/3 = cos(2π/3) + i sin(2π/3). Then and N n must be an integer, we obtain N n = (n+3) 2

12
, where < α > (α = 1/2) is referred to as the closest integer to α. For instance, the solution number for x + 2y + 3z = 14 is 3 Order reduction algorithm and exhaustive method for solving (1) To find all solutions of (1) we may use the following Bézout's Lemma (cf. Millman, Kahn, and one of the authors [9, Theorem 9]).
where k is an arbitrary integer.
Let p and q be integers with the greatest common divisor d. Then from Bézout's lemma there exist integers x and y such that px+qy = d. More generally, the integers of the form px + qy are the multiples of d. Expressions x ′ and y ′ shown in (28) are clearly true.
We are going to use Bézout's lemma to solve a problem with two different features: (1) We are solving the Diophantine equation (1) of order 3, and (2) we are seeking all non-negative solutions.
Our algorithm is based on an order reducing technique. More precisely, let p, q, ℓ, and n ∈ N with p ≤ q ≤ ℓ, and let x, y, z ∈ Z. A linear Diophantine equation ax + by + cz = d of three-variables is reduced to the following three Diophantine equations of two variables after setting x, y, z = 0, respectively. Suppose one of (p, q), (q, ℓ), and (ℓ, p) are divisors of n. Bézout's lemma 3.1 shows that at least one of the Diophantine equations px + qy = n qy + lz = n and px + lz = n has solutions. For instance, if (p, q)|n, then one pair of non-negative solutions (x 0 , y 0 ) of the first equation px+qy = n can be found easily by using an extended Euclidean algorithm easily. Particularly, if (p, q) = p (or q), then it is easier to obtain a pair of solutions as (n/p, 0) (or (0, n/q)), and all pairs of solutions of the equation can be represented in the form where k is an arbitrary integer. The set of all those solutions (x, y, 0) is denoted by S, i.e., We are seeking nonnegative solutions of px + qy = n, i.e., a particular solution pair (x 0 , y 0 ), where x 0 , y 0 ≥ 0, and all solution pairs in (30) for k such that that is x 0 + k q (p,q) , y 0 − k p (p,q) ≥ 0. In the above algorithm, we must assume one of the conditions, (p, q)|n, (q, ℓ)|n, and (p, ℓ)|n, holds; otherwise, our algorithm fails because if gcd(p, q) does not divide n, then clearly px + qy = n has no solutions since gcd(p, q) divides the left hand side but not the right hand side.
Consequently, if p, q, and l are pairwise coprime numbers, then px+ qy + lz = n can be solved by using our algorithm. As what we have defined before, the set of all solutions of the first equation in (29) is denoted by S 1 . Similarly, we let S 2 and S 3 denote the sets of the solutions of the second and the third equations of (29), respectively.
It is obvious that for any integers a, b, and c, with a + b + c = 0 and row vectors s i ∈ S i , i = 1, 2, and 3, (as 1 + bs 2 + cs 3 )/(a + b + c) is also a solution of px + qy + ℓz = n because Because a solution obtained by using our order reducing method has at least one zero component, we can see how important it is to use these linear combinations complete the set of all solutions of (1), say to calculate the solutions with non-zero components. We will also demonstrate how to build those linear combinations by using some examples.
Proposition 3.2. Let sets S i , i = 1, 2, 3, be defined before, and let a, b, and c be any non integers, with a + b + c = 0. We have notation is a solution of (1).
The proof is obvious from the above discussion, and is, therefore, omitted.
To avoid using linear combinations, we may use the following exhaustive method. We assume p ≤ q ≤ ℓ and let Then the solution set of (1) is ∪ for the cases of z = 0, x = 0, and y = 0 in (32). Equation (35) can be written as 2x + 3y = 28. Hence, y = 0 yields a particular solution of (35) as x = 14 and y = 0. The solution set S 3 is 9) , 0 − k 1 6 (6, 9) , which shows (33) has no non-negative integer solutions (y, z). Hence, the solution set of equation (33) is Finally, from equation (34) we have To have non-negative solutions of (34), we must have z = 0 or z = 3, which implies Hence, we have found 6 distinct solutions of (32). The 7th solution is from a linear combination of the elements (8, 4, 0), (11,2,0) and ( Hence, the solutions of 6x + 9y + 20ℓ = 84 are as the same as (36) However, sometimes we have many solutions of px + qy + rz = n that are not from the union ∪ 3 i=1 S i . Therefore, we need calculate the number of the solutions and develop an efficient way (see below) to find the solutions in the form of (as 1 + bs 2 + cs 3 )/(a + b + c), where a, b, c ∈ Z and s i ∈ S i , i = 1, 2, 3. For instance, we may consider (p, q, l) = (1, 2, 3), and the corresponding solution sets of x + 2y + 3z = 14 by using our algorithm are S 1 = {(0, 7 + 3k 3 , −2k 3 ) : k 3 ∈ Z}, S 2 = {(14 + 3k 2 , 0, −k 2 ) : k 2 ∈ Z}, and S 3 = {(2k 1 , 7 − k 1 , 0) : k 1 ∈ Z}, respectively. Hence, Remark 3.4. For small p and q, the number of the solutions, denoted by p p,q (n), of the Diophantine equation px + qy = n can be also found by using the theory of partition, which is similar to the process to derive (3) and (4). More precisely, from the theory of partition (cf. [1]), the generating function of the sequence (P n = p p,q (n)) n≥0 is n≥0 .
From Taylor's expansion, we have Let N n and P n be defined by (26)-(27) and (40)-(41), respectively. Then Consequently, by using a straightforward exhaustive method for solving the Diophantine equation (1), we have .
As the simplest linear combination, we choose (a, b, c) = (1, −1, 1) and calculate We now present the following conjecture for further discussion of finding all of nonnegative solutions of Diophantine equation (1).
We will illustrate that the conjecture is reasonable by using some examples. Meanwhile, we will give an algorithm to apply (43) to construct all of the solutions of the Diophantine equations in the examples.
We say the set S j is the smallest set of the collection { S i : i = 1, 2, 3}, if the cardinal number | S j | = min{| S 1 |, | S 2 |, | S 3 |}. We say the set S k is the next smallest set of the collection { S i : i = 1, 2, 3}, if the cardinal number | S k | = min{| S 1 |, | S 2 |, | S 3 |}\{| S j |}. We say (x i , y i , z i ) is the smallest element of a set S j = {(x j , y j , z j ) : j = 1, 2, . . .}, if x i + y i + z i is the smallest possible number in the set S j . Assume p < q < ℓ in (1). Then, in general, S 1 is the smallest set and S 2 is the next smallest set. One can also check that this is the case, in equations (37), (38), and (37). Our algorithm can be described based on Proposition 3.2 as follows: Step 1 Determine the smallest element of the smallest set.
Step 2 Use the smallest element (s 11 , s 12 , s 13 ) determined in the first step to subtract all of the elements in the next smallest set, S 2 , provided that the differences of the third components are positive.
Step 3 Add the resulting elements obtained in the second step to all of the elements in S 3 , provided the resulting sums for all components are positive.
Step 4 The union of the sets S i , i = 1, 2, 3, and those obtained in the third step consist of the whole solution set of (1).

,
which is implied by the conjecture if it is true.