Here is the program. It generates sudoku that are even more random than those generated by rowSwap(.

```
ClrHome
{9,1 -> dim([A]
cumSum(binomcdf(8,0 -> L1
rand(9 -> L2
SortA(L2,L1
augment(L1,L1 -> L1
For(A,0,8
Output(8,1,int(e2(A+1)/39
List>matr(seq(L1(3A-8int(A/3)+B),B,1,9),[B]
augment([B],[A] -> [A]
End
dim(identity(9 -> dim([A]
For(theta,1,30
int(9rand -> X
X+not(fPart(X/3 -> A
X+2-not(fPart((X+1)/3 -> B
If int(2rand
[A]^T -> [A] ;Transpose
Matr>list([A],A,L1
cumSum(binomcdf(8,0 -> L2
SortA(L1,L2
randInt(1,9 -> C
Ans -> Z
Repeat C=Z
[A](C,B -> X
[A](C,A -> [A](C,B
X -> [A](C,A
L2(X -> D
C -> L2(X
D -> C
End
End
```

The way it works is it first generates a sudoku that is a number swapped version of:

[[1 2 3 4 5 6 7 8 9]

[4 5 6 7 8 9 1 2 3]

[7 8 9 1 2 3 4 5 6]

[2 3 4 5 6 7 8 9 1]

[5 6 7 8 9 1 2 3 4]

[8 9 1 2 3 4 5 6 7]

[3 4 5 6 7 8 9 1 2]

[6 7 8 9 1 2 3 4 5]

[9 1 2 3 4 5 6 7 8]

Then, it swaps two random numbers that are in the same box and column. Obviously, this destroys the Sudoku property, so it continues swapping numbers until the sudoku property is restored.