Skip to content
DeepForgeby svx
All problems
HardInformation Theoryinfo-192

Noise Figure Cascade

Problem

Return the total noise factor of a receive chain using the Friis formula, all in linear units:

F = F1 + (F2 - 1) / G1 + (F3 - 1) / (G1 * G2) + ...

factors[i] are the linear noise factors of the stages and gains[i] the linear gain of stage i (so gains[i - 1] precedes factors[i]).

Hint

Later stages matter less because earlier gain suppresses their contribution.

Test cases

case 1
in: [[2,3],[10]]
expected: 2.2
case 2
in: [[1.5,2],[4]]
expected: 1.75
case 3
in: [[2,3,4],[10,5]]
expected: 2.2600000000000002
case 4
in: [[1,5],[2]]
expected: 3
Starter codePython
def noise_figure_cascade(factors, gains):
    # Your code here
    pass

4 test cases · run your code against them in the editor