This was solved ages ago!

See the referenced Wikipedia article.

Reply

Comments are limited to a maximum of 1000 characters.
More information about formatting options