What does it mean to say a function is length regular and Length preserving? Does any one of them implies the other? Example if any could be useful


Length-regular: if $x$ and $y$ have the same length, then $f(x)$ and $f(y)$ have the same length.

Length-preserving: $x$ and $f(x)$ have the same length.


  • $f(x) = \overline{x}$ (flip every bit in $x$): length-preserving.
  • $f(x) = x \|x$ (concatenate $x$ with itself): length-regular but not length-preserving.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.