import java.io.*; public class Free { public static void main(String args[]) throws NumberFormatException /* This starts the creation of the free modular lattice on n generators. The generators are a, b, c, etc. The first automorphism exchanges a and b, the second excahanges a and c, etc. */ { int [] inverse; ModLattice m; Element [] e; int n; char next = 'a'; n = Integer.parseInt(getLine("Enter n: ")); inverse = new int[n - 1]; for (int i = 0; i < n - 1; i++) inverse[i] = i; m = new SelfDualModLattice(40, inverse); e = new Element[n]; for (int i = 0; i < n; i++) e[i] = new Element(m, next++); for (int i = 0; i < n; i++) e[i].dual = e[i]; for (int i = 0; i < n - 1; i++) for (int j = 0; j < n; j++) if (j == 0) e[j].conjugates[i] = e[i + 1]; else if (j == i + 1) e[j].conjugates[i] = e[0]; else e[j].conjugates[i] = e[j]; Driver.start(m); } //main private static String getLine (String prompt) { System.out.print (prompt); String result = new String(); System.out.flush(); try { BufferedReader in = new BufferedReader (new InputStreamReader(System.in)); result = in.readLine(); }catch (IOException ex) { System.err.println("An IOException ocurred: "); } return result; } }