How could one reasonably define and construct the complement of a deterministic Mealy machine?
My intuition is that the complement should give exactly the opposite of output strings after a specific input string. I think this means the complement is non-deterministic. So let's define a (non-deterministic) Mealy machine: $\mathcal{M} = \langle S,I,\Sigma,\Omega,\delta,\lambda\rangle$, where
- $S$ is a finite nonempty set of states,
- $I \subseteq S$ is the nonempty set of initial states,
- $\Sigma$ is a finite input alphabet,
- $\Omega$ is a finite output alphabet,
- $\delta: S \times \Sigma \to 2^S$ is the transition function, and
- $\lambda: S \times \Sigma \to 2^\Omega$ is the output function.
A Mealy machine is deterministic iff $\vert I\vert = 1 \land \forall s \in S, \forall i \in \Sigma: \vert\delta(s, i)\vert \leq 1 \land \vert\lambda(s, i)\vert \leq 1$.
I believe defining and constructing the complement is easier if we assume the transition function, and output function are total. That is fine for me.
So, given a Mealy machine $\mathcal{M}$ how would one define, and construct (using an algorithm) the complement $\overline{\mathcal{M}}$?
If the algorithm follows trivially from the definition of $\overline{\mathcal{M}}$ that is fine too.
My first idea is that one could, for every transition, add new transitions (from, and to the same state) that give exactly the complement of outputs. However, I am afraid I am missing important corner cases.