  Phylogenetic networks are an extension of phylogenetic trees that allow for
the representation of reticulate evolution events. One of the classes of
networks that has gained the attention of the scientific community over the
last years is the class of orchard networks, that generalizes tree-child
networks, one of the most studied classes of networks.
  In this paper we focus on the combinatorial and algorithmic problem of the
generation of orchard networks, and also of tree-child networks. To this end,
we use that these networks are defined as those that can be recovered by a
reversing a certain reduction process. Then, we show how to choose a
``minimum'' reduction process among all that can be applied to a network, and
hence we get a unique representation of the network that, in fact, can be given
in terms of sequences of pairs of integers, whose length is related to the
number of leaves and reticulations of the network. Therefore, the generation of
networks is reduced to the generation of such sequences of pairs. Our main
result is a recursive method for the efficient generation of all minimum
sequences, and hence of all orchard (or tree-child) networks with a given
number of leaves and reticulations.
  An implementation in C of the algorithms described in this paper, along with
some computational experiments, can be downloaded from the public repository
https://github.com/gerardet46/OrchardGenerator. Using this implementation, we
have computed the number of orchard networks with at most 6 leaves and 8
reticulations.
