This operation determines if two transducers with a certain required determinism have the same states, irrespective of numbering, and the same transitions with the same labels and weights, irrespective of ordering. In other words, Isomorphic(A, B)
is true if and only if the states of A can be renumbered and the transitions leaving each state reordered so that Equal(A, B) is true.
template <class Arc> bool Isomorphic(const Fst<Arc> &fst1, const Fst<Arc> &fst2, double delta = kDelta); |
[bad link?] |
fstisomorphic a.fst b.fst |
A |
B |
C |
Isomorphic(A, B); // returns true Isomorphic(A, C); // returns false $ if fstisomorphic a.fst b.fst; then echo true; else echo false; fi true $ if fstisomorphic a.fst c.fst; then echo true; else echo false; fi false
Isomorphic
#Caveats
The inputs should be deterministic in the sense that no state has two transitions with the same input label, output label and weight (e.g., deterministic after Encode is performed on the labels and weights). If non-determinism in this sense is encountered, an error is raised. This requirement is imposed since the general solution is graph isomorphism complete, for which no known polynomial-time algorithm exists.
Zemlyachenko, Viktor N., Nickolay M. Korneenko, and Regina I. Tyshkevich. "Graph isomorphism problem." Journal of Soviet Mathematics 29.4 (1985): 1426-1481.
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
png | iso1.png | r1 | manage | 9.4 K | 2014-04-23 - 00:26 | MichaelRiley | |
png | iso2.png | r1 | manage | 9.5 K | 2014-04-23 - 00:26 | MichaelRiley | |
png | iso3.png | r1 | manage | 11.4 K | 2014-04-23 - 00:26 | MichaelRiley |