GATE / CS ARCHIVE

GATE CSE 2005 / QUESTION 52

Probability that random strings differ

Discrete Mathematics · Probability & Random Variables · Full GATE CSE 2005 paper

GATE 2005, Q52 2 marks · MCQ
Report issue

Probability & Random Variables

Question 52, GATE 2005: Construct each of two n-bit binary strings using fair coin tosses. Assuming independent tosses for both strings, probability the strings differ? A2^(−n); B1−1/n; C1/n!; D1−2^(−n).
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Assuming the two constructions use independent fair tosses, each bit of the second string matches the corresponding first bit with probability 1/2. The full strings match with probability 2−n, so they differ with probability 1−2−n, option D.

Condition on any fixed first string. Each independent second-string bit matches with probability 1/2, and all n positions match with probability(1/2)n. The event “different strings” means at least one mismatch, the complement of matching in every position, not mismatching in every position. Therefore the requested probability is 1−2−n. Correlation between the two constructions would invalidate this calculation, hence independence is explicit.

Original paper, page 6