- Joined
- Aug 10, 2007

- Messages
- 4,059 (1.07/day)

- Likes
- 1,123

- Location
- Geneva, FL, USA

Processor | Intel i5-6600 |
---|---|

Motherboard | ASRock H170M-ITX |

Cooling | Cooler Master Geminii S524 |

Memory | G.Skill DDR4-2133 16GB (8GB x 2) |

Video Card(s) | Gigabyte R9-380X 4GB |

Storage | Samsung 950 EVO 250GB (mSATA) |

Display(s) | LG 29UM69G-B 2560x1080 IPS |

Case | Lian Li PC-Q25 |

Audio Device(s) | Realtek ALC892 |

Power Supply | Seasonic SS-460FL2 |

Mouse | Logitech G700s |

Keyboard | Logitech G110 |

Software | Windows 10 Pro |

- I'm using explanation given here about how to calculate parity.

- "total" is considered the space square.

- While permutations parity is odd, reshuffle the order until even parity is achieved.

- Loop through the range and for each square, test if value is greater than value of squares further in the sequence. If so, increment the counter.

PHP:

```
$tall = 3;
$wide = 3;
$total = $tall * $wide;
$range = range(1, $total);
do {
shuffle($range);
$permutations = 0;
for ( $i = 0; $i < ($total - 1); ++$i ) {
for ( $j = ($i + 1); $j < $total; ++$j ) {
if ( $range[$i] > $range[$j] ) {
++$permutations;
}
}
}
} while ( $permutations & 1 );
//use validated range for board
```