Week 7: Wednesday ----------------- Q1. (35) Goldbach, a mathematician, conjectured that every even integer greater than 2 is a sum of two primes. Write a program to verify the conjecture till the number 50. That is, for every even number greater than 2 up to 50, either express it as a sum of two prime numbers, or show that it cannot be expressed as such a sum. (You may use an array to store all primes. You may also use a function to express a number as sum of two other numbers. You can do it in your own way as well.) Q2. (65) Consider a 8x8 matrix. Initially each entry of the matrix is coloured black or white. Next, the matrix is divided into 4 equal square matrices (of size 4x4). The colour of all entries of the 1st (i.e., top-left) and the 4th (i.e., bottom-right) matrices are flipped while those of the other two remain as is. This process is repeated recursively for all the 4 sub-matrices, where each one of them is again divided into 4 sub-matrices, of which the colours of the 1st and 4th are flipped, and so on. The process is continued till it cannot be broken into any sub-matrix, i.e., when the matrix is of size 1x1. Write a program to implement it. Assume that all the entries of the 8x8 matrix are black to start with. Print the final configuration. (Use 0 to signify black, and 1 to signify white.)