code: func complement(a *Automaton) *Automaton {
  	a = totalize(determinize(a))
  	numStates := a.numStates()
  	for p := 0; p < numStates; p++ {
  		a.setAccept(p, !a.IsAccept(p))
  	}
  	return removeDeadStates(a)
  }
docs: /*
  Returns a (deterministic) automaton that accepts the complement of
  the language of the given automaton.
  
  Complexity: linear in number of states (if already deterministic).
  */