Click here to Skip to main content
11,496,146 members (369 online)
Click here to Skip to main content

Tagged as

The Code, Part 3

, 8 Aug 2012 CPOL 3.6K 3
Solution to a puzzle.
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.

Here is another interesting puzzle from the book (as I stated previously you need the passwords from the pre-selections).

Basil, a friend of mine, gave me this interesting array of numbers. He told me that if I grab any five numbers from it such that none of the numbers shares a row or column with another, then my five chosen numbers will always add up to the same sum. I think he made an error, however, because it does not always seem to verify properly. Exactly where is the glitch and what quantity should go in its place to improve the matrix's reliability?

8210587243141
7710082142136
142165147303201
274297279435333
638668224122

Let's start with some analysis. The claim is that a1,j1+a2,j2+a3,j3+a4,j4+a5,j5=const, where jk≠jm, ∀k,m∈{1..5}

This implies that, e.g. a1,j1+a2,j2=a1,j2+a2,j1 or by simplifying it a1,i+a2,j=a1,j+a2,i. We make this expression even more generic (easy to prove)
ap,i+aq,j=ap,j+aq,i

Indeed, this is what is happening:
Example 1

8210587243141
7710082142136
142165147303201
274297279435333
638668224122
Or 274+86=63+297

Example 2
8210587243141
7710082142136
142165147303201
274297279435333
638668224122
Or 86+303=165+224

A quick check for all of the 2x2 sub-matrices (stepwise, can be done by a computer program) shows the problem:

8210587243141
7710082142136
142165147303201
274297279435333
638668224122

The answer is, 142 should be replaced by 238.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

rtybase
Software Developer (Senior) Snappli Ltd.
United Kingdom United Kingdom
My name is Ruslan Ciurca. Currently I am a Software Developer at snappli.com.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150520.1 | Last Updated 8 Aug 2012
Article Copyright 2012 by rtybase
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid