Carpenter ruler problem