//Generates random K-regular graphs on N vertices. //Generates N_ITER1 random lifts of each base graph. //Prints lambda_1 of each lift. #include #include #include "defs.h" int main() { base_graph G; /* store base graph here */ lift_graph H; /* store lifted graph here */ /* some pre-built graphs */ //base_graph G = {{1,2,3,4,5,6,7}, {0,2,3,4,5,6,7}, {0,1,3,4,5,6,7}, {0,1,2,4,5,6,7}, {0,1,2,3,5,6,7}, {0,1,2,3,4,6,7}, {0,1,2,3,4,5,7}, {0,1,2,3,4,5,6}}; /* K_8 */ //base_graph G = {{0,4,5}, {0,6,2}, {1,3,7}, {2,4,8}, {0,3,9}, {0,7,8}, {1,8,9}, {2,5,9}, {3,5,6}, {4,6,7}}; /*Petersen graph*/ index i, j; index iter, iter1; real gap_base, gap_lift; real Ram = 2*sqrt(K-1); /* Ramanujan bound */ //printf("Ram is: %g\n", Ram); ran0_init(); for (iter=0; iter= u){ /* lift each edge once */ random_permutation (sigma); j = D[u]; k = D[v]; for(l=0; l