Question:

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
collegedunia
Verified By Collegedunia

Correct Answer: 40

Solution and Explanation

Step 1: Understand what the function depends on.
For a real number \(r \in (0,1)\), write its decimal expansion as
\[ r = 0.d_1d_2d_3d_4\ldots \]
where \(d_1\) is the first digit after the decimal point, \(d_2\) is the second digit, and so on, using the terminating decimal representation where one exists rather than the representation ending in an infinite string of nines.
The function is defined as
\[ f(r) = 1 \text{ if } d_2 \in \{2,3,6,7\}, \quad f(r) = 0 \text{ otherwise} \]
So \(f\) depends only on \(d_2\), the second digit, and on nothing else in \(r\).

Step 2: Split \((0,1)\) into 100 equal subintervals of length 0.01.
For every pair of digits \((d_1, d_2)\) with \(d_1, d_2 \in \{0,1,\ldots,9\}\), define
\[ k = 10d_1 + d_2, \qquad k = 0, 1, \ldots, 99 \]
and the corresponding subinterval
\[ I_k = \left[\frac{k}{100}, \frac{k+1}{100}\right) \]
Every \(r\) with second digit \(d_2\) lies in exactly one such \(I_k\), and \(f\) is constant on the whole of \(I_k\), because \(f\) only cares about \(d_2 = k \bmod 10\).

Step 3: Write out the value of \(f\) as a function of the last digit of \(k\).
Let \(v(d)\) be the common value of \(f\) on any interval \(I_k\) with \(k \bmod 10 = d\). From the definition,
\[ v(0)=0,\ v(1)=0,\ v(2)=1,\ v(3)=1,\ v(4)=0,\ v(5)=0,\ v(6)=1,\ v(7)=1,\ v(8)=0,\ v(9)=0 \]
So as \(k\) runs from \(0\) to \(9\), \(v\) follows the repeating block pattern \(0,0,1,1,0,0,1,1,0,0\), and this block repeats for each of the ten values of \(d_1\).

Step 4: Locate the only points where \(f\) can be discontinuous.
On the open interior of any \(I_k\), \(f\) is constant, so it is continuous there. The only candidates for discontinuity are the 99 boundary points between consecutive subintervals, namely
\[ r = \frac{1}{100}, \frac{2}{100}, \ldots, \frac{99}{100} \]
At the boundary point \(r = \frac{k+1}{100}\) (for \(k = 0,\ldots,98\)), the left hand limit of \(f\) as \(r\) approaches from below equals \(v(k \bmod 10)\), the value on \(I_k\), while \(f\) at the point itself, and the right hand limit, equal \(v((k+1) \bmod 10)\), the value on \(I_{k+1}\), since \(I_{k+1}\) is closed on the left. \(f\) is discontinuous at this point exactly when these two values differ.

Step 5: Count discontinuities that occur strictly inside a block of ten (same \(d_1\)).
Within a fixed \(d_1\), as \(d_2\) increases from \(0\) to \(9\), compare consecutive values of \(v\): \(0\to0\) same, \(0\to1\) different, \(1\to1\) same, \(1\to0\) different, \(0\to0\) same, \(0\to1\) different, \(1\to1\) same, \(1\to0\) different, \(0\to0\) same.
So there are exactly \(4\) discontinuities inside every block of ten consecutive values of \(k\) sharing the same \(d_1\). Since there are \(10\) choices of \(d_1\), this contributes
\[ 4 \times 10 = 40 \]
discontinuities.

Step 6: Check the discontinuities at the boundaries between blocks (where \(d_1\) changes).
When \(d_2\) rolls over from \(9\) back to \(0\) as \(d_1\) increases by one, compare
\[ v(9) = 0 \quad \text{and} \quad v(0) = 0 \]
These are equal, so there is no discontinuity at any of these 9 block to block boundary points (occurring at \(r = 0.10, 0.20, \ldots, 0.90\)).

Step 7: Add up all discontinuities.
\[ \text{Total discontinuities} = 40 \text{ (inside blocks)} + 0 \text{ (between blocks)} = 40 \]

Step 8: Final Answer.
The number of points in \((0,1)\) at which \(f\) is discontinuous is 40.
\[ \boxed{40} \]
Was this answer helpful?
0
0

Top GATE CS Engineering Mathematics Questions

View More Questions