    

```Periodic Array
The fundamental equations are
M / 2 1

m  M / 2
W  n  m  X  m  R  n  M / 2  n  M / 2
(1)
 M / 2  n  M / 2 1
W  n 

Wp  n    W  n  M 
n  M / 2 (2)
 W n  M 
n  M / 2

Sample set of numbers
Suppose I have a set of numbers
{-2,-1,0,1} M/2=2 M=4, There are W's for -4 to 3, assume that these are
{-3,-2,-1,0, 1,2,3} The total set of m-n arguments for the range -M/2m,n&lt;M/2
{ 1, 2, 3,100,5,4,2} The total set of W's
{ 5, 2, 3,100,5,2,3} The set of Wp's
M / 2 1

m  M / 2
Wp  n  m  X  m 
M / 2 1
 W  n  m   W  n  m   X m  R n 
p
m  M / 2
 M / 2  n  M / 2 (3)
Multiply by Wp-1(k-n) and sum on n
M / 2 1
M / 2 1
 
m  M / 2 n  M / 2
Wp1  k  n Wp  n  m X  m 
M / 2 1

m  M / 2
M / 2 1

n  M / 2
X m
M / 2 1

n  M / 2
W p1  k  n  W  n  m   W p  n  m   
(4)
Wp1  k  n  R  n  M / 2  n  M / 2
Define
X p k  
M / 2 1

n  M / 2
W p1  k  n  R  n 
(5)
To find
X k  
M / 2 1

m  M / 2
X  m
M / 2 1

n  M / 2
W p1  k  n  W  n  m   W p  n  m    X p  k 
(6)
The inner paren is not of the type that can be evaluated by convolution, owing to the fact that it is not periodic.
for\CodeFrag.for. The arguments of the array W(n-m)-Wp(n-m) using the example set above become
2, 2 2, 1 2,0 2,1
 1, 2 1, 1 1,0 1,1

n
,
m

  

 0, 2 0, 1 0,0 0,1 
 1, 2
1, 1 1,0
0,1 
(7)
0 1 2 3
1 0 1 2 

n  m  

2 1 0 1
3 2 1 0 
The values of W and Wp are the same except for the terms with 2, -3 and 3, which from the example set are seen to be W(-3)=1, Wp(3) =5 and W(3) = 2, Wp(3) = 3 so that the array becomes
0
0

W

W



p
2
1
0 0 4 
0 0 0 
 (8)
0 0 0
2 0 0 
The inverse of Wp
W p1  n  
 0, n
Wp  0 

h n
Wp  0 
h  1 h  2  h 1 
 1

 (9)
1
h  1 h  2  
1  h 1



1
h  1 
W p  0   h  2  h 1
h  1 h  2 
h 1
1 

So that the last sum in (6) becomes
M / 2 1

n  M / 2
W p1  k  n  W  n  m   W p  n  m  
h  1
 1

1
1  h 1


W p  0  h  2  h 1
 h  1 h  2 

 2h(2)  h(1)

1 2h  1  h  2 


W p  0   2  h  1
 2h 1  1

h  2  h 1   0

h  1 h  2    0

1
h  1   2
h 1
1  1
2h 1
2h  2 
2h  1
2
0
0
0
2
0 4 
0 0 
 (10)
0 0
0 0 
0
4 

0 4h 1 

0 4h  2  
0 4h  1 
Equation (6) for X, in this case is
0
0
4
 h 1  W p  0 
  X 2   X p  2 



 
Wp  0 
0
4h 1
1   h  2 
 X 1   X p 1 



 
 (11)
X
0
Wp  0 
4h  2 
X
W p  0    h  1
p
0
0

 






X

1
0
0

4
h

1

W
0
X




p

  1   p1 
Dropping terms of order h/Wp(0), the equations to solve for X are of the form
1







L



2
 1
L
1
1
1
1
1
L
L
2
L
2
1   X 1   X p1 


L
2   X 2   X p 2 

 

L




 L   X L   X pL 

 



 (12)
 X
 X

 M  L   p , M  L 
1

 

 X
 X

1
 M 1   p , M 1 
1 
 X M   X p , M 
Start with the L'th equation and subtract from each to remove the L'th term. The final equation involves X1 and the
subtractions of all but the last term. This is an equation of the form
X1+F(XM-L,XM)=G(XM-L,XM). Start from the M-L term and remove from M'th term. This is an equation of the form
XM+F(X1,XL)=G(X1,XL)
for\codefrag2.for for\tgaussj\gauselim.wpj
The final two equations will involve XM and X1. Solve these. The two above these involve XM-1 and X2 etc. An array of 2L
x 2L terms is needed
Arr(2L,2L), Fill this array.
For m&lt;0 the extra columns begin at -M/2-m and extend to M/2-1. For m&gt;0 the terms start at -M/2 and extend to -MC/2+m-1
To a good approximation Wp-1(k-n) = n,k/W(0) so that
X k  
M / 2 1

W  k  m   W  k  m   X
p
W  0
m  M / 2
 m  X p  k 
(13)
Iteration
X it  k   X p  k  
M / 2 1
M / 2 1
 
m  M / 2 n  M / 2
Wp1  k  n  W  n  m   W p  n  m  X it 1  m 
(14)
For each value of m, the terms in the sum are different. The sum over W p is a convolution, but not the sum over W.
For Wp-1(k-n)=k,n/W(0)
X it  k   X p  k  
1 M / 2 1
 W  k  m   Wp  k  m   X it 1 m
W  0  m  M / 2
(15)
Note that for -M/2k-m&lt;M/2 that the term in parenthesis is zero. Or
M/2+k  m &gt; -M/2+k. The sum is not zero for m-M/2+k and for m &gt;M/2+k
 k M / 2

W  k  m   W p  k  m   X it 1  m 




1  m  M / 2

X it  k   X p  k  
 M / 2 1
 (16)
W  0 

W  k  m   Wp  k  m   X it 1  m
 m  M
/ 2  k 1

1
1
Wk , n 
 Wn , m  W1,2
W1,2
  S k .m S1.2


 
1
S 2,1
 W2,1
  W2,1



 





 


 


 








For k=-M/2, the first term is from -M/2 to -M or zero. The second term is from m=1 to M/2-1. For k=M/2-1, the first term is from M/2 to -1, and the second term is zero. There is a sum of ~ M/4 terms for each k, so that the time requires is M 2/4. To evaluate for the
L terms in each corner requires 2*L*L/2 or L2 operations.
X 2 k   X p k   
X 3 k   X p k   

1
1
M / 2 1
 W  k  m   W  k  m   X m
W  0  m  M / 2
1
p
p
M / 2 1
 W  k  m   W  k  m   X m
W  0  m  M / 2
p
M / 2 1
(17)
p
M / 2 1
 W  k  m   W  k  m    W  k  m '  W  k  m '  X m
W 2  0  m  M / 2
p
m '  M / 2
p
p
This converges as 1/W[0], 1/(W[0])2 etc. The convergence works as long as the W difference is &lt; W(0) which in our case is almost a
given.
```