what is the correct answer for shifting and scaling this signal? The discrete signal is provided in the following table:

$$\begin{array}{|c|ccccccc|}\hline 
 n&amp; -3 &amp; -2 &amp; -1 &amp; 0 &amp; 1 &amp; 2 &amp; 3\\ \hline
x[n] &amp; 3 &amp;  2 &amp;  1 &amp; 0 &amp; 1 &amp; 2 &amp; 3 \\ \hline
\end{array}$$

The book is asking to determine $x[3n-1]$. This involves shifting by one and then scaling by $3$. My answer to this problem is: 

$$\begin{array}{|c|cc|}\hline 
 3n-1 &amp;    0 &amp; 1\\ \hline
x[3n-1]&amp;  1 &amp; 2 \\ \hline
\end{array}$$

However the answer in the book is:

$$\begin{array}{|c|ccc|}\hline 
 3n-1 &amp;  -1 &amp; 0 &amp; 1\\ \hline
x[3n-1]&amp; 0 &amp; 1 &amp; 2 \\ \hline
\end{array}$$ 

Which answer is correct?
The sequence $x[n]$ is only non-zero in the range $-3\le n\le 3$. So if you change the index to $3n-1$, in order to remain inside that region, $n$ can only take the values $n=0$ (giving $3n-1=-1$), and $n=1$ (giving $3n-1=2$). This gives

$$x[3n-1]=\begin{cases}x[-1]=1,&amp;n=0\\x[2]=2,&amp;n=1\\
0,&amp;\text{otherwise}\end{cases}$$

So if the exercise is as you stated it, then your solution is correct, apart from the fact that it is not $3n-1$ but $n$ that takes the values $0$ and $1$.