Implementation of Markov chains over Galois fields

13
Discrete Math. Appl., Vol. 14, No. 3, pp. 273–285 (2004) © VSP 2004. Implementation of Markov chains over Galois fields SH. R. NURUTDINOV Abstract — The automaton implementation of a determinate function is a probabilistic automaton A 1 = ( S, Y, P s , λ(s )), where S is the Markov chain state set, P s is an m 1 × m 1 stochastic matrix, Y is the output alphabet of cardinality m 2 m 1 . The automaton implementation of a probabilistic function is a probabilistic automaton A 2 = ( S, Y, P s , P y ), where S, Y , P s are of the same sense as in A 1 , while P y is a stochastic m 1 × m 2 matrix. In this paper, we solve the problem of synthesis of generators of finite homogeneous Markov chains on the base of the analytical apparatus of polynomial functions over a Galois field. We suggest a method to calculate the coefficients of a polynomial in several variables which implements any mapping of the Galois field into itself. We study the case of implementing a finite automaton by a homogeneous computing structure defined over a Galois field; automaton mappings are implemented as polynomial functions over the Galois field. As the base polynomials, we use polynomial functions over the Galois field f 1 (x , s ) = r i, j =0 a ij x j s i , f 2 (s ) = r i =0 b i s i , where r = 2 n 1, x , s, b i , a ij GF(2 n ). We give expressions of an automaton A 1 in the framework of a polynomial model over the field GF(2 n ) of the form M 1 = ( ˆ µ 1 , f 1 (x , s ), f 2 (s )), where ˆ µ 1 is the discrete random variable which takes values µ GF(2 n ) determined by some probability vector ¯ P = ( p 1 ,... , p k 1 ) such that P s = k 1 i =1 p i B i , where B i are stochastic Boolean matrices and k 1 m 2 1 m 1 + 1, and of an automaton M 2 = ( ˆ µ 1 , f 1 (x , s ), f 2 (s ), ˆ µ , f 3 (x , s )), where ˆ µ 1 is a discrete random variable which takes val- ues µ GF(2 n ) determined by some probability vector ˆ P = ( p 1 ,..., p k 2 ) such that P y = k 2 i =1 p i B i , where B i are stochastic Boolean matrices and k 2 m 1 2 m 1 + 1. The problem of representation of a discrete random variable over the field GF(2 n ) has been solved earlier. This research was supported by the Russian Foundation for Basic Research, grant 99–01–00163. Originally published in Diskretnaya Matematika (2004) 16, No. 2, 136–147 (in Russian). Received April 10, 2002.

Transcript of Implementation of Markov chains over Galois fields

Page 1: Implementation of Markov chains over Galois fields

Discrete Math. Appl., Vol. 14, No. 3, pp. 273–285 (2004)© VSP 2004.

Implementation of Markov chains over Galoisfields

SH. R. NURUTDINOV

Abstract — The automaton implementation of a determinate function is a probabilistic automatonA1 = (S, Y, Ps , λ(s)), where S is the Markov chain state set, Ps is an m1 × m1 stochastic matrix,Y is the output alphabet of cardinality m2 ≤ m1. The automaton implementation of a probabilisticfunction is a probabilistic automaton A2 = (S,Y, Ps , Py), where S, Y , Ps are of the same sense as inA1, while Py is a stochastic m1 × m2 matrix.

In this paper, we solve the problem of synthesis of generators of finite homogeneous Markovchains on the base of the analytical apparatus of polynomial functions over a Galois field. We suggesta method to calculate the coefficients of a polynomial in several variables which implements anymapping of the Galois field into itself. We study the case of implementing a finite automaton by ahomogeneous computing structure defined over a Galois field; automaton mappings are implementedas polynomial functions over the Galois field.

As the base polynomials, we use polynomial functions over the Galois field

f1(x, s) =r∑

i, j=0

ai j x j si , f2(s) =r∑

i=0

bi si ,

where r = 2n − 1, x, s, bi , ai j ∈ GF(2n).We give expressions of an automaton A1 in the framework of a polynomial model over the field

GF(2n) of the form M1 = (µ̂1, f1(x, s), f2(s)), where µ̂1 is the discrete random variable whichtakes values µ ∈ GF(2n) determined by some probability vector P̄ = (p1, . . . , pk1 ) such that

Ps =k1∑

i=1

pi Bi ,

where Bi are stochastic Boolean matrices and k1 ≥ m21 − m1 + 1, and of an automaton

M2 = (µ̂1, f1(x, s), f2(s), µ̂′, f3(x′, s)), where µ̂′

1 is a discrete random variable which takes val-

ues µ′ ∈ GF(2n) determined by some probability vector P̂ = (p1, . . . , pk2 ) such that

Py =k2∑

i=1

pi Bi ,

where Bi are stochastic Boolean matrices and k2 ≥ m12 − m1 + 1. The problem of representation of

a discrete random variable over the field GF(2n) has been solved earlier.This research was supported by the Russian Foundation for Basic Research, grant 99–01–00163.

Originally published in Diskretnaya Matematika (2004) 16, No. 2, 136–147 (in Russian).Received April 10, 2002.

Page 2: Implementation of Markov chains over Galois fields

274 Sh. R. Nurutdinov

1. INTRODUCTION

Markov chains belong to the class of random processes which have found a widespreadapplication. In this connection, the problem of generation of Markov sequences receives thebulk of attention. Primary questions that concern synthesising generators of Markov chainsare answered in a series of studies (see, e.g., [1, 2]) on the base of automaton-theoreticalideas.

Over Galois fields, stream processing of n-dimensional binary vectors is realised quiteefficiently. This opens up fresh opportunities for implementing the abstract structures underconsideration by means of parallel processes.

We solve the problem of synthesis of autonomous implementations of Markov functionsover a polynomial basis over the field GF(2n). We consider Markov functions of two kinds:determinate functions defined over the set of states of a Markov chain by lumping the chainstates, and probabilistic functions defined by a stochastic matrix.

2. IMPLEMENTATION OF A MAPPING DETERMINED OVERGALOIS FIELD ELEMENTS BY A POLYNOMIALIN ONE VARIABLE

Let G = GF(2n). We consider a mapping Y : G → G. Any mapping of a finite field intoitself can be determined by some polynomial f over this field [3] of the form

f (x) =r∑

i=0

ai xi , r = 2n − 1, x, ai ∈ G. (1)

Let us derive the coefficients of polynomial (1) from a given mapping Y . To do this, weconstruct

f (α) =r∑

i=0

aiαi , r = 2n − 1, (2)

where α = 0, 1, ξ, ξ 2, . . . , ξ2n−2, ξ is a primitive element of G.The matrix of coefficients of the above set of equations is (in view of the properties of

the field elements)

C =

1 0 0 . . . 0 . . . 01 1 1 . . . 1 . . . 11 ξ ξ2 . . . ξ2n−2 . . . 11 ξ2 ξ4 . . . ξ2(2n−2) (mod 2n−1) . . . 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 ξ (2n−2) (mod 2n−1) ξ (2n−3) (mod 2n−1) . . . ξ . . . 1

.

We rewrite (2) in the matrix form

F = C A,

where

F = ( f (0), f (1), f (ξ), . . . , f (ξ 2n−2))T, A = (a0, a1, . . . , a2n−1)

T .

Page 3: Implementation of Markov chains over Galois fields

Implementation of Markov chains over Galois fields 275

Then

A = C−1 F.

It is immediately seen that

C−1 =

1 0 0 . . . 0 . . . 00 1 ξ r−1 . . . ξ (r−1)i (mod r) . . . ξ

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

0 1 ξ 2 . . . ξ2i (mod r) . . . ξ r−2

0 1 ξ . . . ξ i . . . ξ r−1

1 1 1 . . . 1 . . . 1

, (3)

where r = 2n − 1, 1 ≤ i ≤ r − 1.

Theorem 1. If Y : G → G is a function which maps G = GF(2n) into G, then thereexists a unique polynomial

f (x) =r∑

i=0

ai xi , r = 2n − 1, x, ai ∈ G,

which implements the mapping G in the sense that f (c) = Y (c) for all c ∈ G. Thecoefficients of the polynomial f are calculated by the formula

A = C−1 F, (4)

where A = (a0, a1, . . . , ar )T is the vector of coefficients of polynomial (1),

F = (Y (0), Y (1), Y (ξ), . . . , Y (ξ r−1))T,

where ξ is a primitive element of the field G, is the vector of values of the mapping Y atthe elements of the field G, C−1 is matrix (3), and CC−1 = E, where C is the matrix ofcoefficients of equations (2).

Example 1. Let G = GF(22). We set m(x) = 1 + x + x2. Then G = {0, 1, ξ, ξ 2},where ξ is a primitive element. On the elements of the field G we define the mapping Ywhich maps the points {0, 1, ξ, ξ 2} to {ξ, 1, 0, 1} respectively. Then the polynomial whichimplements the mapping Y takes the form

f (x) =3∑

i=0

ai xi , xi , ai ∈ G.

Let us find the coefficients of the polynomial f (x). The values of the mapping Y

at the elements of the field G constitute the vector F = (Y (0), Y (1), Y (ξ), Y (ξ 2))T =

(ξ, 1, 0, 1)T . By (4), A = C−1 F , A = (a0, a1, a2, a3)T , and

C−1 =

1 0 0 00 1 ξ 2 ξ

0 1 ξ ξ 2

1 1 1 1

.

Page 4: Implementation of Markov chains over Galois fields

276 Sh. R. Nurutdinov

Hence,

A =

1 0 0 00 1 ξ 2 ξ

0 1 ξ ξ 2

1 1 1 1

ξ

101

=

ξ

ξ2

ξ

ξ

.

Thus,

f (x) = ξ + ξ2x + ξx2 + ξx3.

3. IMPLEMENTATION OF A FINITE AUTOMATON BYA HOMOGENEOUS NETWORK OVER GF(2n)

The functioning of a digital device can be described by means of a finite automaton(X, Y, Q, σ, λ), where X and Y are the input and output alphabets, σ is the transition func-tion, and λ is the output function.

Let M = (X, Y, Q, σ, λ) and M1 = (X1, Y1, Q1, σ1, λ1) be finite automata.We say that an automaton M1 implements an automaton M if there are mappings

ϕ : X → X1, � : Y → Y1, χ : Q → Q1 such that

χ(σ(x, q)) = σ1(ϕ(x), χ(q)),

�(λ(x, q)) = λ1(ϕ(x), χ(q)), (5)

that is, the sets X , Y , Q can be identified with some subsets X ′1 ⊂ X1, Y ′

1 ⊂ Y1, Q′1 ⊂ Q1,

and on these subsets the automaton M1 behaves exactly as M (the input alphabet of theautomaton M can be coded with the use of letters in the set X ′

1 ⊂ X1, while the states Qare put into correspondence with points in the set Q ′

1 ⊂ Q1). Thereafter, being in any stateof the set Q ′

1, under the action of any letter of the alphabet X 1 the automaton M1 behavesexactly as M .

By a homogeneous network is meant an automaton network M i = (Xi , Yi , Qi , σi , λi ),

where i = 1, . . . , N , and the information flows follow homogeneous and local links [5].We set

Q′ = Q1 ∗ Q2 ∗ . . . ∗ QN .

Some of the inputs and outputs of the automata Mi , 1 = 1, . . . , N , are inputs and outputsof the network. Let X ′ and Y ′ be the input and output alphabets of the network. Thefunctioning of the network is described by some automaton M ′ = (X ′, Y ′, Q′, σ ′, λ′). Letus demonstrate how, beginning with an arbitrary automaton M = (X, Y, Q, σ, λ), one isable to construct a homogeneous network such that the automaton M ′ which describes thenetwork implements the automaton M . Let us consider the case where the automaton Mis a combinatorial circuit. This circuit is defined by the mapping λ : X → Y . Let n be theleast positive integer obeying the inequalities 2n ≥ |X |, 2n ≥ |Y |. Let G = GF(2n). Wecode the elements of the sets X and Y by elements of the field G (which is equivalent toconstructing the mappings ϕ and � in (5)). We agree that the mapping λ is defined on somesubset of G and takes values in G. We define the mapping λ with the use of a polynomial

Page 5: Implementation of Markov chains over Galois fields

Implementation of Markov chains over Galois fields 277

in a single variable over the field G:

g(x) =r∑

i=0

ai xi , r = 2n − 1, x, ai ∈ G. (6)

Such a polynomial can be constructed with the use of Theorem 1. Thus, we obtain someautomaton M ′ which implements the initial automaton M . Choosing one of ways to imple-ment polynomial (6) by a homogeneous computing network [8], we obtain an implementa-tion of the initial combinatorial circuit in the form of a homogeneous computing network.

Example 2. Let a combinatorial circuit be given by the simultaneous Boolean equationsy1 = x1x3, y2 = x3x2. We code the elements of the sets X = {x : x = (x1x2x3)} andY = {y : y = (y1y20)} by elements of the field GF(23). In order to find the elements of thefield GF(23), we choose the primitive polynomial p(x) = 1 + x + x 3. The elements of thefield GF(23) expressed in terms of powers of the primitive element ξ admit the followingvector representation:

0 → (000), 1 → (100), ξ → (101), ξ 2 → (111), ξ 3 → (011),

ξ4 → (110), ξ 5 → (001), ξ 6 → (010).

After direct coding of the elements of the sets X and Y , we obtain the mapping

(0, 1, ξ, ξ 2, ξ3, ξ4, ξ5, ξ6) → (0, 0, 1, ξ 4, ξ6, 0, 0, 0). (7)

We represent it in the form of a polynomial in one variable. To do this, we make use ofTheorem 1.

In this case,

C−1 =

1 0 0 0 0 0 0 00 1 ξ 6 ξ5 ξ4 ξ3 ξ2 ξ

0 1 ξ 5 ξ3 ξ ξ6 ξ4 ξ2

0 1 ξ 4 ξ ξ5 ξ2 ξ6 ξ3

0 1 ξ 3 ξ6 ξ2 ξ5 ξ ξ4

0 1 ξ 2 ξ4 ξ6 ξ ξ3 ξ5

0 1 ξ ξ 2 ξ3 ξ4 ξ5 ξ6

1 1 1 1 1 1 1 1

, F = (0, 0, 1, ξ 4, ξ6, 0, 0, 0).

The coefficients of the polynomial in one variable which realises mapping (7) obey theformula

A = C−1 F = (ξ4, ξ5, ξ5, ξ, ξ3, 0, 0).

Thus, we obtain the polynomial

g(x) = ξ4 + ξ5x + ξ5x2 + ξx3 + ξ3x4.

Page 6: Implementation of Markov chains over Galois fields

278 Sh. R. Nurutdinov

4. IMPLEMENTATION OF A FUNCTION OF s VARIABLES OVER GF(2n)

BY A POLYNOMIAL IN s VARIABLES

Lemma 1 ([4]). Let G = GF(2n), and let ϕ : Gs → G be an arbitrary function of svariables which maps G ∗ G ∗ . . . ∗ G into G. Then there exists a unique polynomial

f (x1, . . . , xs) =r∑

i1,... ,is=0

ai1,... ,is x i11 xi2

2 . . . xiss , (8)

where r = 2n − 1, ai1,... ,is , x1, . . . , xs ∈ G, which implements the mapping ϕ in the sensethat f (c, d, . . . , e) = ϕ(c, d, . . . , e) for all c, d, . . . , e ∈ G.

Let us find the polynomial coefficients by a given mapping ϕ. To do this, we introducethe following notation. Let Y be a matrix in G s , and let the symbol ∗ mean that the corres-ponding subscript runs through all values between the lower and upper bounds. If, writingout an element of the matrix, we replace some its subscript by ∗ and fix the other subscripts,we obtain the vector consisting of the elements of the initial matrix referred to as the section.

Example 3. Let the matrix

Y =(

Y11 Y12Y21 Y22

)

be given. Then Y (∗, 1) is the vector (Y11, Y21)T ; Y (∗, 2) is the vector (Y12, Y22)

T ; Y (2, ∗)

is the vector (Y21, Y22)T .

Theorem 2. Let G = GF(2n). If ϕ : Gs → G is an arbitrary function of s variableswhich maps Gs into G, then the coefficients of the polynomial f in (8) satisfy the relations

Y (1)(∗, i2, . . . , is) = C−1Y (∗, i2, . . . , is), i2, . . . , is = 0, 1, . . . , r,

Y (2)(i1, ∗, . . . , is) = C−1Y (1)(i1, ∗, . . . , is), i1, i3, i4, . . . , is = 0, 1, . . . , r,

. . .

Y (s)(i1, . . . , is−1, ∗) = C−1Y (s−1)(i1, . . . , is−1, ∗), i1, i2, . . . , is−1 = 0, 1, . . . , r,

A = Y (s), (9)

where Y is the matrix of order s of the values of the function ϕ at the elements of the field G,

Y0,... ,0 = ϕ(0, . . . , 0), Yi1,... ,is = ϕ(ξ i1−1, . . . , ξ is −1),

ξ is a primitive element of the field G, i1, . . . , is = 1, . . . , r , r = 2n − 1. The matrix C−1

is defined by (3). The matrix A = {ai1,... ,is }, i1, . . . , is = 0, 1, . . . , r , contains the valuesof the coefficients of polynomial (8).

Proof. We calculate the coefficients of polynomial (1) with the use of (4). We assumethat equations (9) hold true for a polynomial in k variables, and consider the polynomial

f (x1, . . . , xk+1) =r∑

i1,... ,ik+1=0

ai1...ik+1 x1i1 . . . xk+1

ik+1 . (10)

Page 7: Implementation of Markov chains over Galois fields

Implementation of Markov chains over Galois fields 279

We fix the variables x1, . . . , xk , then polynomial (10) takes the form

f (c, d, . . . , e, xk+1) =r∑

ik+1=0

aik+1 (c, d, . . . , e)x ik+1k+1 . (11)

Polynomial (11) is a polynomial in one variable. The coefficients a ik+1 (c, d, . . . , e),ik+1 = 0, 1, . . . , r , can be calculated with the use of (4) as follows:

B = C−1(ϕ(c, d, . . . , e, 0), ϕ(c, d, . . . , e, 1), ϕ(c, d, . . . , e, ξ),

. . . , ϕ(c, d, . . . , e, ξ r−1))T .

We obtain

B = (a0(c, d, . . . , e), a1(c, d, . . . , e), . . . , ar (c, d, . . . , e))T . (12)

Furthermore, the vector B in (12) is the section Y (i 1, . . . , ik, ∗), where the matrix Ycontains values of the function ϕ(x1, . . . , xk+1). Therefore, (12) can be rewritten as

B = C−1Y (i1, . . . , ik, ∗),

where i1, . . . , ik are fixed. We thus obtain

Y (1)(i1, . . . , ik, ∗) = C−1Y (i1, . . . , ik, ∗).

The coefficients aik (x1, . . . , xk), ik = 0, 1, . . . , r , are, in turn, functions of k vari-ables x1, . . . , xk and can be represented as polynomials whose coefficients can be cal-culated according to the above assumption. The values of the functions a ik (x1, . . . , xk),ik = 0, 1, . . . , r , at the elements of the field G constitute the corresponding sections ofthe matrix Y and can be used in calculations by (9). Thus, we obtain the values of thecoefficients of polynomial (9) which constitute the matrix A.

Corollary 1. For s = 2 the coefficients of polynomial (8) are calculated by the formula

A = C−1Y (C−1)T, (13)

where Y is the matrix of order two constituted by the values of the function ϕ at the elementsof the field G.

Proof. For s = 2 (9) takes the form

Y (1)(∗, i2) = C−1Y (∗, i2), i2 = 0, 1, . . . , r,

Y (2)(i1, ∗) = C−1Y (1)(i1, ∗), i1 = 0, 1, . . . , r,

A = Y (2). (14)

The sections Y (1)(∗, i2), i2 = 0, 1, . . . , r , are columns of the matrix Y , which implies thatthe leading expression in (14) is

Y (1) = C−1Y.

Page 8: Implementation of Markov chains over Galois fields

280 Sh. R. Nurutdinov

The sections Y (2)(i1, ∗), i1 = 0, 1, . . . , r , are rows of the matrix Y (1), the second ex-pression in (14) is hence

Y (2) = C−1(Y (1))T = C−1(C−1Y )T = C−1Y T (C−1)T .

We observe that the matrix Y (2) is transposed with respect to the variables of the mapping.Finally,

A = Y (2)T = C−1Y (C−1)T .

Example 4. Let G = GF(22), and let the values of the function ϕ : G ∗ G → G begiven by the matrix

Y =

1 1 1 0ξ2 1 ξ2 0ξ2 0 1 00 0 ξ 2 ξ2

,

where ξ is a primitive element being a root of the polynomial m(x) = 1 + x + x 2. Weimplement the function ϕ by the polynomial in two variables

f (x, y) =3∑

i, j=0

aij xi y j , x, y, aij ∈ G.

Making use of (13), we find the coefficients aij . The matrix C−1 is of the form

C−1 =

1 0 0 00 1 ξ 2 ξ

0 1 ξ ξ 2

1 1 1 1

.

Then

A = C−1Y (C−1)T =

1 1 ξ 1ξ 0 0 1ξ2 0 1 ξ

1 0 ξ ξ

and

f (x, y) = 1 + y + ξy2 + ys + x(ξ + ys) + x2(ξ2 + y2 + ξys) + xs(1 + ξ2 + ξys).

5. IMPLEMENTATION OF AN AUTOMATON WITH MEMORY

We consider an automaton without output. Such an automaton is described by the tripleM = (X, Q, δ(x, q)). We choose (see [5]) the least n such that the inequalities 2n ≥ |X |,2n ≥ |Q| hold. The elements of the sets X and Q are coded by elements of the fieldG = GF(2n). We see that the mapping δ(x, q) is defined on a subset of G × G and takesvalues in G. We represent it as the polynomial

f (x, q) =r∑

i, j=0

aij xj qi , r = 2n − 1, x, q, aij ∈ G. (15)

Page 9: Implementation of Markov chains over Galois fields

Implementation of Markov chains over Galois fields 281

Table 1.

x1 x2 x3 x4q1 q1 q1 q1 q2q2 q2 q2 q3 q3q3 q4 q3 q1 q4q4 q4 q4 q2 q1

Then the automaton M is implemented by the automaton M ′ = (G, G, f (x, q)). Thecoefficients of polynomial (15) are calculated by the formula

A = C−1Y (C−1)T, (16)

where Y is the matrix constituted by the values of the function δ(x, q) at the elements of thefield G.

Example 5. Consider the outputless automaton with memory defined by Table 1, whereeach pair of inputs and states corresponds to the new state. The input alphabet isX = {x1, x2, x3, x4}, the alphabet of internal states is Q = {q1, q2, q3, q4}. The elementsof the sets X and Q are coded by elements of the field G = GF(2 2) in an arbitrary way:x1 = 0, x2 = 1, x3 = ξ , x4 = ξ2, q1 = 0, q2 = 1, q3 = ξ , q4 = ξ2. The elementsof the field G are defined by the primitive polynomial m(x) = 1 + x + x 2. The functionδ(x, q) defined on a subset of G × G with values in G is represented as a polynomial intwo variables similar to polynomial (15). Let us calculate the coefficients of the polynomial.The matrices F and C−1 are of the form

F =

0 1 ξ 2 ξ2

0 1 ξ ξ 2

0 ξ 0 11 ξ ξ2 0

, C−1 =

1 0 0 00 1 ξ 2 ξ

0 1 ξ ξ 2

1 1 1 1

.

The coefficients of the polynomial in two variables are calculated by formula (16). Thematrix of the coefficients of the polynomial δ(x, q) obeys the equalities

A = C−1 F(C−1)T =

1 0 0 00 1 ξ 2 ξ

0 1 ξ ξ 2

1 1 1 1

0 1 ξ 2 ξ2

0 1 ξ ξ 2

0 ξ 0 11 ξ ξ2 0

1 0 0 10 1 1 10 ξ2 ξ 10 ξ ξ2 1

=

0 ξ ξ2 1ξ 1 1 ξ 2

ξ ξ0 0 01 ξ 1 ξ

and

δ(x, q) = ξx + ξ2x2 + x3 + (ξ + x + x2 + ξ2x3)q

+ (ξ + ξx)q2 + (1 + ξx + x2 + ξx3)q3.

Page 10: Implementation of Markov chains over Galois fields

282 Sh. R. Nurutdinov

6. POLYNOMIAL IMPLEMENTATION OF A MARKOV CHAIN

We define a finite homogeneous Markov chain by the equation

P(m) = (S, P, π0), (17)

where S = (s1, . . . , sm) is the set of states of the Markov chain, P is an m × m stochasticmatrix, π0 is an m-dimensional stochastic vector determining the initial distribution of thestate probabilities of the Markov chain.

Following [1, 2], stochastic matrices whose elements are zeros and ones such that eachrow has a single one are referred to as simple stochastic matrices.

Let µ̂ denote a discrete random variable of the form

µ̂ =(

µ1, µ2, . . . , µl

p1, p2, . . . , pl

),

where µi , i = 1, . . . , l, are the values of µ̂, pi are probabilities of occurrences of µ i ,i = 1, . . . , l, 0 ≤ pi ≤ 1, p1 + . . . + pl = 1, and let P̄ denote the stochastic vector(p1, . . . , pl); the inequality l ≤ m2 − m + 1 should be true. We introduce the finite fieldG = GF(2n) and the polynomial in two variables over this field (see [4, 7])

f (x, q) =r∑

i, j=0

aij xj qi , r = 2n − 1, (18)

x, q, aij ∈ G, n satisfies the condition l ≤ 2n − 1.The following synthesis theorem is true.

Theorem 3. For given equation (17) there exists a random variable µ̂ and a polynomialf (x, q) of degree r ≥ l with the random initial value of the variable q and coefficientsai j ∈ G such that µ̂ is mapped by the polynomial function f (x, q) to the given Markovchain.

To prove Theorem 3, we need the following lemma.

Lemma 2 ([1]). Any m × m stochastic matrix P can be represented as a stochasticlinear combination of at most m 2 − m + 1 simple matrices. The sequence of coefficientsof any of such representations yields the stochastic vector P̄ which uniquely determines allelements of the given matrix P.

We represent the matrix P of size m by the stochastic combination [2]

P =l∑

k=1

pk M(µk), (19)

where l ≤ m2 −m +1, M(µk) is the m ×m simple matrix corresponding to µk , 0 ≤ pi ≤ 1,p1 + . . . + pl = 1.

Page 11: Implementation of Markov chains over Galois fields

Implementation of Markov chains over Galois fields 283

In representation (19), the coefficients pk , k = 1, . . . , l, define the stochastic vector P̄sought for, while the set of simple matrices M(µk), k = 1, . . . , l, uniquely determines thetransition function δ(µ, s) of the finite automaton

M = (µ̄, S, δ(µ, s)), (20)

where µ̄ is the input alphabet coinciding with the set of values of the random variable µ̂, Sis the set of states of the automaton coinciding with the set of states of (17). The elementsπi j (µk), i, j = 1, . . . , m, of the matrices M(µk) define the function δ(µ, s) as follows: ifin M(µk) the element πi j (µk) = 1, then δ(µk, si ) = sj , i, j = 1, . . . , m.

Automaton (20) possesses the following property [1]: if the input of the automaton Mis fed by a sequence of independent copies of the random variable µ̂, then the sequence ofits states is a Markov chain.

Let us implement the function δ(µ, s) of automaton (20) by some polynomial f (x, q).We need the following lemma.

Lemma 3. Let G = GF(2n), and let ϕ : G × G → G be an arbitrary function in twovariables which maps G × G into G, then there is a unique polynomial of the form (18)which implements the mapping ϕ in the sense that f (c, d) = ϕ(c, d) for any c, d ∈ G × G.

We find the coefficients of polynomial (18) implementing the given mapping ϕ as in(13):

A = C−1Y (C−1)T , (21)

where A = ‖aij ‖, i, j = 0, 1, . . . , r − 1, is the matrix of the coefficients of polynomial(18), Y = ‖yi j ‖, i, j = 0, 1, . . . , r − 1, is the matrix of values of the mapping ϕ at theelements of the field G, and the matrix C −1 is constructed as in (3).

We implement δ(µ, s) by polynomial (18) as in Section 5. We choose the least n suchthat the inequalities 2n ≥ |µ̄|, 2n ≥ |S| hold, where |A| is the cardinality of A. Theelements of the sets µ̄ and S are coded by elements of the field G. We see that the mappingδ(µ, s) is defined on some subset of G × G, takes values in G, and can be implemented bypolynomial (18).

Thus, the representation of a Markov chain in the form

(µ̂, f (x, q), π0) (22)

is equivalent to representation (17).Theorem 1 is thus proved.From Lemmas 1, 2, and relation (21) it easily follows that for (22) the inverse to The-

orem 1 assertion (the analysis theorem) is true.

Theorem 4. Let

f (x, q) =r∑

i, j=0

aij xj qi , r = 2n − 1, aij , x, q ∈ G,

Page 12: Implementation of Markov chains over Galois fields

284 Sh. R. Nurutdinov

be given together with the set {xi }, i = 1, . . . , l, of values of the variable x and the set{qj }, j = 1, . . . , m, of values of the variable q, a random variable µ̂ with the set of values{µi } ⊂ {xi } and a stochastic vector P̄, and an m-dimensional stochastic vector π0.

Then the sequence of calculated values of the polynomial f (x, q) is an implementationof the simple homogeneous Markov chain with the set of states {q j } defined by the stochasticmatrix P of size |{qj }| whose elements are uniquely determined by the vector P̄ and thepolynomial f (x, q).

As one of the solutions, we consider the implementation of the mapping ϕ : G × G →G by a polynomial of one variable. The solution is based on reducing a polynomial ofthe form (18) to a polynomial of one variable over a field of greater dimensionality. Thepolynomial f (x, q) is represented as the mapping δ(z) : GF(2 p) → GF(2p), where p =2n. Furthermore,

δ(z) = z′, z, z′ ∈ GF(2p), z = (x, q)T , (23)

δ can be represented as the polynomial of one variable

δ(z) =s∑

i=0

ai zi , s = 2p − 1, z, ai ∈ GF(2p). (24)

While reducing the polynomial of two variables (18) to a polynomial of one variable,the problem to minimise the number of terms in sum (24) arises. This problem was solvedin [10].

Let us consider various ways to generate Markov chains which follow from Theorems 1and 2:

(1) if implementation (22) is based on (17), then the sequence of values of q is the Markovchain described by the given stochastic matrix P;

(2) if implementation (22) is arbitrary but satisfies the constraints given in Theorem 2,then the sequence of values of q is the Markov chain uniquely determined by theinitial data (the variable µ̂ and the polynomial δ(z));

(3) using in implementation (22) as the initial data various stochastic vectors P̂ or vary-ing the coefficients ai , i = 0, 1, . . . , s, of the polynomial δ(z), or varying both thestochastic vector and the coefficients of the polynomial δ(z) simultaneously, we arriveat various families of simple homogeneous Markov chains.

The problem of polynomial representation of the generator of the random variable µ̂

over a Galois field is solved in [6], where it is shown that the structural model of the gener-ator of a random variable constructed in the class of combinatorial circuits can be represen-ted as some polynomial function f µ̂ over the Galois field. In view of this result, the processof construction of a Markov chain can be considered as the superposition of transformationsperformed by the polynomial functions f µ̂ and δ(z). Thus, (17) can be implemented as asuperposition of the form δ(z) f µ̂ or f (x, q) fµ̂ (if we use the polynomial f (x, q)), wherethe initial value of the variable q is chosen in accordance with the given stochastic vector π 0.

Page 13: Implementation of Markov chains over Galois fields

Implementation of Markov chains over Galois fields 285

The complexity of realisation of structural model (22) depends on the way of structuralrepresentation of the polynomials over the field G. In [8–9], upper bounds for the complex-ity of realisation of a polynomial functions are obtained in the case of implementation of thepolynomial function of the form f (x, q) by parallel, systolic, vector systolic, and sequentialstructures.

REFERENCES

1. D. A. Pospelov, Probabilistic Automata. Energia, Moscow, 1970 (in Russian).

2. R. G. Bukharaev and V. M. Zakharov, Controlled Generators of Random Codes. Kazan Univ.Press, Kazan, 1978 (in Russian).

3. R. Lidl and H. Niederreiter, Finite Fields. Cambridge Univ. Press, Cambridge, 1996.

4. Sh. R. Nurutdinov, Realisation of a combinatorial circuit with the use of a polynomial in severalvariables over a finite field. Abstr. VIII All-Union Conf. on Cybernetics, v. 2. Gorkii, 1988, pp. 61–62 (in Russian).

5. Sh. R. Nurutdinov and E. L. Stolov, Realisation of an automaton by an asynchronous network.Cybern. (1988) No. 6, 108–109 (in Russian).

6. V. M. Zakharov, Sh. R. Nurutdinov, and S. V. Shalagin, Synthesis of autonomous probabilisticautomata based on Galois fields. In: Studies in Information Science No. 2. Otechestvo, Kazan,2000, pp. 107–116 (in Russian).

7. Sh. R. Nurutdinov, Markov chains in Galois fields. Intern. Conf. OFEA’2001. St. Peterburg,47–49.

8. V. M. Zakharov, Sh. R. Nurutdinov, and S. V. Shalagin, Polynomial representation of Markovchains over a Galois field. Bull. Kazan State Techn. Univ. (2001) No. 3, 27–31 (in Russian).

9. V. M. Zakharov, Sh. R. Nurutdinov, and S. V. Shalagin, Implementation of the multiplicationoperation in Galois fields. Proc. VII International Seminar ‘Discrete Mathematics and Applic-ations’, v. I. Centre of Applied Research of the Mech. Math. Faculty of Moscow State Univ.,Moscow, 2001, pp. 62–65 (in Russian).

10. Sh. R. Nurutdinov and S. V. Shalagin, Minimisation of the number of elements of a homogeneouscomputational structure. In: Studies in Information Science No. 2. Otechestvo, Kazan, 2000,pp. 117–124 (in Russian).