Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Input matrix M
- Define X_1 = list of rows of M
- Define X_2 = list of columns of M
- Define X_3 = list of diagonals of M
- Define X_4 = list of antidiagonals of M
- For each {integer a in {1,2,3,4}}{ // X_a is the set of rows
- For each {integer b in {1,2,3,4} with b!=a}{ // X_b is the set of columns
- For each {permutation s in S_n}{ // s is an ordering of X_a
- For each {permutation t in S_n}{ // t is an ordering of X_b
- For each {integer k in {1,...,n^2}}{
- Define i such that k in X_a[s(i)]
- Define j such that k in X_b[t(j)]
- Define n_ij = k
- }
- Output matrix N_{a,b,s,t} = (n_ij).
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement