The input signal consists of three parts: 1s, 2s, and 3s, with lengths of 8, 8, and 8 samples, respectively. The filter has three taps: \(2, -1, -1\).
For each tap, we perform a convolution operation. The number of non-zero output samples corresponds to the number of valid outputs after the convolution with the filter. Since the input signal has 24 samples (8 for each part), and the filter has 3 taps, the total number of non-zero output samples is:
\[
\text{Non-zero output samples} = \text{Length of input signal} - (\text{Length of filter} - 1) = 24 - (3 - 1) = 22
\]
Thus, the number of non-zero output samples is \( 22 \).