ITPEC FE Morning April 2023 Question 4
Source exam: ITPEC FE Morning April 2023Topic: Basic Theory & Math
ITPEC FE Morning April 2023 — Question 4 of 80
Probability with Random Functions — calculate P(C = 0) where C = A − B.
Random(10) returns integers 0..9 uniformly. C = A − B = 0 when A == B.
- •Total outcomes:
10 × 10 = 100 - •Favorable outcomes (A = B):
(0,0), (1,1), …, (9,9)→ 10 - •Probability:
10 / 100 = 1/10
Why not others:
- (a) 1/100 — probability of one specific pair, not all matching pairs
- (b) 1/20 — no combinatorial basis
- (d) 1/5 — no combinatorial basis
Key rule: When two independent uniform random variables have the same range of n values, P(A = B) = n / n² = 1/n.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.