0% found this document useful (0 votes)
10 views19 pages

Frobeniusjuliol Opt

Uploaded by

Márton Pelyvás
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views19 pages

Frobeniusjuliol Opt

Uploaded by

Márton Pelyvás
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/33421624

The Frobenius problem: a geometric approach

Article · July 2007


Source: OAI

CITATIONS READS

0 299

2 authors:

Lali Barriere Alícia Miralles


Universitat Politècnica de Catalunya Universitat Politècnica de Catalunya
39 PUBLICATIONS 1,352 CITATIONS 18 PUBLICATIONS 210 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Alícia Miralles on 20 May 2014.

The user has requested enhancement of the downloaded file.



The Frobenius problem: A Geometric Approach
Lali Barrière†and Alı́cia Miralles
Departament de Matemàtica Aplicada IV
Universitat Politècnica de Catalunya
{lali,almirall}@ma4.upc.edu

Abstract
For the well known Frobenius problem, we present a new geometric approach, based on the
use of the n-dimensional lattice Zn , where n is the number of generators. Within this approach
we are able to study the cases of two and three generators. The main feature of our geometric
representation is that we can nicely visualize the set of gaps, i.e., the non-representable positive
integers.
In the case of two generators, we give a description of the set of gaps. Moreover, for any
positive integer, m, we derive a simple expression for the denumerant d(m; a, b).
We show that we can use the 2-dimensional lattice associated to the set of generators {a, b}
to study the Frobenius problem with generators {a, b, c}. In particular, we give, as for two
generators, a graphical representation of the set of gaps. For a large set of possible values of c,
this representation allows us to simplify the computation of the Frobenius number and compute
the number of gaps.

MSC2000: 11D85, 20M14, 20M30.

Keywords: Frobenius problem, integer lattice, semigroup.

1 Introduction
Given a finite set of positive integers, A = {a1 , . . . , an }, the Frobenius problem for A asks for the
maximum natural number that can not be represented as a positive combination of the elements
of A. The solution of the Frobenius problem, called the Frobenius number of A and denoted by
g(a1 , . . . , an ), does exists, provided that gcd(a1 , . . . , an ) = 1.
Several interesting problems are related with the Frobenius problem. Namely, the computation
of the number of non-representable integers, called gaps in the context of numerical semigroups,
and their description, and the computation of the denumerant of a representable positive integer
m, i.e. the number of non-negative representations of m on A.
This problem was introduced by Frobenius in its lectures. In 1884 Sylvester set that the
Frobenius number for n = 2 is g(a1 , a2 ) = a1 a2 − a1 − a2 and the number of non-representable
positive integers is N (a1 , a2 ) = (a1 −1)(a
2
2 −1)
[9]. Since then, the Frobenius problem has been widely

Research supported by the Ministry of Education and Science (Spain) and the European Regional Development
Fund (ERR) under projects MTM2005-08990-C02-01 and TEC2005-03575.

Corresponding author. Postal address: Campus Nord UPC; c. Jordi Girona, 3-5; 08034 Barcelona (Spain)

1
studied, from very different points of view, ranging from arthmetics and algebra to algorithmics
and complexity.
The Frobenius problem turns out to be a difficult problem. For fixed values of n, it is known
to be polynomial, whilst it is proved to be NP-complete if n is part of the input [5]. It is shown
in [2] that closed formulas doesn’t exist for the Frobenius number with a fixed number of generators
n ≥ 3. We found in the litterature a variety of works giving formulas for the Frobenius number
in particular cases. One of the classical ones is [1], where the authors also study the case of three
generators. Other methods for computing G(a1 , a2 , a3 ) are given in [3, 4, 8]. From a more algebraic
point of view, the set of representable integers is a numerical semigroup. The fundamental gaps of
a semigroup, a concept that inspired part of our results, are explicitly described in [7].
A review of the existing work up to 2005 is the book [6]. We refer the reader to this book and
the references therein for a complete overview of the state of the art.

Notation Throughout the paper we use the following notation. We say that a set of natural
numbers A = {a1 , . . . , an } satisfying gcd(a1 , . . . , an ) = 1 is a set of generators of dimension n.
Given such a set:

• R(A) = R(a1 , . . . , an ) = {m = x1 a1 + x2 a2 + · · · + xn an | xi ∈ N} denotes the set of integers


which are representable as a non-negative linear combination of elements of A. The expression
m = x1 a1 + x2 a2 + · · · + xn an is a representation of m on A.

• R(A) = R(a1 , . . . , an ) = N \ R(A) denotes the set of non-representable integers, which we will
also call gaps, as R(A) is a numerical semigroup.

• g(a1 , . . . , an ) = max R(A) denotes the Frobenius number of A.

• N (A) = |R(A)| denotes the number of gaps.

• If m is a non-negative integer, the denumerat of m and A is the number of non-negative


representations of m on A, denoted by d(m; A) . Hence, m is a gap if and only if d(m; A) = 0.

Our results For the Frobenius problem we present a new geometric approach. Within this
approach, most of the known results for n = 2 can easily be derived and visualized. Moreover, we
are able to study the case of three generators.
Our approach is based in the following idea. Given A = {a1 , . . . , an }, we associate to the
point (x1 , . . . , xn ) ∈ Zn the integer m = x1 a1 + . . . + xn an . This gives a labeling of the integer
n-dimensional lattice.
For n = 2, A = {a, b}, we identify a particular triangle in the plane containing exactly the set
of non-representable positive integers. This allows us to give a complete description of this set.
Moreover, we derive a simple expression for the denumerant, d(n; a, b).
Let A = {a, b, c} be a set of positive integers, with gcd(a, b) = 1 and a < b. We use the
2-dimensional lattice and the labeling associated to {a, b} to study the Frobenius problem for
A = {a, b, c}. In particular, if c is non-representable on {a, b} and 2c is, then we can easily compute
g(a, b, c) and N (a, b, c), and also characterize the set of integers which are non-representable by
{a, c, b}. The same results are proved for a particular configuration of the multiples of c in the set
of gaps for {a, b}.

2
73 78 83 88 93 98 103 108 113 118 123 128 133 138 143 148 153 158

60 65 70 75 80 85 90 95 100 105 110 115 120 125 130 135 140 145

47 52 57 62 67 72 77 82 87 92 97 102 107 112 117 122 127 132

34 39 44 49 54 59 64 69 74 79 84 89 94 99 104 109 114 119

21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106

8 13 18 23 28 33 38 43 48 53 58 63 68 73 78 83 88 93

-5 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80

-18 -13 -8 -3 2 7 12 17 22 27 32 37 42 47 52 57 62 67

-31 -26 -21 -16 -11 -6 -1 4 9 14 19 24 29 34 39 44 49 54

-44 -39 -34 -29 -24 -19 -14 -9 -4 1 6 11 16 21 26 31 36 41

-57 -52 -47 -42 -37 -32 -27 -22 -17 -12 -7 -2 3 8 13 18 23 28

-70 -65 -60 -55 -50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15

-83 -78 -73 -68 -63 -58 -53 -48 -43 -38 -33 -28 -23 -18 -13 -8 -3 2

-96 -91 -86 -81 -76 -71 -66 -61 -56 -51 -46 -41 -36 -31 -26 -21 -16 -11

-109 -104 -99 -94 -89 -84 -79 -74 -69 -64 -59 -54 -49 -44 -39 -34 -29 -24

Figure 1: The Frobenius lattice for a = 5 and b = 13.

2 The geometric approach


For a given set of generators, A = {a1 , . . . , an }, we can consider the linear map
ℓ: Zn → Z
(x1 , . . . , xn ) 7→ x1 a1 + · · · xn an
This map can be viewed as an integer labeling of Zn . If m = x1 a1 + · · · + xn an , we label the point
of coordinates (x1 , . . . , xn ) by the integer m. Notice that the function ℓ is linear and surjective,
and its kernel is the set
ker ℓ = {(x1 , . . . , xn ) ∈ Zn | x1 a1 + · · · + xn an = 0}
that is, the set of integer points lying on the hyperplane of Rn of equation x1 a1 + · · · + xn an = 0.
In this paper we study the first two cases, n = 2 and n = 3. (See Figure 1 for a simple example.)

2.1 The case of two generators


Let us first concentrate on the case of two generators. We define the Frobenius lattice and study
its geometric properties.
Definition 2.1 (Frobenius lattice) Given an ordered set of generators A = {a, b}, with a < b,
the Frobenius lattice associated to A is the pair (Z2 , ℓ), where ℓ is the map from the infinite lattice
Z2 to Z
ℓ: Z2 → Z
(x, y) 7→ xa + yb
We call ℓ(x, y) the label of (x, y).

3
PSfrag F−1 F0 F1 F2

U−1

(−b, a) (0, a)
U0
T−1 U1

(0, 0) (b, 0)

T0

L−1
(b, −a) (2b, −a)

T1
L0

(2b, −2a)
L1

Figure 2: The Frobenius lattice and its basic features.

We next describe the geometric objects associated to the Frobenius lattice. A graphical repre-
sentation is given in Figure 2.
The set of points labeled 0 are the integer points which lie on the line of equation xa + yb = 0

ker ℓ = {(λb, −λa) | λ ∈ Z}

As a consequence, for every m ∈ Z, the set of points labeled m are the integer points which lie on
the line of equation xa + yb = m. If m = ua + vb = ℓ(u, v) then for every λ ∈ Z

ℓ((u, v) + (λb, −λa)) = m

The labeling ℓ is a covering of Z2 by Z and, thus, induces a partition of the plane. We say that
the plane is decomposed into strips, which are defined as follows.
For every m ∈ Z and λ ∈ Z, there is exactly one point (x, y) such that m = ℓ(x, y) and
λb ≤ x < (λ + 1)b. This allows us to define the strip associated to λ.

Definition 2.2 (λ-strip associated to {a, b}) For every λ ∈ Z, we define the strip Fλ or the
λ-strip associated to the set {a, b} as the subset of the Frobenius lattice

Fλ = {(x, y) ∈ Z2 | λb ≤ x < (λ + 1)b} = [0, b) × Z

The collection of sets {Fλ }λ∈Z constitutes a partition of Z2 . Indeed, they are pairwise disjoints
and they cover Z2 . Moreover, for every integer λ, the restriction ℓ|Fλ : Fλ → Z is a bijection.

4
For every pair of integers λ1 , λ2 , the translation of vector ((λ2 − λ1 )b, −(λ2 − λ1 )a) is a bijection
between Fλ1 and Fλ2 which applies every point of Fλ1 onto the point inFλ2 with the same label.
For any given λ, we now give the definition of three subsets in the λ-strip whose respective
sets of labels are the negative integers, the non-representable positve integers, R(a, b), and the
representable integers R(a, b) (see Figure 2).

• The points below the line xa + yb = 0 are labeled by the negative integers. We define

Lλ = {(x, y) ∈ Fλ | xa + yb < 0}

• The positive integers are the labels of the points satisfying xa + yb ≥ 0. Among these points,
we distinguish two sets.

Tλ = {(x, y) ∈ Fλ | xa + yb > 0, y < −λa}

and
Uλ = {(x, y) ∈ Fλ | xa + yb ≥ 0, y ≥ −λa}

When using this notation, we have to take into account that a representable integer has also
non-valid representations (m = ℓ(u, v) is a valid representation of m if and only if u, v ≥ 0).
In F0 , the set of representable numbers, R(a, b), is the set of labels of the points satisfying y ≥ 0

ℓ(U0 ) = R(a, b)

and the set of gaps, R(a, b), is the set of labels of the triangle T0

ℓ(T0 ) = R(a, b)

Thanks to this representation we can easily deduce most of the known results on the Frobenius
problem with two generators. In particular, both the Frobenius number and the number of gaps
follow nicely from the Frobenius lattice and the definition of T0 .

• The Frobenius number of A is the labeling of the up-right corner of T0 ,

g(a, b) = max{ℓ(x, y)|(x, y) ∈ T0 } = ℓ(b − 1, −1) = (b − 1)a − b = ab − a − b

because the labeling function is increasing in both coordinates and, in T0 , the point of maxi-
mum first coordinate is the point of maximum second coordinate.

• The number of gaps generated by A is the number of integer points in T0 ,

(a − 1)(b − 1)
N (A) = |R(A)| =
2
because no points in T0 lie on the line xa + yb = 0.

5
⌈ ab ⌉, −1

xa + yb = 0 (0, 0) (b − 1, −1)

y = −1
Sj
(b − 1, −j)
y = −j  
⌊ bj
a ⌋, −j
(b − 1, −(a − 1))
 
bj
a , −j
 
⌈ bj
a ⌉, −j
(b, −a)

Figure 3: The set of gaps.

2.1.1 Description of the set of gaps


Let us see how the elements of R(a, b) are distributed in T0 . For a graphical representation, see
Figure 3.
Notice that, for every u1 , u2 ∈ Z, ℓ(u1 , v) ≡ ℓ(u2 , v) ≡ bv (mod a). This implies that R(A) =
ℓ(T0 ) can be partitioned into congruence classes modulo a, which correspond to horizontal segments
in the geometric representation. We denote by Sj the segment T0 ∩ {(x, y) | y = −j}.
For every j, 1 ≤ j ≤ a − 1, the number of points in Sj is
   
bj b
nj = b − = (a − j)
a a

By symmetry, na−j = ⌊ bj
a ⌋ and nj + na−j = b − 1.

• The points (i, −j) ∈ Sj are


l m  l m 
bj bj
, −j , + 1, −j , . . . , (b − 1, −j)
a a
and their respective labels are
l m 
bj l bj m
ℓ + k, −j = a + ak − bj, 0 ≤ k ≤ nj − 1
a a

• In Sj , the minimum and the maximum labels are


l m  l m
min ℓ(Sj ) = ℓ bj
a , −j = a bj
− bj
l m a
max ℓ(Sj ) = ℓ bj
a + nj , −j = ℓ(b − 1, −j) = a(b − 1) − bj

If r = b (mod a), then the smallest non-representable integers are

{1, 2, 3, · · · , a − 1} = {r (mod a), 2r (mod a), . . . (a − 1)r (mod a)}

6
m Positive representations

(−b, 2a)
m

(−b, a) (0, a)
m

(0, 0) (b, 0)
m

(b, −a) (2b, −a)

Figure 4: The denumerant of m with respect to {a, b}, d(m; a, b). We represent by • the points
which give a positive representation of its label.

Each of these points is the minimum of one of the segments Sj .


Let us concentrate on r = b − a⌊ ab ⌋. Notice that r ∈ ℓ(Sa−1 ) and thus
l 
b(a − 1) m
r=ℓ , −(a − 1)
a
Moreover, rj ∈ Sa−j and l 
b(a − j) m
rj = ℓ , −(a − j)
a
In particular, the coordinates of 1 in T0 can be obtained by solving the equation
kr (mod a) = 1
Then, ℓ(b − ⌊ kb
a ⌋, −(a − k)) = 1.

2.1.2 The denumerant


We can use the Frobenius lattice to give a simple expression of the denumerant of a given integer.
This expression relates the denumerant of m with the position in the plane of any of the points
labeled m. Figure 4 illustrates our result, which is given in the following Proposition.
Proposition 2.3 Let m ∈ N and m = ℓ(u, v). Then,
juk jv k
d(m; a, b) = + +1
b a
Proof. If m = ℓ(u, v) = ℓ(u′ , v ′ ) then u′ = u + λb and v ′ = v − λa, for some integer λ. It is clear
that  ′ j k  ′ j k
u u v v
= + λ and = −λ
b b a a
This implies that ⌊ ub ⌋ + ⌊ va ⌋ + 1 is the same for every (u, v) ∈ ℓ−1 (m). Hence, we can assume
w.l.o.g. that (u, v) ∈ F0 , i.e. 0 ≤ u < b. In this case, the set of non-negative representations
 v  of
v
 | 0 ≤ λ ≤ ⌊ a ⌋}. The number of elements
m is {(u, v) + λ(b, −a)    in this set is d(m; a, b) = a + 1.
Since in this strip ub = 0, we can write d(m; a, b) = ub + av + 1.

7
F0 F0 + k

Xk = [u, b − 1] × [−v, −1]

k = ℓ(u, −v)

Figure 5: Adding a gap k to the set of generators {a, b}.

Remark that d(m; a, b) = 0 if and only if m is a gap.

3 Some results on the case of three generators


In this section we deal with the Frobenius poblem for {a, b, c} with gcd(a, b) = 1, a < b and
c ∈ R(a, b). For this purpose, we will use the 2-dimensional lattice associated to {a, b} instead of
the 3-dimensional lattice associated to {a, b, c}.
First, we give the plane construction that allows us to represent g(a, b, c) in Z2 . Our concern is to
determine the distribution of the multiples of c in the triangle T0 , for which we know ℓ(T0 ) = R(a, b).
In fact, the Frobenius problem with three generators {a, b, c} is easy to solve if c is a gap but 2c
is not. This case covers half of the possible values of c. We show also that, in two particular cases,
the set of gaps R(a, b, c) has a nice plane represention as a subset of T0 , and both the Frobenius
number and the number of gaps are easy to compute.

3.1 The representation of R(a, b, c) in Z2


For three generators, {a, b, c}, the labeling of (x, y, z) ∈ Z3 is defined as ℓ(x, y, z) = xa + yb + zc.
This gives a labeling of the points of the three dimensional lattice.
Given c = ua − vb ∈ R(a, b), with (u, −v) ∈ T0 , the translation of vector (u, −v) applied to F0
gives a new strip, denoted by F0 + c. We denote by U0 + c the set obtained from U0 by the same
translation. Since (u, −v) ∈ T0 , (U0 + c) ∩ T0 is a rectangle containing the gaps of R(a, b) but have
a non-negative representation of the form xa + yb + c. Notice that xa + yb + c can be represented
in Z3 by (x, y, 1).
In this way, the set of gaps for {a, b, c} can be obtained from T0 , by removing the points in
U0 + c, U0 + 2c, U0 + 3c, and so on. In Figure 5 we show the representation of the 3-dimensional
lattice in the plane. More formally, we have the following.

Definition 3.1 (k-representable integer) Let {a, b} be a set of two positive integers with a < b,

8
gcd(a, b) = 1. For a given non-negative integer k we define the set of k-representable integers by

Rk (a, b) = {m ∈ Z | m = λ1 a + λ2 b + k, λ1 ≥ 0, λ2 ≥ 0} = ℓ(U0 + k)

In particular, if k = 0, R0 (a, b) = R(a, b).

Definition 3.2 (k-rectangle) Let {a, b} be a set of two positive integers with a < b, gcd(a, b) = 1.
For a given non-negative integer k we define the k-rectangle by the set of points

Xk = (U0 + k) ∩ T0

Notice that, with this definition ℓ(Xk ) = Rk (a, b) \ R(a, b). That is, if k is a gap on {a, b}, then
the k-rectangle contains the points in T0 which are gaps on {a, b} but have a representation on
{a, b, k} of the form xa + yb + k.
The k-rectangle is empty if k is representable on {a, b}. If k is a gap, easy computations give
the following property (see Figure 5).
Property 1 Let {a, b} be a set of two positive integers with a < b, gcd(a, b) = 1. If k = ua − vb is
the representation of k in T0 then

Xk = [u, b − 1] × [−1, −v] (1)

As the two following properties show, in order to describe R(a, b, c), we are interested on the
ic-representable integers, {Ric (a, b)}i≥0 and the ic-rectangles, {Xic }i≥1 .
Property 2 The set of integers which have a non-negative representation by {a, b, c} is

[
R(a, b, c) = Ric (a, b)
i=0

Property 3 The set of points in T0 with labels in R(a, b, c) is



[
Xic
i=1

In what follows we show that the set of gaps on {a, b, c} depends only on a relatively small
number of multiples of c.
Definition 3.3 Let {a, b} be a set of two positive integers with a < b, gcd(a, b) = 1. For a given
c ∈ R(a, b), we define the first representable multiple as the positive number, denoted by s > 1, such
that
c, 2c, . . . , (s − 1)c ∈ R(a, b)
and
sc ∈ R(a, b)

Proposition 3.4 If c ∈ R(a, b) and s is the first representable multiple of c on {a, b}, then
s−1
[
R(a, b, c) = Ric (a, b)
i=0

9
Proof. By Property 2, we need only to prove that
s−1
[
R(a, b, c) ⊆ Ric (a, b)
i=0

Since sc ∈ R(a, b), there are two integers m1 ≥ 0 and m2 ≥ 0 such that sc = m1S a + m2 b. Let
s−1
m = xa + yb + zc ∈ R(a, b, c), with x ≥ 0, y ≥ 0 and z ≥ 0. If z < s, then m ∈ i=0 Ric (a, b).
Assume that z ≥ s, and let z = ps + q with 0 ≤ q ≤ s − 1 the integer division of z by s.
We can write m = xa + yb + zc = xa + yb + (ps + q)c = Sxa + yb + p(m1 a + m2 b) + qc =
s−1
(x + pm1 )a + (y + pm2 )b + qc, where 0 ≤ q ≤ s − 1. Thus, m ∈ i=0 Ric (a, b).

Corollary 3.5 ∀c ∈ R(a, b), if c, 2c, · · · , (s − 1)c ∈ R(a, b) and sc ∈ R(a, b),
s−1
[
R(a, b, c) = R(a, b)\ ℓ(Xic ).
i=1

Proof. It follows straightforward from Proposition 3.4 and the definition of Xic .

3.2 Solving the Frobenius problem


Although the Frobenius number for three generators is known, we have defined a nice geometric
description of the set of gaps which will be used to give a more intuitive computation of g(a, b, c),
toghether with the computation of the number of gaps N (a, b, c).
In fact, given c ∈ R(a, b), if the first representable multiple of c is small, we can give simple
expressions for both the Frobenius number g(a, b, c) and the number of gaps N (a, b, c). We start
by completely characterize the case s = 2, that is, c is a gap on {a, b} and 2c is not. An example
of this case is shown in Figure 6.

Proposition 3.6 Let c ∈ R(a, b) and c = ua − vb the representation of c in T0 . Then, the first
representable multiple of c is s = 2 if and only if 2 = ⌈ ub ⌉ ≤ ⌊ va ⌋.
Under these conditions, the number of gaps and the Frobenius number corresponding to the set
of generators {a, b, c} are, respectively,

N (a, b, c) = N (a, b) − (b − u)v

and
g(a, b, c) = max{ℓ(u − 1, −1), ℓ(b − 1, −v − 1)}

Proof. If c = ua − vb is the representation of c in T0 , then 1 ≤ u < b and 1 ≤ v < a. The first


representable multiple of c is 2 if and only if (2u, −2v) ∈ U1 . This is equivalent to

u < b ≤ 2u and 2v ≤ a ⇔
b a
1< u ≤ 2 and 2 ≤ v ⇔
2 = ⌈ ub ⌉ ≤ ⌊ av ⌋

10
(u − 1, −1) (b − 1, −v − 1)

(0, 0)
Xc

c = ℓ(u, −v)

2c = ℓ(2u, −2v)

Figure 6: For c = ℓ(u, −v), with 2 = ⌈ ub ⌉ ≤ ⌊ av ⌋, the Frobenius number of {a, b, c} is g(a, b, c) =
max{ℓ(u − 1, −1), ℓ(b − 1, −v − 1)} and the number of gaps is N (a, b, c) = N (a, b) − (b − u)v.

By Corollary 3.5, the set of gaps R(a, b, c) are represented in the plane by the set T0 \ Xc .
Consequently,
N (a, b, c) = |T0 \ Xc | = N (a, b) − |Xc |
and
g(a, b, c) = max ℓ(T0 \ Xc )
Property 1 implies |Xc | = (b − u)v and, thus

N (a, b, c) = N (a, b) − (b − u)v

Let us compute the maximum label of the points in T0 \Xc . By the monotonicity of the labeling
function ℓ, we can distinguish two local maxima (see Figure 6).

• In the set {(x, y) ∈ T0 \ Xc | y ∈ [−v, −1]}, the maximum label is attained in the point
C1 = (u − 1, −1), since C1 + (0, 1) ∈ U0 and C1 + (1, 0) ∈ Xc .
• In the set {(x, y) ∈ T0 \ Xc | y ∈ [−a, −v − 1]}, the maximum label is attained in the point
C2 = (b − 1, −v − 1), since C2 + (0, 1) ∈ Xc and C2 + (1, 0) ∈ U1 .

This gives

g(a, b, c) = max{ℓ(C1 ), ℓ(C2 )} = max{ℓ(u − 1, −1), ℓ(b − 1, −v − 1)}

which completes the proof.


We have shown that, if c is a gap for {a, b}, but 2c is not, then we can use a simple geometric
reasoning to compute the number of gaps for {a, b, c} as well as the Frobenius number. If s 6= 2 a
similar reasoning can be applied in some particular cases. Roughly speaking, if c is represented in
T0 by (u, −v), Lemma 3.7 gives a necessary and sufficient condition to ensure that (2u, −2v) is in
T0 (remark that it could be in T1 ) and the points (iu, −iv) are also in T0 , for i = 2, . . . , s − 1. The

11
computation of the number of gaps and the Frobenius number under the conditions of Lemma 3.7
are given in Theorem 3.9.
The geometric representation of the Frobenius lattice gives an intuitive approach to our results
(see Figures 6 and 7). The basic idea is that computations are easy if the points in T0 , the labels of
which are the multiples of c, are aligned. In fact, the hypothesis of Theorem 3.9 and Theorem 3.10
are symmetric, as shown in Figures 7 and 8.

Lemma 3.7 Let c ∈ R(a, b) and c = ua − vb the representation of c in T0 . Then, s = ⌈ ub ⌉ ≤ ⌊ av ⌋


if and only if

(u, −v), (2u, −2v), . . . ((s − 1)u, −(s − 1)v) ∈ T0 and (su, −sv) ∈ U1 (2)

Proof. Assume that that (u, −v) ∈ T0 . This is equivalent to 0 < u < b and 0 < v < a. Then,
b a
s= u ≤ v ⇔
b a
s−1< u ≤ s and 0 < s ≤ v ⇔
(s − 1)u < b ≤ su and 0 < sv < a

By definition of T0 and U1 , this is equivalent to

((s − 1)u, −(s − 1)v) ∈ T0 and (su, −sv) ∈ U1

And, since (u, −v) ∈ T0 , this is equivalent to (2).


Next we give a technical Lemma that will allow us to do easy computations in the proof of
Theorem 3.9.
Lemma 3.8 Let c ∈ R(a, b), c = ua − vb the representation of c in T0 , and r > 0 such that

(u, −v), (2u, −2v), . . . (ru, −rv) ∈ T0 (3)

For every i = 1, . . . , r, let Yic = [iu, b − 1] × [−iv, −(i − 1)v − 1], then
r
[ r
[
Xic = Yic (4)
i=1 i=1

and the rectangles {Yic }i=1...r are pairwise disjoint.


Proof. Equation (4) follows from Equation (1) in Property 1. The pairwise disjointness of the
collection of rectangles is clear from its definition.

Theorem 3.9 Let c ∈ R(a, b) and c = ua − vb the representation of c in T0 . If s = ⌈ ub ⌉ ≤ ⌊ va ⌋,


then s is the first representable multiple of c. Moreover,
s(s − 1)
N (a, b, c) = N (a, b) − (s − 1)bv + uv
2
and
g(a, b, c) = max{ℓ((s − 1)u − 1, −(s − 2)v − 1), ℓ(b − 1, −(s − 1)v − 1)}

12
(3u − 1, −2v − 1)
(b − 1, −3v − 1)
(0, 0)
Yc
c = ℓ(u, −v)
Y2c
2c = ℓ(2u, −2v) Y3c
3c = ℓ(3u, −3v)
4c = ℓ(4u, −4v)

Figure 7: For c = ℓ(u, −v), with 4 = ⌈ ub ⌉ ≤ ⌊ av ⌋, the Frobenius number of {a, b, c} is g(a, b, c) =
max{ℓ(3u − 1, −2v − 1), ℓ(b − 1, −3v − 1)} and the number of gaps is N (a, b, c) = N (a, b) − (b −
u)v − (b − 2u)v − (b − 3u)v.

Proof. Lemma 3.7 implies that s is the first representable multiple of c (on {a, b}).
To prove the Theorem, we have to compute the number of gaps and the Frobenius number, for
the set of generators {a, b, c}. (See Figure 7 for a graphical explanation.)
By Corollary 3.5,
s−1
[
N (a, b, c) = N (a, b) − Xic
i=1

Now, by Lemma 3.8, with Yic = [iu, b − 1] × [−iv, −(i − 1)v − 1] as in the mentioned Lemma,
s−1 s−1 s−1 s−1
[ [ X X s(s − 1)
Xic = Yic = |Yic | = (b − iu)v = (s − 1)bv − uv
2
i=1 i=1 i=1 i=1

Thus,
s(s − 1)
N (a, b, c) = N (a, b) − (s − 1)bv + uv
2
s−1
[
The Frobenius number is the maximum label of the points in T0 \ Xic . By Lemma 3.8,
i=1

s−1
!
[
g(a, b, c) = max ℓ T0 \ Yic
i=1

A reasoning analogous to the proof of Proposition 3.6 gives that the maximum is attained in one
of the local maxima
Ci = (iu − 1, −(i − 1)v − 1), for i = 1, . . . , s − 1
and
Cs = (b − 1, −(s − 1)v − 1)

13
(−4u′ − 1, a − 1)
′ ′
5c = ℓ(−5u , 5v ) (−3u′ − 1, 4v ′ − 1)

4c = ℓ(−4u′ , 4v ′ )

3c = ℓ(−3u′ , 3v ′ )

2c = ℓ(−2u′ , 2v ′ )

c = ℓ(−u′ , v ′ )

(0, 0)

Figure 8: For c = ℓ(−u′ , v ′ ), with 5 = ⌈ va′ ⌉ ≤ ⌊ ub′ ⌋, the Frobenius number of {a, b, c} is g(a, b, c) =
max{ℓ(−4u′ − 1, a − 1), ℓ(−3u′ − 1, 4v ′ − 1)} and the number of gaps is N (a, b, c) = N (a, b) − u′ v ′ −
2u′ v ′ − 3u′ v ′ − 4u′ (a − 4v ′ ).

By noticing that ℓ(Ci ) = ℓ(iu − 1, −(i − 1)v − 1) = (iu − 1)a − (i − 1)vb − b = ic − a − b + vb, which
is increasing in i, we can conclude that

g(a, b, c) = max{ℓ((s − 1)u − 1, −(s − 2)v − 1), ℓ(b − 1, −(s − 1)v − 1)}

a b
Theorem 3.10 Let c = ℓ(u, −v) ∈ R(a, b). If s = ⌈ a−v ⌉ ≤ ⌊ b−u ⌋, then s is the first representable
multiple of c. Moreover,

s(s − 1)
N (a, b, c) = N (a, b) − (b − u)(s − 1)a + (b − u)(a − v)
2
and

g(a, b, c) = max{ℓ(−(s − 2)(b − u) − 1, (s − 1)(a − v) − 1), ℓ(−(s − 1)(b − u) − 1, a − 1)}

Proof. Let u′ = b − u and v ′ = a − v. Then, (−u′ , v ′ ) is the representation of c in the triangle of


gaps T−1 . Analogously to Lemma 3.7, we have that s = ⌈ va′ ⌉ ≤ ⌊ ub′ ⌋ if and only if

(−u′ , v ′ ), (−2u′ , 2v ′ ), . . . (−(s − 1)u′ , (s − 1)v ′ ) ∈ T−1 and (−su′ , sv ′ ) ∈ U−1

Moreover, for 1 ≤ i ≤ s − 1, we can replace the rectangles Yic , introduced in Lemma 3.8, by
Zic = [−iu′ , −(i − 1)u′ − 1] × [iv ′ , a − 1] and compute the number of gaps and the Frobenius number
for {a, b, c} in T−1 , as we did in T0 when proving Theorem 3.9. (See Figure 8 for a graphical
explanation.)
This gives
s−1
X s−1
X
N (a, b, c) = N (a, b) − |Zic | = N (a, b) − u′ (a − iv ′ )
i=1 i=1

14
and thus
s(s − 1)
N (a, b, c) = N (a, b) − u′ (s − 1)a + u′ v ′ (5)
2
On the other hand,
s−1
!
[
g(a, b, c) = max ℓ T−1 \ Zic
i=1

which is attained in one of the points

Ci = (−(i − 1)u′ − 1, iv ′ − 1), for i = 1, . . . , s − 1

and
Cs = (−(s − 1)u′ − 1, a − 1)
By noticing that ℓ(Ci ) = ℓ(−(i − 1)u′ , iv ′ − 1) = −(i − 1)u′ a − a + iv ′ b − b = ic − a − b + u′ a, which
is increasing in i, we can conclude that

g(a, b, c) = max{ℓ(−(s − 2)u′ − 1, (s − 1)v ′ − 1), ℓ(−(s − 1)u′ − 1, a − 1)} (6)

Replacing u′ by b − u and v ′ by a − v in Equations (5) and (6), we get

s(s − 1)
N (a, b, c) = N (a, b) − (b − u)(s − 1)a + (b − u)(a − v)
2
and

g(a, b, c) = max{ℓ(−(s − 2)(b − u) − 1, (s − 1)(a − v) − 1), ℓ(−(s − 1)(b − u) − 1, a − 1)}

This concludes the proof.

4 Conclusion
For the Frobenius problem with generators {a1 , . . . , an } we have proposed a geometric approach.
This approach is based on a labeling of the n-dimensional integer lattice, were n is the number of
generators. Our results in the cases 2 and 3 follow from an exploration of the set of gaps which can
nicely be visualized thanks to our geometric approach.
For three generators {a, b, c}, with a < b and gcd(a, b) = 1, we propose a technique that allows
to compute in a simple fashion both the Frobenius number and the number of gaps. As a final
remark, notice that our computations need only O(log2 a) operations, as they rely on the solution
of the diophantine equation au + bv = 1. Moreover, our results are proved in a geometric flavor
which gives a deeper understandig of the Frobenius problem.
A natural question that arises from Theorem 3.9 and Theorem 3.10 is: Given a pair of generators
{a, b}, with a < b and gcd(a, b) = 1, which values of c ∈ R(a, b) meet the hypothesis of one of the
mentioned theorems? In other words, for which values of c ∈ R(a, b) are the Frobenius problem,
and maybe other problems related with, geometrically easy to solve?
In Figure 10 we show with a simple example an intuitive answer to this question. In fact, if
c = ua − vb is the representation of c in T0 and the multiples of c are not all aligned in T0 , we can
not apply our technique.

15
Theorem 3.9
... s=5
s=4
s=3
s=2

Theorem 3.10
s=3
s=4
s=5

...
Figure 9: The portion of T0 which is covered by our technique.

Another natural question, related with our previous results, is: Given a pair of generators {a, b},
with a < b and gcd(a, b) = 1, how many values of c ∈ R(a, b) meet the hypothesis of one of the
mentioned theorems? In other words, which portion of the triangle of gaps T0 corresponds to points
for which the Frobenius problem, and maybe other problems related with, are geometrically easy
to solve?
In Figure 9 we represent the answer to this question.
Related to this question, it’s worth to mention that Proposition 3.6 says that in case s = 2
Theorem 3.9 and Theorem 3.10 are equivalently fullfilled. Indeed, it is easy to see that
  j k    
b a a b
2= ≤ ⇔2= ≤
u v a−v b−u

Moreover, a point (u, −v) ∈ T0 satisfies this condition if and only if


 
b jak
≤ u ≤ b − 1 and 1 ≤ v ≤
2 2

This gives a rectangle in T0 of size   j k


b a
·
2 2
which we know to be exactly the points corresponding to values of c satisfying s = 2. This rectangle
contains almost half of the points in T0 , and is the big white rectangle in Figure 9.
In fact, we can say more. By a simple geometric reasoning, it is easy to see that if 2 ≤ s ≤ 4
then we are under the hypothesis of either Theorem 3.9 or Theorem 3.10.

Open problems We let some open problems, concerning the use of the technique we propose.

• We have studied the case {a, b, c} with a < b and gcd(a, b) = 1. To apply the same technique
to the general case needs the consideration of (at least) d = gcd(a, b) different 2-dimensional
lattices.

16
(0, 0) 3c

c = ℓ(u, −v) 4c

2c = ℓ(2u, −2v)
3c = ℓ(3u, −3v)

4c = ℓ(4u, −4v)

5c = ℓ(5u, −5v)

Figure 10: For c = ℓ(u, −v) with s = 5, (u, −v), (2u, −2v) ∈ T0 and (3u, −3v), (4u, −4v) ∈ T1 , the
Frobenius number and the number of gaps for {a, b, c} is not so easy to compute. The points in T0
corresponding to 3c and 4c are obtained from (3u, −3v) and (4u, −4v) by the translation of vector
(−b, a).

• Also, we think that some work can be done using the 3-dimensional lattice. This approach
has the drawback that visualization becomes more difficult. For instance, the line xa + yb = 0
in the plane translates to a plane in the space, the plane xa + yb + zc = 0. The triangle T0
becomes a tetrahedron. But, obviously, only a small portion of the tetrahedron correspond
to the set of gaps. A possible question is: is there a nice representation of the set of gaps, as
a subset of the tetrahedron determined by xa + yb + zc = 0?

• The generalization of our method to higher dimension could probably give some new result.

References
[1] A. Brauer and J.E. Shockley, On a problem of Frobenius, J. Reine Angew. Math., 211 (1962)
pp. 399-408 (see Math. Rev. 47#127)

[2] F. Curtis, On formulas for the Frobenius number of a numerical semigroup, Math. Scand., 67
(1990) 190–192.

[3] M. Hujter and B. Vizvari, The exact solution to the Frobenius problem with three variables, J.
Ramanujan Math. Soc., 55(2) (1987), 117–143.

[4] I.D. Kan, B.S. Stechkin, and I.V. Sharkov, Frobenius problem for three arguments, Math. Notes,
62(4) (1997), 521–523.

[5] J.L. Ramı́rez-Alfonsı́n, Complexity of the Frobenius Problem, Combinatorica, 16(1996) 143–
147.

[6] J.L. Ramı́rez-Alfonsı́n, The Diophantine Frobenius Problem, Oxford University Press (2005).

17
[7] J.C. Rosales, Fundamental gaps of numerical semigroups generated by two elements, Linear
Algebra Appl., 405 (2005), 200–208.

[8] E. S. Selmer and Ö. Beyer, On the linear diophantine problem of Frobenius in three variables,
J. Reine Angew. Math. 301 (1978), 161–170.

[9] J.J. Sylvester, Problem 7382, Educational Times, 37 (1884), 26. Repreinted in: Mathematical
questions with their solution, Educational Times, 41 (1884), 21.

18

View publication stats

You might also like