Question
For , let be a non-zero vector. Suppose that is chosen uniformly at random from . Then, the probability that is an odd number is _______.
Official answer and solution
- Official answer
- 0.5
- From
- Official GATE 2020 answer key
Solution
Condition on one coordinate where a_k = 1 to show the inner product modulo 2 is equally likely to be 0 or 1.
The sum is an integer. It is an odd number if and only if:
Since is a non-zero vector, there exists at least one index such that .
Decompose the sum modulo 2:
Because is chosen uniformly at random from , the coordinate is independent of all other coordinates , with .
Conditioning on any fixed assignment of , the partial sum evaluates to some constant . Then:
By the law of total probability, the unconditional probability is .
0.5
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2020 Computer Science and Information Technology (CS)
- Question
- 55 of 65, printed as CS Q.45
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.