Step 1: Signal Definition and Index Mapping
The sequence \( y[n] = u[n] - u[n-4] \) evaluates to a rectangular window pulse. It turns on at index 0 and is cancelled out (turns off) at index 4.
It is exactly 1 at indices \( n=0, 1, 2, 3 \), and 0 everywhere else. Let's write the array: \( y[n] = \{1, 1, 1, 1\} \) starting at \(n=0\).
The time-reversed sequence \( y[-n] \) is the mirror image across the y-axis. It is exactly 1 at indices \( n=0, -1, -2, -3 \), and 0 everywhere else.
Step 2: Even Part \( y_e[n] = (y[n]+y[-n])/2 \)
We calculate this formula point-by-point along the integer timeline:
At \( n=0 \): Both sequences evaluate to 1. Therefore, \( (1+1)/2 = 1 \).
At positive indices \( n=1, 2, 3 \): Only the right-sided \( y[n] \) equals 1. Therefore, \( (1+0)/2 = 0.5 \).
At negative indices \( n=-1, -2, -3 \): Only the left-sided \( y[-n] \) equals 1. Therefore, \( (0+1)/2 = 0.5 \).
Everywhere else outside this range: \( (0+0)/2 = 0 \).
Step 3: Odd Part \( y_o[n] = (y[n]-y[-n])/2 \)
Calculate point-by-point:
At \( n=0 \): Both sequences equal 1. \( (1-1)/2 = 0 \) (Note: Odd signals mathematically MUST always evaluate to zero at the origin).
At positive indices \( n=1, 2, 3 \): Only \( y[n] \) equals 1. \( (1-0)/2 = 0.5 \).
At negative indices \( n=-1, -2, -3 \): Only \( y[-n] \) equals 1. \( (0-1)/2 = -0.5 \).
Everywhere else outside this range: 0.
Final Arrays:
\( y_e[n] \) has values \( \{0.5, 0.5, 0.5, \mathbf{1}, 0.5, 0.5, 0.5\} \) from \( n=-3 \) to \( 3 \).
\( y_o[n] \) has values \( \{-0.5, -0.5, -0.5, \mathbf{0}, 0.5, 0.5, 0.5\} \) from \( n=-3 \) to \( 3 \).