Some 2-clue logic for PrismaPix
(solving help for PrismaPix, Fill-a-Pix, Minesweeper, etc)

  Intro  

Terminology: All squares start out Unmarked, and will eventually be marked as a Filled square or an Empty square.

In all cases, there is a common idea:
Two clues have overlapping areas, which makes 3 sections:
  • the used-by-clue-A-only section (the yellow area)
  • the used-by-clue-B-only section (the blue area)
  • the common-to-both-clues section (the green area)
(we igonore the area outside of these three sections).
       
  A    
    B  
       

"A" and "B" are numbers. If we put a certain amount of Filled squares into the A-only section (yellow), that will force us to put some specific amount of Filled squares into the Common section (green), which will force us to put some specific amount into the B-only section (blue).

for example
       
  2    
    5  
       
Suppose we put only one Filled square in the A-only section (yellow).

Then, to complete the 2, we would need to put another one Filled square into the Common section (green)

Then, to complete the 5, we would need to put four Filled squares in the B-only section (blue).

This doesn't help much, because we don't know where, within each section, we should put the filled squares. Furthermore, we could have started with zero, or two filled squares in the A-only section (instead of one), and only one case is correct in any given puzzle.

Here's the thing though, in all cases this is the exact logic we use:

       
  2    
    5  
       
5 is three greater than 2 (remember that)
In the end there will be a certain amount of Filled squares in each section (possibly zero).
We'll use simple algebra and call the amounts B, G and Y (for blue, green and yellow, respectively).
We know that  
and
B + G = 5
Y + G = 2
when we sutract and simplify we get:
( B + G ) - ( Y + G ) = 5 - 2
B - Y = 3
or in English
the Blue section has three more Filled squares than the Yellow section (see the connection?)

In this case (also) it doesn't help us to do anything specific (yet), but that's all there is to it.

Well, other than actually applying the knowledge.

  Part 1 - assuming the puzzle has no squares marked  

Lesson 1.1(medium logic)
Here is a common occurrence:
If you have 2 clues that are are in squares that are touching (sides, not just corners),
and one number is three greater than the other number (or, as we say in math, | A - B | = 3)
then there is something you can do:

for example
       
  4 7  
       
We know that 7 is three greater than 4
so the Blue section will have three more Filled squares than the Yellow section
therefore ALL of the Blue section will be marked with Filled squares
and ALL of the Yellow section will be marked with Empty squares.

Note that if some of the squares are already marked one way or the other,
and/or if we have some other clues within the sections . . .
It Doesn't Matter! That logic is still 100% true and valid.

     
  8  
  5  
     
In this second example (no color this time),
the top 3 squares MUST be marked with Filled squares
and the bottom 3 MUST be marked with Empty squares.

(Did you do the math?)

If the clues are up against the edge of the puzzle, then the logic is the same, but the numbers are a bit different.

Lesson 1.2
BORDER
  2 4  
       
If both numbers are on an edge of the puzzle and have values 2 apart,
you must mark 2 Filled squares and 2 Empty squares.

(you know which ones)

Lesson 1.3

If only one of the clues is against the edge, and the two numbers are the same, . . .
Well, see this example:
       
3 3  
     
The bold 3 is on the edge of the puzzle, and will have three Filled squares in the green area.
Those three squares will also satisfy the non-bold 3, so the three yellow squares MUST all be Empty

What would happen if we had a 6 instead of the non-bold 3? (this is a test)

Lesson 2.1 (advanced logic)

The clues don't have to be side by side for us to deduce something. Here are three other cases:
       
  3    
    8  
       
(2 squares, touching diagonally, | A - B | = 5 )

Here, the yellow area will all be marked Empty,
the green area will eventually get three Full squares,
and the blue area will all be marked with Full squares.
         
  1   7  
         
(1st & 3rd squares in a line of 3, | A - B | = 6 )

Which area will all be marked with Empty squares?
Which area will all be marked with Full squares?
How many Full squares go in the other section?
         
  1      
      8  
         
(2 squares, chess-knight's move apart, | A - B | = 7 )

I hope you know what to do by now

Lesson 2.2

Just as with Lesson 1 there were special on-the-edge cases, so there are with Lesson 2.

Here is one example:
       
A    
  B  
     
Since we only have two squares in the blue section,
we are looking for clues whose values are two apart.

For example, if A is 5 and B is 3
then the blue area would all be marked Full
and the yellow area will all be marked with Empty squares.

If A is 3 and B is 5 then it doesn't help. Why not?

and I'll leave for you to figure out all the other edge cases, including where
  - one of the numbers is in a corner, or
  - the two numbers are on two adjacent edges.

  Part 2 - but the puzzle does have squares marked  

Again, even if some of the grid is filled, and/or there are additional clues within our sections, all of the above is true, and may be applied.
However, when the sections are partly filled we may be able to make additional deductions.

Lesson 3.1

In this example from the game PrismaPix, we have three squares marked as Empty (the X's).
 
X 2 1  
    X X

The hint we are given (slightly modified) by the program is:
The [blue section] can be solved. Left click in the [unmarked square] to fill [it] in.

Here is an explanation of why this is so.
Using the same steps we used before, we see that 2 is one greater than 1 therefore
the Blue section will have one more Filled square than the Yellow section,
meaning that it will have at least one square and since there is only one available location, that has to be it.
The two Empty squares by the 1 didn't help us any, but they didn't hurt either.

Lesson 3.2

Here is another example from PrismaPix:
       
  6    
    2  
       
In this first view I removed some of the information to show the general case.
We know that 6 is four greater than 2,
so the Blue section will have four more Filled squares than the Yellow section.

This doesn't give us enough to be able to do anything
However, by the time we get to this, five squares have been marked as Empty (grey),
and two have been marked as Filled (orange), and it looks like this:
3 6    
  6    
4   2  
       
again:
The Blue section (including the upper orange one) will have four more Filled squares than the Yellow section (which includes those four grey ones).
So . . . you do the math.

It doesn't even matter that we know the two full ones already,
the one empty one (with the 3) gives us all the info we need.

Now all you have to figure out is how to look at the whole puzzle and see the places where this knowledge helps.

Unless you're ready for 3-clue logic . . .