Algorithm 1 Computation of Krawtchouk polynomials using the proposed algorithm. |
Input:
|
N represents the size of the Krawtchouk polynomial, |
p represents the parameter of the Krawtchouk polynomials. |
Output:
|
1: =False
|
|
2: if
then
|
|
3: =True;
|
|
4: end if
|
|
5: ,
|
|
6: Compute using (10) |
|
7: Compute using (12) |
|
8: Compute and using (16) and (17) |
|
9: |
▹ Compute initial set |
10: for
do
|
|
11: for do
|
|
12: Compute using (18) |
|
13: end for
|
|
14: end for
|
|
15: |
▹ Compute coefficient values in Part 1 |
16: for
do
|
|
17: for do▹ inner loop |
|
18: Compute using (19) |
|
19: if then
|
|
20: Exit inner loop |
|
21: end if
|
|
22: end for
|
|
23: end for
|
24: |
▹ Compute coefficient values in Part 2-1 |
25: for
do
|
|
26: for do
|
▹ inner loop |
27: Compute using (21) |
|
28: if then
|
|
29: Exit inner loop |
|
30: end if
|
|
31: end for
|
|
32: end for
|
|
33: |
▹ Compute coefficient values in Part 2-2 |
34: for
do
|
|
35:
|
|
36: Compute using (23) |
|
37: end for
|
|
38: for
do
|
|
39:
|
|
40: Compute using (26) |
|
41: end for
|
|
42: |
▹ Compute coefficient values in Part 2-3 |
43: for
do
|
|
44: for do
|
▹ inner loop |
45: Compute using (21) |
|
46: if then
|
|
47: Exit inner loop |
|
48: end if
|
|
49: end for
|
|
50: end for
|
|
51: Compute the rest of the coefficients using the similarity relations (28) and (29) |
|
52: if
=True then
|
|
53: Apply (30) |
|
54: end if
|
|