macro in excel for Samurai?

For fans of Killer Sudoku, Samurai Sudoku and other variants

macro in excel for Samurai?

Postby Crazy Girl » Mon Jan 02, 2006 6:08 pm

Samurai, in form,
Code: Select all
P1  P2 
  P3
P4  P5

where P1, P2, P3, P4, P5 are the 5 Sudoku Puzzles that form the Samurai, with P3 sharing top left/top right/bottom left/bottom right blocks with appropiate puzzle.

Trying to program a macro in excel to give a candidate list for a Samurai, as found in the Times, but having difficulty on the overlapping blocks, idealy would like the candidates for a particular cell in one of these blocks (say *) to be the union of the candidates from the 2 involved puzzles (in * case P1 and P3), but this involves the function(fx) used for the sudoku puzzle to be used on 2 difference Sudoku's eg Union(cell, fx(P1), fx(P3) )
Code: Select all
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  P1 . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+---------+---------+
| .  .  . | .  .  . | .  .  . | .  .  . | .  .  . |
| .  .  . | .  .  . | .  *  . | .  .  . | .  .  . |
| .  .  . | .  .  . | .  .  . | .  .  . | .  .  . |
+---------+---------+---------+---------+---------+
                    | .  .  . | .  .  . | .  .  . |
                    | .  .  . | .  P3 . | .  .  . |
                    | .  .  . | .  .  . | .  .  . |
                    +---------+---------+---------+
                    | .  .  . | .  .  . | .  .  . |
                    | .  .  . | .  .  . | .  .  . |
                    | .  .  . | .  .  . | .  .  . |
+---------+---------+---------+---------+---------+
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  P4 . | .  .  . |                 
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
| .  .  . | .  .  . | .  .  . |                   
+---------+---------+---------+


any ideas on how to procede?
Crazy Girl
 
Posts: 189
Joined: 08 November 2005

Postby Lardarse » Sun Jan 08, 2006 12:03 pm

There's a mistake in your picture...
Lardarse
 
Posts: 106
Joined: 01 July 2005

Postby Crazy Girl » Sun Jan 08, 2006 2:10 pm

Lardarse wrote:There's a mistake in your picture...


I've missed of P2 and P5 as the rows of the grid would not fit on the same line, so to make the picture understandable i missed off these sudoku grids.

Is this the mistake you are talkin' about:?:
Crazy Girl
 
Posts: 189
Joined: 08 November 2005

re: Excel for Samurai

Postby Pat » Sun Jan 08, 2006 3:59 pm

Crazy Girl wrote:Trying to program a macro in Excel to give a candidate list for a Samurai,
but having difficulty on the overlapping blocks

Would like the candidates for a particular cell in one of these blocks (say *) to be the union of the candidates from the 2 involved puzzles (in * case P1 and P3),
but this involves the function(fx) used for the SuDoku to be used on 2 difference SuDoku e.g. Union(cell, fx(P1), fx(P3) )


intersection ( rather than "Union" )


sorry i cannot help with Excel,
try the Sudoku Programmers Forum

~ Pat
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005


Return to Sudoku variants