Brain Teaser No 1
Posted by: Don Atkinson on 16 November 2001
THE EXPLORER
An explorer set off on a journey. He walked a mile south, a mile east and a mile north. At this point he was back at his start. Where on earth was his starting point? OK, other than the North Pole, which is pretty obvious, where else could he have started this journey?
Cheers
Don
Posted on: 02 July 2003 by Don Atkinson
As a supplementary question,
what are the closest PAIR of palindromic dates this milenium ?
Cheers
Don
what are the closest PAIR of palindromic dates this milenium ?
Cheers
Don
Posted on: 02 July 2003 by Don Atkinson
And looking a bit further ahead,
what are the closest pair we shall ever get....(OK up to the end of 9999.)
Cheers
Don
what are the closest pair we shall ever get....(OK up to the end of 9999.)
Cheers
Don
Posted on: 02 July 2003 by Don Atkinson
Matthew,
enjoy the nightmare........
Cheers
Don
enjoy the nightmare........
Cheers
Don
Posted on: 02 July 2003 by John Channing
what are the closest PAIR of palindromic dates this milenium ?
23-2-2232 & 2-3-2232 which are 8 days apart.
John
23-2-2232 & 2-3-2232 which are 8 days apart.
John
Posted on: 02 July 2003 by John Channing
what are the closest pair we shall ever get....(OK up to the end of 9999.)
29-8-8892 and 2-9-8892 which are just 4 days apart. Just out of interest there are also 2430 palindromic dates between 1-1-2000 and 31-12-9999.
John
29-8-8892 and 2-9-8892 which are just 4 days apart. Just out of interest there are also 2430 palindromic dates between 1-1-2000 and 31-12-9999.
John
Posted on: 02 July 2003 by Don Atkinson
John,
before pronouncing you the winner, I'll let Paul and Matthew have the opportunity at least, to decide whether you are right
and just out of interest......i'll take your word on the 2430.....because by hand i have to keep finding the odd leap years to add in....
Cheers
Don
before pronouncing you the winner, I'll let Paul and Matthew have the opportunity at least, to decide whether you are right
and just out of interest......i'll take your word on the 2430.....because by hand i have to keep finding the odd leap years to add in....
Cheers
Don
Posted on: 02 July 2003 by John Channing
What are the sizes of the five sectors (you can produce the drawing if that helps)
Well, I have manages to go one higher with 1, 2, 6, 6, 4 = 19. I can't believe I didn't spot that straight off!
John
Well, I have manages to go one higher with 1, 2, 6, 6, 4 = 19. I can't believe I didn't spot that straight off!
John
Posted on: 02 July 2003 by Paul Ranson
By 'possible' combinations of sectors I was assuming obedience to the adjacent rule. I think there are 21 valid combinations.
There are 366 possible dates that may form the left side of the palindrome. I listed all the ranges of dates that clearly made palindromes in this millenium. The rest followed. A brute force search would have taken longer to create.
Paul
There are 366 possible dates that may form the left side of the palindrome. I listed all the ranges of dates that clearly made palindromes in this millenium. The rest followed. A brute force search would have taken longer to create.
Paul
Posted on: 03 July 2003 by John Channing
A brute force search would have taken longer to create
The code to solve the original problem took me a matter of minutes to write and run. This was then modified in a just a couple more minutes to solve Don's subsequent problems. I suspect as the scale of the problem becomes bigger, the computer based approach becomes more appealing and accurate.
John
The code to solve the original problem took me a matter of minutes to write and run. This was then modified in a just a couple more minutes to solve Don's subsequent problems. I suspect as the scale of the problem becomes bigger, the computer based approach becomes more appealing and accurate.
John
Posted on: 03 July 2003 by John Channing
By 'possible' combinations of sectors I was assuming obedience to the adjacent rule. I think there are 21 valid combinations.
Well why don't you list the 5 numbers that add up to 21 and put me out of my misery then?
John
Well why don't you list the 5 numbers that add up to 21 and put me out of my misery then?
John
Posted on: 03 July 2003 by John Channing
Computing power
Not that anyone is likely to work it out by hand, but the consecutive date palindromes that are furthest apart are 9-10-2019 and 10-1-2101 which are 29678 days apart.
John
[This message was edited by John Channing on THURSDAY 03 July 2003 at 11:29.]
Not that anyone is likely to work it out by hand, but the consecutive date palindromes that are furthest apart are 9-10-2019 and 10-1-2101 which are 29678 days apart.
John
[This message was edited by John Channing on THURSDAY 03 July 2003 at 11:29.]
Posted on: 03 July 2003 by John Channing
More Computing Power
Going out a bit further, between 01-01-10000 and 31-12-99999 the closest palindrmoic date pair is 31-12-12113 and 4-1-12114, which as also 4 days apart.
John
Going out a bit further, between 01-01-10000 and 31-12-99999 the closest palindrmoic date pair is 31-12-12113 and 4-1-12114, which as also 4 days apart.
John
Posted on: 03 July 2003 by Paul Ranson
quote:
I suspect as the scale of the problem becomes bigger, the computer based approach becomes more appealing and accurate.
Up until the point that you have to start optimising...
quote:
Well why don't you list the 5 numbers that add up to 21 and put me out of my misery then?
If I knew them, I would...
How many sets of five numbers add up to 21? And each set can be arranged in a number of non-equivalent ways. Probably 5!/(5 * 2)?
Paul
Posted on: 03 July 2003 by John Channing
Paul,
After a lot of head scratching, I am fairly convinced that three out of the five sectors have to be 2, 1, 4 which give you:
1
2
3 = 2+1
4
5 = 4+1
?
7
This then obviously requires one of the remaining two numbers to be 6 (the situation you have with 4 sectors), forcing the other to be 8 if the total were to reach 21. This fails because one way round you can'y make 9 and the other way round you can't make 10.
If you start with 2, 1, 3 you quickly run into similar problems.
John
After a lot of head scratching, I am fairly convinced that three out of the five sectors have to be 2, 1, 4 which give you:
1
2
3 = 2+1
4
5 = 4+1
?
7
This then obviously requires one of the remaining two numbers to be 6 (the situation you have with 4 sectors), forcing the other to be 8 if the total were to reach 21. This fails because one way round you can'y make 9 and the other way round you can't make 10.
If you start with 2, 1, 3 you quickly run into similar problems.
John
Posted on: 03 July 2003 by John Channing
More trivia
The closest palindromic pair of dates, starting from January 1st 0000 is 31-10-113 and 3-11-113, which are just 3 days apart.
John
The closest palindromic pair of dates, starting from January 1st 0000 is 31-10-113 and 3-11-113, which are just 3 days apart.
John
Posted on: 03 July 2003 by Paul Ranson
I've brute forced a bit with the segments of a circle and I think that,
1, 3, 10, 2, 5
does the trick. All sizes up to 21.
Paul
1, 3, 10, 2, 5
does the trick. All sizes up to 21.
Paul
Posted on: 03 July 2003 by John Channing
1, 3, 10, 2, 5
Yep, that definitely works.
John
Yep, that definitely works.
John
Posted on: 03 July 2003 by John Channing
Why the answer to the dates problem is 323...
The Dates take the form of:
ddmm|2|mmdd or ddmm|22|mmdd
since the year part must lie between 2000 and 2999 this gives some restrictions on the allowed mm and dd. For the single digit months (first nine months of the year) all the days of the month are capable of forming palindromes i.e.
For days 1-9
dm22md
For days 10-month end
ddm2mdd
This gives us 31+29+31+30+31+30+31+31+30=274
For the remaining three months we have
October
For days 1-9
m10201m
November
For days 1-9
m11211m
December
For days 1-9
m12221m
For days 10-month end
mm1221mm
which gives us another 9+9+31=49 palindromes. The total is therefore 274+49=323.
John
The Dates take the form of:
ddmm|2|mmdd or ddmm|22|mmdd
since the year part must lie between 2000 and 2999 this gives some restrictions on the allowed mm and dd. For the single digit months (first nine months of the year) all the days of the month are capable of forming palindromes i.e.
For days 1-9
dm22md
For days 10-month end
ddm2mdd
This gives us 31+29+31+30+31+30+31+31+30=274
For the remaining three months we have
October
For days 1-9
m10201m
November
For days 1-9
m11211m
December
For days 1-9
m12221m
For days 10-month end
mm1221mm
which gives us another 9+9+31=49 palindromes. The total is therefore 274+49=323.
John
Posted on: 03 July 2003 by Paul Ranson
That was my approach, as cryptically alluded to on the previous page.
Paul
Paul
Posted on: 04 July 2003 by Don Atkinson
Sectors.
1, 3, 10, 2, 5 is a good answer. In fact, it’s the only answer other than starting 3, 10, 2, 5, 1 etc or reversing the order.
There are ONLY 21 ways of combining 5 sectors viz,
5 single sectors
5 pairs of adjacent sectors
5 triples of consecutive sectors
5 lots of 4 sectors
1 combination of all 5 sectors
So, at the most there are only 21 ways of combining different sectors. Hence the best that can be expected is to have sizes 1, 2, 3,....., 21.
We MUST have a 1 and a 2.
A bit of trial and error soon shows that if we don't have a 3 we must have a 4 and also either 5 or 6. We would also need an 8 or 9. But no matter how we try, we can't get these to make all the totals.
So, the sectors 1 and 2 must not be adjacent and we need a 3. We soon realise that the 1, 2, 3 can be arranged in one of three possible layouts and bit more trial and errors shows us that 1, 3, 10, 2, 5 is the only possible answer.
There was an appealing simplicity to this teaser when I first saw it......
Cheers
Don
1, 3, 10, 2, 5 is a good answer. In fact, it’s the only answer other than starting 3, 10, 2, 5, 1 etc or reversing the order.
There are ONLY 21 ways of combining 5 sectors viz,
5 single sectors
5 pairs of adjacent sectors
5 triples of consecutive sectors
5 lots of 4 sectors
1 combination of all 5 sectors
So, at the most there are only 21 ways of combining different sectors. Hence the best that can be expected is to have sizes 1, 2, 3,....., 21.
We MUST have a 1 and a 2.
A bit of trial and error soon shows that if we don't have a 3 we must have a 4 and also either 5 or 6. We would also need an 8 or 9. But no matter how we try, we can't get these to make all the totals.
So, the sectors 1 and 2 must not be adjacent and we need a 3. We soon realise that the 1, 2, 3 can be arranged in one of three possible layouts and bit more trial and errors shows us that 1, 3, 10, 2, 5 is the only possible answer.
There was an appealing simplicity to this teaser when I first saw it......
Cheers
Don
Posted on: 04 July 2003 by Don Atkinson
The picture !
Worth a thousand words....
Cheers
Don
Worth a thousand words....
Cheers
Don
Posted on: 04 July 2003 by Paul Ranson
I don't find the picture helpful, it's more an obfuscation...
The first thing I did was to abstract the problem into a set of values that could be combined in a number of ways. That number falls out as 21 after a moments thought, and the arrangement of the 5 potential values can be made in 5!/(5*2) ways, which is 4*3.
So I brute forced a test for any 5 values generating all 21 possible sums. A bit of intuition was used to guess the values and a 'pass' was achieved at the second attempt. The brute force came in by testing all 5! permutations, but the count of extra trials at this level is small enough to be insignificant.
I suppose an obvious supplementary question is what happens with 6, 7 etc values? I'm away this weekend so I'll not be looking...
Paul
The first thing I did was to abstract the problem into a set of values that could be combined in a number of ways. That number falls out as 21 after a moments thought, and the arrangement of the 5 potential values can be made in 5!/(5*2) ways, which is 4*3.
So I brute forced a test for any 5 values generating all 21 possible sums. A bit of intuition was used to guess the values and a 'pass' was achieved at the second attempt. The brute force came in by testing all 5! permutations, but the count of extra trials at this level is small enough to be insignificant.
I suppose an obvious supplementary question is what happens with 6, 7 etc values? I'm away this weekend so I'll not be looking...
Paul
Posted on: 05 July 2003 by John Channing
I suppose an obvious supplementary question is what happens with 6, 7 etc values? I'm away this weekend so I'll not be looking...
Fairly clearly the maximum number of combinations of sectors for a circle of n segments is n(n-1)+1. An interesting question would be, prove that there is always a combination of n positive integers that will satisfy this. I had a quick look at the 6 segment problem, which should add up to 31 and persued a few of the combinations starting with 1,2,3 but with no luck so far.
John
Fairly clearly the maximum number of combinations of sectors for a circle of n segments is n(n-1)+1. An interesting question would be, prove that there is always a combination of n positive integers that will satisfy this. I had a quick look at the 6 segment problem, which should add up to 31 and persued a few of the combinations starting with 1,2,3 but with no luck so far.
John
Posted on: 05 July 2003 by Don Atkinson
6 segments
A quick look, and the best I can do so far is :-
1, 5, 2, 10, 10, 3
Which generates all the numbers except 15 and 16.
Cheers
Don
A quick look, and the best I can do so far is :-
1, 5, 2, 10, 10, 3
Which generates all the numbers except 15 and 16.
Cheers
Don
Posted on: 06 July 2003 by Don Atkinson
The Pentagon
I went to the local school today to give a talk to the children.
I watched part of a physical education lesson where the kids had to run around in a walled regular pentagonal courtyard, with sides of 20m and with an orange spot in the middle. (It looked more like a prison exercise yard than a school courtyard!). When the whistle blew, each kid had to run from wherever they happened to be, to touch each of the five walls, returning to their starting point between each wall and finishing back at their starting point.
I noticed one of the kids, who appeared to be a bit lazy, but the headmaster said he was a very bright lad. He appeared to have identified the boundary of a region within which he stayed throughout the exercise so as to minimise the distance he had to run each time the whistle blew. I spoke to him afterwards and sure enough, Marcus (that was his name) said that providing he stayed within a certain region he could minimise the amount of running involved. In fact, he had chalked a very faint line within the courtyard to define this region.
How many sides does Marcus' region have ?
What is the shortest distance from the orange spot to Marcus' chalk line. ?
Cheers
Don
I went to the local school today to give a talk to the children.
I watched part of a physical education lesson where the kids had to run around in a walled regular pentagonal courtyard, with sides of 20m and with an orange spot in the middle. (It looked more like a prison exercise yard than a school courtyard!). When the whistle blew, each kid had to run from wherever they happened to be, to touch each of the five walls, returning to their starting point between each wall and finishing back at their starting point.
I noticed one of the kids, who appeared to be a bit lazy, but the headmaster said he was a very bright lad. He appeared to have identified the boundary of a region within which he stayed throughout the exercise so as to minimise the distance he had to run each time the whistle blew. I spoke to him afterwards and sure enough, Marcus (that was his name) said that providing he stayed within a certain region he could minimise the amount of running involved. In fact, he had chalked a very faint line within the courtyard to define this region.
How many sides does Marcus' region have ?
What is the shortest distance from the orange spot to Marcus' chalk line. ?
Cheers
Don