Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package curse;
- import java.util.HashSet;
- import java.util.Iterator;
- public class MainClass {
- static int mod = R.mod; //характеристика поля
- static int n = M.n; //размер матриц
- public static void main(String[] args){
- R q = new R(2);
- int sqrt2 = q.r();
- int[][] g1 = new int[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++){
- g1[i][j] = 0;
- }
- g1[0][1]=sqrt2; g1[4][0]=mod-sqrt2; g1[2][6]=mod-1; g1[3][5]=1;
- M G1 = new M(g1);
- System.out.println("g_1");
- G1.print();
- int[][] g2 = new int[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++){
- g2[i][j] = 0;
- }
- g2[0][2]=sqrt2; g2[5][0]=mod-sqrt2; g2[1][6]=1; g2[3][4]=mod-1;
- M G2 = new M(g2);
- System.out.println("\ng_2");
- G2.print();
- int[][] g3 = new int[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++){
- g3[i][j] = 0;
- }
- g3[0][6]=sqrt2; g3[3][0]=mod-sqrt2; g3[5][1]=1; g3[4][2]=mod-1;
- M G3 = new M(g3);
- System.out.println("\ng_-3");
- G3.print();
- int[][] g12 = new int[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++){
- g12[i][j] = 0;
- }
- g12[1][2]=sqrt2; g12[5][4]=mod-sqrt2;
- M G12 = new M(g12);
- System.out.println("\ng_1,-2");
- G12.print();
- int[][] g31 = new int[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++){
- g31[i][j] = 0;
- }
- g31[3][1]=1; g31[4][6]=mod-1;
- M G31 = new M(g31);
- System.out.println("\ng_3,-1");
- G31.print();
- int[][] g32 = new int[n][n];
- for (int i = 0; i < n; i++)
- for (int j = 0; j < n; j++){
- g32[i][j] = 0;
- }
- g32[3][2]=1; g32[5][6]=mod-1;
- M G32 = new M(g32);
- System.out.println("\ng_3,-2");
- G32.print();
- HashSet<M> Nalg = new HashSet<M>();//подалгебра n
- int i1, i2, i3, i4, i5, i6;
- for (i1 = 0; i1 < mod; i1++)
- for (i2 = 0; i2 < mod; i2++)
- for (i3 = 0; i3 < mod; i3++)
- for (i4 = 0; i4 < mod; i4++)
- for (i5 = 0; i5 < mod; i5++)
- for (i6 = 0; i6 < mod; i6++){
- Nalg.add(G1.scal(i1).plus(G2.scal(i2).plus(G3.scal(i3).plus(G12.scal(i4).plus(G31.scal(i5).plus(G32.scal(i6)))))));
- }
- HashSet<M> Ualg = new HashSet<M>();//множество U
- Iterator<M> Nitr = Nalg.iterator();
- while (Nitr.hasNext()) {
- Ualg.add(Nitr.next().exp());
- }
- System.out.println(Ualg.size());
- int vol = 0;
- HashSet<M>[] OG1 = new HashSet[6]; //орбита для g1
- HashSet<M>[] OG2 = new HashSet[6];
- HashSet<M>[] OG3 = new HashSet[6];
- HashSet<M>[] OG12 = new HashSet[6];
- HashSet<M>[] OG31 = new HashSet[6];
- HashSet<M>[] OG32 = new HashSet[6];
- HashSet<M>[] OG1and12 = new HashSet[6];
- HashSet<M>[] OG1and2 = new HashSet[6];
- HashSet<M>[] OG1and32 = new HashSet[6];
- HashSet<M>[] OG31and2 = new HashSet[6];
- HashSet<M>[] OG31and12 = new HashSet[6];
- HashSet<M>[] OG3and12 = new HashSet[6];
- for(int i = 1; i < mod; i++){//проходим по всем фунциям для одноэлементных множеств
- OG1[i-1]= new HashSet<M>();
- OG2[i-1]= new HashSet<M>();
- OG3[i-1]= new HashSet<M>();
- OG12[i-1]= new HashSet<M>();
- OG31[i-1]= new HashSet<M>();
- OG32[i-1]= new HashSet<M>();
- OG1and12[i-1]= new HashSet<M>();
- OG1and2[i-1]= new HashSet<M>();
- OG1and32[i-1]= new HashSet<M>();
- OG31and2[i-1]= new HashSet<M>();
- OG31and12[i-1]= new HashSet<M>();
- OG3and12[i-1]= new HashSet<M>();
- Iterator<M> Uitr = Ualg.iterator();
- while (Uitr.hasNext()) {//проходим по U
- M tcd = Uitr.next();
- M RD1 = tcd.Ad(G1.scal(i));
- M RD2 = tcd.Ad(G2.scal(i));
- M RD3 = tcd.Ad(G3.scal(i));
- M RD12 = tcd.Ad(G12.scal(i));
- M RD31 = tcd.Ad(G31.scal(i));
- M RD32 = tcd.Ad(G32.scal(i));
- OG1[i-1].add(RD1);
- OG2[i-1].add(RD2);
- OG3[i-1].add(RD3);
- OG12[i-1].add(RD12);
- OG31[i-1].add(RD31);
- OG32[i-1].add(RD32);
- OG1and12[i-1].add(RD1.plus(RD12));
- OG1and2[i-1].add(RD1.plus(RD2));
- OG1and32[i-1].add(RD1.plus(RD32));
- OG31and2[i-1].add(RD2.plus(RD2));
- OG31and12[i-1].add(RD31.plus(RD12));
- OG3and12[i-1].add(RD3.plus(RD12));
- }
- vol += OG1[i-1].size();
- vol += OG2[i-1].size();
- vol += OG3[i-1].size();
- vol += OG12[i-1].size();
- vol += OG31[i-1].size();
- vol += OG32[i-1].size();
- vol += OG1and12[i-1].size();
- vol += OG1and2[i-1].size();
- vol += OG1and32[i-1].size();
- vol += OG31and2[i-1].size();
- vol += OG31and12[i-1].size();
- vol += OG3and12[i-1].size();
- }
- System.out.println(vol);
- HashSet<M> all = new HashSet<M>();
- for(int i = 1; i < mod; i++){
- Iterator<M>[] MIT = new Iterator[12];
- MIT[0] = OG1[i-1].iterator();
- MIT[1] = OG2[i-1].iterator();
- MIT[2] = OG3[i-1].iterator();
- MIT[3] = OG12[i-1].iterator();
- MIT[4] = OG31[i-1].iterator();
- MIT[5] = OG32[i-1].iterator();
- MIT[6] = OG1and12[i-1].iterator();
- MIT[7] = OG1and2[i-1].iterator();
- MIT[8] = OG1and32[i-1].iterator();
- MIT[9] = OG31and2[i-1].iterator();
- MIT[10] = OG31and12[i-1].iterator();
- MIT[11] = OG3and12[i-1].iterator();
- int ind =1;
- for(int j = 0; j < 12; j++){
- if(ind == 1){
- while (MIT[j].hasNext()) {
- M tjj = MIT[j].next();
- if(all.contains(tjj)) {
- System.out.println("FOUND" + i + " " + j);
- tjj.print();
- ind = 0;
- break;
- }
- else all.add(tjj);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement