Whether the automaton is functional, i.e. each input (string) is transduced to a unique output (string). There may be multiple paths, however, that contain this input and output string pair.
Precondition:
import vcsn
%%automaton a dot
digraph {
vcsn_context = "lat<lal_char(abc),lal_char(xyz)>, b"
I0 -> 0
0 -> 1 [label = "(a, x)"]
0 -> 2 [label = "(a, x)"]
1 -> 3 [label = "(b, y)"]
2 -> 3 [label = "(b, y)"]
3 -> F3
}
This transducer is functional, as can also be seen from its series (computed thanks to automaton.shortest): it uniquely maps ab
to xy
.
a.is_functional()
a.shortest(10)
However, the following transducer is not functional, as it maps ab
to both xy
and xz
, again, as demonstrated by shortest
.
%%automaton a dot
digraph {
vcsn_context = "lat<lal_char(abc),lal_char(xyz)>, b"
I0 -> 0
0 -> 1 [label = "(a, x)"]
0 -> 2 [label = "(a, x)"]
1 -> 3 [label = "(b, y)"]
2 -> 3 [label = "(b, z)"]
3 -> F3
}
a.is_functional()
a.shortest(10)