d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Math Problem
Add Reply New Topic New Poll
Member
Posts: 15,293
Joined: Jul 9 2012
Gold: 3,000.00
Nov 19 2015 07:14pm
brain teaser problem, can't figure out how to approach it

pick as many numbers as you like from the first 1989 counting numbers, but do not pick any more than once.
if no two numbers can be exactly 4 apart and no numbers can be exactly 7 apart, what is the maximum amount of numbers that you can have in your list?

This post was edited by Sefira on Nov 19 2015 07:16pm
Member
Posts: 31,702
Joined: Mar 21 2007
Gold: 4.00
Nov 19 2015 11:52pm
724 is what I come up with, but I'd like to see some other answers :o

I got to my answer like this:
Seems obvious that you'd want to pick 1, 2, 3, and 4.
5, 6, 7, 8, 9, 10, and 11 are now unavailable by the rules of the problem.
We are able to then pick 12, 13, 14, and 15.
16, 17, 18, 19, 20, 21, and 22 can not be chosen.
This pattern of being able to pick 4 from every 11 counting numbers continues (simple to show, feel free to if you don't believe me).
1989/11 = 180+ some unimportant remainder. But you can pick 4 from every 11 numbers, so next:
180 x 4 = 720. However, we are not done yet.
720 is how many we could take if we are only allowed to count to 180 x 11 = 1980.
We can still pick the next 4 numbers (You can always pick the 4 numbers AFTER a multiple of 11 which is obvious from how I've explained and tackled this problem.
Thus 720 + 4 = 724.
Member
Posts: 1,783
Joined: Dec 26 2002
Gold: 5,501.88
Nov 20 2015 03:07pm
I had the same result as ringo. Similar approach as well. It's likely correct, especially because you get the full 4 from the left over 9 numbers. If it were setup in a way where you couldn't get any from the last 9 using his method you'd likely have to start a bit higher than 1 until you could get as many possible in the left over 9.


Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Nov 21 2015 10:54am
I have 904 as a possibility. Not sure for the moment if it's the highest.
Member
Posts: 31,702
Joined: Mar 21 2007
Gold: 4.00
Nov 21 2015 10:44pm
Quote (feanur @ Nov 21 2015 11:54am)
I have 904 as a possibility. Not sure for the moment if it's the highest.


How is it possible? Pretty sure you can't get more than 724 so I'd like to see it.
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Nov 22 2015 09:43am
Among the eleven first counting numbers, pick :
1 - 2 - 4 - 7 - 10
Then repeat modulo 11 :
1 - 2 - 4 - 7 - 10 - 12 - 13 - 15 - 18 - 21 - 23 - 24 - 26 - 29 - 32 ...

That's 5 numbers chosen every 11 numbers.
As you said, 1980 = 180x11, so that's 180x5 = 900 chosen among the 1980 first.
And you can add 4 more : 1981 - 1982 - 1984 - 1987.

I'm pretty sure now that's the maximum possible, but still not able to prove it definitely.
Member
Posts: 31,702
Joined: Mar 21 2007
Gold: 4.00
Nov 22 2015 09:47am
Quote (feanur @ Nov 22 2015 10:43am)
Among the eleven first counting numbers, pick :
1 - 2 - 4 - 7 - 10
Then repeat modulo 11 :
1 - 2 - 4 - 7 - 10 - 12 - 13 - 15 - 18 - 21 - 23 - 24 - 26 - 29 - 32 ...

That's 5 numbers chosen every 11 numbers.
As you said, 1980 = 180x11, so that's 180x5 = 900 chosen among the 1980 first.
And you can add 4 more : 1981 - 1982 - 1984 - 1987.

I'm pretty sure now that's the maximum possible, but still not able to prove it definitely.


damn, nice.
Member
Posts: 628
Joined: Jun 23 2012
Gold: 3,437.55
Nov 22 2015 05:41pm
Quote (feanur @ Nov 22 2015 10:43am)
Among the eleven first counting numbers, pick :
1 - 2 - 4 - 7 - 10
Then repeat modulo 11 :
1 - 2 - 4 - 7 - 10 - 12 - 13 - 15 - 18 - 21 - 23 - 24 - 26 - 29 - 32 ...

That's 5 numbers chosen every 11 numbers.
As you said, 1980 = 180x11, so that's 180x5 = 900 chosen among the 1980 first.
And you can add 4 more : 1981 - 1982 - 1984 - 1987.

I'm pretty sure now that's the maximum possible, but still not able to prove it definitely.


I agree with modulo 11 being the crucial pattern to follow, although with a specific cutoff point (1989) you'd want to try to maximize the amount of numbers you can fit under the cutoff.

The pattern 1-3-4-6-9 for example would allow you to add 5 more during the last iteration (1981-1983-1984-1986-1989). Although for this case I doubt it can be any higher, I wonder if there's a way to have 905 if the max you could choose is 1988.
Member
Posts: 16,662
Joined: Nov 24 2007
Gold: 15,245.00
Trader: Trusted
Nov 26 2015 12:44pm
Quote (TheMiracleCollector @ Nov 23 2015 12:41am)
I agree with modulo 11 being the crucial pattern to follow, although with a specific cutoff point (1989) you'd want to try to maximize the amount of numbers you can fit under the cutoff.

The pattern 1-3-4-6-9 for example would allow you to add 5 more during the last iteration (1981-1983-1984-1986-1989). Although for this case I doubt it can be any higher, I wonder if there's a way to have 905 if the max you could choose is 1988.


Good point.

Working only with a modulo 11 pattern, there is no way to beat 905.

And 904 would be the max if 1988 was given : to have 5 numbers chosen among 11, you can't leave a "hole" of 3 (ie : you can't have 5 among 1981 to 1988, leaving 1989, 1990 and 1991 blank).
Go Back To Homework Help Topic List
Add Reply New Topic New Poll