Originally Posted by
mklotz
The " + 1 " appears automatically if you think about how many spaces you need to create.
If you arrange N screws in a row you automatically create N - 1 spaces. Two screws create one space between them, three screws create two spaces, four create three, and so on. However you need to add the two spaces at the ends, one between the leftmost screw and the leftmost edge of the board, one between the rightmost screw and the rightmost edge of the board. Thus, you need
N - 1 + 2 = N + 1
spaces and voilà, there's your " + 1 ", and dividing N + 1 into the length of the board will give you the size of the required space(s).
Note that this formulation works for the case of only one screw, yielding a space equal to half the width of the board, i.e. put the screw in the middle of the board.
It also works for zero screws, yielding a spacing equal to the board width.
While the latter two cases aren't of practical interest, they're mathematically satisfying showing the formulation would work for all possible values of N.
Bookmarks