%% if you are submitting an initial manuscript then you should have submission as an option here
%% if you are submitting a revised manuscript then you should have revision as an option here
%% otherwise options taken by the article class will be accepted
\documentclass[revision]{FPSAC2019}
%% but DO NOT pass any options (or change anything else anywhere) which alters page size / layout / font size etc

\articlenumber{17}
\addbibresource{17.bib}

%\usepackage{lmodern} % <-- added by davidp to deal with a certain font used by fpsac
%\usepackage{amssymb}
%\usepackage{amsthm}

%\usepackage{hyperref}

%\usepackage{geometry}               
%\geometry{letterpaper}

\usepackage[color=green!40]{todonotes}
\usepackage{tikz}
\tikzstyle{ball} = [circle,shading=ball, ball color=black,
    minimum size=1mm,inner sep=1.3pt]
\usepackage{tikz-cd}
\usepackage{enumitem}
\usepackage{systeme}
\usepackage{needspace}  
\usepackage{url}

\newtheorem{thm}{Theorem}[section]
\newtheorem{lemma}[thm]{Lemma}
\newtheorem{claim}[thm]{Claim}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{property}[thm]{Property}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{question}[thm]{Question}
\newtheorem{fact}[thm]{Fact}


\newtheorem{Definition}[thm]{Definition}
\newenvironment{defn}
  {\begin{Definition}\rm}{\end{Definition}}

\newtheorem{Example}[thm]{Example}
\newenvironment{example}
  {\begin{Example}\rm}{\end{Example}}

\newtheorem{Remark}[thm]{Remark}
\newenvironment{remark}
  {\begin{Remark}\rm}{\end{Remark}}

\DeclareMathOperator{\Prin}{Prin}
\DeclareMathOperator{\Pic}{Pic}
\DeclareMathOperator{\Jac}{Jac}
\DeclareMathOperator{\Div}{Div}
\DeclareMathOperator{\smalldiv}{div}
\DeclareMathOperator{\spn}{span}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\Deg}{Deg}
\DeclareMathOperator{\ehr}{Ehr}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\cok}{cok}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\ord}{ord}
\DeclareMathOperator{\Span}{Span}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\Hom}{Hom}

\newcommand{\primary}{\mathcal{P}}
\newcommand{\secondary}{\mathcal{S}}
\newcommand{\mat}[1]{\mathbb{#1}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\tL}{\tilde{L}}
\newcommand{\tV}{\tilde{V}}
\newcommand{\tl}{\ell}
\newcommand{\K}{\mathcal{K}}
\newcommand{\A}{\mathcal{A}}
\newcommand{\tK}{\widetilde{\mathcal{K}}}
\newcommand{\polyring}{\C[\mathbf{x}]}
%% note that the class file already loads {amsmath, amsthm, amssymb}

\title{Enumerating Linear Systems on Graphs}

\author{Sarah Brauner\thanks{\href{mailto:braun622@umn.edu}{braun622@umn.edu}}\addressmark{1}, Forrest Glebe\addressmark{2}, \and David Perkinson\addressmark{3}}

\address{\addressmark{1}University of Minnesota, Twin Cities, Minnesota \\
\addressmark{2}Purdue University, West Lafayette, Indiana \\ \addressmark{3}Reed College, Portland, Oregon}

%% put the date of submission here
\received{\today}

%% leave this blank until submitting a revised version
%\revised{}

%% put your English abstract here, or comment this out if you don't have one yet
%% please don't use custom commands in your abstract / resume, as these will be displayed online
%% likewise for citations -- please don't use \cite, and instead write out your citation as something like (author year)
\abstract{The divisor theory of graphs views a finite connected graph $G$ as a discrete
version of a Riemann surface.  Divisors on~$G$ are formal integral combinations
of the vertices of~$G$, and linear equivalence of divisors is determined by the discrete
Laplacian operator for~$G$.  As in the case of Riemann surfaces, we are
interested in the complete linear system~$|D|$ of a divisor~$D$---the collection
of nonnegative divisors linearly equivalent to~$D$.  Unlike the case of Riemann
surfaces, the complete linear system of a divisor on a graph is always finite.
We compute generating functions encoding the sizes of all complete linear
systems on~$G$.  We interpret our results in terms of polyhedra associated with
divisors and in terms of the invariant theory of the (dual of the) Jacobian
group of~$G$.  If~$G$ is a cycle graph, our results lead to a bijection
between complete linear systems and binary necklaces.} 

%% put your French abstract here, or comment this out if you don't have one
%\resume{\lipsum[2]}

%% put your keywords here, or comment this out if you don't have them yet
\keywords{Chip-firing, divisors on graphs, lattice points in polyhedra, invariant theory,  necklaces}

%% you can include your bibliography however you want, but using an external .bib file is STRONGLY RECOMMENDED and will make the editor's life much easier
%% regardless of how you do it, please use numerical citations, ie. [xx, yy] in the text

%% this sample uses biblatex, which (among other things) takes care of URLs in a more flexible way than bibtex
%% but you can use bibtex if you want
%\usepackage[backend=bibtex]{biblatex}
%\addbibresource{fpsac_brauner.bib}
%% note the \printbibliography command at the end of the file which goes with these biblatex commands

\begin{document}

\maketitle
\section{Introduction.}
\noindent{\bf Divisor theory preliminaries.}  Let~$G=(V,E)$ be a
connected, undirected multigraph with finite vertex set~$V$ and finite edge
multiset~$E$.  Loops are allowed but our results are not affected if they are 
removed.

We recall some of the theory of divisors on graphs, referring readers unfamiliar
with this theory to~\cite{Baker} or to Part~1 of the textbook~\cite{Corry}. 
A~{\em divisor} on~$G$ is an element in the free abelian group on the vertices
of~$G$,
\[
  \Div(G):=\Z V=\textstyle\left\{ \sum_{v\in V}D(v)v:D(v)\in\Z \right\}.
\]
The~{degree} of a divisor~$D$ is the sum of its
coefficients:~$\deg(D):=\sum_{v\in V}D(v)$.  For instance, if we consider~$v\in
V$ as a divisor, then~$\deg(v)=1$.  We use the notation~$\deg_G(v)$ to refer to
the ordinary degree of a vertex---the number of edges incident on~$v$. The set
of divisors of degree~$k$ is denoted by~$\Div^k(G)$.  
The {\em (discrete) Laplacian operator} of~$G$ is the
function~$L\colon\Z^V\to\Z^V$ given by
\[
  L(f)(v)=\sum_{vw\in E}\left( f(v)-f(w) \right)
\]
for each $f\in\Z^V$ and~$v\in V$.  The {\em divisor of a function}~$f\colon
V\to\Z$, arising by analogy from the theory of divisors on Riemann surfaces,
is then
\[
  \smalldiv(f):=\sum_{v\in V}\left( L(f)(v) \right)v\in\Div(G).
\]
The mapping~$v\mapsto\chi_v$ which sends each
vertex to its corresponding characteristic function determines an
isomorphism~$\chi\colon\Div(G)\simeq\Z^V$, and we have~$\chi\circ \smalldiv=L$,
which we use to identify~$\smalldiv$ with~$L$.

Divisors of functions are called {\em principal divisors}, and they form an
additive subgroup of~$\Div(G)$ denoted~$\Prin(G)$.  Divisors~$D$ and~$D'$ are {\em linearly
equivalent} if~$D-D'\in\Prin(G)$, in which
case we write~$D\sim D'$. The {\em
Picard group} of~$G$ is then the group of divisors modulo linear equivalence:
\[
  \Pic(G):=\Div(G)/\Prin(G).
\]
Since principal divisors have degree zero,~$\Pic(G)$ is graded by degree. Its
degree~$k$ part is denoted~$\Pic^k(G)$.  The degree-zero part of the Picard group
is a subgroup called the {\em Jacobian group} of~$G$:
\[
  \Jac(G):=\Pic^0(G)=\Div^0(G)/\Prin(G)\subseteq\Pic(G).
\]
We write~$[D]$ for the class of a divisor~$D$ modulo~$\Prin(G)$.  Fixing any
vertex~$q\in V$, there is an isomorphism
\begin{align}\label{eqn: Pic(G)}
  \Pic(G)&\to\Z\oplus\Jac(G)\\
  [D]&\mapsto\left(\deg(D), [D-\deg(D)q] \right).\nonumber
\end{align}


Throughout this work, we fix an ordering~$v_1,\dots,v_n$ of~$V$, which
determines a
basis for~$\Div(G)$ and a corresponding dual basis~$\chi_{v_1},\dots,\chi_{v_n}$
for~$\Z^V$, allowing us to identify both spaces with~$\Z^n$.
Thus,~$D\in\Div(G)$ is identified with~$(D(v_1),\dots,D(v_n))$, and for
any~$v\in V$, we may refer to the~$v$-th coordinate of a vector in~$\Z^n$.  With
respect to the chosen bases,~$\smalldiv$ and~$L$ are represented by the~$n\times
n$ {\em Laplacian matrix}, which we also denote by~$L$.  This matrix is given by
\[
  L=\mathrm{Deg}(G)-A
\]
where
\[
  \mathrm{Deg}(G)=\diag(\deg_G(v_1),\dots,\deg_G(v_n))
\]
and~$A$ is the adjacency matrix for~$G$.  The~$i,j$-th entry
of~$A$ is the number of edges connecting~$v_i$ to~$v_j$. It is symmetric
since~$G$ is undirected.  We then have the
isomorphism
\begin{align*}
  \Pic(G)&\simeq \cok(L)=\Z^n/\im_{\Z}(L)\\
  \textstyle [\sum_{i=1}^{n}a_iv_i]&\mapsto(a_1,\dots,a_n)+\im_{\Z}(L).
\end{align*}
Fixing any vertex~$q\in V$, define the {\em reduced Laplacian} matrix for~$G$ with
respect to~$q$ as the~$(n-1)\times(n-1)$ matrix~$\tL$ formed by removing the row
and column corresponding to~$q$ from~$L$.  There is an isomorphism
\begin{align}\label{eqn: Jac(G)}
  \Jac(G)&\simeq\Z^{n-1}/\im_{\Z}(\tL)\\
  [D]&\to D|_{q=0}\nonumber
\end{align}
where~$D|_{q=0}:=\sum_{v\in V\setminus\left\{ q \right\}}D(v)v$.  The inverse
sends the class of the~$v$-th standard basis vector
in~$\Z^{n-1}/\im_{\Z}(\tL)$ to~$[v-q]$ for each~$v\neq q$.
Isomorphisms~(\ref{eqn: Pic(G)}) and~(\ref{eqn: Jac(G)}) combine to say
that for~$D,D'\in\Div(G)$,
\[
  D\sim D'
  \quad\Longleftrightarrow\quad 
  \left(
  \deg(D)=\deg(D')
  \quad\text{and}\quad
  D|_{q=0}=D'|_{q=0}\bmod\im_{\Z}(\tL)\right).
\]

The kernel of the Laplacian matrix is the set of constant vectors, and the
reduced Laplacian has full rank~$n-1$.  By the matrix-tree
theorem, the number of spanning trees of~$G$ is~$\det(\tL)$, and thus
by~$\eqref{eqn: Jac(G)}$, it is also the order of~$\Jac(G)$.
\bigskip

\noindent{\bf Partitioning effective divisors.}
A divisor~$E$ is {\em effective} if~$E(v)\geq0$ for all~$v\in V$, in which case
we write~$E\geq0$.  The {\em complete linear system} of a divisor~$D$ is its set
of linearly equivalent effective divisors:
\[
  |D| := \left\{ E\in\Div(G): E\geq 0\text{ and } E\sim D \right\}.
\]
Note that~$|D|$ depends only on the divisor class of~$D$.  Also, since linearly
equivalent divisors have the same degree,~$|D|$ is finite.

Fix~$q\in V$, and for each~$[D]\in\Jac(G)$, define
\[
  \E_{[D]}:=\cup_{k\geq0}|D+kq|=\left\{ E\in\Div(G):E\geq0\text{ and }
  E-\deg(E)q\sim D \right\}.
\]
The~$\E_{[D]}$ partition the set of effective divisors as~$D$ runs over a set
of representatives for~$\Jac(G)$.  The collection~$\E_{[0]}$ is a semigroup, and
each~$\E_{[D]}$ is a~$\E_{[0]}$ semi-module.
Note that~$\E_{[D]}$ depends on~$q$.\footnote{For~$q'\in V$, writing~$D+kq =
  D+kq'+k(q-q')$ shows the dependence is ``periodic'' with period equal to the
  order of~$[q-q']\in\Jac(G)$.}

\begin{defn}
  The~{\em $\lambda$-sequence} for~$[D]\in\Jac(G)$ is the
  sequence with~$k$-th term
  \[
    \lambda_{[D]}(k):=\#|D+kq|.
  \]
  (It does not depend on the choice of representative of the
  class~$[D]$.)  The {\em $\lambda$-sequence generating function} is
  \[
    \Lambda_{[D]}(z):=\sum_{k\geq0}\lambda_{[D]}(k)z^k.
  \]
\end{defn}

\noindent{\bf Goal.}
The study of complete linear systems is fundamental to the divisor theory of
both Riemann surfaces and graphs.  For instance, the Riemann-Roch
Theorem\footnote{See~\cite{Baker} for the Riemann-Roch Theorem for graphs.} in
either area can be interpreted as a statement about the existence of effective
divisors. However, unlike the case of Riemann surfaces, the complete linear system of a
divisor on a graph is always finite.  Thus, it is natural to wonder about its
cardinality. We know of no prior work focused on this question. 
Moreover, there are special representatives for the elements~$\Jac(G)$ relative to the
choice of a vertex~$q$ variously called~{\em $G$-parking functions}
or~{\em $q$-reduced divisors} (for example, see~\cite{Corry}).  The structures we
introduce here provide new invariants to attach to these objects.

Our goal for this extended abstract is to provide a means of computing
the~$\lambda$-sequence generating function~$\Lambda_{[D]}$ for any graph $G$ and
divisor $[D]$.  In \cref{sect: primsec}, the computation is achieved by
introducing systems of {\em primary} and {\em secondary divisors}.  In
\cref{sect: poly}, the primary and secondary divisors are related to
standard theory for counting lattice points in polyhedra.  In \cref{sect:
molien}, primary and secondary divisors are interpreted as primary and secondary
invariants for a certain representation of the dual group $\Jac^*(G)$. Finally,
in \cref{sect: cycle}, we relate complete linear systems on cycle graphs
to binary necklaces.  This final section also serves as a set of concrete examples
for the results in earlier sections.


\section{Primary and secondary divisors} \label{sect: primsec}
We first compute~$\Lambda_{[D]}$ using {\em primary} and {\em secondary
divisors}, defined as part of the following theorem. 
\begin{thm}\label{thm: primary-secondary}
  Fix~$q\in V$, and for each~$v\in V$, let~$\ord_{q}(v)$ be the order of~$[v-q]$ in the
  finite group~$\Jac(G)$.
\begin{enumerate}[label=\rm{(\arabic*)},leftmargin=*]
  \item\label{ps-1} {\rm (Existence)} There exists a finite subset
    $\primary\subset\E_{[0]}$ and for each $[D]\in\Jac(G)$, a finite
    subset $\secondary_{[D]}\subset\E_{[D]}$ such
    that each $E\in\E_{[D]}$ can be written uniquely as
\[
E = F + \sum_{P\in\primary}a_P P
\]
with $F\in\secondary_{[D]}$ and~$a_P\in\Z_{\geq0}$ for all~$P\in\primary$. The set
$\primary$ is called a set of {\em primary divisors} for~$G$,  and
$\secondary_{[D]}$ is called the set of {\em $[D]$-secondary} divisors with
respect to~$\primary$.
\item\label{ps-2} {\rm (Uniqueness)} Sets~$\primary$
  and~$\{\secondary_{[D]}\}_{[D]\in\Jac(G)}$ satisfy part~\ref{ps-1} if and only
  if
  \[
  \primary=\left\{\tl_v v: v\in V\right\}
    \quad\text{and}\quad
    \secondary_{[D]}=\{E\in\E_{[D]}:E(v)<\tl_v \mbox{ for all $v\in
    V$}\},
  \]
  where~$\tl_v$ is any positive multiple of~$\ord_{q}(v)$ for all~$v\in V$.
\item\label{ps-3} With $\primary$ and $\secondary_{[D]}$ as above,
  \[ | \secondary_{[D]} | | \Jac(G) | = \prod_{v \in V} \ell_{v}. \]
\item\label{ps-4} Choose~$\tl_{i}:=\tl_{v_i}$ for~$j=1,\dots,n$ in
  accordance with part~\ref{ps-2}, and let~$q=v_n$. Let~$A$ be a set of standard
  representatives for the image of~$D|_{q=0}+\im_{\Z}(\tL)$ under the natural
  projection $\Z^{n-1}\to\prod_{i=1}^{n-1}\Z/\tl_i\Z$.  Then the corresponding
  secondary divisors are
  \[
    \secondary_{[D]} =\left\{ (a_1,\dots,a_{n-1},a_n):(a_1,\dots,a_{n-1})\in A,
    0\leq a_n<\tl_n\right\}.
  \]
\end{enumerate}
\end{thm}
A standard argument then expresses the~$\lambda$-sequence generating
function as a rational function in terms of primary and secondary divisors.
\begin{cor}\label{cor: ps-genfun} Fix primary and secondary divisors as in \cref{thm:
  primary-secondary}. For each~$[D]\in\Jac(G)$,
  \[
    \Lambda_{[D]}(z)=\frac{\sum_{F\in\secondary_{[D]}}z^{\deg(F)}}{\prod_{v\in
    V}\left(1-z^{\tl_v}\right)}.
  \]
\end{cor}
\cref{thm: primary-secondary} has a direct proof, but in the next two
sections we show how the theorem is a consequence of standard results in the
theory of lattice points in polyhedra and in invariant theory, respectively.

\section{Polyhedra} \label{sect: poly}
We now interpret the results of \cref{sect: primsec} in terms of lattice
points in polyhedra naturally associated with divisors.
We first recall some relevant theory, using~\cite{Beck} as our
reference.
An
{\em affine $n$-cone in~$\R^n$}, or simply an {\em $n$-cone}, is a set of the
form
\[
  \K = \left\{\,
  p+\lambda_1\omega_1+\dots+\lambda_m\omega_m:\lambda_1,\dots,\lambda_m\geq0 \right\}
\]
where~$\omega_1,\dots,\omega_m,p\in\R^n$ and the span of the~$\omega_i$ has
dimension~$n$.  The~$\omega_i$ are called {\em generators} of the
cone.  Any generator that is not a convex combination of the remaining
generators is called an {\em extreme ray}. The cone is {\em pointed} if it
contains no line, and in that case~$p$ is called its {\em apex}.  We say~$\K$ is
{\em rational} if~$p,\omega_1,\dots,\omega_m\in\Q^n$, and then, by rescaling, we
may assume the~$\omega_i$ have integer coordinates.  An~$n$-cone is {\em
simplicial} if it may be written using~$n$ generators.  Simplicial cones are
necessarily pointed.

Equivalently, we may define a rational pointed $n$-cone in~$\R^n$ to be
an~$n$-dimensional intersection of finitely many half-planes of the form
\[
  \left\{ x\in\R^n: a_1x_1+\dots+a_nx_n\geq \beta\right\}
\]
where~$a_1,\dots,a_n,\beta\in\Z$ and such that the hyperplanes 
\[
  \left\{ x\in\R^n: a_1x_1+\dots+a_nx_n= \beta\right\}
\]
meet in a single point. In that case, we may express the cone as $\left\{
x\in\R^n:Ax\geq b \right\}$ where~$A$ is an integral~$m\times n$ matrix of
rank~$n$ and $b\in\Z^m$.

%A hyperplane~$H$ is a {\em supporting hyperplane} of~$\K$ if~$\K$ sits entirely
%within one of the two closed half-planes defined by~$H$.  A {\em face} of~$\K$
%is the intersection of~$\K$ with a supporting half-plane.  Evert face
%of~$\K$ is also a cone.  A face of
%codimension~$1$ in~$\K$ is a {\em facet}.

If~$\K$ is a simplicial~$n$-cone in~$\R^n$ with an integral generating
set~$\Omega=\{\omega_1,\dots,\omega_n\}$ and apex~$p$, define the {\em
fundamental parallelepiped} for~$\K$ with respect to~$\Omega$ to be
\[
  \textstyle
  \Pi:=\left\{\,
  p+\sum_{i=1}^n\lambda_i\omega_i:0\leq\lambda_1,\lambda_2,\dots,\lambda_n<1
\right\}.
\]
Every point~$\alpha\in\K\cap\Z^n$ has a unique expression as
\[
\alpha = p+\pi+m_1\omega_1+\dots+m_n\omega_n
\]
with~$\pi\in\Pi$ and~$m_1,\dots,m_n\in\N$.


Define the {\em integer-point transform} of a set~$S\subset\R^n$ by
\[
  \sigma_S(\vec{z}\,)=\sigma_S(z_1,\dots,z_n):=\sum_{\alpha\in
  S\cap\Z^n}\vec{z}^{\ \alpha}
\]
where~$\vec{z}^{\ \alpha}:=\prod_{i=1}^nz_i^{\alpha_i}$.

When
  \[
    \K = \left\{\,
  p+\lambda_1\omega_1+\dots+\lambda_n\omega_n:\lambda_1,\dots,\lambda_n\geq0 \right\}
  \]
  is a simplicial~$n$-cone in~$\R^n$ with~$\omega_1,\dots,\omega_n\in\Z^n$
  and~$p\in\R^n$,  then
  \[
    \sigma_{\K}(\vec{z}\,)=\frac{\sigma_{\Pi}(\vec{z}\,)}{\prod_{i=1}^{n}(1-\vec{z}^{\ \omega_i})},
  \]
  where~$\Pi$ is the fundamental parallelepiped of~$\K$ with respect to
  the~$\omega_i$.
\bigskip

\noindent{\bf Linear systems and polyhedra.} 
Throughout this section, we fix the embedding
\[
  \R^{n-1}=\R^{n-1}\times\left\{ 0 \right\}\subset\R^{n}.
\]
Thus, if~$D\in\Div(G)=\Z^n$, then we may regard~$D|_{q=0}$ as an element of
either~$\Z^{n-1}$ or~$\Z^n$.  Similarly, given~$f\in\R^{n-1}$, we write~$Lf$ in place
of~$L\bigl(\begin{smallmatrix}f\\0\end{smallmatrix}\bigr)$.

Two divisors~$D$ and~$D'$ on~$G$ are linearly
equivalent exactly when there is a function~$f\in\Z^V$ such
that~$D'=D+\smalldiv(f)$. In this context~$f$ is referred to as a {\em firing
script}, and we express the complete linear system for~$D$ as
\[
  |D|=\left\{ E\in\Div(G): E = D+Lf\geq0 \text{ for some firing
  script~$f$}\right\}.
\]
The set of firing scripts appearing above for the complete linear system for~$D$
form the polyhedron
\[
  Q_D :=\left\{f\in\R^n: Lf\geq -D\right\}\subset\R^n.    
\]
However, the integer points of~$Q_D$ are not in bijection with elements of~$|D|$
since~$L$ has a non-trivial kernel.  The kernel is generated by the
all-ones vector~$\vec{1}$; so modulo~$\ker(L)$, each firing
vector~$f=(f_1,\dots,f_n)$ has the unique
representative $f-f_n\cdot\vec{1}$ with last coordinate~$0$,
leading us to define
\[
  P_D:=Q_D\cap\left\{f\in\R^n: f_n=0 \right\}\subset\R^{n-1}
\]
so that~$Q_D=P_D+\R\vec{1}\subset\R^n$.
It is straightforward to see that the integer points~$P_D\cap\Z^{n-1}$ are in
bijection with~$|D|$:
\begin{equation}\label{eqn: polytope bijection}
  f\in P_D\cap\Z^{n-1}\quad\longleftrightarrow\quad
  D+Lf\in|D|.
\end{equation}
Since~$|D|$ is finite, it follows that the polyhedron~$P_D$ is bounded, and hence is
a~{\em polytope}. (For a direct proof of boundedness, see
\cite[Proposition~2.20]{Corry}.)

If~$D\sim D'$ with~$D'=D+Lf$, then the polyhedra associated with these divisors
differ by a translation: $Q_{D}=Lf+Q_{D'}$, and as discussed above, we may
assume~$f_n=0$ to write $P_{D}=\tL f+P_{D'}$.

We extend the ideas presented above to interpret the results of
\cref{sect: primsec} in terms of counting lattice points in polyhedra.
\begin{defn} The {\em cone for a divisor~$D\in\Div^0(G)$} with respect
  to~$q$ is the set
\[
  \K_D := \left\{ (f,t)\in\R^n\times\R : Lf+tq\geq -D \text{ and } f_n=0\right\}
\subset\R^{n-1}\times\R.
\] 
\end{defn}
\begin{thm}\label{thm: poly} Let~$D\in\Div^0(G)$. 
Then $\K_D$ is a rational simplicial~$n$-cone with
      apex~$p:=\tL^{-1}(-D|_{q=0})\in\R^{n-1}\times\left\{ 0
      \right\}\subset\R^{n}$ and has the following properties: 
  \begin{enumerate}[label=\rm{(\arabic*)},leftmargin=*]
    \item\label{poly1} The set of integer points of~$\K_D$ is in bijection
      with~$\E_{[D]}$ via the mapping
      \begin{align*}
	\psi_D\colon\K_D\cap\Z^{n}&\xrightarrow{\sim}\E_{[D]}\\
	(f,k)\ &\mapsto D+kq+Lf.
      \end{align*}

    \item\label{poly2}  
      The mapping $\psi_0$ is a bijection between the generating set of integral
      extreme rays for~$\K_D$ and the set of primary divisors for $G$.
      Furthermore, $\psi_D$ is a bijection between integer points of the
      fundamental parallelepiped and secondary divisors of $[D]$ with respect to
      $\primary$.
    \item\label{poly3} Fix a generating set~$\Omega$ for~$\K_D$ with fundamental
      parallelepiped~$\Pi$ and corresponding primary and secondary
      divisors~$\primary=\psi_0(\Omega)$
      and~$\secondary_{[D]}=\psi_D(\Pi\cap\Z^n)$ as in
      part~\ref{poly2}.  Then the~$\lambda$-sequence generating function for~$\E_{[D]}$ is
      \[
	\Lambda_{[D]}(z)=\sigma_{\K}(1,\dots,1,z)=\frac{\sigma_{\Pi}(1,\dots,1,z)}{\prod_{\omega\in\Omega}(1-z^{\deg(\omega)})},
      \]
      where~$\deg(\omega)$ is the sum of the coordinates of~$\omega$.  The numerator and
      denominator of the expression on the right are the same as those appearing
      in \cref{cor: ps-genfun}.
  \end{enumerate}
\end{thm}

\section{Invariant theory}\label{sect: molien}
The results of \cref{sect: primsec} may also be interpreted in terms of
the invariant theory for a representation of the dual group~$\Jac^*(G)$.
Through this lens, primary and secondary divisors become primary and secondary
invariants, and~$\Lambda_{[D]}(z)$ is given a substantially different expression
as a Molien series.

We recall basic invariant theory for finite groups with~\cite{Stanley}
as reference.  Given a matrix~$A\in\GL(\C^n)$ and a
polynomial~$f\in\polyring:=\C[x_1,\dots,x_n]$, define~$f\circ A$ by
\[
  (f\circ A)(x_1,\dots,x_n)=f(A\vec{x})
\]
where~$\vec{x}$ is the column vector~$[x_1,\dots,x_n]^t$.  Given a finite
subgroup~$\Gamma$ of~$\GL(\C^n)$ and a
character~$\chi\colon\Gamma\to\C^{\times}:=\C\setminus\left\{ 0 \right\}$,
define the {\em $\chi$-relative invariants of~$\Gamma$} to be elements of 
\[
  \polyring^{\Gamma}_{\chi}:=\left\{ f\in\polyring: f\circ\gamma=\chi(\gamma)f
  \text{ for all~$\gamma\in\Gamma$} \right\}.
\]
In the case~$\chi=\varepsilon$, the trivial character,
$\polyring^{\Gamma}:=\polyring^{\Gamma}_{\varepsilon}$
is a subring of~$\polyring$, graded by degree, called the {\em invariant subring of~$\Gamma$}.
Its elements are simply called~{\em invariants of~$\Gamma$}.  The invariant
subring~$\polyring^{\Gamma}$ is generated by the homogeneous polynomials
\[
  \frac{1}{|\Gamma|}
  \sum_{\gamma\in\Gamma}f\circ\gamma
\]
as~$f$ ranges over all monomials of degree at most~$|\Gamma|$.  For
arbitrary~$\chi$, the relative invariants~$\polyring^{\Gamma}_{\chi}$ form
a~$\polyring^{\Gamma}$-module, generated by homogeneous polynomials of degree at
most~$|\Gamma|$.  

There exist algebraically independent homogeneous
invariants~$p_1,\dots,p_n$ such that $\polyring^{\Gamma}$ is a
finitely-generated free module over $\C[p_1,\dots,p_n]$.
For any character $\chi$, if $q_1,\dots,q_t$ are homogeneous polynomials
forming a~$\C$-basis for~$\polyring^{\Gamma}_{\chi}$ modulo the
submodule $\sum_{i=1}^tp_i\polyring^{\Gamma}_{\chi}$, then
\[
  \polyring_{\chi}^{\Gamma}=\bigoplus_{i=1}^{t}q_i\C[p_1,\dots,p_n].
\]
The~$p_i$ are called {\em primary invariants} and are independent of~$\chi$.
The~$q_i$ are called {\em secondary (relative) invariants} and depend
on~$\chi$. The number of secondary invariants,~$t$, also
depends on~$\chi$ in general.  Letting~$t_{\varepsilon}$ be the number of
secondary invariants for the trivial character, we have
\[
  t_{\varepsilon}|\Gamma|=\prod_{i=1}^n\deg(p_i).
\]

The {\em Hilbert series} for~$\polyring^{\Gamma}_{\chi}$ is
\[
  \Phi_{\Gamma,\chi}(z):=\sum_{d\geq
  0}\dim_{\C}(\polyring_{\chi,d}^{\Gamma})z^d,
\]
where~$\polyring_{\chi,d}^{\Gamma}$ is the~$d$-th graded piece
of~$\polyring_{\chi}^{\Gamma}$.
The Hilbert series is also known as the (relative) {\em Molien series} for~$\Gamma$ due to a
theorem of Molien which states that
\begin{equation} \label{eqn: Molien}
  \Phi_{\Gamma,\chi}(z) =
  \frac{1}{|\Gamma|}\sum_{\gamma\in\Gamma}\frac{\overline{\chi(\gamma)}}{\det(I_n-z\gamma)}.
\end{equation}
%\bigskip

\noindent{\bf Linear systems and Molien series.} Order the vertices~$v_1,\dots,v_n$ of~$G$, and
fix~$q=v_n$. To see the relevance of invariant theory to our problem, start
with the sequence of projections
\begin{center}
\begin{tikzcd}[row sep = 1pt ]
\Z^n=\Div(G)\arrow[r,twoheadrightarrow]&\Pic(G)\arrow[r,twoheadrightarrow]&\Jac(G)\\
 \qquad  D\arrow[r,mapsto,shorten >= 14pt,shorten <= 14pt,xshift=2pt ]
 &\left[D\right]\arrow[r,mapsto,shorten >= 10pt,shorten <= 10pt,xshift=2pt ]
 &\left[D-\deg(D)q\right].
\end{tikzcd}
\end{center}
Apply the functor $\Hom(\,\cdot\,,\C^{\times})$ to get a sequence of dual groups
\[
  \Jac(G)^*\hookrightarrow\Pic(G)^*\hookrightarrow(\C^\times)^n\subset GL(\C^n),
\]
identifying~$(\C^{\times})^n$ with diagonal matrices having nonzero diagonal
entries.  Define~$\rho$ to be the composition of these mappings:
\begin{align*}
  \rho\colon\Jac(G)^{*}\ &\xrightarrow{\qquad}\qquad\GL(\C^n)\\
  \chi\qquad
  &\mapsto\quad\diag(\chi([v_1-q]),\chi([v_2-q]),\dots,\chi([v_{n-1}-q]),1).
\end{align*}
\begin{thm}\label{thm:rep}
  Consider~$[D]\in\Jac(G)$ as a character of~$\Gamma:=\im(\rho)\subset\GL(\C^n)$
  via~$[D](\rho(\chi)):=\chi([D])$ for each~$\chi\in\Jac(G)^{*}$.  Then 
  \begin{enumerate}[label=\rm{(\arabic*)},leftmargin=*]
    \item\label{inv1} 
\[
  \textstyle \left\{x^{E}:=\prod_{i=1}^nx_i^{E(v_i)}: E\in\E_{[D]} \right\}
\]
is a~$\C$-basis for the relative invariants~$\polyring^{\Gamma}_{[D]}$,
\item\label{inv2} $\polyring=\bigoplus_{[D']\in\Jac(G)}\polyring^{\Gamma}_{[D']}$, and
\item\label{inv3}  the correspondence~$E\mapsto x^{E}$ for effective divisors~$E$ gives a
  bijection between systems of primary and~$[D]$-secondary divisors and systems
  of monomial primary and~$[D]$-relative invariants.
  \end{enumerate}
\end{thm}
Computing~$\Lambda_{[D]}$ thus becomes an application of Molien's theorem. 

\begin{cor}\label{cor: lambda-molien}
  Let~$[D]\in\Jac(G)$.  The generating function for the $\lambda$-sequence
  for~$\E_{[D]}$ is given by the Molien series
  \[
    \Lambda_{[D]}(z)=\Phi_{\Gamma,[D]}(z)
    =\frac{1}{|\Jac(G)|}\sum_{\chi\in\Jac(G)^{*}}\frac{\overline{\chi([D])}}{\det(I_n-z\rho(\chi))}.
  \]
\end{cor}

\section{Cycle Graphs and Necklaces}\label{sect: cycle}
We now turn to the special case of cycle graphs.  Let $C_{n}$ be
the cycle graph with vertices $v_1,\dots,v_n$, in order around the cycle,
with~$q:=v_n$.  It is well-known that~$\Jac(C_n)\simeq\Z/n\Z$, with
generator~$[v_1-q]$ and such that~$[D_{j}]:= j[v_1-q]=[v_{j}-q]$
for~$j=1,\dots,n$.  It follows that~$\ord_{q}(v_i)=n/\gcd(i,n)$ for all~$i$.
To apply \cref{thm: primary-secondary}, for convenience take~$\tl_{v_i}=n$ for~$i=1,\dots,n-1$ and~$\tl_n=1$.  The
primary divisors are then~$\primary=\{nv_1,nv_2,\dots,nv_{n-1},q\}$ and
part~\ref{ps-4} of \cref{thm: primary-secondary} may be applied to the
Hermite normal form for~$\im_{\Z}(\tL)$ to find the secondary
divisors for~$[D_j]\in\Jac(C_n)$:
\[
  \secondary_{[D_j]}=
  \textstyle
  \left\{ \left(a_1,a_2,\dots,a_{n-1},0\right):0\leq
      a_i<n\ \text{for all~$i$ and }a_{n-1}=(-j+\sum_{i=1}^{n-2}ia_i)\bmod n \right\}.
\]

Consider the case where $n=3$ and $[D]=[D_1]=[(1,0,-1)]$. As elements
of~$\Z^3\simeq\Div(C_3)$, the primary divisors
are~$\primary =\left\{ (3,0,0),(0,3,0),(0,0,1) \right\}$, and the secondary
divisors are~$\secondary_{[D]}=\left\{(1,0,0),(0,2,0),(2,1,0) \right\}$.
By \cref{cor: ps-genfun}, the~$\lambda$-sequence generating function is
\[
  \Lambda_{[D]}(z)=\frac{z+z^2+z^3}{(1-z^3)^2(1-z)}
  =z + 2 z^{2} + 3 z^{3} + 5 z^{4} + 7 z^{5} + 9 z^{6} + 12 z^{7} + 15z^8+\dots
\]
See for example the five elements of~$|D+4k|$ corresponding to the term~$5z^4$ in
\cref{fig: necklaces}.

Using \cref{thm: poly}, we may then compute the cone
for~$D$ with respect to~$q$:
\[
  \K_D=\left\{ (-2/3,-1/3,0)+\lambda_1(2,1,3)
    +\lambda_2(1,2,3)+\lambda_3(0,0,1): \lambda_1,\lambda_2,\lambda_3\geq0 \right\}.
\]
There are three integer points in the fundamental parallelepiped:
\[
\Pi\cap\Z^3=\left\{ (0,0,1),(0,1,2), (1,1,3) \right\}.
\]
Therefore, the integer-point transform of~$\K_D$ is
\[
  \sigma_{\K}(z_1,z_2,z_3)=\frac{z_3+z_2z_3^2+z_1z_2z_3^3}{(1-z_1^2z_2z_3^3)(1-z_1z_2^2z_3^3)(1-z_3)},
\]
and we find~$\sigma_{\K}(1,1,z)=\Lambda_{[D]}(z)$ in accordance with
\cref{thm: poly}~\ref{poly3}.  
 
Considering that~$(0,0,1)$ is an extreme ray,~$\K_D$ is determined by its lower
face, which we project onto its first two coordinates to define the
cone~$\tK_D\subset\R^2$.  Recalling that the fundamental
parallelepiped~$\Pi$
of~$\K_D$ is half-open, we see that~$\Pi\cap\Z^3$ is in bijection with the integer
points of the corresponding fundamental parallelogram~$\widetilde{\Pi}$ for~$\tK_D$.
\cref{fig: cone} depicts~$\tK_D$ and~$\widetilde{\Pi}$.  Note the
three integer points in $\widetilde{\Pi}\cap\Z^2$ corresponding to the three
secondary divisors for~$[D]$.  The intersection of~$\K_D$ with the plane at
height~$k$ has integer points in bijection with the elements of the complete
linear system~$|D+kq|$, and its projection into~$\R^2$ is the
polytope~$P_{D+kq}$ defined in \cref{sect: poly}.  The case~$k=7$ is
illustrated in \cref{fig: cone}.
\begin{figure}[ht!]
\centering
\resizebox{0.35\textwidth}{!}{
\begin{tikzpicture}[scale=0.9]
  % polytope P_{D+7q}
  \filldraw[color=gray!20] (-2/3,-1/3)--(5/3,13/3)--(4,2)--(-2/3,-1/3);
  \draw[thin] (5/3,13/3)--(4,2);
  % fundamental parallelogram
    \filldraw[color=gray!60]
    (-2/3,-1/3)--(-2/3+2,-1/3+1)--(-2/3+3,-1/3+3)--(-2/3+1,-1/3+2)--(-2/3,-1/3);
    \draw[dashed] (-2/3+2,-1/3+1)--(-2/3+3,-1/3+3)--(-2/3+1,-1/3+2);
  % axes
  \draw (-1.2,0)--(6.2,0);
  \draw (0,-1.2)--(0,6.2);
  % axes labels
  \foreach \x in {1,2,...,6}
  {
    \node at (-0.25,\x) {$\scriptstyle\x$};
    \node at (\x,-0.30) {$\scriptstyle\x$};
  }
  % integer lattice
  \foreach \i in {-1,0,...,6}
    \foreach \j in {-1,0,...,6}
    {
      \filldraw (\i,\j) circle(1.3pt);
    }
  % tK_D
    \def\sone{3.1}
    \def\stwo{3.0}
    \draw[->,thick] (-2/3,-1/3)--(-2/3+\sone*2,-1/3+\sone*1);
    \draw[->,thick] (-2/3,-1/3)--(-2/3+\stwo*1,-1/3+\stwo*2);
  % more labels
    \node at (1.3,1.6) {$\widetilde{\Pi}$};
    \node at (1.99,3.33) {$P_{D+7q}$};
\end{tikzpicture}
}
\vspace{-1ex}
\caption{The cone~$\tK_D$, its fundamental parallelogram, and the
  polytope~$P_{D+7q}$ for the divisor~$D=(1,0,-1)$ on~$C_3$.
}\label{fig: cone}
\end{figure}

\vspace{-2ex}
\noindent{\bf Invariant theory.} Let~$\omega$ be a primitive~$n$-th root of unity.
Since~$\Jac(C_n)$ is the cyclic group of order~$n$ generated by~$[D_1]=[v_1-q]$,
the dual group~$\Jac^*(C_n)$ is also cyclic of order~$n$, generated by the
character~$\psi$ determined by~$\psi([v_1-q])=\omega$.  As explained in
\cref{sect: molien}, we identify~$\psi$ with the diagonal
matrix~$\diag(\omega,\omega^2,\dots,\omega^{n-1},1)$, and by \cref{cor:
lambda-molien}, 
\[
  \Lambda_{[D_j]}(z)
  =
  \frac{1}{n}\sum_{k=0}^{n-1}\frac{\omega^{-jk}}{\prod_{i=0}^{n-1}(1-\omega^{ik}z)}
\]
for~$j=1,\dots,n$.  In particular,
\[
  \Lambda_{[0]}(z)=\Lambda_{[D_n]}(z)=\frac{1}{n}\sum_{k=0}^{n-1}\frac{1}{(1-z^{n/\gcd(n,k)})^{\gcd(n,k)}}
  =\frac{1}{n}\sum_{d|n}\frac{\phi(d)}{(1-z^d)^{n/d}}
\]
where~$\phi$ is the Euler totient function.  The formula on the right is
well-known from Polya counting theory and yields the first part of the following
surprising result.
\begin{thm}\label{thm: necklaces}
On a cycle graph with $n$ vertices, $\lambda_{[0]}(k)$ counts the number of
binary necklaces with~$n$ black beads and~$k$ white beads.  More
generally,~$\lambda_{[D_j]}(k)$ is the number of binary necklaces with~$n$ black
beads and~$k$ white beads and with period divisible by~$(n+k)/\gcd(n,k,j)$.
\end{thm}
In the case where~$n$ and~$k$ are coprime, we can say more.
Let $N_{n,k}$ denote the set of necklaces with
$n$ black beads and $k$ white beads. Represent a necklace in $N_{n,k}$ by a
rotational equivalence class $[(w_1,\dots,w_k)]$ where each nonnegative integer~$w_i$
represents~$w_i$ white beads followed by a single black bead running counterclockwise
in a
cycle. For each~$j$ and~$k$, define
\begin{align*}
  \varphi_{j,k}:|D_{j}+kq| &\to\ \ N_{n,k}\\
  E\quad &\mapsto [(E(v_1),\dots,E(v_n))].
\end{align*}
\begin{thm}
  If $\gcd(k,n)=1$, then $\varphi_{j,k}$ is a bijection.
\end{thm}
\cref{fig: necklaces} illustrates all three
bijections~$\varphi_{1,4}$,~$\varphi_{2,4}$, and~$\varphi_{3,4}$ for the
case~$n=3$ and $k=4$ depending upon which vertex is designated as~$q$.

\begin{figure}[ht!]
\centering
  \def\r{1.1}
  \def\xshift{1.2in}
  \def\yshift{-1.0in}
  \def\rot{360/28}
  \begin{center}
  \resizebox{0.8\textwidth}{!}{
    \begin{tikzpicture}[scale=0.95]
      % septagon
      \draw (0+\rot:\r) \foreach \x in {0,1,...,6} {
	      -- (\x*360/7+\rot:\r)
	  } -- cycle (0+\rot:\r);
      % beads
      \draw[fill=white] (0+\rot:\r) circle(3pt);
      \draw[fill=white] (360/7+\rot:\r) circle(3pt);
      \draw[fill=black] (2*360/7+\rot:\r) circle(3pt);
      \draw[fill=black] (3*360/7+\rot:\r) circle(3pt);
      \draw[fill=black] (4*360/7+\rot:\r) circle(3pt);
      \draw[fill=white] (5*360/7+\rot:\r) circle(3pt);
      \draw[fill=white] (6*360/7+\rot:\r) circle(3pt);
      % divisor on triangle
      \begin{scope}[yshift=2.8]
      \draw (270:\r/2.1) node[below] {$\scriptstyle 4$}
      --(30:\r/2.1) node[right] {$\scriptstyle 0$}
      --(150:\r/2.1) node[left] {$\scriptstyle 0$}
	  --cycle;
      \end{scope}
      \begin{scope}[xshift=\xshift]
	% septagon
	\draw (0+\rot:\r) \foreach \x in {0,1,...,6} {
		-- (\x*360/7+\rot:\r)
	    } -- cycle (0+\rot:\r);
	% beads
	\draw[fill=black] (0+\rot:\r) circle(3pt);
	\draw[fill=white] (360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (2*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (3*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (4*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (5*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (6*360/7+\rot:\r) circle(3pt);
	% divisor on triangle
        \begin{scope}[yshift=2.8]
	\draw (270:\r/2.1) node[below] {$\scriptstyle 2$}
	--(30:\r/2.1) node[right] {$\scriptstyle 1$}
	--(150:\r/2.1) node[left] {$\scriptstyle 1$}
	    --cycle;
	  \end{scope}
      \end{scope}
      \begin{scope}[xshift=2*\xshift]
	% septagon
	\draw (0+\rot:\r) \foreach \x in {0,1,...,6} {
		-- (\x*360/7+\rot:\r)
	    } -- cycle (0+\rot:\r);
	% beads
	\draw[fill=white] (0+\rot:\r) circle(3pt);
	\draw[fill=black] (360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (2*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (3*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (4*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (5*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (6*360/7+\rot:\r) circle(3pt);
	% divisor on triangle
        \begin{scope}[yshift=2.8]
	\draw (270:\r/2.1) node[below] {$\scriptstyle 0$}
	--(30:\r/2.1) node[right] {$\scriptstyle 2$}
	--(150:\r/2.1) node[left] {$\scriptstyle 2$}
	    --cycle;
	  \end{scope}
      \end{scope}
      %% second row
      \begin{scope}[xshift=3*\xshift]%[xshift=\xshift/2,yshift=\yshift]
	% septagon
	\draw (0+\rot:\r) \foreach \x in {0,1,...,6} {
		-- (\x*360/7+\rot:\r)
	    } -- cycle (0+\rot:\r);
	% beads
	\draw[fill=white] (0+\rot:\r) circle(3pt);
	\draw[fill=white] (360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (2*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (3*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (4*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (5*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (6*360/7+\rot:\r) circle(3pt);
	% divisor on triangle
        \begin{scope}[yshift=2.8]
	\draw (270:\r/2.1) node[below] {$\scriptstyle 1$}
	--(30:\r/2.1) node[right] {$\scriptstyle 3$}
	--(150:\r/2.1) node[left] {$\scriptstyle 0$}
	    --cycle;
	  \end{scope}
      \end{scope}
      \begin{scope}[xshift=4*\xshift]%[xshift=3*\xshift/2,yshift=\yshift]
	% septagon
	\draw (0+\rot:\r) \foreach \x in {0,1,...,6} {
		-- (\x*360/7+\rot:\r)
	    } -- cycle (0+\rot:\r);
	% beads
	\draw[fill=black] (0+\rot:\r) circle(3pt);
	\draw[fill=white] (360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (2*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (3*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (4*360/7+\rot:\r) circle(3pt);
	\draw[fill=white] (5*360/7+\rot:\r) circle(3pt);
	\draw[fill=black] (6*360/7+\rot:\r) circle(3pt);
	% divisor on triangle
        \begin{scope}[yshift=2.8]
	\draw (270:\r/2.1) node[below] {$\scriptstyle 1$}
	--(30:\r/2.1) node[right] {$\scriptstyle 0$}
	--(150:\r/2.1) node[left] {$\scriptstyle 3$}
	    --cycle;
	\end{scope}
      \end{scope}
    \end{tikzpicture}
    }
  \end{center}
  \vspace{-3ex}
  \caption{A complete linear system on~$C_3$ and the
    corresponding necklaces.}\label{fig: necklaces}
\end{figure}

\vspace{-3ex}
\acknowledgements{This work was partially supported by a Reed College Science Research Fellowship and by
  the Reed College Summer Scholarship Fund. We would also like to acknowledge
  our extensive use of the mathematical software {\em
  SageMath}~(\cite{Sage}) and the {\em OEIS}~(\cite{oeis}).

\vspace{-2ex}
%% if you use biblatex then this generates the bibliography
%% if you use some other method then remove this and do it your own way
\printbibliography



\end{document}
