Question:hard

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)\) is equal to 0.

The number of points in \((0,1)\) at which \(f\) is discontinuous is ____________.

Show Hint

The function changes value only where the second decimal digit changes; check each digit transition from 0 through 9 to see which ones cross the boundary of the set {2,3,6,7}.
Updated On: Jul 22, 2026
Show Solution

Correct Answer: 40

Solution and Explanation

Step 1: Pin down what makes $f$ jump.
Only the second decimal digit $d_2$ decides $f(r)$: it is $1$ when $d_2\in\{2,3,6,7\}$ and $0$ otherwise. A jump in $f$ can only happen at a point where $d_2$ changes value, and those change points are exactly the multiples of $0.01$, since each strip $[k/100,(k+1)/100)$ keeps $d_2$ fixed.

Step 2: List which single digit changes in $d_2$ flip $f$'s value.
Go through $d_2=0$ up to $d_2=9$ and mark where the "is it in $\{2,3,6,7\}$" status flips: $0\to1$ no flip, $1\to2$ flip, $2\to3$ no flip, $3\to4$ flip, $4\to5$ no flip, $5\to6$ flip, $6\to7$ no flip, $7\to8$ flip, $8\to9$ no flip, $9\to0$ (wrap into next $d_1$) no flip.
So exactly $4$ of the $10$ possible digit steps flip $f$, namely $1\to2$, $3\to4$, $5\to6$, and $7\to8$.

Step 3: Translate each flip into an actual point in $(0,1)$.
For a fixed first digit $d_1$, these four flips happen where $d_2$ crosses from $1$ to $2$, from $3$ to $4$, from $5$ to $6$, and from $7$ to $8$. In terms of $r$, these boundary points are
\[ r = 0.d_1 2,\quad 0.d_1 4,\quad 0.d_1 6,\quad 0.d_1 8 \]
that is, $r=(10d_1+2)/100$, $(10d_1+4)/100$, $(10d_1+6)/100$, $(10d_1+8)/100$. Each is a genuine discontinuity since $f$ takes one value just to the left and the other value from that point onward.

Step 4: Count how many first digits are possible.
$d_1$ can be any of $0,1,2,\ldots,9$, so there are $10$ possible values of $d_1$.

Step 5: Multiply digits by flips per digit.
Each of the $10$ values of $d_1$ contributes exactly $4$ discontinuity points from Step 3, and no two different values of $d_1$ produce the same point, since the value of $d_1$ fixes the hundredths position of the point. So the total count is
\[ 10 \times 4 = 40 \]

Step 6: Confirm the boundaries between first digits add nothing extra.
At points like $r=0.10, 0.20,\ldots,0.90$, the second digit wraps from $9$ (outside the set) to $0$ (also outside the set), so $f$ stays at $0$ across these points. These are not discontinuities, so they add nothing to the count.

Step 7: State the total.
Adding the $40$ genuine flip points and the $0$ extra points at the decade boundaries gives $40$ points of discontinuity in total.
\[ \boxed{40} \]
Was this answer helpful?
0


Questions Asked in GATE CS exam