So I decided to give a shot on the #453 project euler problem but there is something that confuses me with the numbers given. I decided to start by calculating the possible arrangements of 4 vertices in the 9 vertex grid. To do that I used the binomial coefficient which gives (for the first example) 126 different arrangements. I then removed all non valid arrangements (polygons with straight lines) but the result is smaller than what described. I am probably doing something wrong and I can't figure out what is the issue. Any help is much appreciated!

Edit: Here is the link


You are missing the fact that some arrangements of four vertices can produce more than one polygon. Eg {(0,0), (0,2), (1,1) ,(1,2)}

  • $\begingroup$ I can't believe I missed that. Now I wonder if I'm going the right way about this. $\endgroup$ – Veritas Feb 2 '14 at 17:07
  • 1
    $\begingroup$ @Veritas That's much more difficult to say :-) $\endgroup$ – leonbloy Feb 2 '14 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.