  The general Markov model of the evolution of biological sequences along a
tree leads to a parameterization of an algebraic variety. Understanding this
variety and the polynomials, called phylogenetic invariants, which vanish on
it, is a problem within the broader area of Algebraic Statistics.
  For an arbitrary trivalent tree, we determine the full ideal of invariants
for the 2-state model, establishing a conjecture of Pachter-Sturmfels. For the
$\kappa$-state model, we reduce the problem of determining a defining set of
polynomials to that of determining a defining set for a 3-leaved tree.
  Along the way, we prove several new cases of a conjecture of
Garcia-Stillman-Sturmfels on certain statistical models on star trees, and
reduce their conjecture to a family of subcases.
