Random generation of words in an algebraic language in linear binary space