(* Fouriertransformation *)

a={-1,2,3,0,0}

{-1, 2, 3, 0, 0}

b={1,1,1,0,0}

{1, 1, 1, 0, 0}

(* beliebige Matrix *)
f={    {1,0,0,0,0},
    {1,1,1,1,1},
    {1,2,4,8,16},
    {1,-1,1,-1,1},
    {1,3,9,27,81}}

{{1, 0, 0, 0, 0}, {1, 1, 1, 1, 1}, {1, 2, 4, 8, 16}, 
 
  {1, -1, 1, -1, 1}, {1, 3, 9, 27, 81}}

f //MatrixForm

1    0    0    0    0

1    1    1    1    1

1    2    4    8    16

1    -1   1    -1   1

1    3    9    27   81

f.a  (* Anwendung auf a *)

{-1, 4, 15, 0, 32}

f.b  (* Anwendung auf b *)

{1, 3, 7, 1, 13}

(f.a)*(f.b)   (* komponentenweise Multiplikation *)

{-1, 12, 105, 0, 416}

fInv=Inverse[f]   (* Berechnung der Inversen von f *)

                     5   3    1     1   1
{{1, 0, 0, 0, 0}, {-(-), -, -(-), -(-), --}, 
                     6   2    2     4   12
 
     5   1  1  11    1      5      1    1     1
  {-(-), -, -, --, -(--)}, {-, -1, -, -(-), -(--)}, 
     6   4  6  24    24     6      2    4     12
 
     1   1    1   1   1
  {-(-), -, -(-), --, --}}
     6   4    6   24  24

fInv // MatrixForm


1       0       0       0       0

  5     3         1       1     1
-(-)    -       -(-)    -(-)    --
  6     2         2       4     12

  5     1       1       11        1
-(-)    -       -       --      -(--)
  6     4       6       24        24

5               1         1       1
-               -       -(-)    -(--)
6       -1      2         4       12

  1     1         1     1       1
-(-)    -       -(-)    --      --
  6     4         6     24      24

Transpose[(f.a)*(f.b)]

{-1, 12, 105, 0, 416}

fInv.(Transpose[(f.a)*(f.b)]) (* Konvolution *)

{-1, 1, 4, 5, 3}

(* direkte Berechnung der Konvolution *)
Expand[(-1+2x+3x^2)*(1+x+x^2)]

            2      3      4
-1 + x + 4 x  + 5 x  + 3 x


(* Division *)

p=x^8+2x^7-2x^6+x^5+3x^4-x^3+3x^2+x-1

            2    3      4    5      6      7    8
-1 + x + 3 x  - x  + 3 x  + x  - 2 x  + 2 x  + x

r1=PolynomialRemainder[p,(x-0)(x-1)(x-2)(x-3),x]

                    2         3
-1 + 2641 x - 4063 x  + 1430 x

r2=PolynomialRemainder[p,(x-4)(x-5)(x-6)(x-7),x]

                                  2           3
-33479041 + 22087449 x - 4888375 x  + 366174 x

r11=PolynomialRemainder[r1,(x-0)(x-1),x]

-1 + 8 x

r12=PolynomialRemainder[r1,(x-2)(x-3),x]

-18523 + 9496 x

r21=PolynomialRemainder[r2,(x-4)(x-5),x]

-1622861 + 428688 x

r22=PolynomialRemainder[r2,(x-6)(x-7),x]

-28098295 + 5042672 x

r111=PolynomialRemainder[r11,(x-0),x]

-1

r112=PolynomialRemainder[r11,(x-1),x]

7

r121=PolynomialRemainder[r12,(x-2),x]

469

r122=PolynomialRemainder[r12,(x-3),x]

9965

r211=PolynomialRemainder[r21,(x-4),x]

91891

r212=PolynomialRemainder[r21,(x-5),x]

520579

r221=PolynomialRemainder[r22,(x-6),x]

2157737

r222=PolynomialRemainder[r22,(x-7),x]

7200409

p /. {x->0}

-1

p /. {x->1}

7

p /. {x->2}

469

p /. {x->3}

9965

p /. {x->4}

91891

p /. {x->5}

520579

p /. {x->6}

2157737

p /. {x->7}

7200409



(* Primitive Einheitswurzeln *)

w[i_,n_]:=E^(I 2 Pi i / n)

w[1,8]

 I/4 Pi
E

Simplify[(x-w[0,8])(x-w[4,8])(x-w[2,8])(x-w[6,8])]

      4
-1 + x

Simplify[(x-w[1,8])(x-w[5,8])(x-w[3,8])(x-w[7,8])]

     4
1 + x

Simplify[(x-w[0,8])(x-w[4,8])]

      2
-1 + x

Simplify[(x-w[2,8])(x-w[6,8])]

     2
1 + x

Simplify[(x-w[1,8])(x-w[5,8])]

      2
-I + x

Simplify[(x-w[3,8])(x-w[7,8])]

     2
I + x



(* Bit Operationen *)

a0=0

0

a1=1

1

a2=2

2

a3=3

3

b0=Mod[a0+a2,5]

2

b1=Mod[a1+a3,5]

4

b2=Mod[a0+4a2,5]

3

b3=Mod[a1+4a3,5]

3

c0=Mod[b0+b1,5]

1

c1=Mod[b0+4*b1,5]

3

c2=Mod[b2+2*b3,5]

4

c3=Mod[b2+8*b3,5]

2

c0=Mod[b0+b1,5]

1

c1=Mod[b0+4*b1,5]

3

c2=Mod[b2+2*b3,5]

4

c3=Mod[b2+8*b3,5]

2


Converted by Mathematica  (July 7, 2003)