I've done some experiments with moments caclulations. My goal was to find method of optimal pattern representation, i.e. criterium for selection unique isomorph for given pattern such that it can look fine and be optimal (from mathematical point of view). But I didn't succeed in doing that. The main problem is unicity. For any method I used there was at least one pattern having multiple representations.
First, I produced all possible isomorphs for given pattern. Then I found center of mass for each isomorph (assuming each clue is mass unit). Finally I calculated:
1. Average square distance between clues and center of mass, i.e. sum(distance^2)/number_of_clues. I call square root of this value as "effective pattern's radius" or R_eff.
2. Maximal distance between clues and center of mass, i.e. max(distance). I call this value as "maximal pattern's radius" or R_max.
Both values were calculated for each isomorphs and the least over all isomorphs were treated as given pattern's value.
Let's consider for example 2 simple patterns ("1" denotes clue cell):
- Code: Select all
P1 P2
1 1 1 1 1 1 1 1 1 1 . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . .
1 1 1 1 1 1 1 1 1 . . . . . . . . 1
One can check that R_eff = 3.651, R_max = 5.657 (in cell side's units) for P1 pattern and R_eff = 0.707, R_max = 0.707 for P2 pattern.
I calculated R_eff and R_max for all 121 vertically symmetric 18-clue patterns and found, that
Minimal R_eff: 2.724, maximal R_eff: 3.371 (over all 121 patterns).
Minimal R_max: 3.459, maximal R_max: 4.333 (over all 121 patterns).
To my mind critical values for R_eff and R_max should exist such that R_eff and R_max values for any pattern having valid puzzles must be not less than that critical values.
Serg