## Problem 177

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
mpiotte
Administrator
Posts: 1914
Joined: Tue May 08, 2012 5:40 pm
Location: Montréal, Canada

### Re: Problem 177

def345 wrote:I've written 2 programs months apart to solve this problem, both of these get <snip> as the answer but Euler doesn't agree this is the right answer. I've counted analytically the number of solutions that are Cyclic Quadrilateral (opposite angles add up to 180 degrees) and the number that are Kites, these being <snip>and <snip> respectively and these are the number my programs get (45 of these solutions being both cyclic and a kite). Can anyone else suggest anything else I can do to debug my program.
Just to make sure I understand what you mean, could you give one example of an integer angled quadrilaterals that is both cyclic and a kite, but not a square? Otherwise all I can suggest if that the most typical mistake on this problem is not to account for rotation/reflection correctly when counting "non-similar integer angled quadrilaterals".
Also, please don't post partial answers, correct or incorrect.
def345
Posts: 2
Joined: Sat Oct 17, 2015 10:33 am

### Re: Problem 177

mpiotte wrote:Also, please don't post partial answers, correct or incorrect.
I believe I could put up a good argument that I've not done that, but it isn't what I think that matters, if you think I've done that then I've over stepped the mark and thus I've delete the numbers from my post as you did in your reply.
mpiotte wrote:Just to make sure I understand what you mean, could you give one example of an integer angled quadrilaterals that is both cyclic and a kite, ...
Here is one that is not a square, the four corners have angles: 2,90,178,90, the 8 angles are 1,1,89,1,89,89,1,89 in the order you would meet them as you go round the edge of the figure. It is easy to see how to generalise this get all 45 solutions that are a kite and cyclic.
I believe that there isn't an analytic way of counting all the solutions to this problem. I've talked about counting various subsets and this is possible analytically. Thus counting subsets of solutions isn't a partial solution as it is going down a road that will never get you to a full solution. But it does provides a debugging tool as to whether you code finds all the solutions or not. However in my case it doesn't show up any defects in my current code.
If the 2 numbers I posted in my previous answer are correct (and I believe they are) it is difficult to see how I could possible have made either of the mistakes you suggest. If the problem was find the number of integer angled cyclic quadrilaterals then I've written 2 programs that work very differently (and were run on different hardware) and solved the problem analytically and got the same answer each time - which is very strong evidence this number is correct and further that my code hasn't got any simple problems (like the ones you suggest) in it.
whatteaux
Posts: 7
Joined: Mon Sep 24, 2012 11:58 am

### Re: Problem 177

def345 wrote: It is easy to see how to generalise this get all 45 solutions that are a kite and cyclic.
I'm also struggling with this one (but have too many, not too few!).

Cyclic? Why cyclic? For example, how about a quad with angles {8,170,1,4,5,86,85,1} which meets the requirements but isn't cyclic? Or {30,30,60,60,30,30,60,60} - pick a rhombus, any rhombus!
nwalton125
Posts: 1
Joined: Wed Aug 31, 2016 1:05 am

### Re: Problem 177

I'm wondering if the tolerance could be wrong for the way I'm calculating this problem. Is it possible that, given my calculation method / choice of language, the tolerance should actually be 10^(-8) or 10^(-10) or something?
DJohn
Posts: 65
Joined: Sat Oct 11, 2008 12:24 pm

### Re: Problem 177

nwalton125 wrote: Tue May 07, 2019 9:52 pm I'm wondering if the tolerance could be wrong for the way I'm calculating this problem. Is it possible that, given my calculation method / choice of language, the tolerance should actually be 10^(-8) or 10^(-10) or something?
For the method that I used, at least, it's quite tolerant of varying tolerance: I get the same result with tolerances from 10^-7 down to 10^-12. That's using double-precision floats, and paying no attention at all to numerical issues. Single precision might not be enough, but I can't easily test that.

If you get the same result for 10^-8 and 10^-10, then you're probably not falling to precision errors and should look for the problem elsewhere.
albert
Posts: 56
Joined: Sat Aug 02, 2008 12:36 pm

### Re: Problem 177

hk wrote: Sun Mar 06, 2011 1:10 pm Please don't create a new topic for a problem for which a topic already exists.
Perhaps reading through previous posts will help somewhat.
I had a specific question about problem 177. The forum has grown much too large that non-specifity is a good idea,so you may no longer have the above opinion. Do you agree that it is better to have a good subject line, which includes "problem 177" over wading through dozens maybe hundreds of posts, nowadays?
hk
Administrator
Posts: 11122
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

### Re: Problem 177

No.
You can sort the forum (on this board) alphabetically and none of the topics is so dramatically long as you are suggesting.