A Note on Unique Decipherability

We consider the following problem: Given a set Γ = {c1,...,cn} of nonempty strings over a fixed, finite alphabet Σ, is every string in Γ+ uniquely decipherable, or does the equation cx = dy, where c, d ∈ Γ, c ≠ d, and x,y ∈ Γ*, have a solution? We give an O(n L) algorithm for this problem, where L = |c1| + ... + |cn|, and use this algorithm to investigate the impact of structural properties of Γ on the complexity of testing unique decipherability. We then give an O(L log(n)) unique decipherability test for sets Γ which may be linearly ordered by the prefix relation.