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

You are not logged in.

- Topics: Active | Unanswered

**patchy1****Member**- Registered: 2012-07-07
- Posts: 10

The 8 squares surrounding each shaded number must equal the shaded number. Only numbers from 1 to 7. Numbers can't repeat in any given row or column (like sudoku).

*Last edited by patchy1 (2015-08-22 10:30:25)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

The 8 squares surrounding each shaded number must equal the shaded number.

Must equal? In what way?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**patchy1****Member**- Registered: 2012-07-07
- Posts: 10

Sorry - the sum of the numbers in the white squares surrounding each shaded square must equal the number in that shaded square.

Offline

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

Hi;

patchy1 wrote:

The sum of the numbers in the white squares surrounding each shaded square must equal the number in that shaded square. Only numbers from 1 to 7. Numbers can't repeat in any given row or column (like sudoku).

Haven't got anywhere with this so far...other than to construct a couple of similar puzzles, with slightly different totals in the shaded target cells than the original.

eg,

I know the final solution to this one, but not how to solve it.

patchy1 wrote:

Numbers can't repeat in any given row or column (like sudoku).

That would only apply to the eight odd-lettered/numbered rows and columns, I suppose.

*Last edited by phrontister (2017-02-27 00:17:26)*

"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

**patchy1****Member**- Registered: 2012-07-07
- Posts: 10

phrontister wrote:

That would only apply to the eight odd-lettered/numbered rows and columns, I suppose.

Yes that's right

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi phrontister;

You did the solution by hand?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

Hi bobby;

I used an Excel spreadsheet to sum the numbers surrounding the nine target cells and to enter the results into them, and also to alert me when a row or column didn't meet the requirement of containing all of the seven numbers.

It was quite easy: I just distributed the numbers 1-7 into the grid by hand while visually ensuring they didn't 'repeat in any given row or column', and left it to Excel to do the rest.

For the figure in my previous post I simply moved a few of the numbers around - which can only be done to a limited degree - to achieve a fairly even result for the target cells (the smallest and largest values are only 4 apart).

*Last edited by phrontister (2015-09-02 02:57:34)*

"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,621

Hi;

Here's my Excel worksheet with the best result I've got so far on patchy1's puzzle. I placed the numbers by hand and shuffled them around to improve their location, with Excel's help. If a solution is found all coloured cells will be green.

Problems:

D2 sums to 29, not 30;

F2 sums to 35, not 33;

Hence the nine target cells sum to 283, not 282.

This method won't solve the puzzle before the world blows up, but after failing to find one that would work I tried it anyway just to see how close I could get. The actual solution probably won't look anything like this...

*Last edited by phrontister (2017-02-27 00:16:27)*

"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****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I am trying in between other problems to also solve this before the world blows up.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

Hi patchy1,

Do you know the solution strategy for these puzzles?

Can you solve the one in post #4?

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Nope.

I suspect that you will have a better chance than I will.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

Here's the answer!

Had to use some serious computer assistance, though.

Is there a logical approach?

*Last edited by phrontister (2017-02-26 23:44:18)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

Bravo! Is that the only solution?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

No, there's at least one other (see image).

There may be more too, but I can't confirm that as the solver I used is just an advanced version of Excel Solver that looks for an 'optimum solution' (whatever that means). When that is found, the readout says, "Solver found a solution. All constraints and optimality conditions are satisfied."

I've tried to encourage the solver to begin searching from different points, but to no avail...these are the only two it finds. And I'm not sure what caused the solver to look in a different direction to find the second solution. *EDIT: I've since worked out how to find more solutions: by fixing a cell's value, which I did via constraints. Each variation will yield another solution if there is one.*

The standard Excel Solver was missing a constraint functionality I needed that the advanced one has.

*EDIT: I had a tiny sniff of success with the standard Excel Solver by scaling the grid down from 7x7 to 5x5. The solver doesn't allow (as far as I could tell) crossing of the 'AllDifferent' constraint (eg, a row crossing a column - because one of them is then treated as not containing all variables, which it must contain), and so I cooked up some workarounds (linear and nonlinear). Only one 'worked': ie, - a nonlinear one, with the 'GRG Nonlinear' solving method; - for one particular scenario only, in which I helped it get started by providing the answers to 4 cells, leaving the other 17 for the solver to find...which it did! - it failed on all other assignments. *

I tried the advanced solver on my post #4 puzzle and got a different result from the one I had. So that one also has multiple solutions.

Hmm...

*Last edited by phrontister (2017-02-26 23:43:30)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Regarding whether there is a "logical approach," your solver is indicating that this is a linear programming problem. That means yes to your question.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

I used the solver's LP/Quadratic engine, and that worked.

Can these be solved by hand?

*Last edited by phrontister (2016-06-22 12:59:11)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

I thought so, that means (LP) Linear programming and Quadratic programming. Wish I were smart enough to put the problem into that form because M could solve it instantly. But alas, M can not turn a bumpkin into a brainy guy.

Can these be solved by hand?

Sometimes you are enigmatic to me.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

The solver takes 5 seconds...but I'm sure M would beat that.

I like Solver for this puzzle because it's so easy to set up. Once it's in the spreadsheet (fairly quick in Excel) it takes just a few minutes to create the Solver model.

Sometimes you are enigmatic to me.

I don't know what 'Linear programming and Quadratic programming' means. I meant, are problems that are solved by such means too difficult (etc) to do by hand?

I must go now...much to do.

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Hi;

I meant, are problems that are solved by such means too difficult (etc) to do by hand?

I would say that this problem probably requires a computer, even if you use math the resulting solution would still need a computer to evaluate.

I meant that you have a natural gift for programming, so why seek to do this by hand at all?

Had to use some serious computer assistance, though.

Here is where you should be asking how can I eliminate the part which required human intervention rather than trying to eliminate the computer. But since you are only around 28 years old I will have plenty of time to change your mind.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

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

Hi bobby;

I found another 10 solutions to patchy1's puzzle by changing some optional processing settings, so that makes 12 solutions so far. But I think I'll stop there, as I have no means of proving how many there are, or what they are.

Yes, programming's good for something I can handle and when I can set aside enough time for it - and sometimes I prefer to go that route anyway. Fair enough if a problem's too difficult or time-consuming to do by hand...then I'd happily try to find a solution by any means. And I certainly didn't mind when the advanced solver came up with the answer!

*Last edited by phrontister (2017-02-27 00:20:40)*

Offline

**bobbym****bumpkin**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 109,606

Anyway you at least solved the problem before the world blows up.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**** Always satisfy the Prime Directive of getting the right answer above all else.**

Offline

**thickhead****Member**- Registered: 2016-04-16
- Posts: 1,086

phrontister wrote:

No, there's at least one other (see image).

There may be more too, but I can't confirm that as the solver I used is just an advanced version of Excel Solver that looks for an 'optimum solution' (whatever that means). When that is found, the readout says, "Solver found a solution. All constraints and optimality conditions are satisfied."

I've tried to encourage the solver to begin searching from different points, but to no avail...these are the only two it finds. And I'm not sure what caused the solver to look in a different direction to find the second solution.

The standard Excel Solver was missing a constraint functionality I needed that the advanced one has.

https://onedrive.live.com/download?resid=C20C46B976D069EE!3546&authkey=!AIDJZzWJphAYQWM&v=3&ithint=photo%2cjpg

I tried the advanced solver on my post #4 puzzle and got a different result from the one I had. So that one also has multiple solutions.

Hmm...

But 4 occurs twice in F row.

**{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha{Gods rejoice at those places where ladies are respected.}**

Offline

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

Hi thickhead;

phrontister wrote:

patchy1 wrote:Numbers can't repeat in any given row or column (like sudoku).

That would only apply to the eight odd-lettered/numbered rows and columns, I suppose.

patchy1 wrote:

Yes that's right

Row F is one of the six even-lettered/numbered rows and columns, so repeats in that row are allowed.

'4' is also repeated in column 6 of post #12's solution, but as that column is even-numbered, it is allowed too.

Offline

**patchy1****Member**- Registered: 2012-07-07
- Posts: 10

For the original puzzle:

row B = 109

row D = 107

row F = 110

col 2 = 104

col 4 = 115

col 6 = 107

A7 = 5

G7 = 3

That should narrow it down to one solution...

Offline

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

Hi;

patchy1 wrote:

For the original puzzle:

row B = 109

row D = 107

row F = 110col 2 = 104

col 4 = 115

col 6 = 107A7 = 5

G7 = 3That should narrow it down to one solution...

Those constraints still yield multiple solutions, but I don't know how many there are in total.

Here are twelve of them:

*Last edited by phrontister (2017-02-27 00:21:33)*

Offline