//ALGORITHM 6 //p_1 is period 1, p_2 is period 2 in no. of iterations float** filterMARP(int** A, float* x, float e, int max_iterations, float a, int p_1, int p_2, int size){ float* x_new, x_c, y; int count = 0; float norm = 1.0; int* N, C, N_new, C_new; int** Ann, Acn; int i; /*********** ...malloc... *************/ x_new = malloc(size*sizeof(float)); x_c = malloc(size*sizeof(float)); y = malloc(size*sizeof(float)); N = malloc(size*sizeof(int)); C = malloc(size*sizeof(int)); N_new = malloc(size*sizeof(int)); C_new = malloc(size*sizeof(int)); Ann = malloc(size*sizeof(int *)); for(i=0; i #include void main(){ printf("Hello I am maria \n"); //Read from file of adjacency matrix FILE *adjm; int x; adjm = fopen("adj_matrix.txt", "r+"); if(!adjm){ printf("Error opening file \n"); exit(0); } //Read dimensions of file (square) int m, count=0; while((m=fgetc(adjm))) { // break if end of file if(m == EOF) break; // otherwise add one to the count of that particular character if(m=='\n'){ count+=1; } } printf("Line count of matrix is %d \n", count); int d = count; int i,j; // Put values in matrix A int** A = malloc(d*sizeof(int *)); for( i=0; i