Ruler Wrapping

09/29/2021
by   Travis Gagie, et al.
0

We propose a natural variation of the Hopcroft, Joseph and Whitesides' (1985) classic problem of folding a carpenter's ruler into the shortest possible interval. In the original problem folds must alternate between 180 degrees clockwise and 180 degrees counterclockwise but in our version, which we call ruler wrapping, all the folds must be in the same direction. Whereas the original problem is NP-complete, we first show our version has a simple and fairly obvious quadratic-time algorithm, and then show it has a somewhat less obvious linear-time algorithm which is nevertheless still simple enough to be implemented in under a page of C code.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset