For the following pairs of programs, write down the simulation table and prove the equivalence of the programs. You are given the starting condition that the function agruments are equal. In case, you feel the starting condition is not sufficient then please provide a stronger starting condition that can prove the equivalence. 1. int f1(int N) { int i = 0; while(i < N) i++; return i; } int f2(int M) { int j = 0; while(j < M) j++; return j; } a. What if the while condition in f2 is (j != M)? b. What if f2 is int f2(int M) { int j = 1; int ret = 0; while(j < M + 1) { j++; ret++; } return ret; } 2. int f1(int k, int N) { int i = 0; while(i < k) i++; while(i < N) i++; return i; } int f2(int M) { int j = 0; while(j < M) j++; return j; } Assume that 0 < k < N. 3. int f1(int N) { int i = 0; while(i < N-1) i++; i++; return i; } int f2(int M) { int j = 0; while(j < M) j++; return j; } Assume that 0 < N-1 < INT_MAX 4. int f1(int N1, int N2) { int i = 0; if(N1 < N2) { while(i < N1) i += 2; } else { while(i < N2) i++; } return i; } int f2(int N1, int N2) { int i = 0; if(N2 <= N1) { while(i < N2) i++; } else { while(i < N1) i += 2; } return i; } 5. int f1(int x, int n) { int i, k = 0; for (i=0; i!=n; ++i) { x += k*5; k += 1; if (i >= 5) k += 3; } return x; } int f2(int x, int n) { int i, k = 0; for (i=0; i!=n; ++i) { x += k; k += 5; if (i >= 5) k += 15; } return x; } 6. int f1(int N) { int i, sum = 0; goto label2; label1: sum = sum + i*i*i; i++; label2: if(i < N) goto label1; return sum; } int f2(int N) { int i, sum = 0; label1: if(i < N) { sum = sum + i; i++; goto label1; } return sum*sum; }