Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi all!

This is my first post on the forum and I'm a little unsure of the suitability of my puzzle here because of the need to use a computer to find the solution...but I'd like to share it because I've had a lot of fun composing it and I reckon it's a good brain teaser (I hope). Sorry about it being so long, but it grew over time as ideas to 'improve' it popped into my head.

Much of the puzzle can be solved longhand, but Part B's YOB and YOP components are definitely best tackled with the help of a computer. I composed those two components in Excel (spreadsheet) and had to overcome Excel's lack of certain digit-manipulation functions...for which I've given array formulas (found on the internet) and a link to a prime-factorization function (also found on the internet). Just ignore the bits in blue if you'd rather use your own techniques.

No advanced math knowledge is required - not beyond high school, anyway - otherwise someone else would have had to compose my puzzle!

I've posted it on three other puzzle forums and although two people have solved it (an older version with a different solution, actually), the puzzle hasn't exactly prompted fierce discussion. Because I'm fairly new to Excel and VBA I'd hoped to get some feedback about others' Excel techniques and learn from them, but so far all has been quiet on that front. Anyway...

Here's an image of the puzzle.

And here's a pdf file of it.

Hope you'll enjoy it!

*EDIT: The links are to the most current version*

*Last edited by phrontister (2013-04-19 23:25:50)*

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,200

Hi phrontister;

*Last edited by bobbym (2009-07-12 23:42:03)*

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi bobbym,

Yes - that's the right answer to Part A.

What method did you use?

So far I've come across 3 quite different ones:

I've just re-read my first post and have realised that in the excitement of the occasion of that important posting event I told a lie. @'.'@

I didn't compose Part A - a good friend of mine did, and had it published in a puzzle magazine...which also published her solution strategy. She was quite interested to find out that I'd added a Part B to her puzzle, but sadly she's also very interested in avoiding trying to solve it!

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

I got the same answer as bobby.

There was a bit of guess-and-check near the end, but I used logic first to reduce the possibilities.

Why did the vector cross the road?

It wanted to be normal.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,200

Hi phrontister;

I went with the computer program idea. Basically I didn't want to have to solve an undetermined set of diophantine equations over the integers.

*Last edited by bobbym (2009-07-15 00:18:42)*

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi, mathsyperson. Thanks for posting your method.

Mine has some parallels with yours. I've tried to explain my method but found the going a bit difficult. It's too wordy and not as neatly-structured as yours...but I hope it makes sense:

The answer will probably jump out at me as soon as I post this, but there's something about your method that I don't understand:

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi bobbym,

Here's my code:

*Last edited by phrontister (2010-11-06 03:34:46)*

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

phrontister wrote:

The answer will probably jump out at me as soon as I post this, but there's something about your method that I don't understand:

Why did the vector cross the road?

It wanted to be normal.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,200

Hi phrontister;

That code you hide in post #7 will get the answer but it is inefficient.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.**

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

I was thinking about how to optimise the code earlier, but then I decided there wasn't much point.

There are "only" 151200 different phone numbers to try, and that code could easily get the answer in less than a second on a reasonable computer.

Why did the vector cross the road?

It wanted to be normal.

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi bobbym and mathsyperson,

I've only dabbled a bit in programming code and haven't learnt efficient, optimised techniques. I just know enough BASIC to get by with simple puzzle stuff...which keeps me happy enough, although I sometimes wish I knew more. At times I wonder how my clumsy efforts could be improved to look and perform better with more efficient coding...but I'll just continue to dream about it, as there's a limit to my limited time!

My BASIC program runs in approx 1 second, while the person who wrote the 'C' code said theirs ran in 0.017sec. That time difference is about as long as it takes me to sneeze, so I won't worry too much about it.

Here's an image of an Excel 4.0 macro that someone sent me. With MESSAGE (cell D12) 'on' it runs in 17 seconds, and with it 'off' it takes 6 seconds. Those times are for Excel v2002...in v2007 it takes 419 secs (yes - that's right!!) and 8 secs respectively.

Still, I'm not too concerned about any of that as Part A comprises only a tiny portion of the whole puzzle. It's only there to get things started for Part B, which is a MUCH more serious undertaking.

Recently I made several improvements to my spreadsheet solution. This has reduced the time for the entire process of testing the 0-3000 AD year range against the many rules to find my YOB and Part A's YOP, including performing the "Solution check", to just 1 second.

*Last edited by phrontister (2009-07-15 14:28:57)*

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

One last squeak before this puzzle disappears off the page and into oblivion (I'll just let it sink quietly to the bottom after this)...

I think I'll give up on the idea of interesting anybody in coming up with an Excel solution to Part B (although most of the spreadsheet construction is pretty straight forward, especially if using the hints I gave...but there are a couple of quite interesting bumps in the road, too).

I'll just mention that one of the two people whom I said in my first post had solved it used Mathematica, and I suspect that the other one did too - or something similar.

Also, anyone interested in a good prime-factorization function for Excel might like to have a look at the link I gave in the puzzle. The function can handle numbers up to 1e15, and on my computer takes just 2 seconds to determine that 999999999999989 is prime (*much *less than that for factorizing composite numbers).

The author very kindly included for me a handy optional argument that reverses the factor order - which is probably totally useless for any purpose other than my puzzle . Factors are output in a comma-delimited string, containing repeat factors (powers), if any: eg, input "1926", output "2,3,3,107" (or, *arranged in descending prime factor order*: "107,3,3,2").

*Last edited by phrontister (2009-08-10 04:57:48)*

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,200

HI phrontister;

I will get around to part b. I just am swamped at the moment.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.**

Offline

**ZHero****Real Member**- Registered: 2008-06-08
- Posts: 1,889

If two or more thoughts intersect, there has to be a point!

Offline

**ZHero****Real Member**- Registered: 2008-06-08
- Posts: 1,889

Hi again phrontister!

part-A was quite easy but charming

part-B? I'm already panicked by your repetitive instructions to use a computer to solve it.

Nonetheless, I'll give a try!!

If two or more thoughts intersect, there has to be a point!

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi ZHero,

Your answer to Part A is correct.

Just thought I'd confirm that for you because Part B's solution relies on the answer to Part A being correct.

I've started to have a look at your method for Part A, but have a way to go with it yet.

part-B? I'm already panicked by your repetitive instructions to use a computer to solve it.

I was just trying to be helpful, wanting to save you a few years' time if you did it by hand.

It should be possible to do by hand, because, contrary to what I said in my first post, I initially composed it by using paper, pen and a scientific calculator. Transferring it to Excel helped me to refine it and increase the difficulty level.

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi Bobby,

I've had trouble with the file host for this old puzzle and have now changed to Kiwi6.

The pdf's direct link to the 'factors' text file (an Excel UDF for prime factorization) has also been updated.

I've changed the links in post #1.

I've also changed the links to the 'bobbym's YOB' puzzle that I posted in the 'How old are you bobbym?' thread. They're now:

Image

PDF

Now anybody clicking on the links will be able to access the puzzles again.

*Last edited by phrontister (2013-04-19 22:57:02)*

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,200

Hi phrontister;

What is kiwi6?

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,122

Hi Bobby,

Kiwi6 is a free www file hosting service for storing and sharing files - here's a link to their 'About' page.

I've only just joined up and so I don't know much about them, but so far so good. The uploading and sharing process is easy...don't know much about what else they offer. They have a paid service with more benefits, but the free one will do me.

One excellent feature that most free file hosts don't have is hotlinking, whereby a file displays directly in your browser when you click on the link.

Theirs works without any popups or need to download the file...which is great for forums, I thought. You'll notice that as soon as you click on the links in my previous post the files will open.

I usually hold down the Ctrl key while I click so that the document opens in another tab instead of my current window. I use Google Chrome, but I think most browsers have that feature now.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 98,200

Hi phrontister;

Thanks for the information. I am checking them out.

**In mathematics, you don't understand things. You just get used to them.**

**If it ain't broke, fix it until it is.**

Offline

Pages: **1**