GATE 2026 CS (CS1) – Question 8
For positive real numbers $S$ and $K$, the function $H_K(S)$ is defined as $H_K(S) = \max(S - K, 0)$. The graph below shows the plot of a function $N(S)$ versus $S$, where $N(S) = 0$ for $S \le 10$, increases with slope 1 for $10 < S \le 20$, and remains constant at 10 for $S > 20$. $N(S)$ can be expressed as _____.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) $H_{10}(S) - H_{20}(S)$
Explanation
Recall the definition: $H_K(S) = \max(S - K, 0)$.
- For $S \le 10$:
$H_{10}(S) = 0$, $H_{20}(S) = 0 \implies H_{10}(S) - H_{20}(S) = 0$.
- For $10 < S \le 20$:
$H_{10}(S) = S - 10$, $H_{20}(S) = 0 \implies H_{10}(S) - H_{20}(S) = S - 10$.
This is a line with slope 1 starting at $(10, 0)$ and reaching value $20 - 10 = 10$ at $S = 20$.
- For $S > 20$:
$H_{10}(S) = S - 10$, $H_{20}(S) = S - 20 \implies H_{10}(S) - H_{20}(S) = (S - 10) - (S - 20) = 10$.
The slope becomes 0 and the function stays flat at 10.
This perfectly matches the function $N(S)$ depicted in the plot. Therefore, option (A) is correct.