Question 2: Consider the problem of adding two $n$-bit binary integers, stored in two
$n$-element arrays A and B. The sum of the two integers should be stored in binary form in
an $(n+1)$-element array C.
Ex: Let $n = 5$, A = (1,0,1,1,0) and B = (0,1,1,0,1). Then the sum of A and B is
C= (1,0,0,0,1,1) having size $n+1 = 6$.
1. State the computational problem formally.
2. Let Sum Binary be an algorithm that solves the problem, i.e., adds the two binary
integers. Write the pseudocode of the Sum Binary algorithm.
3. Is Sum Binary an efficient algorithm? Discuss in detail.
4. Write the Python code on PyCharm of Sum Binary algorithm. Randomly generate
the input data, calculate the computational time of the algorithm.
5. Report the console outputs for $n = 100, 500, 1000$. Plot the computational time vs the
input size $n$. Comment on the results.
6. Report your Python code scripts.