Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from numpy.lib.function_base import kaiser
- import numpy as np
- array = np.array([[[0, 0], [0, 1]],
- [ [0, 0], [1, 0]],
- [ [0, 1], [0, 0]],
- [ [1, 0], [0, 0]],
- [ [1, 1], [0, 0]],
- [ [0, 1], [1, 0]],
- [ [0, 0], [1, 1]],
- [ [1, 0], [0, 1]],
- [ [1, 0], [1, 0]],
- [ [0, 1], [0, 1]],
- [ [1, 1], [1, 0]],
- [ [0, 1], [1, 1]],
- [ [1, 0], [1, 1]],
- [ [1, 1], [0, 1]],
- [ [1, 1], [1, 1]],
- [ [0, 0], [0, 0]],
- [ [0, 0], [0, 2]],
- [ [0, 0], [2, 0]],
- [ [0, 2], [0, 0]],
- [ [2, 0], [0, 0]],
- [ [2, 2], [0, 0]],
- [ [0, 2], [2, 0]],
- [ [0, 0], [2, 2]],
- [ [2, 0], [0, 2]],
- [ [2, 0], [2, 0]],
- [ [0, 2], [0, 2]],
- [ [2, 2], [2, 0]],
- [ [0, 2], [2, 2]],
- [ [2, 0], [2, 2]],
- [ [2, 2], [0, 2]],
- [ [2, 2], [2, 2]],
- [ [1, 1], [1, 2]],
- [ [1, 1], [2, 1]],
- [ [1, 2], [1, 1]],
- [ [2, 1], [1, 1]],
- [ [2, 2], [1, 1]],
- [ [1, 2], [2, 1]],
- [ [1, 1], [2, 2]],
- [ [2, 1], [1, 2]],
- [ [2, 1], [2, 1]],
- [ [1, 2], [1, 2]],
- [ [2, 2], [2, 1]],
- [ [1, 2], [2, 2]],
- [ [2, 1], [2, 2]],
- [ [2, 2], [1, 2]],
- [ [0, 0], [1, 2]],
- [ [0, 0], [2, 1]],
- [ [1, 2], [0, 0]],
- [ [2, 1], [0, 0]],
- [ [1, 0], [0, 2]],
- [ [2, 0], [0, 1]],
- [ [0, 1], [2, 0]],
- [ [0, 2], [1, 0]],
- [ [1, 0], [1, 2]],
- [ [1, 0], [2, 1]],
- [ [0, 1], [1, 2]],
- [ [0, 1], [2, 1]],
- [ [2, 1], [0, 1]],
- [ [1, 2], [0, 1]],
- [ [1, 2], [1, 0]],
- [ [2, 1], [1, 0]],
- [ [2, 0], [1, 2]],
- [ [2, 0], [2, 1]],
- [ [0, 2], [1, 2]],
- [ [0, 2], [2, 1]],
- [ [2, 1], [0, 2]],
- [ [2, 2], [1, 0]],
- [ [1, 2], [0, 2]],
- [ [1, 2], [2, 0]],
- [ [2, 1], [2, 0]],
- [ [2, 0], [1, 0]],
- [ [1, 0], [2, 0]],
- [ [0, 1], [0, 2]],
- [ [0, 2], [0, 1]],
- [ [0, 1], [2, 2]],
- [ [0, 2], [1, 1]],
- [ [1, 0], [2, 2]],
- [ [1, 1], [0, 2]],
- [ [1, 1], [2, 0]],
- [ [2, 0], [1, 1]],
- [ [2, 2], [0, 1]]])
- c = np.zeros((81, 81), dtype=int)
- for i in range(81):
- A = np.array(array[i])
- count = 0
- for j in range(81):
- if i != j:
- C = np.array(array[j])
- T1 = A.dot(C) % 3
- T2 = C.dot(A) % 3
- if (T1==T2).all() :
- a = i+1
- b = j+1
- c[i][count] = j
- count += 1
- print(str(a) + " " + str(b))
- for i in range(81):
- sovpad = True
- print(c[i], end=" ")
- for j in range(i, 81):
- for k in range(81):
- if c[i][k] != c[j][k]:
- if c[j][k] != i:
- sovpad = False
- if sovpad:
- print(j, end=" ")
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement