---
abstract: 'In this paper we give an algorithm for the computation of all the Arf numerical semigroups with a given genus. Moreover, we generalize the concept of genus of a numerical semigroup to good semigroups of $\mathbb{N}^r$ and we give a procedure to calculate all the Arf semigroups of $\mathbb{N}^r$ with a given genus.'
author:
- |
    Giuseppe Zito\
    \
    \
title: Arf good semigroups with fixed genus
---

Introduction {#introduction .unnumbered}
============

In this paper we present procedures concerning Arf subsemigroups of $\mathbb{N}^r$ for $r \geq 1$. In particular, for $r=1$, we deal with the concept of Arf numerical semigroup whose importance is motivated by its role in the study of equivalence between algebroid branches. Specifically, two algebroid branches are said to be equivalent if they have the same multiplicity sequence (cf. [@Campi Definition 1.5.11]), that is the sequence of the multiplicities of their succesive blow ups. In [@Arf], Arf gave an algebraic interpretation of this equivalence, introducing the concept of Arf ring and showing that for each ring $R$ there exists a smallest Arf overring $R'$, called the Arf closure of $R$. A ring $R$ and its Arf closure have the same multiplicity sequence, and from this it follows that two algebroid branches are equivalent if and only if their Arf closure have the same value semigroup. Taking in account the properties of the value semigroup of an Arf ring, a numerical Arf semigroup is defined as a numerical semigroup $S \subseteq \mathbb{N}$ such that $S(s)-s$ is a semigroup, for each $s\in S$, where $S(s)=\left\{n \in S; n\geq s \right\}$. The multiplicity sequence of an Arf numerical semigroup $S=\left\{ s_0=0<s_1<s_2,\ldots \right\}$ is very easy to compute since it coincides with the sequence of the differences $s_{i+1}-s_i$. By focusing on the numerical properties that a sequence has to satisfy to be a multiplicity sequence, it is possible to study the Arf numerical semigroups with a combinatorial approach without referring to the ring theory context. In the first section of this paper we present a new procedure to compute all Arf numerical semigroups $S$ with a prescribed genus, that is the cardinality of $\mathbb{N} \setminus S$ (this problem was already addressed in [@algo]). Then we start dealing with the case $r>1$, considering the class of Arf good semigroups of $\mathbb{N}^r$. The definition of good semigroup was presented [@BDF] and it is based on the properties of the value semigroups of one dimensional analytically unramified ring (for example the local ring of an algebraic curve), although it is possible to show that the resulting class of good semigroups is bigger than the class of value semigroups. Therefore the good semigroups can be seen as a natural generalization of the numerical semigroups. A good semigroup $S \subseteq \mathbb{N}^n$ is said to be local if the zero vector is the only element of $S$ with zero coordinates.

Then we can give the definition of Arf semigroup in the context of good semigroups of $\mathbb{N}^r$, by adapting in a natural way the numerical version, considering the usual partial ordering of $\mathbb{N}^r$. Furthermore, in order to extend the concept of multiplicity sequence, in [@BDF] it is also shown that to each local Arf good semigroup, it can be associated a multiplicity tree that characterizes the semigroup completely. A tree $T$ of vectors of $\mathbb{N}^n$ has to satisfy some properties to be a multiplicity tree of a local Arf good semigroup. For instance, it must have multiplicity sequences along its branches (because its projections are Arf numerical semigroups) and each node must be able to be expressed as a sum of nodes in a subtree of $T$ rooted in it. In [@Zito], taking in account this $1$-$1$ correspondence, it is showed a way to describe a multiplicity tree of an Arf semigroup of $\mathbb{N}^r$ by mean of an ordered collection $E$ of multiplicity sequence and a matrix $M(T)_E=(p_{i,j})$. In the same paper it is shown that we can consider a particular class of trees, the untwisted ones, that are easier to study because they can be expressed by a vector of $\mathbb{N}^{r-1}$ instead of a matrix. This is not restrictive because every multiplicity tree can be transformed by an opportune permutation into an untwisted one (this implies that the corresponding semigroups are isomorphic).

The conductor $\textbf{c}$ of a good semigroup is the minimal vector such that $ \textbf{c}+ \mathbb{N}^r \subseteq S$ (the existence of such a vector is guaranteed by the properties of good semigroups). In [@Zito2], it is shown how to deduce the value of the conductor of an Arf semigroup from the representation of its multiplicity tree and the author presented procedures for the computation of all Arf semigroups of $\mathbb{N}^r$ with a prescribed conductor. In order to generalize the procedure introduced in the numerical case, we need to extend the concept of genus to good semigroups of $\mathbb{N}^r$. This can be done by using the function $d(\textunderscore\setminus \textunderscore )$ defined in [@D'a] . In particular, if $S$ is a good semigroup of $\mathbb{N}^r$ with conductor $\delta$, then $C=\delta+\mathbb{N}^r$ is an ideal of $S$ and we can define the genus of $S$ as $ g(S)=d(\mathbb{N}^r \setminus C) - d(S \setminus C). $ Then, using the aforementioned representation for multiplicity trees and the procedure developed in the numerical case, we address the problem of computing the set $\textrm{Gen}(r,n)$ of all the Arf good semigroups of $\mathbb{N}^r$ with an untwisted tree and genus $n$.

The structure of the paper is the following.

In Section \[section4\], we firstly recall some definitions and properties concerning the numerical semigroups. Then we address the problem, already studied in [@algo], of finding the set $\textrm{Gen}(n)$ of the multiplicity sequences of all the Arf numerical semigroups with genus $n$. We accordingly adapt the procedure presented in [@Zito2] for the computation of all the Arf numerical semigroups with a given conductor, presenting a non recursive algorithm for the computation of $\textrm{Gen}(n)$, that appears to be faster than the one presented in [@algo].

In Section \[section5\], we begin to deal with semigroups in higher dimensions. In order to do that we recall the definition of good semigroups and the properties of the multiplcity tree of an Arf local good semigroup and we accordingly generalize the concept of genus to good semigroups of $\mathbb{N}^r$. We define the sets $\textrm{Gen}(r,n)$ of the untwisted multiplicity trees of all the Arf good semigroups of $\mathbb{N}^r$ with genus $n$. In Theorem \[genere\] we give a way to compute the genus of an untwisted Arf good semigroup of $\mathbb{N}^r$ from its representation $T_E$. Using this theorem it is possible to develope, using induction on $r$, a procedure that calculate the set $\textrm{Gen}(r,n)$, and from Proposition \[raff\] we deduce a possible way to make this computation faster. We give a strategy for computing the set $\overline{\textrm{Gen}(r,n)}$ of all the possible multiplicity trees (twisted and untwisted) associated to an Arf semigroup with genus $n$ in $\mathbb{N}^r$. At the end of the section we give an example of the application of the developed procedure and we present some tables containing cardinalites of the sets $\textrm{Gen}(r,n)$ for some values of $r$ and $n$.

The procedures presented here have been implemented in GAP ([@gap]).

Arf good semigroups of $\mathbb{N}^2$ with given conductor {#section2}
==========================================================

From this section we begin to deal with Arf good semigroups of $\mathbb{N}^r$. First of all we recall some important definitions and results A good semigroup $S$ of $\mathbb{N}^r$ is a submonoid of $\left( \mathbb{N}^r,+\right)$ such that (cf. [@BDF])

-   For all $a,b \in S$, $    \min(a,b) \in S$;

-   If $a,b\in S$ and $a[i]=b[i]$ for some $i \in \left\{ 1, \ldots,n\right\}$, then there exists $c \in S$ such that $c[i] > a[i]=b[i]$, $c[j]\geq \min(a[j],b[j])$ for $j \in  \left\{ 1, \ldots,n\right\} \setminus \left\{ i\right\}$ and $c[j]=\min(a[j],b[j])$ if $a[j]\neq b[j]$;

-   There exists $\delta \in S$ such that $\delta+\mathbb{N}^r \subseteq S$

(where we are considering the usual partial ordering in $\mathbb{N}^r$: $a \leq b$ if $a[i] \leq b[i]$ for each $i=1,\ldots,r$). The previous properties guarantee that for a good semigroup $S$ there exists a minimal vector $c(S)$ such that $c(S)+ \mathbb{N}^r \subseteq S$. Such a vector is said to be the conductor of $S$.\
In this paper we will always deal with local good semigroups. A good semigroup $S$ is local if the zero vector is the only vector of $S$ with some component equal to zero. However, it can be shown that every good semigroup is the direct product of local semigroups (cf. [@BDF Theorem 2.5]).

An Arf semigroup of $\mathbb{N}^r$, is a good semigroup such that $ S(\alpha)-\alpha $ is a semigroup, for each $\alpha \in S$ , where $ S(\alpha)=\left\{\beta \in S; \beta \geq \alpha \right\}$. The multiplicity tree $T$ of a local Arf semigroup $S\subseteq \mathbb{N}^r$ is a tree where the nodes are vector $ \textbf{n}_i^j \in \mathbb{N}^r$, where with $\textbf{n}_i^j$ we mean that this node is in the $i$-th branch on the $j$-th level (the root of the tree is $\textbf{n}_{1}^1=\textbf{n}_i^1 $ for all $i$ because we are in the local case and at level one all the branches must be glued) and we have

$$S=\left\{\textbf{0}\right\} \bigcup_{T'} \left\{ \sum_{\textbf{n}_i^j \in T' } {\textbf{n}_i^j}\right\},$$

where $T'$ ranges over all finite subtree of $T$ rooted in $\textbf{n}_1^1$.

Furthermore a tree $T$ is a multiplicity tree of an Arf semigroup if and only if its nodes satisfy the following properties (cf. [@BDF Theorem 5.11] ).

-   There exists $L \in \mathbb{N}$ such that for $m \geq L$, $\textbf{n}_i^m=(0,\ldots,0,1,0\ldots,0)$ (the nonzero coordinate is in the $i$-th position) for any $i=1,\ldots,n$;

-   $\textbf{n}_i^j[h]=0$ if and only if $\textbf{n}_i^j$ is not in the $h$-th branch of the tree;

-   Each $\textbf{n}_i^j$ can be obtained as a sum of nodes in a finite subtree $T'$ of $T$ rooted in $\textbf{n}_i^j$.

Notice that from these properties it follows that we must have multiplicity sequences along each branch. Therefore a multiplicity tree $T$ of an Arf semigroup of $\mathbb{N}^r$ can be represented by an ordered collection of $r$ multiplicity sequences $E$ and by an upper triangular matrix $ r \times r$ $$M(T)_{E}=\left(  \begin{matrix} 0 & p_{1,2} & p_{1,3} & \ldots & p_{1,r} \\ 
0 & 0 & p_{2,3} & \ldots & p_{2,r} \\ \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & 0 & 0 & \ldots& p_{r-1,r} \\ 0 & 0 & 0 & \ldots & 0 \\  \end{matrix}\right)$$where $p_{i,j}$ is the highest level such that the $i$-th and the $j$-th branches are glued in $T$. Suppose that $E=\left\{M_1,\ldots,M_r \right\}$, then in [@Zito Proposition 1.2], it is shown that the values that can be assigned to the $p_{i,j}$, in order to have a tree compatible with the previous properties, depend only on $M_i$ and $M_{j}$. In particular, if $M_i=M_{j},$ $p_{i,j}$ can be any positive integer, while, if $M_i \neq M_{j}$, there exists a level $k_E(i,j) \in \mathbb{N}^*$ such that $p_{i,j}$ is at most $k_E(i,j)$. We have $$k_E(i,j)=\min\left\{ \min( s_{i,k}, s_{j,k}): s_{i,k}\neq s_{j,k} \right\},$$ where $s_{i,k}$ is the integer such that $$M_i[k]=\sum_{l=k+1}^{s_{i,k}}{M_i[l]}.$$ Thus, if $M_1$ and $M_2$ are two distinct multiplicity sequences, we will define the compatibility between $M_1$ and $M_2$ as the integer $\textrm{Comp}(M_1,M_2)=k_E(1,2) $ where $E=\left\{M_1,M_2 \right\}$. While if $M_1=M_2$ we set by definition $\textrm{Comp}(M_1,M_2)=+\infty$. A tree $T$ is untwisted if two non-consecutive branches are glued at level $l$ if and only if all the consecutive branches between them are glued at a level greater or equal to $l$. We will call twisted a tree that it is not untwisted. From the definition it follows that the matrix of an untwisted tree $T \in \tau(E)$ is such that: $$p_{i,j}=\min\left\{ p_{i,i+1},\ldots,p_{j-1,j}\right\} \textrm{ for all } i<j.$$ So an untwisted tree can be completely described by the second diagonal of its matrix. Thus in the following we will indicate an untwisted tree by a vector $T_E=(p_1,\ldots,p_{r-1})$ where $p_i=p_{i,i+1}$.

\[remark0\] It is easy to see that a twisted tree can be converted to an untwisted one by accordingly permuting its branches (the corresponding Arf semigroups are therefore isomorphic). Thus in the following we can focus only on the properties of the untwisted trees, that are easier to study, because the twisted one can be always obtained by permutation of an untwisted tree.

The aim of this and the following section is to find a procedure that let us to determine all the local Arf semigroup $S \subseteq\mathbb{N}^r$ with a given conductor $\textbf{c} \in \mathbb{N}^r$. For the Remark \[remark0\], we can focus only on the untwisted trees.

We denote by $\textrm{Cond}(\textbf{c})$ the set of all the untwisted multiplicity trees of Arf semigroups in $\mathbb{N}^r$ with conductor $\textbf{c}\in \mathbb{N}^r$ (in the case $r=1$ we have the multiplicity sequences and from the previous section we have a procedure to determine such a set).

We notice the following general fact.

Let $S$ be an Arf semigroup of $\mathbb{N}^r$, $T$ the corresponding multiplicity tree and $M_i$ for $i=1,\ldots,n $ the multiplicity sequences of its branches.

We introduce the following integers $$d(i)=\min\left\{  j \in \mathbb{N}: M_i[j]=1 \textrm{ and  the $i-$th branch is not glued to other branches at level $j$} \right\},$$ for $  i=1,\ldots,r .$

Then $\textbf{c}=(c[1],\ldots,c[n])$ is the conductor of $S$ where $$c[i]=\sum_{k=1}^{d(i)-1}{M_i[k]}  \textrm{ for }  i=1,\ldots,n.$$

**Proof**. Denote by $N(T)= \left\{ \textbf{n}_i^j \right\}$ the set of the nodes of $T$. We will call $e_i=(0,\ldots,0,1,0,\ldots,0)$ where the non zero coordinate is in the $i$-th position. Now, from the properties of the integers $d(i)$, it follows that

-   $\textbf{n}_i^{d(i)}=e_i$ for all $i=1,\ldots,r$;

-   $\textbf{n}_i^{d(i)-1}\neq e_i$ for all $i=1,\ldots,r$.

We consider the subtree $T'$ of $T$ such that $N(T')=\left\{\textbf{n}_i^{j(i)}: i=1,\ldots,r; j(i)=1,\ldots,d(i)-1 \right\}$. Then we have

-   $T'$ is rooted in $\textbf{n}_1^{1}$ (it corresponds to an element of the associated Arf good semigroup);

-   $e_i \notin N(T')$ for all $i=1,\ldots,r$;

-   If $T''$ is such that $T' \subseteq T'' \subseteq T$ then $N(T'') \setminus N(T') $ consists only of nodes of the type $e_i$.

From the previous properties it is clear that the element corresponding to the subtree $T'$ must be the conductor of the Arf semigroup associated to $T$. It is also trivial that the sum of all the elements of $N(T')$ is equal to $\textbf{c}=(c[1],\ldots,c[n])$ where $$c[i]=\sum_{k=1}^{d(i)-1}{M_i[k]}  \textrm{ for }  i=1,\ldots,n.$$

With the notations of the previous proposition, given a tree $T_{E}=(p_1,\ldots,p_{r-1})$ where $E=\left\{M_1,\ldots,M_r\right\}$, it is easy to show that $$d(i)-1=\max(l(M_i),p_i,p_{i-1}) \textrm{ for  } i=2,\ldots,r-1$$ $$d(1)-1=\max(l(M_1),p_1) \textrm { and } d(r)-1=\max(l(M_r),p_{r-1}).$$

Now, we focus on the case $r=2$ and we determine a procedure to compute $\textrm{Cond}(\textbf{c})$ where $\textbf{c}$ is a fixed arbitrary vector $(c[1],c[2])$. Suppose that $T_{E}=(p) \in \textrm{Cond}(\textbf{c})$ where $E=\left\{ M_1,M_2 \right\}$. From the previous remark we have $ d(1)-1=\max(l(M_1),p)$ e $d(2)-1=\max(l(M_2),p)$. We have the following cases:\
$\bullet\ \textrm{Case}\  d(1)-1=l(M_1)$ and $d(2)-1=l(M_2)$.

We have $p \leq \min(l(M_1),l(M_2))$. Furthermore we have $p \leq \textrm{Comp}(M_1,M_2)$ because $T$ is well defined. Because $T_{E}=(p) \in \textrm{Cond}(\textbf{c})$ we have: $$c[1]=\sum_{k=1}^{d(1)-1}{M_1[k]} =\sum_{k=1}^{l(M_1)}{M_1[k]}  \textrm{ and }  c[2]=\sum_{k=1}^{d(2)-1}{M_2[k]} =\sum_{k=1}^{l(M_2)}{M_2[k]},$$ and from it we deduce, if $c[1] \neq 1$ and $c[2] \neq 1 $, that $M_1 \in \textrm{Cond}(c[1])$ and $M_2 \in \textrm{Cond}(c[2])$. If $c[1]=1$ then we can deduce $M_1=[1] \in \textrm{Cond}(0)$ (the same for $c[2]$).

The multiplicity sequence $M=[1]$ is the only one such that the sum of its entries up to to its length is not equal to the conductor of its associated Arf numerical semigroup (that is $\mathbb{N}$ with conductor $0$). In order to have more compact notation in the following, we define the set $\textrm{Cond}^{*}(c)$ for all $c \in \mathbb{N} \setminus \left\{ 0 \right\}$, where

-   $\textrm{Cond}^{*}(c)=\textrm{Cond}(c)  \textrm{ for all } c \neq 1;$

-   $\textrm{Cond}^{*}(1)=\textrm{Cond}(0).$

So in this case $T$ belongs to the following set: $$\begin{aligned}
  S^1(\textbf{c})=\left\{ T_{E}=(k): E=\left\{M_1,M_2\right\}; M_i \in\textrm{Cond}^{*}(c[i]) \textrm{  and } \right. \\  \left. 1 \leq  k \leq \min(\textrm{Comp}(M_1,M_2),l(M_1),l(M_2)) \right\}.  \end{aligned}$$ On the other hand, we can easily show that $ S^1(\textbf{c}) \subseteq  \textrm{Cond}(\textbf{c})$ (using the inverse implications).\
$\bullet\ \textrm{Case}\  d(1)-1=l(M_1)$ and $d(2)-1 \neq l(M_2)$.

Hence $d(2)-1=p$ and we have $l(M_2)<p \leq \min(l(M_1),\textrm{Comp}(M_1,M_2)).$ Therefore: $$c[1]= \sum_{k=1}^{l(M_1)}{M_1[k]} \textrm{ , }  c[2]= \sum_{k=1}^{p}{M_2[k]}=\sum_{k=1}^{l(M_2)}{M_2[k]}+ \sum_{k=l(M_2)+1}^{p}{M_2[k]}=\sum_{k=1}^{l(M_2)}{M_2[k]}+p-l(M_2),$$ and from this we can deduce that $M_1 \in \textrm{Cond}^*(c[1])$ and, denoted by $k(2)=c[2]-(p-l(M_2))$, $M_2 \in \textrm{Cond}^*(k(2))$. Notice that $k(2)<c[2]$.

Now, for all $k<c[2]$ we define the set: $$\begin{aligned}
 I_1(k)=\left\{ T_{E}=(p): E=\left\{M_1,M_2\right\}, M_1 \in \textrm{Cond}^*(c[1]),M_2 \in \textrm{Cond}^*(k) \right.\\ \left. p= l(M_2)+c[2]-k \leq \min(l(M_1),\textrm{Comp}(M_1,M_2)) \right\}, \end{aligned}$$ therefore $T$ belongs to $$S_2^1(\textrm{c})=\bigcup_{k<c[2]} {I_1(k)}.$$ With the inverse implication we can easily show that $ S_2^1(\textbf{c}) \subseteq  \textrm{Cond}(\textbf{c})$.\
$\bullet\ \textrm{Case}\  d(1)-1\neq l(M_1)$ e $d(2)-1 = l(M_2)$.

We have $d(1)-1=p$ and $l(M_1)<p \leq \min(l(M_2),\textrm{Comp}(M_1,M_2)).$ Hence: $$c[1]= \sum_{k=1}^{p}{M_1[k]}=\sum_{k=1}^{l(M_1)}{M_1[k]}+ \sum_{k=l(M_1)+1}^{p}{M_1[k]}=\sum_{k=1}^{l(M_1)}{M_1[k]}+p-l(M_1)  \textrm{; }  c[2]= \sum_{k=1}^{l(M_2)}{M_2[k]},$$ and from this we obtain $M_2 \in \textrm{Cond}^*(c[2])$ and, denoted by $k(1)=c[1]-(p-l(M_1))$, $M_1 \in \textrm{Cond}^*(k(1))$. Notice that $k(1)<c[1]$.

For all $k<c[1]$ we define the set: $$\begin{aligned}
 I_2(k)=\left\{ T_{E}=(p): E=\left\{M_1,M_2\right\}, M_1 \in \textrm{Cond}^*(k),M_2 \in \textrm{Cond}^*(c[2]) \right.\\ \left. p= l(M_1)+c[1]-k \leq \min(l(M_2),\textrm{Comp}(M_1,M_2)) \right\}, \end{aligned}$$ therefore $T$ belongs to $$S_2^2(\textrm{c})=\bigcup_{k<c[1]} {I_2(k)}.$$ With the inverse implication we can easily show that $ S_2^2(\textbf{c}) \subseteq  \textrm{Cond}(\textbf{c})$.\
$\bullet\ \textrm{Case}\  d(1)-1\neq l(M_1)$ and $d(2)-1 \neq l(M_2)$.

Then $d(2)-1=p$, $d(1)-1=p$ and we have $\max(l(M_1),l(M_2))<p \leq \textrm{Comp}(M_1,M_2).$ It follows: $$c[1]= \sum_{k=1}^{p}{M_1[k]}=\sum_{k=1}^{l(M_1)}{M_1[k]}+ \sum_{k=l(M_1)+1}^{p}{M_1[k]}=\sum_{k=1}^{l(M_1)}{M_1[k]}+p-l(M_1)$$ $$c[2]= \sum_{k=1}^{p}{M_2[k]}=\sum_{k=1}^{l(M_2)}{M_2[k]}+ \sum_{k=l(M_2)+1}^{p}{M_2[k]}=\sum_{k=1}^{l(M_2)}{M_2[k]}+p-l(M_2),$$ If we denote by $k(1)=c[1]-(p-l(M_1))$ and by $k(2)=c[2]-(p-l(M_2))$, we have $M_1 \in \textrm{Cond}^*(k(1))$ and $M_2 \in \textrm{Cond}^*(k(2))$.

Furthermore notice that $k(1)<c[1]$ and $k(2)<c[2]$. Now, for all $k_1<c[1]$ and $k_2<c[2]$ we define the set: $$\begin{aligned}
 I(k_1,k_2)=\left\{ T_{E}=(p): E=\left\{M_1,M_2\right\}, M_i \in \textrm{Cond}^*(k_i), \textrm{ for } i=1,2 \right.\\ \left.  p=l(M_1)+c[1]-k_1=l(M_2)+c[2]-k_2 \leq \textrm{Comp}(M_1,M_2) \right\} \end{aligned}$$ so $T$ belongs to $$S^3(\textbf{c})=\bigcup_{k_i < c[i]}{I(k_1,k_2)} \subseteq \textrm{Cond}(\textbf{c})$$ Even in this case we can show that $ S^3(\textbf{c}) \subseteq  \textrm{Cond}(\textbf{c})$.

We have studied all the possible cases so we proved that $$S^1(\textbf{c}) \cup S_1^2(\textbf{c}) \cup S_2^2(\textbf{c}) \cup S^3(\textbf{c})=\textrm{Cond}(\textbf{c}).$$ All the previous set can be computed by using the procedure given in the case $r=1$ so we have found a procedure to compute $\textrm{Cond}(\textbf{c})$ when $r=2$.

Let us compute $ \textrm{Cond}([4,5])$.

First of all we compute $S^1([4,5])$. We need $\textrm{Cond}^*(4)$ and $\textrm{Cond}^*(5)$. They are: $$\textrm{Cond}^*(4)=\left\{[4],[2,2]\right\} \textrm{ and } \textrm{Cond}^*(5)=\left\{ [5], [3,2] \right\}.$$ Hence when we compute $S^1([4,5])$ we find:

-   $E_1=\left\{M_1=[4] , M_2=[5]\right\}$. Thus $\textrm{Comp}(M_1,M_2)=5$ and $\min(l(M_1),l(M_2))=1$. Then we have only the tree $T_1=T_{E_1}=(1)$.

-   $E_2=\left\{M_1=[4] , M_2=[3,2]\right\}$. Thus $\textrm{Comp}(M_1,M_2)=3$ and $\min(l(M_1),l(M_2))=1$. Then we have only the tree $T_2=T_{E_2}=(1)$.

-   $E_3=\left\{M_1=[2,2] , M_2=[5]\right\}$. Thus $\textrm{Comp}(M_1,M_2)=2$ and $\min(l(M_1),l(M_2))=1$. Then we have only the tree $T_3=T_{E_3}=(1)$.

-   $E_4=\left\{M_1=[2,2] , M_2=[3,2]\right\}$. We have $\textrm{Comp}(M_1,M_2)=2$ and $\min(l(M_1),l(M_2))=2$. So we have the trees $T_4=T_{E_4}=(1)$ and $T_5=T_{E_4}=(2)$ .

Hence $S^1([4,5])=\left\{ T_1,T_2,T_3,T_4,T_5\right\}$. 0.3in

\]at(current bounding box.south)[$T_1$]{};

0.3in

at(current bounding box.south)[$T_2$]{};

0.3in

at(current bounding box.south)[$T_3$]{};

0.3in

at(current bounding box.south)[$T_4$]{};

0.3in

\]at(current bounding box.south)[$T_5$]{};

Now we compute $S_1^2([4,5])$. The only value $k$ such that $I_1(k) \neq \emptyset $ is $k=4$ and we have:

-   $c[1]=4$, $k=4$. If we consider $M_1=[2,2] \in \textrm{Cond}^*(4)$ , $M_2=[4] \in \textrm{Cond}^*(4) $ and $E_5=\left\{ M_1,M_2 \right\}$ we have $$l(M_2)+c[2]-k=2 \leq \min(l(M_1),\textrm{Comp}(M_1,M_2))=\min(2,2)=2.$$ Hence we have the tree $T_6=T_{E_5}=(2).$

Therefore $S_1^2([4,5])=\left\{T_6\right\}$. Let us compute $S_2^2([4,5])$. The only value $k$ such that $I_2(k) \neq \emptyset$ is $k=3$ and we have:

-   $k=3$, $c[2]=5$. If we consider $M_1=[3] \in \textrm{Cond}^*(3)$ , $M_2=[3,2] \in \textrm{Cond}^*(5) $ and $E_6=\left\{ M_1,M_2 \right\}$ we have $$l(M_1)+c[1]-k=1+4-3=2 \leq \min(l(M_2), \textrm{Comp}(M_1,M_2)=\min(2,3)=2.$$ Hence we have the tree $T_7=T_{E_6}=(2).$

Therefore $S_2^2([4,5])=\left\{T_7\right\}$.

We finally compute $S^3([4,5])$.

The only values of $k_1$ and $k_2$ such that $I(k_1,k_2) \neq \emptyset$ are the following:

-   $k_1=2$, $k_2=3$. If we consider $M_1=[2] \in \textrm{Cond}^*(2)$, $M_2=[3] \in \textrm{Cond}^*(3) $ and $E_7=\left\{ M_1,M_2 \right\}$ we have $$l(M_1)+c[1]-k_1=1+4-2=3=1+5-3=l(M_2)+c[2]-k_2 \leq \textrm{Comp}(M_1,M_2)=3.$$ Thus we have the tree $T_8=T_{E_7}=(3).$

-   $k_1=3$, $k_2=4$. If we consider $M_1=[3] \in \textrm{Cond}^*(3)$ , $M_2=[4] \in \textrm{Cond}^*(4) $ and $E_8=\left\{ M_1,M_2 \right\}$ we have $$l(M_1)+c[1]-k_1=1+4-3=2=1+5-4=l(M_2)+c[2]-k_2\leq \textrm{Comp}(M_1,M_2)=4.$$ Thus we have the tree $T_9=T_{E_8}=(2).$ Hence $S^3([4,5])=\left\{ T_8,T_9\right\}$. 0.3in

    \]at(current bounding box.south)[$T_6$]{};

    0.3in

    \]at(current bounding box.south)[$T_7$]{};

    0.3in

    \]at(current bounding box.south)[$T_8$]{};

    0.3in

    \]at(current bounding box.south)[$T_9$]{};

Summarizing we have $ \textrm{Cond}([4,5])=\left\{ T_1,T_2,T_3,T_4,T_5, T_6,T_7,T_8,T_9\right\}$.

Using the previous results it is easy to implement an algorithm that computes the number of Arf semigroups of $ \mathbb{N}^2$ with a given conductor. Each entry of the following table is such a number, where the conductors range from $(1,1)$ to $(20,20)$.

Arf semigroups of $\mathbb{N}^r$ with a given conductor {#section3}
=======================================================

In this section we study the general case. We want to develope a recursive procedure to calculate $\textrm{Cond}(\textbf{c})$ for $\textbf{c} \in \mathbb{N}^r$, using the fact that we already know how to solve the base cases $r=1$ and $r=2$. In order to do that is very useful the following Lemma.

\[Lemma3\] Consider $\textbf{c}=(c[1],\ldots,c[r]) \in \mathbb{N}^r$ and suppose that $T=T_{E}=(p_1,\ldots,p_{r-1}) \in \textrm{Cond}(\textbf{c})$ where $E=\left\{ M_1,\ldots,M_r \right\}$. If $t \in \left\{ 2,\ldots,r-1\right\}$, then we have that at least one of the following conditions must hold:

-   $ T_1= T_{E_1}=(p_1,\ldots,p_{t-1}) \in \textrm{Cond}((c[1],\ldots,c[t]))$ with $E_1=\left\{M_1,\ldots,M_t\right\};$

-   $T_2= T_{E_2}=(p_t,\ldots,p_{r-1}) \in \textrm{Cond}((c[t],\ldots,c[r]))$ with $E_2=\left\{M_t,\ldots,M_r\right\}.$

**Proof**. We assume by contradiction that

-   $ T_1 \notin\textrm{Cond}((c[1],\ldots,c[t])); $

-   $ T_2 \notin \textrm{Cond}((c[t],\ldots,c[r])). $

Let us consider the following integers (which are linked to the conductor): $$d(i)=\min\left\{  j \in \mathbb{N}: M_i[j]=1 \textrm{ and the $i$-th branch in $T$ is not glued to other branches at level $j$} \right\},$$ for $  i=1,\ldots,r .$ $$d_1(i)=\min\left\{  j \in \mathbb{N}: M_i[j]=1 \textrm{  and the $i$-th branch in $T_1$ isn't glued to other branches at level $j$}  \right\},$$ for $  i=1,\ldots,t .$ $$d_2(i)=\min\left\{  j \in \mathbb{N}: M_i[j]=1 \textrm{ and the $i$-th branch in $T_2$ isn't glued to other branches at level $j$}  \right\},$$ for $  i=t,\ldots,r .$

We clearly have $d_1(l)=d(l)$ for all $l=1,\ldots,t-1$ and $d_2(m)=d(m)$ for all $m=t+1,\ldots,r$. Furthermore $d_1(t)\leq d(t)$ e $d_2(t) \leq d(t)$. In fact we have noticed that $d(t)-1=\max(l(M_t),p_{t-1},p_t)$, while $d_1(t)-1=\max(l(M_t),p_{t-1})$ and $d_2(t)-1=\max(l(M_t),p_t)$.

From $T \in \textrm{Cond}(\textbf{c})$ we deduce that $$\sum_{k=1}^{d(i)-1}{M_i[k]}=c[i]  \textrm{ for }  i=1,\ldots,r.$$ We denote respectively by $(c_1[1],\ldots,c_1[t])$ and by $(c_2[t],\ldots,c_2[r]))$ the conductors of $T_1$ and of $T_2$.

We have: $$c_1[l]=\sum_{k=1}^{d_1(l)-1}{M_l[k]}=\sum_{k=1}^{d(l)-1}{M_l[k]}=c[l] \textrm{   for  } l=1,\ldots,t-1$$ $$\textrm{  and } c_2[m]=\sum_{k=1}^{d_2(m)-1}{M_m[k]}=\sum_{k=1}^{d(m)-1}{M_m[k]}=c[m],  \textrm{ for } m=t+1,\ldots,r$$ and this implies, because $ T_1 \notin \textrm{Cond}((c[1],\ldots,c[t])) $ and $ T_2 \notin \textrm{Cond}((c[t],\ldots,c[r]))$, that $$c_1[t]=\sum_{k=1}^{d_1(t)-1}{M_t[k]}\neq c[t] \textrm{   and  }  c_2[t]=\sum_{k=1}^{d_2(t)-1}{M_t[k]} \neq c[t],$$ and therefore we have $d_1(t)<d(t)$ and $d_2(t)<d(t)$.

From this it would follow $$d(t)-1=\max(l(M_t),p_{t-1},p_t)=\max(\max(l(M_t),p_{t-1}),\max(l(M_t),p_t)))=$$ $$=\max(d_1(t)-1,d_2(t)-1)<d(t)-1$$ and we obtain a contradiction.

Now, using this Lemma, we can introduce an algorithm that solves our problem working inductively. Given $\textbf{c} \in \mathbb{N}^r$, we want to compute $\textrm{Cond}(\textbf{c})$. We suppose that we are able to solve the problem for all $s<r$ and we develope a strategy for the $r$ case.

Let us fix some notations. If $k=2,\ldots,r-1$, we denote by $\textbf{c}_k=(c[1],\ldots,c[k])$ and by $\textbf{c}^k=(c[k+1],\ldots,c[r])$. Similarly, if $E=\left\{M_1,\ldots,M_r\right\}$, we denote by $E_k=\left\{M_1,\ldots,M_k\right\}$ and by $E^k=\left\{M_{k+1},\ldots,M_r\right\}.$ Furthermore for $i=1,\ldots,r-1$ we define the integers ${}^*p_i=\max(l(M_i),p_{i-1})$ and $p_i^*=\max(l(M_{i+1}),p_{i+1})$, where, by definition, we set $p_{r-1}^*=l(M_r)$ and ${}^*p_1=l(M_1)$.

Fixed $\textbf{c} \in \mathbb{N}^r$ we suppose to have a tree $T=T_{E}=(p_1,\ldots,p_{r-1}) \in \textrm{Cond}(\textbf{c})$ with $E=\left\{ M_1,\ldots,M_r \right\}$. Consider $t \in \left\{ 2,\ldots,r-1 \right\}$. It follows from the previous lemma that we only have two cases:\
$\bullet\ \textrm{Case}\  T_1=T_{E_t}=(p_1,\ldots,p_{t-1}) \in \textrm{Cond}(\textbf{c}_t).$

We clearly have $d_1(i)=d(i) $ for all $i=1,\ldots,t-1$, while from $T_1 \in \textrm{Cond}(\textbf{c}_t)$ it follows that $d_1(t)=d(t)$. Hence: $$^*p_t=\max(l(M_t),p_{t-1})=d_1(t)-1=d(t)-1=\max(p_t,p_{t-1},l(M_t))=\max(^*p_t,p_t)$$ and we deduce that $p_t \leq  {}^*p_t$.

We consider the tree $T_2=T_{E^t}=(p_{t+1},\ldots,p_{r-1})$, (if $t=r-1$ we have $T_2=M_r$). We clearly have $d_2(i)=d(i)$ for all $i=t+2,\ldots,r$.

On the other hand $d_2(t+1)-1=\max(l(M_{t+1}),p_{t+1})=p_{t}^*$ may be different from $$d(t+1)-1= \max(l(M_{t+1},p_{t+1},p_t)=\max(p_t^*,p_t).$$ Hence we have the following two subcases:\
$ \blacktriangleright \textrm{Subcase}\ d_2(t+1)=d(t+1).$

In this case we have $T_2 \in \textrm{Cond}(\textbf{c}^t)$ and $p_t \leq p^*_t$ (if $t=r-1$ we have $T_2=M_r \in \textrm{Cond}^*(c[r])$). We also recall that we must have the compatibility condition $p_t \leq \textrm{Comp}(M_t,M_{t+1})$.

Thus we have discovered that $T$ belongs to the following set: $$S_1^1(\textbf{c})=\left\{ T_{E}=(p_1,\ldots,p_{r-1}): E=\left\{M_1,\ldots,M_r \right\}; T_{E_t}=(p_1,\ldots,p_{t-1})\in \textrm{Cond}(\textbf{c}_t);\right.$$ $$\left. T_{E^t}=(p_{t+1},\ldots,p_{r-1}) \in \textrm{Cond}(\textbf{c}^t) \textrm{ with }1\leq p_t \leq \min({}^*p_{t},p^*_{t},\textrm{Comp}(M_t,M_{t+1})) \right\}.$$ It is very easy to check that we also have $S_1^1(\textbf{c}) \subseteq \textrm{Cond}(\textbf{c}).$ If $t=r-1$ the previous set has the following definition: $$S_1^1(\textbf{c})=\left\{ T_{E}=(p_1,\ldots,p_{r-1}): E=\left\{M_1,\ldots,M_r \right\}; \right.  T_{E_{r-1}}=(p_1,\ldots,p_{r-2}) \in \textrm{Cond}(\textbf{c}_{r-1});$$ $$\left.  M_r \in \textrm{Cond}^*(c[r]) ;1\leq p_{r-1} \leq \min(l(M_r),^*p_{r-1},\textrm{Comp}(M_{r-1},M_r)) \right\}.$$\
$ \blacktriangleright \textrm{Subcase}\ d_2(t+1) \neq d(t+1).$

In this case we have $$p_t=d(t+1)-1 >d_2(t+1)-1=\max(l(M_{t+1}),p_{t+1})=p^*_t.$$ Hence $$c[t+1]=\sum_{k=1}^{d(t+1)-1} M_{t+1}[k]=\sum_{k=1}^{p_t} M_{t+1}[k] =\sum_{k=1}^{p^*_t} M_{t+1}[k]+p_t-p^*_t$$ and from this it follows that $T_2 \in \textrm{Cond}((k[t+1],c[t+2],\ldots,c[r]))$ where $$\sum_{k=1}^{p^*_t} M_{t+1}[k]=\sum_{k=1}^{d_2(t+1)-1} M_{t+1}[k]=k[t+1]<c[t+1],$$ and we have $T_2 \in \textrm{Cond}^*(k[t+1])$ in the case $t=r-1$. Thus we have $k[t+1]=c[t+1]-(p_t-p^*_t)$. For all the $k_{t+1} \in \mathbb{N}$ such that $k_{t+1}<c[t+1]$ we define the set: $$I_1(k_{t+1})=\left\{ T_{E}=(p_1,\ldots,p_{r-1}):E=\left\{M_1,\ldots,M_r \right\}; T_{E_t}=(p_1,\ldots,p_{t-1}) \in\textrm{Cond}(\textbf{c}_t); \right.$$ $$\left.  T_{E^t}=(p_{t+1},\ldots,p_{r-1}) \in \textrm{Cond}((k_{t+1},c[t+2],\ldots,c[r])); \right.$$ $$\left.  p_t=p_t^* +c[t+1]-k_{t+1}\leq\min(^*p_{t},\textrm{Comp}(M_t,M_{t+1}))\right\}.$$ Hence $T$ belongs to the following set: $$S_1^2(\textbf{c})= \bigcup_{1\leq k_{t+1} < c[t+1]}{I_1(k_{t+1})},$$ and it is clear that $ S_1^2(\textbf{c}) \subseteq   \textrm{Cond}(\textbf{c})$.

If $t=r-1$ the previous set has the following definition: $$I_1(k_r)=\left\{ T_{E}=(p_1,\ldots,p_{r-1}):E=\left\{M_1,\ldots,M_r \right\}; T_{E_{r-1}}=(p_1,\ldots,p_{r-2}) \in \textrm{Cond}(\textbf{c}_{r-1})\right.$$ $$\left. M_r \in \textrm{Cond}^*(k_r) ;p_{r-1}=l(M_r)+c[r]-k_r\leq \min(^*p_{r-1},\textrm{Comp}(M_{r-1},M_r)) \right\}.$$\
$\bullet\ \textrm{Case}\  T_1=T_{E^{t-1}}=(p_t,\ldots,p_{r-1})\in \textrm{Cond}(\textbf{c}^{t-1}).$

We only have to adapt the considerations made in the previous case to this case. Thus we directly give the sets which arise without further justifications.

-   If $t\neq 2$, $$S_2^1(\textbf{c})=\left\{ T_{E}=(p_1,\ldots,p_{r-1}): E=\left\{M_1,\ldots,M_r \right\}; T_{E^{t-1}}=(p_t,\ldots,p_{r-1})\in \textrm{Cond}(\textbf{c}^{t-1});\right.$$ $$\left. T_{E_{t-1}}=(p_1,\ldots,p_{t-2}) \in \textrm{Cond}(\textbf{c}_{t-1}) \textrm{ con }1\leq p_{t-1} \leq \min(^*p_{t-1},p^*_{t-1},\textrm{Comp}(M_t,M_{t-1})) \right\}.$$

-   If $t=2$, $$S_2^1(\textbf{c})=\left\{ T_{E}=(p_1,\ldots,p_{r-1}): E=\left\{M_1,\ldots,M_r \right\}; \right.  T_{E^1}=(p_2,\ldots,p_{r-1}) \in \textrm{Cond}(\textbf{c}^{1});$$ $$\left.  M_1 \in \textrm{Cond}^*(c[1]) ;1\leq p_{1} \leq \min(l(M_1),p^*_{1},\textrm{Comp}(M_{1},M_2)) \right\}.$$

We have $S_2^1(\textbf{c}) \subseteq  \textrm{Cond}(\textbf{c}).$

For all $k_{t-1} \in \mathbb{N}$ such that $1\leq k_{t-1} < c[t-1]$ we consider:

-   If $t \neq 2,$ $$I_2(k_{t-1})=\left\{ T_{E}=(p_1,\ldots,p_{r-1}):E=\left\{M_1,\ldots,M_r \right\}; T_{E^{t-1}}=(p_t,\ldots,p_{r-1}) \in\textrm{Cond}(\textbf{c}^{t-1}); \right.$$ $$\left.  T_{E_{t-1}}=(p_{1},\ldots,p_{t-2}) \in \textrm{Cond}((c[1],\ldots,c[t-2],k_{t-1}));\right.$$ $$\left. p_{t-1}={}^*p_{t-1}+c[t-1]-k_{t-1}\leq  \min(p^*_{t-1},\textrm{Comp}(M_{t-1},M_{t}))\right\}.$$

-   If $t=2$, $$I_2(k_1)=\left\{ T_{E}=(p_1,\ldots,p_{r-1}):E=\left\{M_1,\ldots,M_r \right\}; T_{E^{1}}=(p_2,\ldots,p_{r-1}) \in \textrm{Cond}(\textbf{c}^{1})\right.$$ $$\left. M_1 \in \textrm{Cond}^*(k_1) ;p_{1}=l(M_1)+c[1]-k_1\leq \min(p^*_{1},\textrm{Comp}(M_{1},M_2)) \right\}.$$

We have that: $$S_2^2(\textbf{c})= \bigcup_{1\leq k_{t-1} < c[t-1]}{I_2(k_{t-1})} \subseteq   \textrm{Cond}(\textbf{c}).$$ The previous lemma ensures that we have considered all the possibilities. So we showed that $$\textrm{Cond}(\textbf{c}) \subseteq  S_1^1(\textbf{c}) \cup S_1^2(\textbf{c}) \cup S_2^1(\textbf{c}) \cup S_2^2(\textbf{c}),$$ hence $$S_1^1(\textbf{c}) \cup S_1^2(\textbf{c}) \cup S_2^1(\textbf{c}) \cup S_2^2(\textbf{c})=\textrm{Cond}(\textbf{c}).$$ Due to our induction hypothesis all the previous sets can be computed so we developed an algorithm which computes $\textrm{Cond}(\textbf{c})$.

Now we have a way to compute all the untwisted multiplicity trees with a given conductor $\textbf{c}$ for all the $\textbf{c} \in \mathbb{N}^r$. Suppose that we want to find also the twisted multiplicity trees with conductor $\textbf{c}$. We will call $\overline{\textrm{Cond}(\textbf{c})}$ the set of all multiplicity trees (twisted or untwisted) associated to an Arf semigroup with conductor $\textbf{c}$. Suppose that $T$ is a twisted tree in $\overline{\textrm{Cond}(\textbf{c})}$ with $\textbf{c} \in \mathbb{N}^r$. Then there exists a permutation $\sigma \in S^r$, where $S^r$ is the symmetric group, such that $\sigma(T)$ is untwisted and is clearly belongs to $ \textrm{Cond}(\sigma(\textbf{c}))$. From this it follows that: $$\overline{\textrm{Cond}(\textbf{c})}=\bigcup_{\sigma \in S^r} \left\{ \sigma^{-1}(T): T \in  \textrm{Cond}(\sigma(\textbf{c})) \right\}.$$

Let us compute $ \textrm{Cond}([3,2,4])$. In this case $r=3$, therefore we have $t=2$. First of all we compute $S_1^1([3,2,4])$. Because $t=r-1$ the definition of this set is: $$S_1^1([3,2,4])=\left\{ T_{E}=(p_1,p_{2}): E=\left\{M_1,M_2,M_3 \right\}; \right.  T_{E_{2}}=(p_1) \in \textrm{Cond}([3,2]);$$ $$\left.  M_3 \in \textrm{Cond}^*(4) ;1\leq p_{2} \leq \min(l(M_3),^*p_{2},\textrm{Comp}(M_{2},M_3)) \right\}.$$ Then to do that we need the follwing sets:

-   $\textrm{Cond}([3,2])= \left\{A_1,A_2 \right\}$ where $A_1=T_{F_1}=(1)$ and $A_2=T_{F_2}=(2)$ with $F_1=\left\{ [3],[2]\right\}$ and $F_2=\left\{ [2],[1]\right\}.$

-   $\textrm{Cond}^*(4)=\left\{[2,2],[4] \right\}$

Hence we consider:

-   $E_1=\left\{ M_1=[3],M_2=[2],M_3=[2,2] \right\}$ and we have $\min(\max(l(M_2),p_1),\textrm{Comp}(M_2,M_3),l(M_3))=\min(1,2,2)=1$. Thus we only have the tree $T_1=T_{E_1}=(1,1).$

-   $E_2=\left\{ M_1=[3],M_2=[2],M_3=[4] \right\}$ and we have $\min(\max(l(M_2),p_1),\textrm{Comp}(M_2,M_3),l(M_3))=\min(1,3,1)=1$. Thus we only have the tree $T_2=T_{E_2}=(1,1).$

-   $E_3=\left\{ M_1=[2],M_2=[1],M_3=[2,2] \right\}$ and we have $\min(\max(l(M_2),p_1),\textrm{Comp}(M_2,M_3),l(M_3))=\min(2,2,2)=2$. Thus we have the trees $T_3=T_{E_3}=(2,1)$ and $T_4=T_{E_3}=(2,2).$

-   $E_4=\left\{ M_1=[2],M_2=[1],M_3=[4] \right\}$ and we have $\min(\max(l(M_2),p_1),\textrm{Comp}(M_2,M_3),l(M_3))=\min(2,2,1)=1$. Thus we only have the tree $T_5=T_{E_4}=(2,1).$

Hence $S_1^1([3,2,4])=\left\{ T_1,T_2,T_3,T_4,T_5\right\}.$

Now we compute $S_1^2([3,2,4])$. $k_3=3$ is the only value such that $I(k_3) \neq \emptyset$. In fact, if we consider $A_2$ and $M_3=[3]$, we have:

-   $ E_5=\left\{ M_1=[2],M_2=[1],M_3=[3] \right\} \textrm{ and } l(M_3)+c[3]-k_3=1+4-3=2 \leq \min(\max(l(M_2),p_1),\textrm{Comp}(M_2,M_3)))=\min(2,2)=2$. Thus we have the tree $T_6=T_{E_5}=(2,2).$

0.3in

at(current bounding box.south)[$T_1$]{};

0.3in

at(current bounding box.south)[$T_2$]{};

0.3in

at(current bounding box.south)[$T_3$]{};

0.3in

at(current bounding box.south)[$T_4$]{};

0.3in

at(current bounding box.south)[$T_5$]{};

0.3in

at(current bounding box.south)[$T_6$]{};

Now we compute $S_2^1([3,2,4])$. We are in the case $t=2$ so its definition is: $$S_2^1([3,2,4])=\left\{ T_{E}=(p_1,p_2): E=\left\{M_1,M_2,M_3 \right\}; \right.  T_{E^1}=(p_2) \in \textrm{Cond}([2,4]);$$ $$\left.  M_1 \in \textrm{Cond}^*(3) ;1\leq p_{1} \leq \min(l(M_1),p^*_{1},\textrm{Comp}(M_{1},M_2)) \right\}.$$ Then to do that we need the following sets: $$\textrm{Cond}([2,4])= \left\{B_1,B_2,B_3,B_4 \right\}\textrm{ where }$$

-   $B_1=T_{G_1}=(2)$ with $G_1=\left\{ [1],[2,2]\right\};$

-   $B_2=T_{G_2}=(1)$ with $G_2=\left\{ [2],[2,2]\right\}$;

-   $B_3=T_{G_3}=(2)$ with $G_3=\left\{ [1],[3]\right\}$ ;

-   $B_4=T_{G_4}=(1)$ with $G_4=\left\{ [2],[4]\right\}$ ;

-   $\textrm{Cond}^*(3)=\left\{[3] \right\}.$

Hence we consider:

-   $E_6=\left\{ M_1=[3],M_2=[1],M_3=[2,2] \right\}$ and we have $\min(\max(p_2,l(M_2),\textrm{Comp}(M_1,M_2),l(M_1))=\min(2,2,1)=1$. Thus we only have the tree $T_7=T_{E_6}=(1,2).$

-   $E_1=\left\{ M_1=[3],M_2=[2],M_3=[2,2] \right\}$ and we have $\min(\max(p_2,l(M_2),\textrm{Comp}(M_1,M_2),l(M_1))=\min(1,3,1)=1$. Thus we only have the tree, already found in $S_1^1([3,2,4])$, $T_1=T_{E_1}=(1,1).$

-   $E_7=\left\{ M_1=[3],M_2=[1],M_3=[3] \right\}$ and we have $\min(\max(p_2,l(M_2),\textrm{Comp}(M_1,M_2),l(M_1))=\min(2,2,1)=1$. Hence we have the tree $T_8=T_{E_7}=(1,2)$.

-   $E_2=\left\{ M_1=[3],M_2=[2],M_3=[4] \right\}$ and we have $\min(\max(p_2,l(M_2),\textrm{Comp}(M_1,M_2),l(M_1))=\min(1,3,1)=1$. Thus we only have the tree, already found in $S_1^1([3,2,4])$, $T_2=T_{E_2}=(1,1).$

Hence $S_2^1([3,2,4])=\left\{ T_1,T_2,T_7,T_8\right\}.$

Now we compute $S_2^2([3,2,4])$. $k_1=2$ is the only value such that $I(k_1) \neq \emptyset$, and $I(2)$ contains two elements. In fact, if we consider $B_1$ and $B_3$ and $M_1=[2]$, we have:

-   $ E_3=\left\{ M_1=[2],M_2=[1],M_3=[2,2] \right\} \textrm{ and } l(M_1)+c[1]-k_1=1+3-2=2 \leq \min(\max(p_2,l(M_2),\textrm{Comp}(M_1,M_2)))=\min(2,2)=2$. Thus we only have the tree, already found in $S_1^1([3,2,4])$, $T_4=T_{E_3}=(2,2).$

-   $ E_5=\left\{ M_1=[2],M_2=[1],M_3=[3] \right\} \textrm{ and } l(M_1)+c[1]-k_1=1+3-2=2 \leq \min(\max(p_2,l(M_2),\textrm{Comp}(M_1,M_2)))=\min(2,2)=2$. Thus we only have the tree, already found in $S_1^2([3,2,4])$, $T_6=T_{E_5}=(2,2).$

Thus $S_2^1([3,2,4]) \cup S_2^2([3,2,4])=\left\{ T_1,T_2,T_4,T_6,T_7,T_8\right\}$. 0.3in

at(current bounding box.south)[$T_7$]{};

0.3in

at(current bounding box.south)[$T_8$]{};

Hence $ \textrm{Cond}([3,2,4])=\left\{ T_1,T_2,T_3,T_4,T_5,T_6,T_7,T_8\right\}$.

If we compute the set $\overline{\textrm{Cond}([3,2,4])}$, with the technique explained at the end of the previous section we will find that: $$\overline{\textrm{Cond}([3,2,4])}=\textrm{Cond}([3,2,4]) \bigcup \left\{ T_9, T_{10} \right\},$$ where

-   $T_9=M(T)_E=\left( \begin{matrix} 0 & 1 & 2 \\ 0 & 0 & 1 \\ 0 &0 & 0 \end{matrix}\right)$ where $E=\left\{ M_1=[2], M_2=[2], M_3=[2,2] \right\}$.

-   $T_{10}=M(T)_E=\left( \begin{matrix} 0 & 1 & 2 \\ 0 & 0 & 1 \\ 0 &0 & 0 \end{matrix}\right)$ where $E=\left\{ M_1=[2], M_2=[2], M_3=[3] \right\}$.

0.3in

at(current bounding box.south)[$T_9$]{};

0.3in

at(current bounding box.south)[$T_{10}$]{};

It is easy to implement an algorithm that computes the number of untwisted Arf semigroups of $ \mathbb{N}^3$ with a given conductor. In the following table we have the values obtained for some conductors.

The following table contains the value of $|\overline{\textrm{Cond}(\textbf{c})}|$ for some values of $\textbf{c}$.

An algorithm for the Arf numerical semigroups with a given genus {#section4}
================================================================

In [@algo] it is presented an algorithm for the computation of the set of the Arf numerical semigroups with a given genus. In this section we give a new procedure for the computation of such a set that appeared to be faster when implemented in GAP.

First of all we recall some definitions and we fix some notations.\
A numerical semigroup $S$ is a submonoid of $(\mathbb{N},+)$ such that $ \mathbb{N} \setminus S$ is finite. The maximum $F(S)$ of the set $ \mathbb{Z} \setminus S$ is known as the Frobenius number of $S$. The conductor $c(S)$ of $S$ is the smallest number such that $n \in S$ for all $n \geq c(S)$, and it is clear that we have $c(S)=F(S)+1$.

We are interested in a particular class of numerical semigroups, which is the set of Arf numerical semigroups. A numerical semigroup $S$ is said to be Arf if $S(s)-s$ is a semigroup for each $s \in S$, where $S(s)=\left\{ n \in S; n \geq s \right\}$. A nonincreasing sequence $M=\left\{m_n; n\geq 1 \right\}$ of $\mathbb{N}^*=\mathbb{N} \setminus \left\{ 0\right\}$ is called a multiplicity sequence if\
$\bullet\ $ There exists $k \in \mathbb{N}^*$ such that $m_n=1$ for all $n \geq k$;\
$\bullet\ $ For all $n \in \mathbb{N}^*$ there exists $l(n) \geq n+1$ such that $ \displaystyle m_n=\sum_{k=n+1}^{l(n)}{m_k}$.

In the following we describe a multiplicity sequence $M$ by the finite vector $ M=\nolinebreak[1] 
[m_1,\ldots,m_k]$ where $m_k$ is the last entry in $M$ different from one. We will make an exception for the costant multiplicity sequence $M=\left\{1,\ldots,1,\ldots\right\}$ that will be represented by the vector $M=[1]$. Given a vector $\textrm{v}$ we always denote by $\textrm{v}[i]$ its $i$-th component

In [@Rosales Corollary 39] it is proved that a nonempty subset of $\mathbb{N}$ is an Arf numerical semigroup if and only if there exists a multiplicity sequence $M=[m_1,\ldots,m_k]$ such that $$S=\left\{0,m_1,m_1+m_2,\ldots,m_1+\dots+m_k,\rightarrow \right\},$$ where with $n \rightarrow$ we mean that all integers larger than $n$ are in $S$. Thus we have a $1$-$1$ correspondence between Arf numerical semigroups and multiplicity sequences and in the following we deal mainly with the latter. If $M=[m_1,\ldots,m_k]$ is a multiplicity sequence, we will call $k$ the length of $M$ and we will denote it by $l(M)$. We also denote by $\textrm{AS}(M)$ the Arf numerical semigroup associated to $M$. Now, from the previous result, it is clear that if $M$ is a mutliplicity sequence different from $[1]$, then the conductor of $\textrm{AS}(M)$ is $ \sum_{i=1}^{l(M)}{m_i},$ while the conductor of $\textrm{AS}( [1])=\mathbb{N}$ is $0$. The genus of a numerical semigroup $S$ is the cardinality of $\mathbb{N} \setminus S$.

We denote by $\textrm{Gen}(n)$ the set the multiplicity sequences of the Arf numerical semigroups with genus $n$. If $M$ is a multiplicity sequence we denote by $c(M)$ the conductor of the Arf semigroup $\textrm{AS}(M)$ associated to $M$. It is easy to show that, if $M$ is a multiplicity sequence distinct from $[1]$, then the genus of $\textrm{AS}(M)$ is $c(M)-l(M)$. If $M=[1]$ then the genus of $\textrm{AS}(M)=\mathbb{N}$ is zero.

Suppose that we want to compute $\textrm{Gen}(n)$ with $ n \in \mathbb{N} $. If $n=0$ then $\textrm{Gen}(n)=\left\{[1] \right\}$. Thus we suppose $n \geq 1$. Denote by $$U^n(i)=\left\{ M \in \textrm{Gen}(i): M[1]+i-1 \leq n \right\}  \textrm{ for all } i=1,\ldots,n-1.$$ Now suppose that $M=[m_1,\ldots,m_k] \in \textrm{Gen}(n)$. If $k=1$ then $M=[n+1]$, otherwise we have the following situation:

-   $2 \leq m_1 \leq n$;

-   $c([m_2,\ldots,m_k])=c([m_1,m_2,\ldots,m_k])-m_1$ and $l([m_2,\ldots,m_k])=l([m_1,\ldots,m_k])-1$.

    So $c([m_2,\ldots,m_k])- l([m_2,\ldots,m_k])=n-m_1+1$, and $[m_2,\ldots,m_k] \in \textrm{Gen}(n-m_1+1); $

-   $ m_1 \in \textrm{AS}([m_2,\ldots,m_k]);$

-   $ m_2-m_1 \leq 0 \Rightarrow m_2+(n-m_1+1) -1 \leq n \Rightarrow [m_2,\ldots,m_k] \in  U^n(n-m_1+1)$.

So if we know the $U^n(i)$ for $i=1,\ldots,n-1$, then we can compute $\textrm{Gen}(n)$ in the following way: $$\textrm{Gen}(n)=\bigcup_{i=1}^{n-1}{\left\{[n-i+1, \textbf{j}]: M \in U^n(i), n-i+1 \in \textrm{AS}(\textbf{j})\right\}} \cup \left\{  [n+1] \right\}.$$ Thus we need a way to compute $U^n(i)$. Suppose that $M=[m_1,\ldots,m_k] \in U^n(i)$. If $k=1$, and $i+1+i-1 =2i\leq n$ then $M=[i+1]$, otherwise we have the following situation:

-   $2 \leq m_1 \leq i$, and $[m_2,\ldots,m_k] \in \textrm{Gen}(i-m_1+1)=\textrm{Gen}(q); $

-   $m_2+q-1=m_2+i-m_1+1-1=m_2-m_1+i \leq i \leq n \Rightarrow [m_2,\ldots,m_k] \in U^n(q); $

-   $ m_1 \in \textrm{AS}([m_2,\ldots,m_k]);$

-   $m_1+i-1 \leq n \Rightarrow 2m_1 \leq n-i+1 +m_1=n-(i+1-m_1)+2=n-q+2 \Rightarrow  m_1 \leq \nolinebreak \left \lfloor{\frac{n-q+2}{2}}\right \rfloor.$

So each $ U^n(i)$ can be constructed using $U^n(q)$ with $q<i$. Thus we have the following algorithm for the computaton of $\textrm{Gen}(n)$.

$\textrm{Gen}(n) \longleftarrow \left\{ [n+1] \right\}$

$\textrm{Gen}(n)$ \[algo\_disjdecomp\]

Arf semigroups of $\mathbb{N}^r$ with given genus {#section5}
=================================================

From this section we begin to deal with Arf good semigroups of $\mathbb{N}^r$. First of all we recall some important definitions and results. A good semigroup $S$ of $\mathbb{N}^r$ is a submonoid of $\left( \mathbb{N}^r,+\right)$ such that (cf. [@BDF])

-   For all $a,b \in S$, $    \min(a,b) \in S$;

-   If $a,b\in S$ and $a[i]=b[i]$ for some $i \in \left\{ 1, \ldots,n\right\}$, then there exists $c \in S$ such that $c[i] > a[i]=b[i]$, $c[j]\geq \min(a[j],b[j])$ for $j \in  \left\{ 1, \ldots,n\right\} \setminus \left\{ i\right\}$ and $c[j]=\min(a[j],b[j])$ if $a[j]\neq b[j]$;

-   There exists $\delta \in S$ such that $\delta+\mathbb{N}^r \subseteq S$

(where we are considering the usual partial ordering in $\mathbb{N}^r$: $a \leq b$ if $a[i] \leq b[i]$ for each $i=1,\ldots,r$). The previous properties guarantee that for a good semigroup $S$ there exists a minimal vector $c(S)$ such that $c(S)+ \mathbb{N}^r \subseteq S$. Such a vector is said to be the conductor of $S$.\
In this paper we will always deal with local good semigroups. A good semigroup $S$ is local if the zero vector is the only vector of $S$ with some component equal to zero. However, it can be shown that every good semigroup is the direct product of local semigroups (cf. [@BDF Theorem 2.5]).

An Arf semigroup of $\mathbb{N}^r$, is a good semigroup such that $ S(\alpha)-\alpha $ is a semigroup, for each $\alpha \in S$ , where $ S(\alpha)=\left\{\beta \in S; \beta \geq \alpha \right\}$. The multiplicity tree $T$ of a local Arf semigroup $S\subseteq \mathbb{N}^r$ is a tree where the nodes are vector $ \textbf{n}_i^j \in \mathbb{N}^r$, where with $\textbf{n}_i^j$ we mean that this node is in the $i$-th branch on the $j$-th level (the root of the tree is $\textbf{n}_{1}^1=\textbf{n}_i^1 $ for all $i$ because we are in the local case and at level one all the branches must be glued) and we have

$$S=\left\{\textbf{0}\right\} \bigcup_{T'} \left\{ \sum_{\textbf{n}_i^j \in T' } {\textbf{n}_i^j}\right\},$$

where $T'$ ranges over all finite subtree of $T$ rooted in $\textbf{n}_1^1$.

Let us consider the following subset of $\mathbb{N}^2$, $$S=\left\{ (0, 0), (4, 4), (8, 6),  (12, 6)  \right\} \cup \left\{(8,8+n),(12,8+n),(14+n,6); n \in \mathbb{N} \right\} \cup$$ $$\cup \left\{(14+m,8+n); m,n\in \mathbb{N} \right\}.$$

It is possible to verify that $S$ ia an Arf good semigroup with the following multiplicity tree:

\];

A tree $T$ is a multiplicity tree of an Arf semigroup if and only if its nodes satisfy the following properties (cf. [@BDF Theorem 5.11] ).

-   There exists $L \in \mathbb{N}$ such that for $m \geq L$, $\textbf{n}_i^m=(0,\ldots,0,1,0\ldots,0)$ (the nonzero coordinate is in the $i$-th position) for any $i=1,\ldots,n$;

-   $\textbf{n}_i^j[h]=0$ if and only if $\textbf{n}_i^j$ is not in the $h$-th branch of the tree;

-   Each $\textbf{n}_i^j$ can be obtained as a sum of nodes in a finite subtree $T'$ of $T$ rooted in $\textbf{n}_i^j$.

Notice that from these properties it follows that we must have multiplicity sequences along each branch. Therefore a multiplicity tree $T$ of an Arf semigroup of $\mathbb{N}^r$ can be represented by an ordered collection of $r$ multiplicity sequences $E$ and by an upper triangular matrix $ r \times r$ $$M(T)_{E}=\left(  \begin{matrix} 0 & p_{1,2} & p_{1,3} & \ldots & p_{1,r} \\ 
0 & 0 & p_{2,3} & \ldots & p_{2,r} \\ \ldots & \ldots & \ldots & \ldots & \ldots \\ 0 & 0 & 0 & \ldots& p_{r-1,r} \\ 0 & 0 & 0 & \ldots & 0 \\  \end{matrix}\right)$$where $p_{i,j}$ is the highest level such that the $i$-th and the $j$-th branches are glued in $T$. Suppose that $E=\left\{M_1,\ldots,M_r \right\}$, then in [@Zito Proposition 1.2], it is shown that the values that can be assigned to the $p_{i,j}$, in order to have a tree compatible with the previous properties, depend only on $M_i$ and $M_{j}$. In particular, if $M_i=M_{j},$ $p_{i,j}$ can be any positive integer, while, if $M_i \neq M_{j}$, there exists a level $k_E(i,j) \in \mathbb{N}^*$ such that $p_{i,j}$ is at most $k_E(i,j)$. If we set $s_{i,k}$ as the integer such that $$M_i[k]=\sum_{l=k+1}^{s_{i,k}}{M_i[l]},$$ then we have $$k_E(i,j)=\min\left\{ \min( s_{i,k}, s_{j,k}): s_{i,k}\neq s_{j,k} \right\}.$$ Thus, if $M_1$ and $M_2$ are two distinct multiplicity sequences, we define the compatibility between $M_1$ and $M_2$ as the integer $\textrm{Comp}(M_1,M_2)=k_E(1,2) $ where $E=\left\{M_1,M_2 \right\}$. While if $M_1= \nolinebreak M_2$ we set by definition $\textrm{Comp}(M_1,M_2)=+\infty$. A tree $T$ is untwisted if two non-consecutive branches are glued at level $l$ if and only if all the consecutive branches between them are glued at a level greater or equal to $l$. We will call twisted a tree that it is not untwisted. From the definition it follows that the matrix of an untwisted tree $T \in \tau(E)$ is such that: $$p_{i,j}=\min\left\{ p_{i,i+1},\ldots,p_{j-1,j}\right\} \textrm{ for all } i<j.$$ So an untwisted tree can be completely described by the second diagonal of its matrix. Thus, in the following we indicate an untwisted tree by a vector $T_E=(p_1,\ldots,p_{r-1})$ where $p_i=p_{i,i+1}$.

\[remark0\] It is easy to see that a twisted tree can be converted to an untwisted one by accordingly permuting its branches (the corresponding Arf semigroups are therefore isomorphic). Thus in the following we can focus only on the properties of the untwisted trees, that are easier to study than the twisted ones.

The aim of this section is to find a way to determine all the Arf good semigroups of $\mathbb{N}^r$ with a given genus. For the Remark \[remark0\], we can focus only on the untwisted trees.

First of all we recall how we can extend the concept of genus for good semigroups of $\mathbb{N}^r$. If $S$ is a numerical semigroup with conductor $c$, then $C=\left\{c,\rightarrow \right\}$ is an ideal of $S$. In this case the genus of $S$ is: $$g(S)=|\mathbb{N} \setminus C|-|S \setminus C|=c-|S \setminus C|.$$ So we have a natural way to extend this concept to the good semigroups of $\mathbb{N}^r$, using the function $d(\textunderscore\setminus \textunderscore )$ defined in [@D'a] . If $S$ is a good semigroup of $\mathbb{N}^r$ with conductor $\delta$, then $C=\delta+\mathbb{N}^r$ is an ideal of $S$ and we can define the genus of $S$ in the following way: $$g(S)=d(\mathbb{N}^r \setminus C) - d(S \setminus C).$$ Since $d(\mathbb{N}^r \setminus C)$ is the length of a saturated chain in $\mathbb{N}^r$ from the vector $ \textbf{0} \in \mathbb{N}^r$ to the conductor $\delta=(c[1],\ldots,c[r])$ (a chain $\alpha=\alpha_0<\alpha_1<\dots<\alpha_n=\beta$ in $S$ is said to be saturated if it cannot be extended to a longer chain between $\alpha$ and $\beta$ in $S$), it is easy to show that $$d(\mathbb{N}^r \setminus C)=\sum_{k=1}^r{c[k]}.$$ On the other hand, $d(S \setminus C)$ is the length of a sautared chain in $S$ from $ \textbf{0} \in S$ to $\delta \in S$.

\[remark4\] Because the conductor $\delta$ is an element of the Arf semigroup $S(T)$, it can be expressed as a sum of nodes in a subtree $T'$ of $T$. It is easy to verify that $T'$ must be the subtree consisting of the nodes of $T$ that are different from the canonical vectors $e_i=(0,\ldots,0,1,0,\ldots,0).$

For the Arf good local semigroups with untwisted multiplicity tree we have the following theorem:

\[genere\] Suppose that $T=T_E=(p_1,\ldots,p_{r-1})$ is an untwisted mulitplicity tree of an Arf semigroup where $E=\left\{ M_1,\ldots,M_r \right\}$ is a collection of multiplicity sequences.

Then $$g(S(T))=\sum_{k=1}^r{g(\textrm{AS}(M_k))}+\sum_{k=1}^{r-1}{p_k},$$ where $S(T)$ is the Arf semigroup associated to the tree $T$ and $\textrm{AS}(M_k)$ is the Arf numerical semigroup associated to the multiplicity sequence $M_k$.

**Proof**. Denote, as usual, by $\delta=(c[1],\ldots,c[r])$ the conductor of $S(T)$, and by $C=\delta+\mathbb{N}^r$. We know that $$g(S(T))=d(\mathbb{N}^r \setminus C) - d(S \setminus C).$$ We have $$d(\mathbb{N}^r \setminus C) =\sum_{k=1}^r{c[k]}=\sum_{k=1}^{\max(l(M_1),p_1)}{M_{1}[k]}+\ldots+\sum_{k=1}^{\max(l(M_i),p_i,p_{i-1})}{M_{i}[k]}+\ldots+\sum_{k=1}^{\max(l(M_r),p_{r-1})}{M_{r}[k]}=$$ $$=\sum_{k=1}^{l(M_1)}{M_{1}[k]}+\max(l(M_1),p_1)-l(M_1)+\ldots+\sum_{k=1}^{l(M_i)}{M_{i}[k]}+\max(l(M_i),p_i,p_{i-1})-l(M_i)+\ldots$$ $$\ldots+\sum_{k=1}^{l(M_r)}{M_{r}[k]}+ \max(l(M_r),p_{r-1})-l(M_r)=\sum_{j=1}^{r}\left(\sum_{k=1}^{l(M_j)}{M_{j}[k]}-l(M_j)\right)+ \max(l(M_1),p_1)+$$ $$+ \sum_{k=2}^{r-1}{\max(l(M_k),p_k,p_{k-1})}+\max(l(M_r),p_{r-1}),$$ where we are using the fact that $$c[1]=\sum_{k=1}^{\max(l(M_1),p_1)}{M_{1}[k]}, \ldots, c[i]=\sum_{k=1}^{\max(l(M_i),p_i,p_{i-1})}{M_{i}[k]}, \ldots, c[r]= \sum_{k=1}^{\max(l(M_r),p_{r-1})}{M_{r}[k]},$$ that was proved in [@Zito2 Proposition 2.2].

Now we want to compute $d(S \setminus C)$. We need a saturated chain in $S(T)$ from $\textbf{0}$ to $\delta$. Suppose that we have $$\textbf{0}=s_0<s_1<\dots<s_l=\delta,$$ a saturated chain in $S(T)$. We clearly have $s_1=(M_{1}[1],\ldots,M_{r}[1])$, that is the multiplicity vector of $S(T)$. Let us consider $s_q \in S(T)$, with $q=1,\ldots,l-1$. From the properties of the multiplicity tree of an Arf semigroup, there exists a subtree $T'$ of $T$, rooted in the node corresponding to $s_1$, such that $s_q$ is the sum of all the nodes belonging to $T'$. As usual we denote by $\textbf{n}_{i}^{j}$ the node of $T$ that is in the $i$-th branch and on the $j$-th level. We denote, given a subtree $T'$ of $T$, by $\textrm{N}(T')$ the set of nodes that appears in $T'$.

Now, it is clear that, in order to have a saturated chain, $s_{q+1}$ must be the sum of all the nodes belonging to a subtree $T''$ of $T$ such that:

-   $ T' \subseteq T''$;

-   $N(T'') \setminus N(T')=\left\{ \textbf{n}_{i}^{j} \right\}$;

-   $\textbf{n}_{i}^{j-1}\in N(T')$;

-   $\textbf{n}_{i}^{j}\neq e_i$, where $e_i $ is the $i$-th canonical vector of $\mathbb{N}^r$ (by Remark \[remark4\] since $s_q \neq \delta$).

From the previous remark, it easily follows that $$d(S \setminus C)= | \left\{ \textbf{n}_{i}^{j} \in N(T): \textbf{n}_{i}^{j} \neq e_i \right\}|,$$ and we need to compute this cardinality. Taking in account the expressions for $c[i]$, it follows that there are

-   $\max(l(M_1),p_1)$ nodes along the first branch that are different from $e_1$;

-   $ \max(l(M_i),p_i,p_{i-1})$ nodes along the $i$-th branch different from $e_i$, for $2 \leq i \leq \nolinebreak r-1$;

-   $\max(l(M_r),p_{r-1})$ nodes along the last branch that are different from $e_r$.

Now from $T=T_E=(p_1,\ldots,p_{r-1})$ we deduce that the $i$-th and $i+1$-th branches have $p_i$ nodes in common for each $i=1,\ldots,r-1$. Therefore we can conclude: $$d(S \setminus C)= \max(l(M_1),p_1)+\sum_{k=2}^{r-1}{\max(l(M_k),p_k,p_{k-1})}+\max(l(M_r),p_{r-1})-\sum_{k=1}^{r-1}{p_k}.$$ Finally we have: $$g(S(T))=d(\mathbb{N}^r \setminus C) - d(S \setminus C)=\sum_{j=1}^{r}\left(\sum_{k=1}^{l(M_j)}{M_{j}[k]}-l(M_j)\right)+\sum_{k=1}^{r-1}{p_k},$$ and, because $ \displaystyle \sum_{k=1}^{l(M_j)}{M_{j}[k]}-l(M_j)=g(\textrm{AS}(M_j))$, we have: $$g(S(T))=\sum_{k=1}^r{g(\textrm{AS}(M_k))}+\sum_{k=1}^{r-1}{p_k},$$ and the proof is complete.\
Now we denote by $\textrm{Gen}(r,n)$ the set of the untwisted mulitplicity tree of all the Arf semigroups in $\mathbb{N}^r$ with genus $n$. Given a $n \in \mathbb{N}$ we want to find a way to compute the set $\textrm{Gen}(r,n)$. We do that using recursion on $r$. From the previous section we know how to compute $\textrm{Gen}(1,n)$, so the base case is done. First of all, we notice that we need $n \geq r-1$. In fact an untwisted Arf semigroup $S$ of $\mathbb{N}^r$ can be described by a tree $T=T_E=(p_1,\ldots,p_{r-1})$ with $E=\left\{M_1,\ldots,M_r\right\}$, and we have just showed that $$g(S(T))=\sum_{k=1}^r{g(\textrm{AS}(M_k))}+\sum_{k=1}^{r-1}{p_k},$$ where $g(\textrm{AS}(M_k)) \geq 0$ and $p_k \geq 1$ for all the $k$. Then $g(S(T)) \geq r-1$.

We fix a $r\geq 2$ and $n \geq r-1$ and suppose that $T=T_E=(p_1,\ldots,p_{r-1})$ is a multiplicity tree in $\textrm{Gen}(r,n)$, where $E=\left\{ M_1,\ldots,M_r \right\}$ is a collection of $r$ multiplicity sequences.

Consider $t<r$. We have: $$n=\sum_{j=1}^r{g(\textrm{AS}(M_j))}+\sum_{j=1}^{r-1}{p_j}=\left( \sum_{j=1}^{t}{g(\textrm{AS}(M_j))}+\sum_{j=1}^{t-1}{p_j}\right)+ p_t+\left( \sum_{j=t+1}^{r}{g(\textrm{AS}(M_j))}+\sum_{j=t+1}^{r-1}{p_j}\right),$$ therefore if we denote by $$k_1=  \sum_{j=1}^{t}{g(\textrm{AS}(M_j))}+\sum_{j=1}^{t-1}{p_j} \quad \textrm{ and }  \quad   k_2=\sum_{j=t+1}^{r}{g(\textrm{AS}(M_j))}+\sum_{j=t+1}^{r-1}{p_j},$$ we have: $$n-p_{t}=k_1+k_2.$$ Now, we have:

-   The tree $T^1=T_{E_{t}}=(p_1,\ldots,p_{t-1})$, with $E_{t}=\left\{ M_1,\ldots,M_{t} \right\}$, belongs to $\textrm{Gen}(t,k_1)$ ($k_1 \geq t-1$);

-   The tree $T^2=T_{E^{t}}=(p_{t+1},\ldots,p_{r-1})$, with $E^{t}=\left\{ M_{t+1},\ldots,M_{r} \right\}$, belongs to\
    $\textrm{Gen}(r-t,n-p_t-k_1)$ ;

-   $ 1 \leq p_{t} \leq \textrm{Comp}(M_{t},M_{t+1});$

-   $k_1+k_2\geq r-2$ $\Rightarrow  1 \leq p_{t} \leq n-r+2$;

-   $k_2 \geq r-1-t$ $\Rightarrow k_1 \leq n-p_t-r+1+t$.

Now, for each $ 1\leq p \leq n-r+2$ and $ t-1 \leq k(p) \leq n-p-r+1+t$ we define the set $$I_r^n(t,p,k(p))=\left\{ T_E=(p_1,\ldots,p_{r-1}): E=\left\{M_1,\ldots,M_r\right\}, T_{E_{t}}=(p_1,\ldots,p_{t-1}) \in \right.$$ $$\in \textrm{Gen}(t,k(p)), \left.T_{E^{t}}=(p_{t+1},\ldots,p_{r-1}) \in \textrm{Gen}(r-t,n-p-k(p)), \right.$$ $$\left.\textrm{ and } p_t=p\leq \textrm{Comp}(M_{t},M_{t+1}) \right\}.$$ So we can deduce that $T$ belongs to the following set: $$S(r,n)= \bigcup_{p=1}^{n-r+2}\left({ \bigcup_{k(p)=t-1}^{n-p-r+t+1}{ I_r^n(t,p,k(p))}}\right).$$ With the inverse implications, it is very easy to show that $S(r,n) \subseteq \textrm{Gen}(r,n)$. Then we have $ \textrm{Gen}(r,n)=S(r,n)$.

Notice that the computation of $\textrm{Gen}(r,n)$ involves the computation of $\textrm{Gen}(t,k)$ and $\textrm{Gen}(r-t,k)$, then using recursion and the base case we can solve our problem.

If we have $T=T_E=(p_1,\ldots,p_{r-1})$ with $E=\left\{M_1,\ldots,M_r \right\}$, we will denote by $T^{-1}=T_{E^{-1}}=(p_{r-1},\ldots,p_1)$ where $E^{-1}=\left\{ M_r,\ldots,M_1\right\}$.

It is clear that if $T \in \textrm{Gen}(r,n)$ then $T^{-1} \in \textrm{Gen}(r,n)$ too. If $U$ is a set of multiplicity trees, we denote by $U^{-1}=\left\{ T^{-1}: T \in U \right\}$.

We have the following proposition:

\[raff\]

If $t \leq \frac{r}{2}$ and $\lambda(p) \geq \frac{n-p-1}{2}$ then $$\textrm{Gen}(r,n)= \bigcup_{p=1}^{n-r+2}\left({ \bigcup_{k(p)=t-1}^{\lambda(p)}\left({ I_r^n(t,p,k(p)) \cup \left(I_r^n(t,p,k(p))\right)^{-1}}\right)} \right).$$

**Proof**. Consider $t \leq \frac{r}{2}$ and $\lambda(p) \geq \frac{n-p-1}{2}$, we show that for any $p=1,\ldots,n-r+2$, we have $$\bigcup_{k(p)=\lambda(p)+1}^{n-p-r+t+1}{ I_r^n(t,p,k(p))} \subseteq \left(\bigcup_{k(p)=t-1}^{\lambda(p)}{ I_r^n(t,p,k(p))}\right)^{-1}.$$ Consider $\displaystyle T \in \bigcup_{k(p)=\lambda(p)+1}^{n-p-r+t+1}{ I_r^n(t,p,k(p))}$, then $$T=T_E=(p_1,\ldots,p_{r-1}) \textrm{ with } E=\left\{ M_1,\ldots,M_r\right\} \textrm{ and } T_{E^t}=(p_{t+1},\ldots,p_{r-1}) \in \textrm{Gen}(r-t,n-p-\overline{k}),$$ where $\lambda(p)+1 \leq \overline{k} \leq n-p-r+t+1$.

We want to show that $$\displaystyle T \in  \left(\bigcup_{k(p)=t-1}^{\lambda(p)}{ I_r^n(t,p,k(p))}\right)^{-1}  \iff T^{-1} \in \bigcup_{k(p)=t-1}^{\lambda(p)}{ I_r^n(t,p,k(p))}.$$ Let us consider the subtree $T^1$ of $T^{-1}$ with $T^1=T_{(E^{-1})_t}=(p_{r-1},\ldots,p_{r-t+1})$, where $(E^{-1})_t=\left\{M_r,\ldots,M_{r-t+1} \right\}$.

Now we have: $$t \leq \frac{r}{2} \Rightarrow 2t \leq r \Rightarrow t\leq r-t \Rightarrow t+1 \leq r-t+1,$$ and from this and from $ T_{E^t}=(p_{t+1},\ldots,p_{r-1}) \in \textrm{Gen}(r-t,n-p-\overline{k})$ we can deduce that $$T^1=T_{(E^{-1})_t}=(p_{r-1},\ldots,p_{r-t+1}) \in \textrm{Gen}(t,x),$$ where $t-1 \leq x \leq n-p-\overline{k}$.

Thus, from $\lambda(p)+1 \leq \overline{k}$ and from $\lambda(p) \geq \frac{n-p-1}{2}$ we deduce: $$-\overline{k} \leq -\lambda(p)-1 \textrm{ and } n-p-1 \leq 2\lambda(p) \Rightarrow x \leq n-p-\lambda(p)-1 \leq \lambda(p).$$ Therefore, from $T^{-1} \in \textrm{Gen}(r,n)$ and from the previous inequality we have $$T^{-1} \in  I_r^n(t,p,x) \subseteq \bigcup_{k(p)=t-1}^{\lambda(p)}{ I_r^n(t,p,k(p))},$$ and the claim is proved. Therefore we have: $$\textrm{Gen}(r,n) \supseteq \bigcup_{p=1}^{n-r+2}\left({ \bigcup_{k(p)=t-1}^{\lambda(p)}\left({ I_r^n(t,p,k(p)) \cup \left(I_r^n(t,p,k(p))\right)^{-1}}\right)} \right) \supseteq$$ $$\supseteq  \bigcup_{p=1}^{n-r+2}\left({ \bigcup_{k(p)=t-1}^{n-p-r+t+1}{ I_r^n(t,p,k(p))}}\right)=\textrm{Gen}(r,n),$$ and the proof is complete.

The previous proposition suggest us an easier way to compute $\textrm{Gen}(r,n)$. In fact we have to consider a smaller amount of sets of the type $I_r^n(t,p,k(p))$, completing the computation with sets of the type $\left(I_r^n(t,p,k(p))\right)^{-1}$ which are very easy to obtain once we have $I_r^n(t,p,k(p))$. To speed up the process is also useful to set $\lambda(p)=\left \lceil{\frac{n-p-1}{2}}\right \rceil $ and $t=\left \lfloor{\frac{r}{2}}\right \rfloor$.

Denote by $\overline{\textrm{Gen}(r,n)}$ the set of all the multiplicity trees (twisted and untwisted) of the Arf semigroups in $\mathbb{N}^r$ with genus $n$. We are already able to compute all the untwisted ones. Suppose that $T$ is a twisted tree in $\overline{\textrm{Gen}(r,n)}$. Then there exists a permutation $\sigma \in S^r$ such that $\sigma(T)$ is untwisted. From the formula of the genus it is very easy to see that $\sigma(T) \in \textrm{Gen}(r,n)$. Thus we have: $$\overline{\textrm{Gen}(r,n)}=\bigcup_{\sigma \in S^r} \left\{ \sigma^{-1}(T): T \in \textrm{Gen}(r,n)  \right\}.$$

We compute $\textrm{Gen}(2,3)$. In this case we have $t=1$.

We have to consider the sets $I_2^3(1,p,k(p))$ and $\left(I_2^3(1,p,k(p))\right)^{-1}$ for each $ 1\leq p \leq 3$ and $ 0 \leq k(p) \leq \left \lceil{\frac{3-p-1}{2}}\right \rceil $.

**Case:** $p=1$ $\Rightarrow 0\leq k(1) \leq 1$

-   $k(1)=0$. To compute $I_2^3(1,1,0)$ we need $M_1 \in \textrm{Gen}(1,0)$ and $M_2 \in \textrm{Gen}(1,2)$. They are $$\textrm{Gen}(1,0)=\left\{ [1] \right\}  \textrm{ and }  \textrm{Gen}(1,2)=\left\{ [3],[2,2] \right\}.$$ Thus we can consider

    -   $E_1=\left\{M_1=[1],M_2=[3]\right\}$.

        In this case $1=p \leq \textrm{Comp}(M_1,M_2)=2$ then the tree $T_1=T_{E_1}=(1)$ belongs to $\textrm{Gen}(2,3).$

    -   $E_2=\left\{M_1=[1],M_2=[2,2]\right\}$.

        In this case $1=p \leq \textrm{Comp}(M_1,M_2)=3$ then the tree $T_2=T_{E_2}=(1)$ belongs to $\textrm{Gen}(2,3).$

    Therefore $I_2^3(1,1,0)=\left\{ T_1,T_2\right\}.$ We have now to compute $\left(I_2^3(1,1,0)\right)^{-1}$

    -   $T_3=T_1^{-1}=T_{E_3}=(1) \in \textrm{Gen}(2,3),$ with $E_3=E_1^{-1}=\left\{ [3],[1]\right\}.$

    -   $T_4=T_2^{-1}=T_{E_4}=(1) \in \textrm{Gen}(2,3),$ with $E_4=E_2^{-1}=\left\{ [2,2],[1]\right\}.$

    Therefore $\left(I_2^3(1,1,0)\right)^{-1}=\left\{ T_3,T_4\right\}.$

-   $k(1)=1$. To compute $I_2^3(1,1,1)$ we need $M_1 \in \textrm{Gen}(1,1)$ and $M_2 \in \textrm{Gen}(1,1)$. We have $$\textrm{Gen}(1,1)=\left\{ [2] \right\}.$$ Thus we only have to consider

    -   $E_5=\left\{M_1=[2],M_2=[2]\right\}$.

        In this case $1=p \leq \textrm{Comp}(M_1,M_2)=+\infty$ then the tree $T_5=T_{E_5}=(1)$ belongs to $\textrm{Gen}(2,3).$

    Therefore $I_2^3(1,1,1)=\left\{ T_5 \right\}$. In this case $I_2^3(1,1,1)=\left(I_2^3(1,1,1) \right)^{-1}$.

**Case:** $p=2$ $\Rightarrow k(2)=0$

-   $k(2)=0$. To compute $I_2^3(1,2,0)$ we need $M_1 \in \textrm{Gen}(1,0)$ and $M_2 \in \textrm{Gen}(1,1)$.

    Thus we only have to consider

    -   $E_6=\left\{M_1=[1],M_2=[2]\right\}$.

        In this case $2=p \leq \textrm{Comp}(M_1,M_2)=2$ then the tree $T_6=T_{E_6}=(2)$ belongs to $\textrm{Gen}(2,3).$

    Therefore $I_2^3(1,2,0)=\left\{T_6\right\}.$ We have now to compute $\left(I_2^3(1,2,0)\right)^{-1}$

    -   $T_7=T_6^{-1}=T_{E_7}=(2) \in \textrm{Gen}(2,3),$ with $E_7=E_6^{-1}=\left\{ [2],[1]\right\}.$

    Therefore $\left(I_2^3(1,2,0)\right)^{-1}=\left\{ T_7\right\}.$

**Case:** $p=3$ $\Rightarrow k(3)=0$

-   $k(3)=0$.

    To compute $I_2^3(1,3,0)$ we need $M_1 \in \textrm{Gen}(1,0)$ and $M_2 \in \textrm{Gen}(1,0)$.

    Thus we only have to consider

    -   $E_8=\left\{M_1=[1],M_2=[1]\right\}$.

        In this case $3=p \leq \textrm{Comp}(M_1,M_2)=+\infty$ then the tree $T_8=T_{E_8}=(3)$ belongs to $\textrm{Gen}(2,3).$

    Therefore $I_2^3(1,3,0)=\left\{ T_8 \right\}$. In this case $I_2^3(1,3,0)=\left(I_2^3(1,3,0) \right)^{-1}$. Thus $\textrm{Gen}(2,3)=\left\{ T_1, T_2, T_3, T_4, T_5, T_6, T_7, T_8\right\}$. We obviously have $\textrm{Gen}(2,3)=\overline{\textrm{Gen}(2,3)}$ because we have only two branches.

0.3in

\]at(current bounding box.south)[$T_1$]{};

0.3in

at(current bounding box.south)[$T_2$]{};

0.3in

\]at(current bounding box.south)[$T_3$]{};

0.3in

at(current bounding box.south)[$T_4$]{};

0.3in

\]at(current bounding box.south)[$T_5$]{};

0.3in

\]at(current bounding box.south)[$T_6$]{};

0.3in

\]at(current bounding box.south)[$T_7$]{};

0.3in

\]at(current bounding box.south)[$T_8$]{};

In the following table we report the cardinality of $\textrm{Gen}(2,n)$ for $n$ up to $32$.

Using the previous results, it is easy to implement an algorithm that computes the number of untwisted Arf semigroups of $ \mathbb{N}^r$ with a given genus $n$. Each entry of the following table is such a number, for $ 1 \leq r \leq 16$ and $0\leq n \leq 15$.

From the previous table, we can also deduce, considering the sum of all the entries in the corresponding column, the number of all the local untwisted Arf semigroups with a given genus $n$ (in all the possible dimensions). We call $$\textrm{NG}(n)=| \left\{ S \textrm{Arf semigroup}: g(S)=n \right\}|,$$ such a number.

Thus we have

In the following table we report the cardinality of the sets $\overline{\textrm{Gen}(r,n)}$ for $ 1 \leq r \leq 9$ and $0\leq n \leq 8$.

[english]{}

[Dillo 100]{} C. Arf [*Une interpretation algebrique de la suite des ordres de multiplicite d’une branche algebrique*]{} Proc. London Math. Soc. (2), 50:256-287, 1948. V. Barucci, M. D’Anna, R. Fröberg [*Analitically unramifed one-dimensional semilocal rings and their value semigroups*]{}, in J. Pure Appl. Algebra, [*147*]{} (2000), 215-254. A. Campillo, [*Algebroid curves in positive characteristic*]{},Lecture Notes in Math. 813, Springer-Verlag, Heidelberg, (1980). M.  D’Anna [*The canonical module of a one-dimensional reduced local ring*]{}, Comm. Algebra , [*25*]{} (1997), 2939-2965.

The GAP Group, [*GAP-Groups, Algorithms and Programming*]{}, Version 4.7.5 , [*25*]{} (2014).

P. A. Garcia-Sanchez, B. A. Heredia, H. I. Karakas, J. C. Rosales [*Parametrizing Arf numerical semigroups*]{}, J. Algebra Appl. Vol. 16, No. 11 (2017) . J. C. Rosales, [ *Principal ideals of numerical semigroups*]{}, Bull. Belg. Math. Soc. Simon Stevin 10 (2003), 329 - 343. G. Zito, [*Arf good semigroups*]{}, to appear in Journal of Algebra and its Applications (2018). G. Zito, [*Arf good semigroups with fixed conductor*]{}, preprint, arXiv:1802.00809 (2018).

E-mail address: giuseppezito@hotmail.it
