Solve the following problem:
A binary communication system transmits the same information on two diversity channels. The two received signals are
r1 = ±√εb+ n1
r2 = ±√εb+ n2
where E(n1) = E(n2) = 0, E(n21) = σ21 and E(n22) = σ22
And n1 and n2 are uncorrelated Gaussian variables. The detector bases its decision on the linear combination of r1 and r2, i.e., r = r1 + kr2
a. Determine the value of k that minimizes the probability of error.
b. Plot the probability of error for σ21 = 1, σ22 = 3, and either k = 1 or k is the optimum value found in (a). Compare the results.