010 101 => xyx + yxy = x^2y + xy^2
https://en.wikipedia.org/wiki/Enumerator_polynomialThen you can use real (or even complex) analysis on these polynomials. There's a thick book of things you can prove about sets of binary words using those techniques: https://www.elsevier.com/books/the-theory-of-error-correctin...
And Noam Elkies' course notes on it: http://www.math.harvard.edu/~elkies/M256.13/index.html