Научная статья на тему 'On efficiency of modeling an equiprobably distributed system of random variables'

On efficiency of modeling an equiprobably distributed system of random variables Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
103
38
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
EQUIPROBABLE GENERATION / ALGORITHM EFFICIENCY

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Orekhov E. Yu, Orekhov Yu V.

Об эффективности моделирования равновероятно распределенной системы случайных величин. Предложен модифицированный алгоритм моделирования равновероятно распределенной системы дискретных случайных величин, основанный на неравновероятно распределенной системе дискретных случайных величин с таким же набором возможных значений. Оценена эффективность моделирования.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «On efficiency of modeling an equiprobably distributed system of random variables»

ISSN 1992-6502 (Print)_S&OfUH/O'k, QOtyOj _ISSN 2225-2789 (Online)

Vol. 18, no. 5 (66), pp. 54-56, 2014 http://journal.ugatu.ac.ru

UDC 004.023+519.16

On efficiency of modeling

an equiprobably distributed system of random variables

1 2 Emil Yu. Orekhov , Yuri V. Orekhov

1 emil.orekhov@bk.ru Ufa State Aviation Technical University, Russia Submitted 2014, June 10

Abstract. We suggest a modified algorithm of modeling an equiprobably distributed system of discrete random variables based on a non-equiprobably distributed system of discrete random variables with the same set of possible values. The efficiency of modeling is estimated.

Keywords: equiprobable generation; algorithm efficiency.

In [1, 2] a method is suggested which solves the problem of equiprobable generation of values for a system of discrete random variables. The solution is based on a non-equiprobable generator of another system of discrete random variables with the same set of possible values.

Namely, let X = (X,...,Xn) be a system of n discrete random variables with a finite set of possible values xn = (x'.,..., x'n), i = 1,...,N. Let the probability distribution of the system be

P(X = x') = p', i = 1,...,N, jTp' = 1.

'=1

Assume

p = min p , p = p + A , A > 0,' = 1,...,N . Then, giv-

'=1,...,n

en the normalization

we have

Yp. = 1

£ A. = 1 - Np .

Consider a new system of discrete random variables Z = (Z,..., Z), whose values are generated by the algorithm EQPR(Z).

Algorithm EQPR(Z)

1. Generate values for the system of random variables X according to its probability distribution. Let X = xn be the result of the step.

2. Generate values for an auxiliary system of random variables Yi according to its probability

distribution P(Y = 0) = A, P(Y = 1) = —.

p. p.

3. If Y = 1, then set Z = xn; else go to step 1 of the algorithm.

The system Z is proved to be equiprobably distributed, i.e.

P(Z = x') = — ,' = 1,..., N.

N

The chosen measure of efficiency of EQPR(Z) is the expectation M[V] of the random variable V, which is the number of iterations required to deliver a realization of Z. It is proven that

m [V ]=-l. (i)

Np

From (1) it follows that if p is rather small then delivering a realization of Z requires a lot of iterations. In this case the method efficiency is low. Therefore, increasing the efficiency of the suggested method of equiprobable generation is relevant.

In this paper we modify the described generator for an equiprobably distributed system of discrete random variables. We also show the modified algorithm can be substantially more efficient than the original EQPR(Z).

PROBLEM STATEMENT AND SOLUTION

Let X = (X,...,Xn) be the system of discrete random variables defined above. Let A be a finite set of possible values of X, A = N . Let a set of

, K be

equinumerous sets A

•Kl = L = N/K, k = 1,

a partition of A. Let p*,k = 1,...,K, j = 1,...,L be a probability of the j-th element of A. Assume

pk = min pk. (2)

j=1,...,l j

i=1

i=1

Let Wk = (Wk,..., Wk) be a system of discrete random variables with the set A of possible values and their corresponding probabilities

According to (1), the expectation of the number of iterations of EQPR(Wk ) is

IpJ

j=1

, k = 1,..., K .

Consider a new system of discrete random variables U = (U ) whose values are generated by the algorithm EQPRM(U).

Algorithm EQPRM(U)

Generate equiprobably a number k of a subset of A.

Generate a realization wk of the system Wk applying EQPR(Wk) to the system Wk; note that the realization wk coincides with a possible value X of the system X, wk = X.

Assume U = wk = X .

Obviously, the set of possible values of U is the set A.

Proposition 1

The system of random variables U is distributed equiprobably:

P(U = X) = —, i = 1,..., N.

N

Proof. Let X e Ak and let ak be an event of selecting number k on Step 1of the algorithm EQPRM(U) or, equally, selecting a subset Ak to be processed on the next step. Then

P(U = X) = P(U = X / ak) • P(ak).

According to EQPRM(U) we have

• P(ak) = — by Step 1 of EQPRM(U);

K

• P(U = X / ak) = 1 by Step 2 of

EQPRM(U) taking into account Wk and the result of EQPR(Wk).

Therefore

p(U = X ) = 1 • 1=-!-=1,

L K LK N

T N since L = — .

K

The proposition is proved.

Assume VM is the number of iterations required to obtain a realization of the system U. Specifically, VM is the sum of the only iteration of Step 1 and all

the iterations of EQPR(Wk) on Step 2. Let the expectation M[VM ] be a measure of efficiency of EQPRM(U).

IP

j=i

Since it is the conditional expectation of the number of iterations on Step 2 of EQPRM(U) under the condition of equiprobable selection of Ak on Step 1, we obtain

K 1 1

M [VM ] = 1+ I-

k=1 J p

L ■—

K

I p

j=1

I pk I p

1 K ¿—¡r j 1 K ¿—¡r.

=i+—I jV=i+-1—

TSJ ¿—I „k \r ¿—I

KLti pk

Nt1 pk

Therefore, the required measure of efficiency is

K f

N

1 K 1 L ^

M [VM ] = 1 +1IITpk

K P j=1

(3)

Regarding the upper and the lower bounds of M [VM ] we claim that:

Proposition 2

2 < M Vm ] ^ 1+ .

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Np

Proof. Obviously,

M Vm ] ^ 2 ,

(4)

(5)

since we always have at least Stepl of EQPRM(U) and at least one iteration on Step 2. The lower bound (5) is attainable since as

pk = pk,k = 1,...,K, j = 1,...,L we have

m [Vm ] = 1+^ I ±pk = 1

Nt~1 pk 7=:'

K ■ L , N „

L +-= 1 = 2.

NN

Taking into account that -1 <1, k = 1,..., K, we

Pk P

can obtain the upper bound of M [VM ] as follows.

1 K ( 1 L \ 1 1 K L

M [Vm ] = 1 +1Z ILpj \< 1 +1 •1Z ZPk =

N£1

k p j=1

N p k=1 j=1

1 N 1

=1+—ylpi = 1+—>

Np IF • Np

i. e.

M [Vm ] < 1 +

Np

(6)

Obviously, the upper bound (6) is attainable as pk = p, k = 1,...,K .

Combining (5) and (6), we get (4).

1

k

k

L

1

Now compare M [V ] and M [VM ], which are the measures of efficiency of EQPR(V) and EQPRM(U), respectively, for the same system X of random variables. The minimum of M[V] is 1,

which is attainable, according to (1), as p = 1. It

follows that, obviously, since Step 1 of EQPRM(U) is always executed, then M [V] < M \VM ] under "the best" and "the worst" conditions. However, from (1) and (3) we obtain the condition of EQPRM(U) being preferable to EQPR(V) according to the defined measure of efficiency: M\VM ] < M [V] if

к ( Л L

Z К Zpk k=1 ^ p

j=1

1 - Np

(7)

Example

Assume N = 1000, K = 2, p = p1 = 0.0001,

500 500

p2 = 0.001, Z p) = 0.1, Z P2J = 0.9.

j=1

j=1

Then, from (3) we get M[VM ] = 2.9, from (1) we get M[V] = 10, i.e. here EQPRM is 3.5 times more efficient than EQPR.

CONCLUSION

The suggested algorithm EQPRM can be substantially more efficient in practice than its predecessor EQPR. It follows from the proof of the Proposition 2 that, when partitioning a set A to blocks containing nearly equiprobable elements, we get the efficiency of EQPRM close to its lower bound, which equals 2.

REFERENCES

1. E. Yu. Orekhov, Yu. V. Orekhov, "The equiprobable generation of instances for the integer problem of scheduling jobs between unrelated parallel machines," in Proc. of the 14th Int. Workshop on Computer Science and Information technologies CSIT'12 (Ufa - Hamburg - Norwegian Fjords, 2012), vol. 2, pp. 108-110, Ufa: UGATU, 2012.

2. Орехов Э. Ю., Орехов Ю. В. Об одном способе моделирования равновероятно распределенной системы дискретных случайных величин. // ITIDS'2013: Information Technologies for Intelligent Decision Making Support; Models and Algorithms of Applied Optimization: Proc. Int. Conf. and Intended Russian-German Workshop (May 21-25, Ufa, Russia). 2013. Т. 2. С. 63-65. [ E. Yu. Orekhov, Yu. V. Orekhov, "On a method of modeling an equiprobably distributed system of random variables," (in Russian) in Proc. of the Int. Conf. "Information Technologies for Intelligent Decision Making Support" and the Intended Russian-German Workshop "Models and Algorithms of Applied Optimization", May 21-25, Ufa, Russia, 2013, vol. 2, pp. 63-65. ]

ABOUT AUTHORS

OREKHOV, Emil Yurievich, Docent of the Department of Computing Mathematics and Cybernetics. Dipl. Software Engineer (USATU, 1998), Cand. of Phys. & Math. Sci. (Samara State Aerospace University, 2002). Research in combinatorial optimization and heuristic algorithms.

OREKHOV, Yuri Vasilievich, Docent of the Department of Computing Mathematics and Cybernetics. Dipl. Physicist (Bashkir State University, 1973). Cand. of Tech. Sci. (Riga Polytechnical Institute, 1983). Research in combinatorial optimization and heuristic algorithms.

МЕТАДАННЫЕ

Название: Об эффективности моделирования равновероятно распределенной системы случайных величин Авторы: Э. Ю. Орехов, Ю. В. Орехов

Организация: ФГБОУ ВПО «Уфимский государственный

авиационный технический университет», Россия; Email: emil.orekhov@bk.ru Язык: английский.

Источник: Вестник УГАТУ. 2014. Т. 18, № 5 (66). С. 54-56.

ISSN 2225-2789 (Online), ISSN 1992-6502 (Print). Аннотация: Предложен модифицированный алгоритм моделирования равновероятно распределенной системы дискретных случайных величин, основанный на неравновероятно распределенной системе дискретных случайных величин с таким же набором возможных значений. Оценена эффективность моделирования. Ключевые слова: равновероятная генерация; эффективность алгоритма.

Об авторах:

ОРЕХОВ Эмиль Юрьевич, доц. каф. выч. мат. и кибернетики. Дипл. инж.-программист (УГАТУ, 1998). Канд. физ.-мат. наук (Самарск. гос. аэрокосм. ун-т, 2002). Иссл. в области комбинаторной оптимизации и эвристических алгоритмов.

ОРЕХОВ Юрий Васильевич, доц. каф. выч. мат. и кибернетики. Дипл. физик (Баш. гос. ун-т, 1973). Канд. физ.-мат. наук (Рижский политехн. ин-т, 1983). Иссл. в области комбинаторной оптимизации и эвристических алгоритмов.

i Надоели баннеры? Вы всегда можете отключить рекламу.