JP2019053556A - Data generation device, data generation method, and program - Google Patents

Data generation device, data generation method, and program Download PDF

Info

Publication number
JP2019053556A
JP2019053556A JP2017177706A JP2017177706A JP2019053556A JP 2019053556 A JP2019053556 A JP 2019053556A JP 2017177706 A JP2017177706 A JP 2017177706A JP 2017177706 A JP2017177706 A JP 2017177706A JP 2019053556 A JP2019053556 A JP 2019053556A
Authority
JP
Japan
Prior art keywords
random number
generation unit
data generation
elements
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017177706A
Other languages
Japanese (ja)
Other versions
JP6991025B2 (en
Inventor
松永 務
Tsutomu Matsunaga
務 松永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Data Group Corp
Original Assignee
NTT Data Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Data Corp filed Critical NTT Data Corp
Priority to JP2017177706A priority Critical patent/JP6991025B2/en
Publication of JP2019053556A publication Critical patent/JP2019053556A/en
Application granted granted Critical
Publication of JP6991025B2 publication Critical patent/JP6991025B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Other Liquid Machine Or Engine Such As Wave Power Use (AREA)

Abstract

To provide a data generation device, a data generation method, and a program for easily generating power-law distribution data.SOLUTION: A data generation device comprises a random number generation unit that generates a random number, and a data generation unit that generates power-law distribution data using L (where L is a positive integer) pieces of elements having integer values of 0 or more. The data generation unit executes: first processing of distributing, based on a random number generated by the random number generation unit, a total number M (where M is a positive integer) and assigning it to each of the L elements; second processing of selecting, based on the random number generated by the random number generation unit, one element out of the L pieces of elements as a first element; third processing of selecting, based on the random number generated by the random number generation unit, one element as a second element from among elements selectable from the L pieces of elements to the first element; fourth processing of moving, when a value of the first element is 1 or more, one element value from the first element to the second element; and fifth processing of repeating the second processing to the fourth processing.SELECTED DRAWING: Figure 1

Description

本発明は、データ生成装置、データ生成方法、及びプログラムに関する。   The present invention relates to a data generation device, a data generation method, and a program.

都市人口、高所得者の収入、地震の大きさと発生頻度、ウェブページのハイパーリンクの数などの様々な自然現象や社会現象が、べき乗則に従うことが知られており、このようなべき乗則を利用する技術が知られている(例えば、特許文献1を参照)。   Various natural and social phenomena, such as urban population, income of high-income earners, the magnitude and frequency of earthquakes, and the number of hyperlinks on web pages, are known to follow power law. A technique to be used is known (see, for example, Patent Document 1).

特開2004−318884号公報Japanese Patent Laid-Open No. 2004-318884

上述のようにべき乗則は、自然現象や社会現象を解析する上で、近年注目されており、べき乗則に従ったデータ(以下、べき分布データという)を容易に生成する技術が求められている。   As described above, the power law has been attracting attention in recent years in analyzing natural phenomena and social phenomena, and there is a need for a technique for easily generating data that follows the power law (hereinafter referred to as power distribution data). .

本発明は、上記問題を解決すべくなされたもので、その目的は、べき分布データを容易に生成することができるデータ生成装置、データ生成方法、及びプログラムを提供することにある。   The present invention has been made to solve the above problems, and an object of the present invention is to provide a data generation apparatus, a data generation method, and a program capable of easily generating power distribution data.

上記問題を解決するために、本発明の一態様は、乱数を生成する乱数生成部と、0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成部であって、前記乱数生成部が生成した乱数に基づいて、総数M(ただしMは正の整数)を分配して前記L個の要素の各々に割り当てる第1の処理と、前記乱数生成部が生成した乱数に基づいて、前記L個の要素のうちから1つの要素を第1の要素として選択する第2の処理と、前記L個の要素から前記第1の要素に対して予め定められた一部の選択可能な要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を第2の要素として選択する第3の処理と、前記第1の要素の値が1以上である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する第4の処理と、前記第2の処理から前記第4の処理を繰り返し行う第5の処理とを実行するデータ生成部とを備えることを特徴とするデータ生成装置である。   In order to solve the above problem, according to one aspect of the present invention, a power is generated using a random number generation unit that generates a random number and L elements (where L is a positive integer) having an integer value of 0 or more. A data generation unit that generates distribution data that should be data that conforms to a rule, and distributes the total number M (where M is a positive integer) based on the random number generated by the random number generation unit, so that the L data A first process assigned to each of the elements, a second process of selecting one element from the L elements as a first element based on the random number generated by the random number generator, and the L One element is selected as a second element based on a random number generated by the random number generation unit from among a part of selectable elements predetermined for the first element. When the third process and the value of the first element is 1 or more Data for executing a fourth process for moving one value of the element from the first element to the second element and a fifth process for repeatedly performing the fourth process from the second process A data generation device comprising a generation unit.

また、本発明の一態様は、上記のデータ生成装置において、前記L個の要素は、N次元(ただしNは2以上の整数)に配列された要素であり、前記データ生成部は、前記第1の処理において、前記乱数生成部が生成した乱数に基づいて、前記総数Mを分配して前記N次元に配列された要素の各々に割り当て、前記第2の処理において、前記乱数生成部が生成した乱数に基づいて、前記N次元に配列された要素のうちから1つの要素を前記第1の要素として選択し、前記第3の処理において、前記N次元の要素番号の正負の方向のうちの各次元で予め定められた1つの方向に、前記各次元の前記要素番号を1以内移動させて選択可能な複数の要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を前記第2の要素として選択することを特徴とする。   In one embodiment of the present invention, in the above data generation device, the L elements are elements arranged in N dimensions (where N is an integer equal to or greater than 2), and the data generation unit includes: In the first process, based on the random number generated by the random number generator, the total number M is distributed and assigned to each of the elements arranged in the N dimension, and in the second process, the random number generator generates Based on the random number, one element is selected as the first element from the elements arranged in the N dimension, and in the third process, the positive or negative direction of the N-dimensional element number is selected. One element based on a random number generated by the random number generation unit from among a plurality of elements that can be selected by moving the element number of each dimension within one in a predetermined direction in each dimension Is selected as the second element And wherein the Rukoto.

また、本発明の一態様は、上記のデータ生成装置において、前記データ生成部は、前記第3の処理において、前記第2の要素として選択された前記1つの要素の要素番号が、前記N次元に配列された要素に設定された要素番号の範囲から外れた場合に、前記乱数生成部が生成した乱数に基づいて、前記N次元に配列された要素のうちから、前記第1の要素とは異なる1つの要素を前記第2の要素として再選択することを特徴とする。   Further, according to one aspect of the present invention, in the data generation device, the data generation unit is configured such that in the third process, the element number of the one element selected as the second element is the N dimension. The first element out of the elements arranged in the N dimensions based on the random number generated by the random number generation unit when the element number is outside the range of the element number set in the element One different element is reselected as the second element.

また、本発明の一態様は、上記のデータ生成装置において、前記各次元の前記要素番号を1以内移動させて選択可能な複数の要素は、前記各次元で予め定められた1つの方向だけ、前記要素番号を1つ移動させたN個の要素であり、前記データ生成部は、前記第3の処理において、前記N個の要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を前記第2の要素として選択することを特徴とする。   Further, according to one aspect of the present invention, in the above data generation device, the plurality of elements that can be selected by moving the element number of each dimension within one is only one direction predetermined in each dimension, N elements obtained by moving the element number by one, and the data generation unit, based on the random number generated by the random number generation unit from the N elements in the third process, One element is selected as the second element.

また、本発明の一態様は、上記のデータ生成装置において、前記Nは、2であり、前記データ生成部は、前記第3の処理において、前記各次元で予め定められた1つの方向だけ前記要素番号を1つ移動させた2個の要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を前記第2の要素として選択することを特徴とする。   Further, according to one aspect of the present invention, in the above data generation device, the N is 2, and the data generation unit is configured to perform only the one direction predetermined in each dimension in the third process. One element is selected as the second element based on the random number generated by the random number generation unit from the two elements whose element numbers are moved by one.

また、本発明の一態様は、上記のデータ生成装置において、前記データ生成部は、前記第4の処理において、前記第1の要素の値が0である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する処理を実行しないことを特徴とする。   Further, according to one aspect of the present invention, in the data generation device, the data generation unit may change the first element from the first element when the value of the first element is 0 in the fourth process. The process of moving one value of the element to the second element is not executed.

また、本発明の一態様は、乱数生成部が、乱数を生成する乱数生成ステップと、データ生成部が、0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成ステップとを含み、データ生成ステップには、前記データ生成部が、前記乱数生成ステップにより生成された乱数に基づいて、総数M(ただしMは正の整数)を分配して前記L個の要素の各々に割り当てる第1の処理ステップと、前記データ生成部が、前記乱数生成ステップにより生成された乱数に基づいて、前記L個の要素のうちから1つの要素を第1の要素として選択する第2の処理ステップと、前記データ生成部が、前記L個の要素から前記第1の要素に対して予め定められた一部の選択可能な要素のうちから、前記乱数生成ステップにより生成された乱数に基づいて、1つの要素を第2の要素として選択する第3の処理ステップと、前記データ生成部が、前記第1の要素の値が1以上である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する第4の処理ステップと、前記データ生成部が、前記第2の処理ステップから前記第4の処理ステップを繰り返し行う第5の処理ステップとが含まれることを特徴とするデータ生成方法である。   In one embodiment of the present invention, the random number generation unit uses a random number generation step for generating a random number, and the data generation unit uses L elements (where L is a positive integer) having an integer value of 0 or more. And a data generation step of generating distribution data that should be data in accordance with a power law, wherein the data generation unit includes a total number based on the random number generated by the random number generation step. A first processing step that distributes M (where M is a positive integer) and allocates each of the L elements; and the data generation unit generates the L based on the random number generated by the random number generation step. A second processing step of selecting one of the elements as the first element, and a part of the data generator that is predetermined for the first element from the L elements Can be selected A third processing step of selecting one element as a second element based on the random number generated by the random number generation step from among the elements, and the data generation unit determines that the value of the first element is A fourth processing step of moving one value of the element from the first element to the second element, and the data generation unit from the second processing step to the second And a fifth processing step for repeatedly performing the fourth processing step.

また、本発明の一態様は、乱数を生成する乱数生成部と、0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成部とを備えるコンピュータに、前記乱数生成部が生成した乱数に基づいて、総数M(ただしMは正の整数)を分配して前記L個の要素の各々に割り当てる第1の処理と、前記乱数生成部が生成した乱数に基づいて、前記L個の要素のうちから1つの要素を第1の要素として選択する第2の処理と、前記L個の要素から前記第1の要素に対して予め定められた一部の選択可能な要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を第2の要素として選択する第3の処理と、前記第1の要素の値が1以上である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する第4の処理と、前記第2の処理から前記第4の処理を繰り返し行う第5の処理とを実行させるためのプログラムである。   Further, according to one aspect of the present invention, a random number generating unit that generates a random number and L elements (where L is a positive integer) having an integer value greater than or equal to 0 are used for data in accordance with a power law. A total number M (where M is a positive integer) is distributed to each of the L elements based on the random number generated by the random number generation unit to a computer including a data generation unit that generates distribution data that should be A first process to assign, a second process for selecting one element as the first element from the L elements based on the random number generated by the random number generation unit, and the L elements. A third process of selecting one element as a second element based on a random number generated by the random number generation unit from among selectable elements predetermined for the first element. And when the value of the first element is 1 or more, A fourth process for moving one value of the element from the first element to the second element; and a fifth process for repeatedly performing the fourth process from the second process. It is a program.

本発明によれば、べき分布データを容易に生成することができる。   According to the present invention, power distribution data can be easily generated.

本実施形態によるデータ生成装置の一例を示す機能ブロック図である。It is a functional block diagram showing an example of a data generation device by this embodiment. 本実施形態における配列記憶部のデータ例を示す図である。It is a figure which shows the example of data of the arrangement | sequence storage part in this embodiment. 本実施形態における2次元配列の要素の値における移動先候補例を示す図である。It is a figure which shows the example of a movement destination candidate in the value of the element of the two-dimensional array in this embodiment. 本実施形態によるデータ生成装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the data generation apparatus by this embodiment. 本実施形態におけるべき分布データの生成処理の初期値の一例を示す図である。It is a figure which shows an example of the initial value of the production | generation process of the power distribution data in this embodiment. 本実施形態におけるべき分布データの生成過程の一例を示す図である。It is a figure which shows an example of the production | generation process of the power distribution data in this embodiment. 本実施形態におけるべき分布データの生成結果の一例を示す図である。It is a figure which shows an example of the production | generation result of the distribution data in this embodiment. 生成したべき分布データの分布の一例(両対数グラフ)を示す第2の図である。It is a 2nd figure which shows an example (bilogarithm graph) of distribution of the distribution data which should be produced | generated. 本実施形態の分布データの生成処理における繰り返し回数とべき指数との関係の一例を示す図である。It is a figure which shows an example of the relationship between the frequency | count of repetition and the exponent in the production | generation process of the distribution data of this embodiment. 本実施形態における2次元配列の要素の値における移動先候補の第1の変形例を示す図である。It is a figure which shows the 1st modification of the movement destination candidate in the value of the element of the two-dimensional array in this embodiment. 本実施形態における2次元配列の要素の値における移動先候補の第2の変形例を示す図である。It is a figure which shows the 2nd modification of the movement destination candidate in the value of the element of the two-dimensional array in this embodiment. 本実施形態における3次元配列の要素の値における移動先候補例を示す図である。It is a figure which shows the example of a movement destination candidate in the value of the element of the three-dimensional array in this embodiment. 本実施形態における3次元配列の要素の値における移動先候補の変形例を示す図である。It is a figure which shows the modification of the movement destination candidate in the value of the element of the three-dimensional arrangement | sequence in this embodiment.

以下、本発明の一実施形態によるデータ生成装置について、図面を参照して説明する。
図1は、本実施形態によるデータ生成装置1の一例を示す機能ブロック図である。
図1に示すように、データ生成装置1は、乱数生成部11と、記憶部20と、制御部30とを備えている。データ生成装置1は、べき乗則に従ったデータであるべき分布データを生成する。
Hereinafter, a data generation device according to an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a functional block diagram illustrating an example of a data generation device 1 according to the present embodiment.
As shown in FIG. 1, the data generation device 1 includes a random number generation unit 11, a storage unit 20, and a control unit 30. The data generation device 1 generates distribution data that should be data in accordance with a power law.

乱数生成部11は、乱数を生成する乱数生成器である。乱数生成部11は、例えば、ハードウェア又はソフトウェアを利用して、疑似乱数を生成するものであってもよい。
記憶部20は、データ生成装置1が利用する各種情報を記憶する。記憶部20は、配列記憶部21と、選択要素記憶部22とを備えている。
The random number generator 11 is a random number generator that generates random numbers. The random number generation unit 11 may generate a pseudo random number using, for example, hardware or software.
The storage unit 20 stores various information used by the data generation device 1. The storage unit 20 includes an array storage unit 21 and a selection element storage unit 22.

配列記憶部21は、べき分布データを生成するための配列データを記憶するとともに、最終的には、生成されたべき分布データを記憶する。配列記憶部21は、例えば、2次元配列された要素のデータを記憶する。ここで、2次元配列は、N次元配列の一例であり、Nは、例えば、2以上の整数である。また、配列記憶部21が記憶する2次元配列の各要素は、0以上の整数の値を有する。ここで、図2を参照して、配列記憶部21が記憶するデータ例について説明する。   The array storage unit 21 stores array data for generating power distribution data, and finally stores the generated power distribution data. The array storage unit 21 stores, for example, data of elements arranged two-dimensionally. Here, the two-dimensional array is an example of an N-dimensional array, and N is an integer of 2 or more, for example. Each element of the two-dimensional array stored in the array storage unit 21 has an integer value of 0 or more. Here, an example of data stored in the array storage unit 21 will be described with reference to FIG.

図2は、本実施形態における配列記憶部21のデータ例を示す図である。
図2に示すように、配列記憶部21は、要素番号I=1〜30、及び要素番号J=1〜30の合計900個(L個の一例、ただしLは正の整数)の要素を有している。すなわち、配列記憶部21は、要素数I=30×要素数J=30の2次元配列データを記憶する。
FIG. 2 is a diagram illustrating an example of data in the array storage unit 21 in the present embodiment.
As shown in FIG. 2, the array storage unit 21 has a total of 900 elements (an example of L, where L is a positive integer) of element numbers I = 1 to 30 and element numbers J = 1 to 30. doing. That is, the array storage unit 21 stores two-dimensional array data of the number of elements I = 30 × the number of elements J = 30.

なお、図2に示す例は、900個の要素に対して、総数9000(総数Mの一例、ただし、Mは正の整数)をランダムに分配して割り当てた場合(900個の要素の初期値)の一例を示している。
例えば、要素番号I=1及び要素番号J=1のデータD(1,1)の値(要素の値)が、“9”であることを示している。また、要素番号I=2及び要素番号J=1のデータD(2,1)の値(要素の値)が、“11”であることを示している。
In the example shown in FIG. 2, a total of 9000 (an example of the total number M, where M is a positive integer) is randomly distributed and assigned to 900 elements (the initial value of 900 elements). ) Is an example.
For example, the value (element value) of the data D (1, 1) of the element number I = 1 and the element number J = 1 indicates “9”. Further, the value (element value) of the data D (2, 1) of the element number I = 2 and the element number J = 1 is “11”.

図1の説明に戻り、選択要素記憶部22は、べき分布データを生成する際に、要素の値を移動するために選択される移動元の要素(第1の要素)を示す情報、及び移動先の要素(第2の要素)を示す情報を記憶する。ここで、移動元の要素(第1の要素)を示す情報、及び移動先の要素(第2の要素)を示す情報は、例えば、2次元配列を指定する、要素番号Iの値、及び要素番号Jの値である。   Returning to the description of FIG. 1, the selected element storage unit 22 includes information indicating a movement source element (first element) selected to move the value of the element when generating power distribution data, and movement. Information indicating the previous element (second element) is stored. Here, the information indicating the source element (first element) and the information indicating the destination element (second element) are, for example, the value of the element number I specifying the two-dimensional array, and the element The value of the number J.

制御部30は、例えば、CPU(Central Processing Unit)などを含むプロセッサであり、データ生成装置1を統括的に制御する。制御部30は、データ生成部31を備えている。
データ生成部31は、上述したL個の要素を利用して、べき分布データを生成する。ここで、L個の要素は、N次元に配列された要素であり、本実施形態では、30×30の2次元配列の要素として説明する。また、べき分布データを生成する処理を理解し易くするために、本実施形態では、2次元配列の各要素を「壺」とし、各要素の値を「壺の中のボールの数」として説明する。
データ生成部31は、以下の処理により、べき分布データを生成する。
The control unit 30 is a processor including, for example, a CPU (Central Processing Unit) and the like, and comprehensively controls the data generation device 1. The control unit 30 includes a data generation unit 31.
The data generation unit 31 generates power distribution data using the L elements described above. Here, the L elements are elements arranged in N dimensions, and in this embodiment, description will be made as elements of a 30 × 30 two-dimensional array. Further, in order to facilitate understanding of the process for generating the power distribution data, in this embodiment, each element of the two-dimensional array is described as “壺”, and the value of each element is described as “the number of balls in the cage”. To do.
The data generation unit 31 generates power distribution data by the following processing.

(1)データ生成部31は、例えば、30×30の2次元配列の要素に、乱数生成部11が生成した乱数に基づいて、総数9000を分配して、2次元に配列された要素(900個の要素)の各々に割り当てる(第1の処理)。すなわち、データ生成部31は、900個の壺に、総数9000個のボールを、ランダムに分配して割り当てる。データ生成部31は、各要素の値を、上述した図2に示すように、配列記憶部21に記憶させる。   (1) For example, the data generation unit 31 distributes the total number of 9000 to the elements of the 30 × 30 two-dimensional array based on the random numbers generated by the random number generation unit 11 and arranges the elements (900 (First element). That is, the data generation unit 31 randomly distributes and assigns a total of 9000 balls to 900 baskets. The data generation unit 31 stores the value of each element in the array storage unit 21 as illustrated in FIG. 2 described above.

(2)データ生成部31は、乱数生成部11が生成した乱数に基づいて、900個の要素のうちから1つの要素を移動元の要素(第1の要素)として選択する(第2の処理)。すなわち、データ生成部31は、2次元に配列された壺のうちから1つの壺を移動元の壺としてランダムに選択する。データ生成部31は、選択した移動元の要素(移動元の壺)を示す情報(要素番号Iの値、及び要素番号Jの値)を選択要素記憶部22に記憶させる。   (2) Based on the random number generated by the random number generation unit 11, the data generation unit 31 selects one element from among 900 elements as a movement source element (first element) (second process) ). That is, the data generation unit 31 randomly selects one of the two-dimensionally arranged tiles as the movement source basket. The data generation unit 31 causes the selected element storage unit 22 to store information (the value of the element number I and the value of the element number J) indicating the selected movement source element (movement source bag).

(3)データ生成部31は、900個の要素から選択元の要素に対して予め定められた一部の選択可能な要素のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する(第3の処理)。なお、選択元の要素には、予め移動先の候補として、予め決められており、例えば、図3に示すように、2つの移動先候補(SE21、SE22)が定められている。   (3) The data generation unit 31 selects one element based on the random number generated by the random number generation unit 11 from among some selectable elements predetermined from 900 elements with respect to the selection source element. The element is selected as a destination element (second element) (third process). Note that the selection source element is determined in advance as a destination candidate, and for example, as shown in FIG. 3, two destination candidates (SE21, SE22) are determined.

図3は、本実施形態における2次元配列の要素の値における移動先候補例を示す図である。
図3において、要素SE1は、移動元の要素(第1の要素)を示しており、要素SE21及び要素SE22は、移動先候補を示している。ここで、要素SE21は、要素SE1をD(I=i,J=j)とした場合に、要素番号Iを+1だけ移動した要素(D(i+1,j))であり、要素SE22は、要素番号Jを+1だけ移動した要素(D(i,j+1))である。データ生成部31は、この移動先候補である要素SE21及び要素SE22のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する。
FIG. 3 is a diagram illustrating an example of a movement destination candidate in the element values of the two-dimensional array in the present embodiment.
In FIG. 3, an element SE1 indicates a source element (first element), and an element SE21 and an element SE22 indicate destination candidates. Here, the element SE21 is an element (D (i + 1, j)) obtained by moving the element number I by +1 when the element SE1 is D (I = i, J = j), and the element SE22 is an element SE22. This is an element (D (i, j + 1)) obtained by moving the number J by +1. The data generation unit 31 selects one element as a destination element (second element) based on the random number generated by the random number generation unit 11 from the element SE21 and the element SE22 that are destination candidates. .

このように、データ生成部31は、第3の処理において、2次元の要素番号の正負の方向のうちの各次元で予め定められた1つの方向に、各次元の要素番号(I、J)を1以内移動させて選択可能な複数の要素のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素として選択する。すなわち、データ生成部31は、各次元で予め定められた1つの方向だけ要素番号を1つ移動させた2個の壺(要素SE21及び要素SE22)のうちから、1つの壺を移動先の壺としてランダムに選択する。
なお、データ生成部31は、選択した移動先の要素(移動先の壺)を示す情報(要素番号Iの値、及び要素番号Jの値)を選択要素記憶部22に記憶させる。
Thus, in the third process, the data generation unit 31 sets the element numbers (I, J) of each dimension in one direction predetermined in each dimension of the positive and negative directions of the two-dimensional element numbers. Is selected as a destination element based on the random number generated by the random number generation unit 11 from among a plurality of elements that can be selected by moving within one. In other words, the data generation unit 31 selects one tile from the two tiles (element SE21 and element SE22) obtained by moving the element number by one in a predetermined direction in each dimension. Choose at random.
The data generation unit 31 causes the selected element storage unit 22 to store information (the value of the element number I and the value of the element number J) indicating the selected movement destination element (movement destination bag).

(4)データ生成部31は、移動元の要素の値が1以上である場合に、移動元の要素から移動先の要素に要素の値を1つ移動する(第4の処理)。データ生成部31は、例えば、選択要素記憶部22が記憶する移動元の要素を示す情報に基づいて、配列記憶部21が記憶する移動元の要素の値を確認し、移動元の要素の値から“1”を減算する。そして、データ生成部31は、選択要素記憶部22が記憶する移動先の要素を示す情報に基づいて、配列記憶部21が記憶する移動先の要素を特定し、移動先の要素の値に、“1”を加算する。すなわち、データ生成部31は、移動元の壺から、ボールを1つ取り出し、取り出したボールを移動先の壺に入れて移動する処理を実行する。   (4) When the value of the movement source element is 1 or more, the data generation unit 31 moves one element value from the movement source element to the movement destination element (fourth processing). For example, the data generation unit 31 confirms the value of the source element stored in the array storage unit 21 based on the information indicating the source element stored in the selected element storage unit 22, and the value of the source element "1" is subtracted from. Then, the data generation unit 31 specifies the movement destination element stored in the array storage unit 21 based on the information indicating the movement destination element stored in the selected element storage unit 22, and sets the value of the movement destination element as Add “1”. That is, the data generation unit 31 executes a process of taking out one ball from the movement source basket and moving the extracted ball into the movement destination basket.

なお、データ生成部31は、移動元の要素の値(壺の中のボールの数)が、0(ゼロ)である場合に、上述した要素の値(壺の中のボール)の移動を実行しない。
また、データ生成部31は、移動先の要素(移動先の壺)として選択された1つの要素の要素番号(I又はJ)が、2次元に配列された要素に設定された要素番号の範囲(例えば、1〜30)から外れた場合に、移動先の要素(移動先の壺)を再選択する。この場合、データ生成部31は、乱数生成部11が生成した乱数に基づいて、2次元に配列された要素のうちから、移動元の要素(移動元の壺)とは異なる1つの要素を移動先の要素(移動先の壺)としてランダムに再選択する。なお、本実施形態によるべき分布データを生成する系は、外界からの流れのもとで方向付けされたリソース(ここでは、ボール)の配分がある開放系に対応する。
Note that the data generation unit 31 performs the movement of the element value (the ball in the cage) described above when the value of the source element (the number of balls in the cage) is 0 (zero). do not do.
The data generation unit 31 also includes a range of element numbers in which the element number (I or J) of one element selected as the movement destination element (movement destination basket) is set to the elements arranged in two dimensions. When it deviates from (for example, 1 to 30), the element of the movement destination (movement destination bag) is reselected. In this case, based on the random number generated by the random number generation unit 11, the data generation unit 31 moves one element different from the movement source element (movement source bag) from the two-dimensionally arranged elements. Randomly reselect as the previous element (destination to move). Note that the system for generating the distribution data according to the present embodiment corresponds to an open system in which resources (here, balls) are distributed under the flow from the outside.

(5)データ生成部31は、上述した(2)〜(4)の処理(第2の処理から第4の処理)を繰り返し実行する(第5の処理)。データ生成部31は、例えば、(2)〜(4)の処理を所定の回数繰り返して実行する。
このように、データ生成部31が、(1)〜(5)の処理を実行することにより、配列記憶部21に記憶されているL個からなる要素の値が、べき分布データとして生成される。
(5) The data generation unit 31 repeatedly executes the above-described processes (2) to (4) (second process to fourth process) (fifth process). For example, the data generation unit 31 repeatedly executes the processes (2) to (4) a predetermined number of times.
As described above, when the data generation unit 31 executes the processes (1) to (5), the value of L elements stored in the array storage unit 21 is generated as power distribution data. .

次に、図4を参照して、本実施形態によるデータ生成装置1の動作について説明する。
図4は、本実施形態によるデータ生成装置1の動作の一例を示すフローチャートである。
Next, the operation of the data generation device 1 according to the present embodiment will be described with reference to FIG.
FIG. 4 is a flowchart illustrating an example of the operation of the data generation device 1 according to the present embodiment.

図4において、まず、制御部30のデータ生成部31は、L個の要素に、総数Mを乱数により割り当てる(ステップS101)。データ生成部31は、例えば、900個の壺(30×30の壺)に、総数9000個のボールを、ランダムに分配して割り当てる。データ生成部31は、各要素の値を、図2に示すように、配列記憶部21に記憶させる。   In FIG. 4, first, the data generation unit 31 of the control unit 30 allocates the total number M to L elements using random numbers (step S <b> 101). For example, the data generation unit 31 randomly distributes and allocates 9000 balls to 900 baskets (30 × 30 baskets). The data generation unit 31 stores the value of each element in the array storage unit 21 as shown in FIG.

次に、データ生成部31は、L個の要素のうちから乱数により移動元の要素を選択する(ステップS102)。データ生成部31は、例えば、900個の壺(30×30の壺)のうちからランダムに移動元の要素(移動元の壺)を選択する。データ生成部31は、選択した移動元の要素(移動元の壺)を示す情報(要素番号Iの値、及び要素番号Jの値)を選択要素記憶部22に記憶させる。   Next, the data generation unit 31 selects a source element by a random number from among the L elements (step S102). For example, the data generation unit 31 randomly selects a source element (source cocoon) from among 900 cocoons (30 × 30 cocoons). The data generation unit 31 causes the selected element storage unit 22 to store information (the value of the element number I and the value of the element number J) indicating the selected movement source element (movement source bag).

次に、データ生成部31は、移動元の要素に対して予め定められた複数の要素のうちから乱数により移動先の要素を選択する(ステップS103)。データ生成部31は、例えば、図3に示すような、移動元の要素SE1(移動元の壺)の1つ右横の要素SE21(D(i+1,j))及び1つ上の要素SE22(D(i,j+1))のうちから、ランダムに1つの要素(壺)を移動先の要素(移動先の壺)として選択する。データ生成部31は、選択した移動先の要素(移動先の壺)を示す情報(要素番号Iの値、及び要素番号Jの値)を選択要素記憶部22に記憶させる。   Next, the data generation unit 31 selects a destination element by a random number from a plurality of elements predetermined for the source element (step S103). For example, as shown in FIG. 3, the data generation unit 31 includes an element SE21 (D (i + 1, j)) that is one right next to the element SE1 that is a movement source (D (i + 1, j)) and an element SE22 that is one level higher ( D (i, j + 1)) is randomly selected as one element (壺) as the movement destination element (movement destination 壺). The data generation unit 31 causes the selected element storage unit 22 to store information (element number I value and element number J value) indicating the selected destination element (movement destination bag).

次に、データ生成部31は、移動元の要素の値(移動元の壺の中のボール数)が、1以上であるか否かを判定する(ステップS104)。データ生成部31は、選択要素記憶部22が記憶する移動先の要素(移動先の壺)を示す情報に基づいて、移動元の要素(移動元の壺)を参照し、移動元の要素の値(移動元の壺の中のボール数)が、1以上であるか否かを判定する。データ生成部31は、移動元の要素の値(移動元の壺の中のボール数)が、1以上である場合(ステップS104:YES)に、処理をステップS105に進める。また、データ生成部31は、移動元の要素の値(移動元の壺の中のボール数)が、1以上でない(0である)場合(ステップS104:NO)に、処理をステップS102に戻す。すなわち、データ生成部31は、移動元の要素の値(移動元の壺の中のボール数)が、0である場合に、移動元の要素(移動元の壺)から移動先の要素(移動先の壺)に要素の値(ボール)を1つ移動する処理を実行しない。   Next, the data generation unit 31 determines whether or not the value of the movement source element (the number of balls in the movement source basket) is 1 or more (step S104). The data generation unit 31 refers to the movement source element (movement source bag) based on the information indicating the movement destination element (movement destination bag) stored in the selected element storage unit 22, and sets the movement source element. It is determined whether the value (the number of balls in the movement source basket) is 1 or more. If the value of the movement source element (the number of balls in the movement source basket) is 1 or more (step S104: YES), the data generation unit 31 advances the process to step S105. Further, when the value of the movement source element (the number of balls in the movement source basket) is not 1 or more (0) (step S104: NO), the data generation unit 31 returns the process to step S102. . That is, when the value of the element at the movement source (the number of balls in the movement source basket) is 0, the data generation unit 31 moves from the element at the movement source (movement source basket) to the element at the movement destination (movement The process of moving one element value (ball) to the previous item i) is not executed.

また、ステップS105において、データ生成部31は、移動先の要素(移動先の壺)が範囲外であるか否かを判定する。すなわち、データ生成部31は、移動先の要素(移動先の壺)として選択された1つの要素の要素番号(I又はJ)が、2次元に配列された要素に設定された要素番号の範囲(例えば、1〜30)外であるか否かを判定する。データ生成部31は、移動先の要素(移動先の壺)が範囲外である場合(ステップS105:YES)に、処理をステップS108に進める。また、データ生成部31は、移動先の要素(移動先の壺)が範囲外でない(範囲内である)場合(ステップS105:NO)に、処理をステップS106に進める。   In step S <b> 105, the data generation unit 31 determines whether the movement destination element (movement destination bag) is out of range. That is, the data generation unit 31 has a range of element numbers in which the element number (I or J) of one element selected as the movement destination element (movement destination trap) is set to an element arranged in two dimensions. It is determined whether it is outside (for example, 1 to 30). The data generation part 31 advances a process to step S108, when the element of a movement destination (movement destination trap) is out of range (step S105: YES). In addition, when the movement destination element (movement destination trap) is not out of the range (within the range) (step S105: NO), the data generation unit 31 advances the processing to step S106.

ステップS106において、データ生成部31は、移動元の要素(移動元の壺)から移動先の要素(移動先の壺)に要素の値(ボール)を1つ移動させる。すなわち、データ生成部31は、移動元の要素の値から“1”を減算し、移動先の要素の値に、“1”を加算する。例えば、データ生成部31は、移動元の壺から、ボールを1つ取り出し、取り出したボールを移動先の壺に入れて移動する処理を実行する。   In step S106, the data generation unit 31 moves one element value (ball) from the movement source element (movement source basket) to the movement destination element (movement destination basket). In other words, the data generation unit 31 subtracts “1” from the value of the source element and adds “1” to the value of the destination element. For example, the data generation unit 31 executes a process of taking out one ball from the movement source basket and moving the extracted ball into the movement destination basket.

次に、データ生成部31は、所定の回数、実行したか否かを判定する(ステップS107)。データ生成部31は、上述した処理を所定の回数、実行した場合(ステップS107:YES)に、処理を終了させる。また、データ生成部31は、上述した処理を所定の回数、実行していない場合(ステップS107:NO)に、処理をステップS102に戻して、ステップS102からステップS107の処理を繰り返す。   Next, the data generation unit 31 determines whether or not it has been executed a predetermined number of times (step S107). The data generation unit 31 ends the process when the above-described process is executed a predetermined number of times (step S107: YES). In addition, when the above-described processing has not been executed a predetermined number of times (step S107: NO), the data generation unit 31 returns the processing to step S102 and repeats the processing from step S102 to step S107.

また、ステップS108において、データ生成部31は、L個の要素のうちから乱数により移動先の要素を再選択する。すなわち、データ生成部31は、2次元に配列された要素(例えば、900個の壺(30×30の壺))のうちから、移動元の要素(移動元の壺)とは異なる1つの要素を移動先の要素(移動先の壺)としてランダムに再選択する。データ生成部31は、再選択した移動先の要素(移動先の壺)を示す情報(要素番号Iの値、及び要素番号Jの値)を選択要素記憶部22に記憶させる。ステップS108の処理後に、データ生成部31は、処理をステップS106に進める。   In step S108, the data generation unit 31 reselects the destination element from the L elements using a random number. That is, the data generation unit 31 selects one element that is different from the source element (source cocoon) among the elements arranged in two dimensions (for example, 900 cocoons (30 × 30 cocoons)). Randomly re-select as the destination element (destination trap). The data generation unit 31 causes the selected element storage unit 22 to store information (the value of the element number I and the value of the element number J) indicating the reselected destination element (movement destination trap). After the process of step S108, the data generation unit 31 advances the process to step S106.

次に、図5〜図11を参照して、本実施形態によるデータ生成装置1によりべき分布データの生成結果の一例について説明する。
図5は、本実施形態におけるべき分布データの生成処理の初期値の一例を示す図である。この図において、横軸は、2次元配列における要素番号Iの値を示し、横軸は、2次元配列における要素番号Kの値を示している。また、この図において、●(黒丸)の大きさは、要素の値の大きさ(壺の中のボール数)を示している。
Next, an example of the generation result of the power distribution data by the data generation device 1 according to the present embodiment will be described with reference to FIGS.
FIG. 5 is a diagram illustrating an example of an initial value of the generation processing of the distribution data according to the present embodiment. In this figure, the horizontal axis indicates the value of element number I in the two-dimensional array, and the horizontal axis indicates the value of element number K in the two-dimensional array. In this figure, the size of ● (black circle) indicates the size of the element value (the number of balls in the basket).

また、図5に示す例は、データ生成部31が、30×30の2次元配列の要素(900個の要素)に対して、総数9000をランダムに分配して割り当てた場合(900個の要素の初期値)の一例を示している。   Further, in the example illustrated in FIG. 5, when the data generation unit 31 randomly distributes and assigns a total of 9000 to the elements (900 elements) of the 30 × 30 two-dimensional array (900 elements) An initial value) is shown as an example.

また、図6は、本実施形態におけるべき分布データの生成過程の一例を示す第1の図である。この図において、横軸及び縦軸は、図5と同様であり、また、●(黒丸)の大きさは、図5と同様に、要素の値の大きさ(壺の中のボール数)を示している。
また、図6に示す例は、データ生成部31が、上述した図4に示すステップS102からステップS107の処理を、200万回繰り返した途中経過を示している。この図に示すように、データ生成部31が、移動元の要素(移動元の壺)から移動先の要素(移動先の壺)に要素の値(ボール)を1つ移動させる処理を繰り返すことにより、要素の値(ボールの数)が、紙面右上(I=30、J=30)に向って、偏って大きくなっている。
FIG. 6 is a first diagram illustrating an example of a generation process of power distribution data in the present embodiment. In this figure, the horizontal axis and the vertical axis are the same as in FIG. 5, and the size of ● (black circle) is the value of the element value (the number of balls in the basket) as in FIG. Show.
In addition, the example illustrated in FIG. 6 illustrates a process in which the data generation unit 31 repeats the above-described processing from step S102 to step S107 illustrated in FIG. 4 two million times. As shown in this figure, the data generation unit 31 repeats the process of moving one element value (ball) from the movement source element (movement source basket) to the movement destination element (movement destination basket). Thus, the value of the element (the number of balls) is biasedly increased toward the upper right (I = 30, J = 30) on the paper surface.

また、図7は、本実施形態におけるべき分布データの生成結果の一例を示す図である。この図において、横軸及び縦軸は、図5及び図6と同様であり、また、●(黒丸)の大きさは、図5及び図6と同様に、要素の値の大きさ(壺の中のボール数)を示している。
また、図8に示す例は、データ生成部31が、上述した図4に示すステップS102からステップS107の処理を、800万回繰り返した生成結果を示している。この図に示すように、データ生成部31が、移動元の要素(移動元の壺)から移動先の要素(移動先の壺)に要素の値(ボール)を1つ移動させる処理をさらに繰り返すことにより、要素の値(ボールの数)のよるべき分布データが生成されたものを示している。
FIG. 7 is a diagram illustrating an example of a generation result of power distribution data in the present embodiment. In this figure, the horizontal axis and the vertical axis are the same as in FIGS. 5 and 6, and the size of ● (black circle) is the size of the element value (壺The number of balls inside).
In addition, the example illustrated in FIG. 8 illustrates a generation result in which the data generation unit 31 repeats the processing from step S102 to step S107 illustrated in FIG. 4 described above 8 million times. As shown in this figure, the data generation unit 31 further repeats the process of moving one element value (ball) from the movement source element (movement source basket) to the movement destination element (movement destination basket). Thus, the distribution data that should have the element values (the number of balls) is generated.

また、図8は、生成したデータの分布の一例を示す図である。
また、図8に示すグラフは、壷(要素)に対する壷の中のボール数(要素の値)を降順に、ボール数の分布を両対数グラフで示している(波形W1参照)。ここで、横軸が壺(要素、ボール数降順)を示し、壺の中のボール数(要素の値)を示し、横軸及び縦軸が対数スケールになっている。また、このグラフは、30×30の2次元配列の壺(900個の壺)に対して、総数9000のボールをランダムに分配して、上述した生成処理を3億回繰り返した場合のべき分布データの分布を示している。
図8の波形W1に示すように、生成したべき分布データは、両対数グラフにおいて、ほぼ直線になっており、データ生成装置1が、べき乗則に従ったデータ(べき分布データ)を適切に生成したことを示している。
FIG. 8 is a diagram illustrating an example of the distribution of generated data.
In addition, the graph shown in FIG. 8 shows the distribution of the number of balls in a log-log graph in descending order of the number of balls (element values) relative to the basket (element) (see waveform W1). Here, the horizontal axis indicates 軸 (element, descending number of balls), the number of balls in the heel (element value), and the horizontal and vertical axes are logarithmic scales. In addition, this graph shows the power distribution when the total number of 9000 balls is randomly distributed to 30 × 30 two-dimensional array of kites (900 kites) and the above generation process is repeated 300 million times. The distribution of data is shown.
As shown in the waveform W1 in FIG. 8, the distribution data to be generated is substantially a straight line in the log-log graph, and the data generation device 1 appropriately generates data (power distribution data) according to the power law. It shows that.

また、図9は、本実施形態の分布データの生成処理における繰り返し回数とべき指数との関係の一例を示す図である。
図9に示すグラフにおいて、横軸は、繰り返し回数を示し、縦軸は、べき指数を示している。また、波形W2は、繰り返し回数とべき指数との関係を示している。波形W2に示すように、上述した本実施形態による生成処理の一例では、繰り返し回数が約5000万回以上で、べき指数が一定になることを示している。
FIG. 9 is a diagram illustrating an example of the relationship between the number of repetitions and the exponent in the distribution data generation processing of the present embodiment.
In the graph shown in FIG. 9, the horizontal axis indicates the number of repetitions, and the vertical axis indicates the power index. The waveform W2 shows the relationship between the number of repetitions and the exponent. As shown in the waveform W2, the example of the generation process according to the present embodiment described above shows that the exponent is constant when the number of repetitions is about 50 million times or more.

なお、上述した本実施形態では、データ生成部31が、図3に示すように、2つの移動先候補(SE21、SE22)のうちから1つを移動先の要素として選択する例を説明したが、図10に示すように、3つの移動先候補(SE21、SE22、SE23)のうちから選択するようにしてもよい。   In the present embodiment described above, an example has been described in which the data generation unit 31 selects one of two movement destination candidates (SE21, SE22) as a movement destination element as illustrated in FIG. As shown in FIG. 10, it may be selected from three destination candidates (SE21, SE22, SE23).

図10は、本実施形態における2次元配列の要素の値における移動先候補の第1の変形例を示す図である。この図において、要素SE1は、移動元の要素(第1の要素)を示しており、要素SE21、要素SE22、及び要素23は、移動先候補を示している。ここで、要素SE21は、要素SE1をD(I=i,J=j)とした場合に、要素番号Iを+1だけ移動した要素(D(i+1,j))であり、要素SE22は、要素番号Jを+1だけ移動した要素(D(i,j+1))である。また、要素SE23は、要素番号I及び要素番号Jを+1だけ移動した要素(D(i+1,j+1))である。データ生成部31は、この3つの移動先候補のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択するようにしてもよい。   FIG. 10 is a diagram illustrating a first modification example of the movement destination candidate in the element value of the two-dimensional array in the present embodiment. In this figure, element SE1 indicates a source element (first element), and element SE21, element SE22, and element 23 indicate destination candidates. Here, the element SE21 is an element (D (i + 1, j)) obtained by moving the element number I by +1 when the element SE1 is D (I = i, J = j), and the element SE22 is an element SE22. This is an element (D (i, j + 1)) obtained by moving the number J by +1. Element SE23 is an element (D (i + 1, j + 1)) obtained by moving element number I and element number J by +1. The data generation unit 31 may select one element as a movement destination element (second element) from the three movement destination candidates based on the random number generated by the random number generation unit 11. .

また、移動先候補は、図11に示すように、右横の要素SE21(D(i+1,j))の代わりに、左横の要素SE24(D(i−1,j))を用いてもよい。
図11は、本実施形態における2次元配列の要素の値における移動先候補の第2の変形例を示す図である。この図において、要素SE1及び要素SE22は、図3と同様である。要素SE22及び要素SE24は、移動先候補を示しており、要素SE24は、要素番号Iを−1だけ移動した要素(D(i−1,j))である。データ生成部31は、このような2つの移動先候補(要素SE22及び要素SE24)のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択するようにしてもよい。
Further, as shown in FIG. 11, the left side element SE24 (D (i−1, j)) may be used as the movement destination candidate instead of the right side element SE21 (D (i + 1, j)). Good.
FIG. 11 is a diagram illustrating a second modification of the movement destination candidates in the element values of the two-dimensional array in the present embodiment. In this figure, element SE1 and element SE22 are the same as in FIG. An element SE22 and an element SE24 indicate destination candidates, and the element SE24 is an element (D (i-1, j)) obtained by moving the element number I by -1. Based on the random number generated by the random number generation unit 11 among the two destination candidates (element SE22 and element SE24), the data generation unit 31 converts one element into the destination element (second element). ) May be selected.

また、上述した本実施形態では、2次元配列の要素を用いてべき分布データを生成する例を説明したが、3次元以上の配列の要素を用いてもよい。ここで、図12及び図13を参照して、3次元配列の要素の値における移動先候補の変形例について説明する。
図12は、本実施形態における3次元配列の要素の値における移動先候補例を示す図である。この図において、要素SE1aは、移動元の要素(第1の要素)を示しており、要素SE21a、要素SE22a、及び要素23aは、移動先候補を示している。ここで、要素SE21aは、要素SE1aをD(I=i,J=j,K=k)とした場合に、要素番号Iを+1だけ移動した要素(D(i+1,j,k))であり、要素SE22aは、要素番号Jを+1だけ移動した要素(D(i,j+1,k))である。また、要素SE23aは、要素番号Kを+1だけ移動した要素(D(i,j,k+1))である。データ生成部31は、3次元配列の要素において、この3つの移動先候補のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択するようにしてもよい。
Further, in the present embodiment described above, an example in which power distribution data is generated using elements of a two-dimensional array has been described, but elements of an array of three or more dimensions may be used. Here, with reference to FIG.12 and FIG.13, the modified example of the movement destination candidate in the value of the element of a three-dimensional array is demonstrated.
FIG. 12 is a diagram illustrating an example of a movement destination candidate in the value of the element of the three-dimensional array in the present embodiment. In this figure, an element SE1a indicates a source element (first element), and an element SE21a, element SE22a, and element 23a indicate destination candidates. Here, the element SE21a is an element (D (i + 1, j, k)) obtained by moving the element number I by +1 when the element SE1a is D (I = i, J = j, K = k). The element SE22a is an element (D (i, j + 1, k)) obtained by moving the element number J by +1. Element SE23a is an element (D (i, j, k + 1)) obtained by moving element number K by +1. Based on the random number generated by the random number generation unit 11 among the three movement destination candidates in the elements of the three-dimensional array, the data generation unit 31 sets one element as the movement destination element (second element). You may make it select.

また、図13は、本実施形態における3次元配列の要素の値における移動先候補の変形例を示す図である。この図において、要素SE1aは、移動元の要素(第1の要素)を示しており、要素SE21a〜要素27aは、移動先候補を示しており、要素SE21a〜要素23aは、上述した図12と同様である。また、要素SE24aは、要素番号I及びJを+1だけ移動した要素(D(i+1,j+1,k))であり、要素SE25aは、要素番号I及びKを+1だけ移動した要素(D(i+1,j,k+1))である。また、要素SE26aは、要素番号J及びKを+1だけ移動した要素(D(i,j+1,k+1))であり、要素SE27aは、要素番号I、J、及びKを+1だけ移動した要素(D(i+1,j+1,k+1))である。データ生成部31は、3次元配列の要素において、この7つの移動先候補のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択するようにしてもよい。   FIG. 13 is a diagram illustrating a modification example of the movement destination candidate in the element value of the three-dimensional array in the present embodiment. In this figure, an element SE1a indicates a source element (first element), elements SE21a to 27a indicate destination candidates, and elements SE21a to 23a are the same as those in FIG. It is the same. The element SE24a is an element (D (i + 1, j + 1, k)) obtained by moving the element numbers I and J by +1, and the element SE25a is an element (D (i + 1, j) obtained by moving the element numbers I and K by +1. j, k + 1)). The element SE26a is an element (D (i, j + 1, k + 1)) obtained by moving the element numbers J and K by +1, and the element SE27a is an element obtained by moving the element numbers I, J, and K by +1 (D (I + 1, j + 1, k + 1)). Based on the random number generated by the random number generation unit 11 among the seven destination candidates in the elements of the three-dimensional array, the data generation unit 31 sets one element as the destination element (second element). You may make it select.

以上説明したように、本実施形態によるデータ生成装置1は、乱数を生成する乱数生成部11と、0以上の整数の値を有するL個(ただしLは正の整数)の要素(例えば、エレメント、ノードなど)を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成部31であって、第1の処理と、第2の処理と、第3の処理と、第4の処理と、第5の処理とを実行するデータ生成部31とを備える。データ生成部31は、第1の処理において、乱数生成部11が生成した乱数に基づいて、総数M(ただしMは正の整数)を分配してL個の要素の各々に割り当てる。データ生成部31は、第2の処理において、乱数生成部11が生成した乱数に基づいて、L個の要素のうちから1つの要素を移動元の要素(第1の要素)として選択する。データ生成部31は、第3の処理において、L個の要素から移動元の要素に対して予め定められた一部の選択可能な要素(例えば、図3の要素SE21及び要素SE22)のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する。データ生成部31は、第4の処理において、第1の要素の値が1以上である場合に、選択した移動元の要素から移動先の要素に要素の値を1つ移動する。データ生成部31は、第5の処理において、第2の処理から第4の処理を繰り返し行う。   As described above, the data generation device 1 according to the present embodiment includes a random number generation unit 11 that generates a random number, and L elements (where L is a positive integer) having an integer value of 0 or more (for example, an element) , Nodes, etc.) to generate distribution data that should be data that conforms to the power law, and includes a first process, a second process, a third process, The data generation part 31 which performs 4 processes and a 5th process is provided. In the first process, the data generation unit 31 distributes the total number M (where M is a positive integer) based on the random number generated by the random number generation unit 11 and assigns it to each of the L elements. In the second process, the data generation unit 31 selects one element from the L elements as a movement source element (first element) based on the random number generated by the random number generation unit 11. In the third process, the data generation unit 31 selects a part of the selectable elements (for example, the element SE21 and the element SE22 in FIG. 3) predetermined from the L elements to the movement source element. Based on the random number generated by the random number generation unit 11, one element is selected as a movement destination element (second element). In the fourth process, when the value of the first element is 1 or more, the data generation unit 31 moves one element value from the selected movement source element to the movement destination element. In the fifth process, the data generation unit 31 repeatedly performs the second process to the fourth process.

これにより、本実施形態によるデータ生成装置1は、図8〜図11に示すように、べき分布データを容易に生成することができる。
なお、本実施形態によるデータ生成装置1では、例えば、都市人口、高所得者の収入、地震の大きさと発生頻度、ウェブページのハイパーリンクの数などの様々な自然現象や社会現象を解析する際のシミュレーションの初期データとして、生成したべき分布データを利用することができる。よって、本実施形態によるデータ生成装置1は、べき乗則となる現象を解析する際のシミュレーションの初期データを容易に生成することができる。したがって、本実施形態によるデータ生成装置1を用いることにより、例えば、コンピュータ間のネットワーク接続や都市間の人の移動などのシミュレーションが可能となり、例えば、ウィルス蔓延の影響範囲と、その抑制策の効果予測などを行うことができる。
Thereby, the data generation device 1 according to the present embodiment can easily generate the power distribution data as shown in FIGS.
In the data generation apparatus 1 according to the present embodiment, for example, when analyzing various natural phenomena and social phenomena such as urban population, income of high-income earners, the magnitude and frequency of earthquakes, and the number of hyperlinks on web pages. The generated distribution data can be used as initial data for the simulation. Therefore, the data generation device 1 according to the present embodiment can easily generate initial data for simulation when analyzing a phenomenon that becomes a power law. Therefore, by using the data generation apparatus 1 according to the present embodiment, for example, simulation of network connection between computers, movement of people between cities, and the like becomes possible. Predictions can be made.

また、本実施形態では、L個の要素は、N次元(ただしNは2以上の整数)に配列された要素である。データ生成部31は、第1の処理において、乱数生成部11が生成した乱数に基づいて、総数Mを分配してN次元に配列された要素の各々に割り当てる。データ生成部31は、第2の処理において、乱数生成部11が生成した乱数に基づいて、N次元に配列された要素のうちから1つの要素を移動元の要素(第1の要素)として選択する。データ生成部31は、第3の処理において、N次元の要素番号の正負の方向のうちの各次元で予め定められた1つの方向に、各次元の要素番号を1以内移動させて選択可能な複数の要素のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する。
これにより、本実施形態によるデータ生成装置1は、N次元に配列された要素を利用して、べき分布データを容易に生成することができる。
In the present embodiment, the L elements are elements arranged in N dimensions (where N is an integer of 2 or more). In the first process, the data generation unit 31 distributes the total number M based on the random number generated by the random number generation unit 11 and assigns it to each of the elements arranged in the N dimension. In the second process, the data generation unit 31 selects one element as the movement source element (first element) from among the elements arranged in N dimensions based on the random number generated by the random number generation unit 11 To do. In the third process, the data generation unit 31 can select an element number of each dimension by moving it within one direction in one of the positive and negative directions of the N-dimensional element number in a predetermined direction. One element is selected as a movement destination element (second element) based on the random number generated by the random number generation unit 11 from the plurality of elements.
Thereby, the data generation device 1 according to the present embodiment can easily generate power distribution data using elements arranged in N dimensions.

また、本実施形態では、データ生成部31は、第3の処理において、移動先の要素(第2の要素)として選択された1つの要素の要素番号(例えば、I又はJ)が、N次元に配列された要素に設定された要素番号の範囲(例えば、1〜30の範囲)から外れた場合に、乱数生成部11が生成した乱数に基づいて、N次元に配列された要素のうちから、移動元の要素(第1の要素)とは異なる1つの要素を移動先の要素(第2の要素)として再選択する。
これにより、本実施形態によるデータ生成装置1は、総数Mを増減することなく、べき分布データを適切に生成することができる。
In the present embodiment, the data generation unit 31 determines that the element number (for example, I or J) of one element selected as the movement destination element (second element) in the third process is N-dimensional. Based on the random number generated by the random number generation unit 11 when the element number is out of the range of the element numbers set in the elements arranged in (1 to 30), for example, from among the elements arranged in the N dimension Then, one element different from the source element (first element) is reselected as the destination element (second element).
Thereby, the data generation device 1 according to the present embodiment can appropriately generate power distribution data without increasing or decreasing the total number M.

また、本実施形態では、各次元の要素番号を1以内移動させて選択可能な複数の要素は、各次元で予め定められた1つの方向だけ、要素番号を1つ移動させたN個の要素(例えば、図3の要素SE21及び要素SE22の2個の要素(移動先候補の要素))である。データ生成部31は、第3の処理において、N個の要素のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する。
これにより、移動先候補の数を次元数Nに制限することができるため、本実施形態によるデータ生成装置1は、第3の処理を簡略化することができる。よって、本実施形態によるデータ生成装置1は、N次元に配列された要素を利用して、べき分布データをさらに容易に生成することができる。
Further, in the present embodiment, the plurality of elements that can be selected by moving the element number of each dimension within one are N elements that are moved by one element number only in one direction predetermined in each dimension. (For example, two elements (elements of movement destination candidates) of element SE21 and element SE22 in FIG. 3). In the third process, the data generation unit 31 selects one element as a movement destination element (second element) from the N elements based on the random number generated by the random number generation unit 11.
Thereby, since the number of movement destination candidates can be limited to the number of dimensions N, the data generation device 1 according to the present embodiment can simplify the third process. Therefore, the data generation device 1 according to the present embodiment can generate power distribution data more easily using elements arranged in N dimensions.

また、本実施形態では、上述したNは、2であり、データ生成部31は、第3の処理において、各次元で予め定められた1つの方向だけ要素番号を1つ移動させた2個の要素のうちから、乱数生成部11が生成した乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する。
これにより、本実施形態によるデータ生成装置1は、2次元に配列された要素を利用して、べき分布データをさらに容易に生成することができる。
In the present embodiment, N described above is 2, and in the third process, the data generation unit 31 moves two element numbers by moving one element number in one direction predetermined in each dimension. Based on the random number generated by the random number generation unit 11 from among the elements, one element is selected as a movement destination element (second element).
Thereby, the data generation device 1 according to the present embodiment can generate the power distribution data more easily using the elements arranged in two dimensions.

また、本実施形態では、データ生成部31は、第4の処理において、移動元の要素(第1の要素)の値が0である場合に、移動元の要素(第1の要素)から移動先の要素(第2の要素)に要素の値を1つ移動する処理を実行しない。
これにより、本実施形態によるデータ生成装置1は、べき分布データを生成する処理をさらに簡略化することができる。
In the present embodiment, in the fourth process, the data generation unit 31 moves from the movement source element (first element) when the value of the movement source element (first element) is 0. The process of moving one element value to the previous element (second element) is not executed.
Thereby, the data generation device 1 according to the present embodiment can further simplify the process of generating the power distribution data.

また、本実施形態によるデータ生成方法は、乱数生成部11が、乱数を生成する乱数生成ステップと、データ生成部31が、0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき分布データを生成するデータ生成ステップとを含む。データ生成ステップには、第1の処理ステップと、第2の処理ステップと、第3の処理ステップと、第4の処理ステップと、第5の処理ステップとが含まれる。第1の処理ステップにおいて、データ生成部31が、乱数生成ステップにより生成された乱数に基づいて、総数M(ただしMは正の整数)を分配してL個の要素の各々に割り当てる。第2の処理ステップにおいて、データ生成部31が、乱数生成ステップにより生成された乱数に基づいて、L個の要素のうちから1つの要素を移動元の要素(第1の要素)として選択する。第3の処理ステップにおいて、データ生成部31が、L個の要素から移動元の要素(第1の要素)に対して予め定められた一部の選択可能な要素のうちから、乱数生成ステップにより生成された乱数に基づいて、1つの要素を移動先の要素(第2の要素)として選択する。第4の処理ステップにおいて、データ生成部31が、移動元の要素(第1の要素)の値が1以上である場合に、移動元の要素(第1の要素)から移動先の要素(第2の要素)に要素の値を1つ移動する。第5の処理ステップにおいて、データ生成部31が、第2の処理ステップから第4の処理ステップを繰り返し行う。
これにより、本実施形態によるデータ生成方法は、上述したデータ生成装置1と同様の効果を奏し、べき分布データを容易に生成することができる。
Further, in the data generation method according to the present embodiment, the random number generation unit 11 generates a random number, and the data generation unit 31 has L values having an integer value of 0 or more (where L is a positive integer). And a data generation step of generating power distribution data using the elements. The data generation step includes a first processing step, a second processing step, a third processing step, a fourth processing step, and a fifth processing step. In the first processing step, the data generation unit 31 distributes the total number M (where M is a positive integer) based on the random number generated in the random number generation step and assigns it to each of the L elements. In the second processing step, the data generation unit 31 selects one element from among the L elements as a movement source element (first element) based on the random number generated in the random number generation step. In the third processing step, the data generation unit 31 performs a random number generation step from among some selectable elements predetermined from the L elements to the movement source element (first element). Based on the generated random number, one element is selected as a movement destination element (second element). In the fourth processing step, when the value of the source element (first element) is 1 or more, the data generation unit 31 moves from the source element (first element) to the destination element (first element). Move the value of one element to (2 elements). In the fifth processing step, the data generation unit 31 repeatedly performs the second processing step to the fourth processing step.
Thereby, the data generation method by this embodiment has the same effect as the data generation device 1 mentioned above, and can generate power distribution data easily.

なお、本発明は、上記の実施形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で変更可能である。
例えば、上記の実施形態において、N次元配列の要素を用いてべき分布データを生成する例を説明したが、これに限定されるものではなく、単にL個(ただしLは正の整数)の要素を用いてもよい。この場合、移動先候補の要素は、各要素に対して、予め定められた一部の要素であってもよい。
また、上記の実施形態において、N次元配列の一例として、2次元配列を用いる例を説明したが、これに限定されるものではなく、3次元以上の配列を用いるようにしてもよい。
In addition, this invention is not limited to said embodiment, It can change in the range which does not deviate from the meaning of this invention.
For example, in the above embodiment, the example of generating the distribution data using the elements of the N-dimensional array has been described. However, the present invention is not limited to this, and simply L elements (where L is a positive integer). May be used. In this case, the movement destination candidate elements may be a part of elements that are predetermined for each element.
In the above embodiment, an example using a two-dimensional array has been described as an example of an N-dimensional array. However, the present invention is not limited to this, and a three-dimensional or more array may be used.

また、上記の実施形態において、N次元の要素番号の正負の方向のうちの各次元で予め定められた1つの方向(移動先候補の方向)を、全て正方向(図3、図10、図12、及び図13)に定める例を説明したが、これに限定されるものではない。例えば、この移動先候補の方向は、図11に示す第2の変形例のように、正方向と負方向とを組み合わせてもよいし、全て負方向であってもよい。   Further, in the above-described embodiment, all the one direction (direction of the movement destination candidate) predetermined in each dimension among the positive and negative directions of the N-dimensional element number is the positive direction (FIG. 3, FIG. 10, FIG. 12 and FIG. 13) have been described. However, the present invention is not limited to this. For example, the direction of the destination candidate may be a combination of a positive direction and a negative direction as in the second modification shown in FIG.

また、上記の実施形態において、データ生成装置1は、生成したべき分布データを、自然現象や社会現象を解析する際のシミュレーションの初期データとして利用する際に、N次元配列上に、乱数を利用してランダムに再配置するようにしてもよい。これにより、データ生成装置1は、図8に示すようなN次元配列上の偏りを解消したべき分布データを生成することが可能になる。   In the above embodiment, the data generation device 1 uses random numbers on the N-dimensional array when using the distribution data to be generated as initial data for simulation when analyzing a natural phenomenon or a social phenomenon. And you may make it rearrange at random. Thereby, the data generation device 1 can generate distribution data that should eliminate the bias on the N-dimensional array as shown in FIG.

なお、上述したデータ生成装置1が備える各構成は、内部に、コンピュータシステムを有している。そして、上述したデータ生成装置1が備える各構成の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述したデータ生成装置1が備える各構成における処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD−ROM等の非一過性の記録媒体であってもよい。
In addition, each structure with which the data generation apparatus 1 mentioned above is provided has a computer system inside. Then, a program for realizing the functions of each component included in the data generation device 1 described above is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. The processing in each configuration included in the data generation device 1 described above may be performed. Here, “loading and executing a program recorded on a recording medium into a computer system” includes installing the program in the computer system. The “computer system” here includes an OS and hardware such as peripheral devices.
Further, the “computer system” may include a plurality of computer devices connected via a network including a communication line such as the Internet, WAN, LAN, and dedicated line. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. As described above, the recording medium storing the program may be a non-transitory recording medium such as a CD-ROM.

また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部又は外部に設けられた記録媒体も含まれる。なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後にデータ生成装置1が備える各構成で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムに既に記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。   The recording medium also includes a recording medium provided inside or outside that is accessible from the distribution server in order to distribute the program. It should be noted that the program may be divided into a plurality of parts and downloaded at different timings, and the composition of the constituents of the data generation device 1 may be combined, or the distribution server that distributes each of the divided programs may be different. Furthermore, a “computer-readable recording medium” holds a program for a certain period of time, such as a volatile memory (RAM) inside a computer system that becomes a server or client when the program is transmitted via a network. Including things. The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

また、上述した機能の一部又は全部を、LSI(Large Scale Integration)等の集積回路として実現してもよい。上述した各機能は個別にプロセッサ化してもよいし、一部、又は全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、又は汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。   Moreover, you may implement | achieve part or all of the function mentioned above as integrated circuits, such as LSI (Large Scale Integration). Each function described above may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when an integrated circuit technology that replaces LSI appears due to the advancement of semiconductor technology, an integrated circuit based on the technology may be used.

1 データ生成装置
11 乱数生成部
20 記憶部
21 配列記憶部
22 選択要素記憶部
30 制御部
31 データ生成部
DESCRIPTION OF SYMBOLS 1 Data generation apparatus 11 Random number generation part 20 Storage part 21 Array storage part 22 Selection element storage part 30 Control part 31 Data generation part

Claims (8)

乱数を生成する乱数生成部と、
0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成部であって、
前記乱数生成部が生成した乱数に基づいて、総数M(ただしMは正の整数)を分配して前記L個の要素の各々に割り当てる第1の処理と、
前記乱数生成部が生成した乱数に基づいて、前記L個の要素のうちから1つの要素を第1の要素として選択する第2の処理と、
前記L個の要素から前記第1の要素に対して予め定められた一部の選択可能な要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を第2の要素として選択する第3の処理と、
前記第1の要素の値が1以上である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する第4の処理と、
前記第2の処理から前記第4の処理を繰り返し行う第5の処理と
を実行するデータ生成部と
を備えることを特徴とするデータ生成装置。
A random number generator for generating random numbers;
A data generation unit that generates distribution data that should be data according to a power law using L elements (where L is a positive integer) having an integer value of 0 or more,
A first process of distributing a total number M (where M is a positive integer) and allocating to each of the L elements based on the random number generated by the random number generation unit;
A second process of selecting one element as the first element from the L elements based on the random number generated by the random number generation unit;
Based on the random number generated by the random number generation unit, one element is selected as a second element from among a part of selectable elements predetermined for the first element from the L elements. A third process to select;
A fourth process of moving one value of the element from the first element to the second element when the value of the first element is 1 or more;
A data generation device comprising: a data generation unit that executes a fifth process that repeatedly performs the fourth process from the second process.
前記L個の要素は、N次元(ただしNは2以上の整数)に配列された要素であり、
前記データ生成部は、
前記第1の処理において、前記乱数生成部が生成した乱数に基づいて、前記総数Mを分配して前記N次元に配列された要素の各々に割り当て、
前記第2の処理において、前記乱数生成部が生成した乱数に基づいて、前記N次元に配列された要素のうちから1つの要素を前記第1の要素として選択し、
前記第3の処理において、前記N次元の要素番号の正負の方向のうちの各次元で予め定められた1つの方向に、前記各次元の前記要素番号を1以内移動させて選択可能な複数の要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を前記第2の要素として選択する
ことを特徴とする請求項1に記載のデータ生成装置。
The L elements are elements arranged in N dimensions (where N is an integer of 2 or more),
The data generator is
In the first process, based on the random number generated by the random number generation unit, the total number M is distributed and assigned to each of the elements arranged in the N dimensions,
In the second process, based on the random number generated by the random number generation unit, one element is selected as the first element from the elements arranged in the N dimensions,
In the third process, the element number of each dimension can be selected by moving the element number of each dimension within one in a predetermined direction in each dimension of positive and negative directions of the N-dimensional element number. The data generation device according to claim 1, wherein one element is selected as the second element from the elements based on the random number generated by the random number generation unit.
前記データ生成部は、前記第3の処理において、前記第2の要素として選択された前記1つの要素の要素番号が、前記N次元に配列された要素に設定された要素番号の範囲から外れた場合に、前記乱数生成部が生成した乱数に基づいて、前記N次元に配列された要素のうちから、前記第1の要素とは異なる1つの要素を前記第2の要素として再選択する
ことを特徴とする請求項2に記載のデータ生成装置。
In the third process, the data generation unit is configured such that the element number of the one element selected as the second element is out of the range of element numbers set for the elements arranged in the N dimension. In this case, based on the random number generated by the random number generation unit, one element different from the first element is reselected as the second element from the elements arranged in the N dimension. The data generation apparatus according to claim 2, wherein the data generation apparatus is a data generation apparatus.
前記各次元の前記要素番号を1以内移動させて選択可能な複数の要素は、前記各次元で予め定められた1つの方向だけ、前記要素番号を1つ移動させたN個の要素であり、
前記データ生成部は、前記第3の処理において、前記N個の要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を前記第2の要素として選択する
ことを特徴とする請求項2又は請求項3に記載のデータ生成装置。
The plurality of elements that can be selected by moving the element number of each dimension within 1 are N elements that are moved by one element number in one direction predetermined in each dimension,
The data generation unit selects one element as the second element based on the random number generated by the random number generation unit from the N elements in the third process. The data generation device according to claim 2 or 3.
前記Nは、2であり、
前記データ生成部は、前記第3の処理において、前記各次元で予め定められた1つの方向だけ前記要素番号を1つ移動させた2個の要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を前記第2の要素として選択する
ことを特徴とする請求項4に記載のデータ生成装置。
N is 2;
In the third process, the data generation unit generates a random number generated by the random number generation unit from two elements obtained by moving the element number by one in a predetermined direction in each dimension. The data generation device according to claim 4, wherein one element is selected as the second element based on the following.
前記データ生成部は、前記第4の処理において、前記第1の要素の値が0である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する処理を実行しない
ことを特徴とする請求項1から請求項5のいずれか一項に記載のデータ生成装置。
In the fourth process, when the value of the first element is 0, the data generation unit performs a process of moving the element value by one from the first element to the second element. The data generation device according to any one of claims 1 to 5, wherein the data generation device is not executed.
乱数生成部が、乱数を生成する乱数生成ステップと、
データ生成部が、0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成ステップと
を含み、
データ生成ステップには、
前記データ生成部が、前記乱数生成ステップにより生成された乱数に基づいて、総数M(ただしMは正の整数)を分配して前記L個の要素の各々に割り当てる第1の処理ステップと、
前記データ生成部が、前記乱数生成ステップにより生成された乱数に基づいて、前記L個の要素のうちから1つの要素を第1の要素として選択する第2の処理ステップと、
前記データ生成部が、前記L個の要素から前記第1の要素に対して予め定められた一部の選択可能な要素のうちから、前記乱数生成ステップにより生成された乱数に基づいて、1つの要素を第2の要素として選択する第3の処理ステップと、
前記データ生成部が、前記第1の要素の値が1以上である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する第4の処理ステップと、
前記データ生成部が、前記第2の処理ステップから前記第4の処理ステップを繰り返し行う第5の処理ステップと
が含まれることを特徴とするデータ生成方法。
A random number generation unit for generating a random number;
A data generation step in which a data generation unit generates distribution data that should be data in accordance with a power law using L elements (where L is a positive integer) having an integer value of 0 or more. ,
The data generation step includes
A first processing step in which the data generation unit distributes a total number M (where M is a positive integer) and allocates each of the L elements based on the random number generated in the random number generation step;
A second processing step in which the data generation unit selects one element as a first element from the L elements based on the random number generated by the random number generation step;
Based on the random number generated by the random number generation step, the data generation unit is configured to select one element from among the selectable elements predetermined for the first element from the L elements. A third processing step of selecting an element as the second element;
A fourth processing step in which the data generation unit moves the value of the element by one from the first element to the second element when the value of the first element is 1 or more;
And a fifth processing step in which the data generation unit repeats the fourth processing step from the second processing step.
乱数を生成する乱数生成部と、0以上の整数の値を有するL個(ただしLは正の整数)の要素を利用して、べき乗則に従ったデータであるべき分布データを生成するデータ生成部とを備えるコンピュータに、
前記乱数生成部が生成した乱数に基づいて、総数M(ただしMは正の整数)を分配して前記L個の要素の各々に割り当てる第1の処理と、
前記乱数生成部が生成した乱数に基づいて、前記L個の要素のうちから1つの要素を第1の要素として選択する第2の処理と、
前記L個の要素から前記第1の要素に対して予め定められた一部の選択可能な要素のうちから、前記乱数生成部が生成した乱数に基づいて、1つの要素を第2の要素として選択する第3の処理と、
前記第1の要素の値が1以上である場合に、前記第1の要素から前記第2の要素に前記要素の値を1つ移動する第4の処理と、
前記第2の処理から前記第4の処理を繰り返し行う第5の処理と
を実行させるためのプログラム。
Data generation for generating distribution data that should be data according to a power law, using a random number generator for generating random numbers and L elements (where L is a positive integer) having an integer value of 0 or more A computer equipped with a
A first process of distributing a total number M (where M is a positive integer) and allocating to each of the L elements based on the random number generated by the random number generation unit;
A second process of selecting one element as the first element from the L elements based on the random number generated by the random number generation unit;
Based on the random number generated by the random number generation unit, one element is selected as a second element from among a part of selectable elements predetermined for the first element from the L elements. A third process to select;
A fourth process of moving one value of the element from the first element to the second element when the value of the first element is 1 or more;
And a fifth process for repeatedly performing the fourth process from the second process.
JP2017177706A 2017-09-15 2017-09-15 Data generator, data generation method, and program Active JP6991025B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017177706A JP6991025B2 (en) 2017-09-15 2017-09-15 Data generator, data generation method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017177706A JP6991025B2 (en) 2017-09-15 2017-09-15 Data generator, data generation method, and program

Publications (2)

Publication Number Publication Date
JP2019053556A true JP2019053556A (en) 2019-04-04
JP6991025B2 JP6991025B2 (en) 2022-01-12

Family

ID=66013817

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017177706A Active JP6991025B2 (en) 2017-09-15 2017-09-15 Data generator, data generation method, and program

Country Status (1)

Country Link
JP (1) JP6991025B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275634A (en) * 2004-03-24 2005-10-06 Hi Enterprise:Kk Power law type information processor, power law type information processing method, program, and recording medium
JP2007287079A (en) * 2006-04-20 2007-11-01 Fujitsu Fip Corp Pseudo random number generation device, pseudo random number generation method, pseudo random number generation program, ciphering device and deciphering device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275634A (en) * 2004-03-24 2005-10-06 Hi Enterprise:Kk Power law type information processor, power law type information processing method, program, and recording medium
JP2007287079A (en) * 2006-04-20 2007-11-01 Fujitsu Fip Corp Pseudo random number generation device, pseudo random number generation method, pseudo random number generation program, ciphering device and deciphering device

Also Published As

Publication number Publication date
JP6991025B2 (en) 2022-01-12

Similar Documents

Publication Publication Date Title
US20190266217A1 (en) Apparatus and method for matrix computation
De Vleeschauwer et al. Dynamic microcell assignment for massively multiplayer online gaming
CN111667057B (en) Method and apparatus for searching model structures
Liivamägi et al. SDSS DR7 superclusters-The catalogues
Lim et al. A Biogeography‐Based Optimization Algorithm Hybridized with Tabu Search for the Quadratic Assignment Problem
JP5708495B2 (en) Dictionary creation device, word collection method, and program
CN109992699B (en) User group optimization method and device, storage medium and computer equipment
JP2018073427A5 (en)
JP6729810B2 (en) Information processing apparatus, information processing method, and information processing program
JP2019053556A (en) Data generation device, data generation method, and program
JP6958260B2 (en) Simulation methods, programs, and equipment
JP2010176657A (en) System, method, and computer program product for importance sampling of partitioned domains
Rodionov et al. Framework for biologically inspired graph optimization
CN1423191A (en) Sub-minimum tree structure for providing optimized network configuration, its searching and generating method
CN107992526B (en) Anchor recommendation method, storage device and computer device
Pillay Finding solutions to Sudoku puzzles using human intuitive heuristics
JP5949606B2 (en) Test design support apparatus and program
Bhardwaj et al. Performance improvement in genetic programming using modified crossover and node mutation
Rashid et al. A greedy-genetic local-search heuristic for the traveling salesman problem
JP2010198133A (en) Method of selecting function for performance evaluation modeling
US20230145348A1 (en) Force-directed graph layout
Fazal et al. Using Open Street Map for Content Creation in Location-Based Games
JP3615439B2 (en) Similarity Feature Retrieval Method, Retrieval Device, and Retrieval Program Recording Medium
GB2593700A (en) Force-directed graph layout
KR101738415B1 (en) Data storage apparatus and method for storing a message dispersedly

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200721

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210517

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210525

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210712

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211109

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211207

R150 Certificate of patent or registration of utility model

Ref document number: 6991025

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350