A string encoding for a subclass of bipartite graphs enables graph rewriting used in autosegmental descriptions of tone phonology via existing and highly optimized finite-state transducer toolkits (YliJyr 2013). The current work offers a rigorous treatment of this code-theoretic approach, generalizing the methodology to all bipartite graphs having no crossing edges and unordered nodes. We present three bijectively related codes each of which exhibit unique characteristics while preserving the freedom to violate or express the OCP constraint. The codes are infinite, finite-state representable and optimal (efficiently computable, invertible, locally iconic, compositional) in the sense of Kornai (1995). They extend the encoding approach with visualization, generality and flexibility and they make encoded graphs a strong candidate when the formal semantics of autosegmental phonology or non-crossing alignment relations are implemented within the confines of regular grammar.