* Exercise #1: Question #1: The main process creates a first child at line 16, and then a second child at line 20. All these processes have then a value of the count variable that's equal to 1, so no more processes are created. So the answer is: 2 processes. Question #2: The main process creates 2 children during the first iteration. At the end of this iteration each process has the following count values: - main process: count = 1 (integer division 3/2 = 1) - first child: count = 2 (subtraction 3-1 = 2) - second child: count = 2 (subtraction 3-1 = 2) Therefore, the main process exists and both children do another iteration of the loop since in their address space count = 2. Each of them will create 2 processes (see Question #1). Answer: 2 + 2*2 = 6 processes Question #3: T(0) = 0 T(1) = 0 T(2) = 2 T(3) = 6 T(n) = 2 + 2*T(n-1) + T(floor(n/2)) At the first iteration, 2 children are created (the first term above). Then we have 3 processes. 2 of them re-do the same thing with n-1, and 1 re-does the same thing with floor(n/2). Question #4: No need to solve the induction. Instead, we can write a small program to compute the values. For instance, in python: #!/usr/bin/python3 def f(x): if (x <= 1): return 0 elif (x == 2): return 2 elif (x == 3): return 6 else: return 2 + 2 * f(x-1) + f(x // 2) for n in range(0,30): count = f(n) print(f"T({n}) = {count}") if count > 10000: print(f"Answer: {n}") break Which gives use the answer: 13 (T(12) = 6118, T(13) = 12318) * Exercise #2: q1: 40 q2: 60 q3: 23 q4: 23 q5: 50 q6: 20 q7: 200 q8: 23 q9: 89, 200, 23