Inverse of a summing function
Looks like a convolution. S is the convolution of y with another signal of w+1 consecutive ones. So, S is the result of a moving sum filter. But the moving sum filter completely removes certain frequencies in the signal. For example, if you use w=3 and have the following signal y:

 y: ... 0  1  0 -1  0  1  0 -1  0  1  0  -1 ...


Then S[i] for any i (the moving sum over 4 neighboring samples) will always be zero, no matter how you shift or scale y. And that makes the problem of recovering y from s something between impossible and hard.

In case your data is finite, it is possible to write your equations as a matrix-vector product and solve it with the usual algorithms. You can ask tools like Matlab or GNU Octave about how noisy the inverse would be. This is something you should check for since the problem is ill-conditioned. Your equations, assuming y and s are finite can be written like this:

$$ A \cdot y = s $$

Here, A would contain mostly zeros and w+1 consecutive ones per row, at least for first rows. At the end, you have less ones because y is supposed to be finite. Then, asking for the condition number is a matter of typing

cond(A)


in Matlab or Octave. Example for 6 samples and w=2

octave:1&gt; A = toeplitz([1 0 0 0 0 0],[1 1 1 0 0 0])
A = 

   1   1   1   0   0   0
   0   1   1   1   0   0
   0   0   1   1   1   0
   0   0   0   1   1   1
   0   0   0   0   1   1
   0   0   0   0   0   1

octave:2&gt; cond(A)
ans = 7.9053


Let's actually test it:

octave:3&gt; y = [1 9 3 2 4 3]';
octave:4&gt; s = A*y
s =

   13
   14
    9
    9
    7
    3


And now the inversion:

octave:5&gt; y2 = A\s
y2 =

   1
   9
   3
   2
   4
   3


This inversion is actually easy to implement because the matrix exhibits a triangular structure. You can recover y sample by sample starting at the end and moving to the front.

This example was free of noise. Keep in mind that the condition number tells you how the relative error in s will be amplified (worst case) if you recover y from s. So, for example, if s contains a relative error of 3%, the recovered y may have a relative error as large as 3% * 7.9053 = 23.716%. Unfortunately, the condition number increases with the number of samples in this case. So, if you have to recover not six but 1000 samples and/or your w parameter is large, you're out of luck because the inversion will amplify the noise in s a lot, too.