It's said that "Necessity is the mother of invention," but some people think that "Laziness" is a more likely parent.
Hubert Greenthumb hated digging fence posts. But he knew that, without a fence around his garden, deer from the nearby woods would eat his vegetables before he could harvest them. Being something of a tinkerer, he retired to his workshop with a small garden tractor, some out-of-date computer chips, and a couple of robot arms he had picked up at a bankruptcy auction from a failed ".com" high-tech company. After two days of work, he emerged as the proud inventor of the Greenthumb Automatic Garden Fence Layer (pat. pending).
To his skeptical wife (who observed that he could easily have built the fence in half the time it took to construct this machine), he explained that he needed only to program in the desired fence shape, and the machine would proceed to chug around the yard, laying down a fence in 1-foot sections until the job had been completed.
Hubert proceeded to key in instructions to enclose a square area, 25 feet on a side, of his 100' by 100' yard. He set the machine to operating and went inside for a celebratory drink.
When he emerged, he discovered that the machine had laid down fence in an elaborate, possibly random walk about his lawn. Unwilling to actually admit that anything had gone wrong, he announced his intention to plant within the garden actually laid out by the machine, as if he had wanted it that way all along. Any section of the yard that was no longer accessible to the deer (enclosed by the fence) would be considered as garden space.
"Fine," sighed his wife, "but we'll need to know just how many square feet of garden we have so that we can buy an appropriate amount of seeds." Hubert gamely began to trace out the fence laid down by the machine. "Let's see, it went North for 5 feet, then West for 3 feet, ..."
Note: Hubert's yard can be divided into a grid of 100 × 100 feet, with each grid box being 1 foot by 1 foot. The robot moves along the edges of the boxes. As the robot moves, it builds a fence from vertex to vertex of the grid (intersections of the lines).
Note: Because the robot moves along the edges of the grid, you can ignore the amount of space the fence occupies. For example, if the robot moves North one, East one, South one, andWest one, it has enclosed one square foot of garden space.