Advertisement
Qellex

Untitled

Mar 7th, 2022
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. from numpy.lib.function_base import kaiser
  2. import numpy as np
  3. array = np.array([[[0, 0], [0, 1]],
  4. [ [0, 0], [1, 0]],
  5. [ [0, 1], [0, 0]],
  6. [ [1, 0], [0, 0]],
  7. [ [1, 1], [0, 0]],
  8. [ [0, 1], [1, 0]],
  9. [ [0, 0], [1, 1]],
  10. [ [1, 0], [0, 1]],
  11. [ [1, 0], [1, 0]],
  12. [ [0, 1], [0, 1]],
  13. [ [1, 1], [1, 0]],
  14. [ [0, 1], [1, 1]],
  15. [ [1, 0], [1, 1]],
  16. [ [1, 1], [0, 1]],
  17. [ [1, 1], [1, 1]],
  18. [ [0, 0], [0, 0]],
  19. [ [0, 0], [0, 2]],
  20. [ [0, 0], [2, 0]],
  21. [ [0, 2], [0, 0]],
  22. [ [2, 0], [0, 0]],
  23. [ [2, 2], [0, 0]],
  24. [ [0, 2], [2, 0]],
  25. [ [0, 0], [2, 2]],
  26. [ [2, 0], [0, 2]],
  27. [ [2, 0], [2, 0]],
  28. [ [0, 2], [0, 2]],
  29. [ [2, 2], [2, 0]],
  30. [ [0, 2], [2, 2]],
  31. [ [2, 0], [2, 2]],
  32. [ [2, 2], [0, 2]],
  33. [ [2, 2], [2, 2]],
  34. [ [1, 1], [1, 2]],
  35. [ [1, 1], [2, 1]],
  36. [ [1, 2], [1, 1]],
  37. [ [2, 1], [1, 1]],
  38. [ [2, 2], [1, 1]],
  39. [ [1, 2], [2, 1]],
  40. [ [1, 1], [2, 2]],
  41. [ [2, 1], [1, 2]],
  42. [ [2, 1], [2, 1]],
  43. [ [1, 2], [1, 2]],
  44. [ [2, 2], [2, 1]],
  45. [ [1, 2], [2, 2]],
  46. [ [2, 1], [2, 2]],
  47. [ [2, 2], [1, 2]],
  48. [ [0, 0], [1, 2]],
  49. [ [0, 0], [2, 1]],
  50. [ [1, 2], [0, 0]],
  51. [ [2, 1], [0, 0]],
  52. [ [1, 0], [0, 2]],
  53. [ [2, 0], [0, 1]],
  54. [ [0, 1], [2, 0]],
  55. [ [0, 2], [1, 0]],
  56. [ [1, 0], [1, 2]],
  57. [ [1, 0], [2, 1]],
  58. [ [0, 1], [1, 2]],
  59. [ [0, 1], [2, 1]],
  60. [ [2, 1], [0, 1]],
  61. [ [1, 2], [0, 1]],
  62. [ [1, 2], [1, 0]],
  63. [ [2, 1], [1, 0]],
  64. [ [2, 0], [1, 2]],
  65. [ [2, 0], [2, 1]],
  66. [ [0, 2], [1, 2]],
  67. [ [0, 2], [2, 1]],
  68. [ [2, 1], [0, 2]],
  69. [ [2, 2], [1, 0]],
  70. [ [1, 2], [0, 2]],
  71. [ [1, 2], [2, 0]],
  72. [ [2, 1], [2, 0]],
  73. [ [2, 0], [1, 0]],
  74. [ [1, 0], [2, 0]],
  75. [ [0, 1], [0, 2]],
  76. [ [0, 2], [0, 1]],
  77. [ [0, 1], [2, 2]],
  78. [ [0, 2], [1, 1]],
  79. [ [1, 0], [2, 2]],
  80. [ [1, 1], [0, 2]],
  81. [ [1, 1], [2, 0]],
  82. [ [2, 0], [1, 1]],
  83. [ [2, 2], [0, 1]]])
  84.  
  85. c = np.zeros((81, 81), dtype=int)
  86.  
  87. for i in range(81):
  88. A = np.array(array[i])
  89. count = 0
  90. for j in range(81):
  91. if i != j:
  92. C = np.array(array[j])
  93. T1 = A.dot(C) % 3
  94. T2 = C.dot(A) % 3
  95. if (T1==T2).all() :
  96. a = i+1
  97. b = j+1
  98. c[i][count] = j
  99. count += 1
  100. print(str(a) + " " + str(b))
  101.  
  102.  
  103. for i in range(81):
  104. sovpad = True
  105. print(c[i], end=" ")
  106. for j in range(i, 81):
  107. for k in range(81):
  108. if c[i][k] != c[j][k]:
  109. if c[j][k] != i:
  110. sovpad = False
  111. if sovpad:
  112. print(j, end=" ")
  113.  
  114. print()
  115.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement