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.
User avatar
mpiotte
Administrator
Posts: 1961
Joined: Tue May 08, 2012 5:40 pm
Location: Montréal, Canada

Re: Problem 177

Post by mpiotte »

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.
Image
def345
Posts: 2
Joined: Sat Oct 17, 2015 10:33 am

Re: Problem 177

Post by def345 »

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: 12
Joined: Mon Sep 24, 2012 11:58 am

Re: Problem 177

Post by whatteaux »

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

Post by nwalton125 »

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: 90
Joined: Sat Oct 11, 2008 12:24 pm

Re: Problem 177

Post by DJohn »

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: 61
Joined: Sat Aug 02, 2008 12:36 pm

Re: Problem 177

Post by albert »

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?
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 177

Post by hk »

No.
You can sort the forum (on this board) alphabetically and none of the topics is so dramatically long as you are suggesting.
Image
War ruins the life and health of untold numbers of innocent children.
bharathswami
Posts: 1
Joined: Mon Mar 11, 2024 6:12 pm

Re: Problem 177

Post by bharathswami »

I have been working hard on this problem. I am confident with my method. It seems I am missing some conditions - omitting or including certain quadrilaterals. Can someone confirm if mirror images and cyclic permutations of the angles need to be discarded? Are there any other conditions someone can hint me to?
User avatar
neverforget
Posts: 88
Joined: Sat Sep 16, 2006 10:10 pm

Re: Problem 177

Post by neverforget »

bharathswami wrote: Mon Mar 11, 2024 6:15 pm Can someone confirm if mirror images and cyclic permutations of the angles need to be discarded? Are there any other conditions someone can hint me to?
The question asks for the number of non-similar integer angled quadrilaterals. The question uses the usual definition of similarity from Euclidean geometry (i.e. equivalence up to translation, rotation, reflection, and uniform scaling)
Image
User avatar
yourmaths
Posts: 47
Joined: Mon Aug 25, 2014 11:00 am

Re: Problem 177

Post by yourmaths »

Unless I am mistaken, the diagram on the problem page is not consistent with the example provided. The 130 degree (external) angle is located at C in the diagram but in terms of the example values is located at D. I guess it doesn't really say anywhere that the diagram refers directly to the example given but it would be good if they matched.
level = lambda number_solved: number_solved // 25
Image
pjt33
Posts: 140
Joined: Mon Oct 06, 2008 6:14 pm

Re: Problem 177

Post by pjt33 »

yourmaths wrote: Wed Oct 22, 2025 4:18 am Unless I am mistaken, the diagram on the problem page is not consistent with the example provided. The 130 degree (external) angle is located at C in the diagram but in terms of the example values is located at D. I guess it doesn't really say anywhere that the diagram refers directly to the example given but it would be good if they matched.
There are two examples given, but the diagram just illustrates how to get 8 corner angles from 4 corners. Note that the diagram has two obtuse angles but neither example does.
User avatar
yourmaths
Posts: 47
Joined: Mon Aug 25, 2014 11:00 am

Re: Problem 177

Post by yourmaths »

You are right pjt33, the angle at D in the diagram looks obtuse on closer inspection. It doesn't really matter, but it does seem odd that the diagram doesn't match the example problem description.
level = lambda number_solved: number_solved // 25
Image
pim.mfs.0

Re: Problem 177

Post by pim.mfs.0 »

Should we change the title of this problem to "Approximately Integer Angled Quadrilaterals"? Because getting the answer depends on:
Note: In your calculations you may assume that a calculated angle is integral if it is within a tolerance of 10^(-9) of an integer value.
byhill
Posts: 29
Joined: Mon Aug 01, 2022 3:13 am

Re: Problem 177

Post by byhill »

No. The note is just a small hint.
Image
Post Reply