Mathematical Approaches to Polymer Sequence Analysis and Related Problems