Problem 584

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.
Post Reply
smikulsk
Posts: 3
Joined: Sun Jun 07, 2015 11:08 am

Problem 584

Post by smikulsk »

Could anyone explain what does mean: "3 people with Birthdays within 7 days from each other"?
Does it mean e.g. birthdays Jan 1, Jan 8 and Jan 15 or 3 birthdays within a week like Jan 1, Jan 3 and Jan 7?
MuthuVeerappanR
Posts: 483
Joined: Sun Mar 22, 2015 2:30 pm
Location: India
Contact:

Re: Problem 584

Post by MuthuVeerappanR »

The second one...
Image
It is not knowledge, but the act of learning, not possession but the act of getting there, which grants the greatest enjoyment.
User avatar
Animus
Administrator
Posts: 1919
Joined: Sat Aug 16, 2014 1:23 pm

Re: Problem 584

Post by Animus »

Actually, it means within a week plus one day, since 0 days apart would mean on the same day.
So if, for example, someone would have its Birthday on some Friday, another person on Friday a week later and someone in between these two, the condition would be fulfilled.
vamsikal3
Posts: 89
Joined: Sat Oct 01, 2016 9:25 am

Re: Problem 584

Post by vamsikal3 »

<deleted post>
Last edited by vamsikal3 on Fri Nov 27, 2020 3:08 am, edited 2 times in total.
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image
User avatar
sjhillier
Administrator
Posts: 558
Joined: Sun Aug 17, 2014 4:59 pm
Location: Birmingham, UK
Contact:

Re: Problem 584

Post by sjhillier »

vamsikal3 wrote:Have another question. Let the year length be 5 days. If I want to get birthdays that are 1 day apart, are they just {(1,2), (2, 3), (3, 4), (4,5)} or should we also count (5,1) (day 5 of previous year and day 1 of the current year)?
Yes, you should also count the 'wrap-around' possibilities, so 31st December is 1 day away from 1st January. As you may have guessed, the timing of the release of this problem was at least partially influenced by the new year.
vamsikal3
Posts: 89
Joined: Sat Oct 01, 2016 9:25 am

Re: Problem 584

Post by vamsikal3 »

<deleted post>
Last edited by vamsikal3 on Fri Nov 27, 2020 3:07 am, edited 2 times in total.
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image
User avatar
jaap
Posts: 554
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 584

Post by jaap »

vamsikal3 wrote:Could you add it to the problem statement that wrap-around possibilities must be considered? I found an article on the net which mentioned this, and so, I asked this question, otherwise, I would have never been able to guess that wrap-around possibilities should be considered.
I don't think that needs to be explicitly stated. If your birthday was 31 Dec, and your friend's birthday was 1 Jan, would you really think those two birthdays were not one day apart but 364 days apart?
vamsikal3
Posts: 89
Joined: Sat Oct 01, 2016 9:25 am

Re: Problem 584

Post by vamsikal3 »

<deleted post>
Last edited by vamsikal3 on Fri Nov 27, 2020 3:07 am, edited 2 times in total.
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image
User avatar
sjhillier
Administrator
Posts: 558
Joined: Sun Aug 17, 2014 4:59 pm
Location: Birmingham, UK
Contact:

Re: Problem 584

Post by sjhillier »

vamsikal3 wrote:Could you add it to the problem statement that wrap-around possibilities must be considered? I found an article on the net which mentioned this, and so, I asked this question, otherwise, I would have never been able to guess that wrap-around possibilities should be considered.
I think it's probably sufficient that the topic has now been addressed in this thread. That is, after all, exactly the purpose of this forum to clarify interpretation. If there's sufficient cause, then we can consider adding a note in the problem itself.
Post Reply