GATE 2026 CS (CS2) – Question 64
Consider a function $f:(0,1)\to\{0,1\}$ defined as follows. For a real number $r\in(0,1)$, $f(r)=1$ if the second digit after the decimal point in $r$ is one of the four digits 2, 3, 6, and 7. Otherwise, $f(r)=0$. The number of points in $(0,1)$ at which $f$ is discontinuous is __________. (answer in integer)
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: 40
Explanation
Within each block of numbers having the same first digit after the decimal point, the value of $f$ as the second digit runs from 0 to 9 is $0,0,1,1,0,0,1,1,0,0$. This sequence changes value 4 times: between 1 and 2, 3 and 4, 5 and 6, and 7 and 8. There are 10 choices for the first decimal digit, so the total number of discontinuity points is $10\times4=40$. The boundaries between adjacent first-digit blocks do not create additional discontinuities because the end of one block and the beginning of the next both correspond to value 0. Hence the answer is 40.