JP7079546B2 - Pseudo-random number generator and pseudo-random number generator - Google Patents

Pseudo-random number generator and pseudo-random number generator Download PDF

Info

Publication number
JP7079546B2
JP7079546B2 JP2018168348A JP2018168348A JP7079546B2 JP 7079546 B2 JP7079546 B2 JP 7079546B2 JP 2018168348 A JP2018168348 A JP 2018168348A JP 2018168348 A JP2018168348 A JP 2018168348A JP 7079546 B2 JP7079546 B2 JP 7079546B2
Authority
JP
Japan
Prior art keywords
random number
tent
prime
mapping
pseudo
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.)
Active
Application number
JP2018168348A
Other languages
Japanese (ja)
Other versions
JP2020042453A (en
Inventor
隆 岩野
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.)
Toshiba Information Systems Japan Corp
Original Assignee
Toshiba Information Systems Japan 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 Toshiba Information Systems Japan Corp filed Critical Toshiba Information Systems Japan Corp
Priority to JP2018168348A priority Critical patent/JP7079546B2/en
Publication of JP2020042453A publication Critical patent/JP2020042453A/en
Application granted granted Critical
Publication of JP7079546B2 publication Critical patent/JP7079546B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、擬似乱数生成装置及び擬似乱数生成プログラムに関するものである。 The present invention relates to a pseudo-random number generator and a pseudo-random number generator.

従来、一次元写像(テント写像やロジスティック写像)による疑似乱数生成方法がいくつか提案されている。これらは一次元写像による写像の度に値を乱数として取得していくものである。しかしながら、有限演算精度実装では、演算精度の割には、かなり短い周期帯に入ることで乱数性能が悪くなるといった問題がある。このため系列を変動させる機構を取り入れ長周期化を図り、乱数性能を向上させるといった工夫を施している。 Conventionally, several methods for generating pseudo-random numbers by one-dimensional mapping (tent mapping or logistic mapping) have been proposed. These acquire values as random numbers each time they are mapped by one-dimensional mapping. However, in the implementation of finite arithmetic precision, there is a problem that the random number performance deteriorates due to entering a fairly short periodic band for the arithmetic accuracy. For this reason, we have adopted a mechanism to change the sequence to extend the period and improve the random number performance.

従来の一次元写像による乱数生成において周期を延長するためには、乱数生成系列を自己フィードバックしたり外部からの不確定な系列で撹乱したりするものであった。従ってこのような乱数生成手法では、理論的に一度出力された同じ値は出力することが無いといった一様性の保証は得られなく、数値に偏りが生じた場合に乱数性が悪くなってしまう懸念を含んでいた。また、最大周期長の見積もりも確定的に行えないといった問題があった。 In order to extend the period in the conventional random number generation by one-dimensional mapping, the random number generation sequence is self-feedback or disturbed by an uncertain sequence from the outside. Therefore, with such a random number generation method, it is not possible to obtain a guarantee of uniformity that the same value once output theoretically is not output, and the random number property deteriorates when the numerical value is biased. It contained concerns. In addition, there is a problem that the maximum cycle length cannot be definitively estimated.

特許文献1には、周期性を考慮したカオス的乱数列の発生装置が開示されている。この特許文献1では一次元写像による乱数生成方法において周期を巧妙に延長する手段が紹介されているが、一様性の保証面の言及がなされておらず、周期長の延長に限界がある。 Patent Document 1 discloses a device for generating a chaotic random number sequence in consideration of periodicity. In Patent Document 1, a means for skillfully extending a period in a random number generation method using a one-dimensional map is introduced, but the aspect of guaranteeing uniformity is not mentioned, and there is a limit to the extension of the period length.

また、一周期内で一様な乱数が得られるものとしては、「線形合同法」や「線形フィードバックシフトレジスタ(LFSR)」、「メルセンヌツイスター」などが知られている。しかしながら、これらのものでは、一様な値を最大周期にて乱数生成が行われるような最適なパラメータを、経験的に予め探索しなくてはならないといった労力が必要となる。 Further, "linear congruential method", "linear feedback shift register (LFSR)", "Mersenne Twister" and the like are known as those that can obtain a uniform random number in one cycle. However, in these cases, it is necessary to empirically search in advance for the optimum parameters such that random numbers are generated with a uniform value at the maximum cycle.

特許文献2には、乱数生成モジュールで生成された乱数列から乱数とする数列を選択する際に、素数を利用するという周期拡張方法が開示されている。しかしながら、この特許文献2に記載のものは、周期の一様性を保証するものではない。 Patent Document 2 discloses a periodic extension method in which a prime number is used when selecting a sequence of random numbers from a sequence of random numbers generated by a random number generation module. However, the one described in Patent Document 2 does not guarantee the uniformity of the period.

特開平9-292978号公報Japanese Unexamined Patent Publication No. 9-292978 特開2009-3925号公報Japanese Unexamined Patent Publication No. 2009-3925

本発明は上記の様な従来の乱数生成における問題点に鑑みてなされたもので、実質的に際限のない周期長を持った疑似乱数列を生成することが可能な疑似乱数生成装置及び疑似乱数生成プログラムを提供することを目的とする。 The present invention has been made in view of the problems in the conventional random number generation as described above, and is a pseudo-random number generator and a pseudo-random number capable of generating a pseudo-random number sequence having a substantially unlimited period length. The purpose is to provide a generator.

本発明に係る擬似乱数生成装置の実施形態は、テント写像による写像演算を行うテント写像演算手段と、前記テント写像を整数演算で可能とするために、前記テント写像の最大区間を整数倍するときの素数Pを用いた式(P-1)/2が素数であるかを検出し、(P-1)/2が素数でない場合には(P-1)/2を素因数分解して素因数を求め、(P-1)/2が素数であるかまたは前記素因数が所定条件式を満たすかに基づき、当該素数Pを選択して前記テント写像演算手段へ与えるテント写像パラメータ選択手段と、前記テント写像演算手段による演算結果に基づき所定長の数列を生成する乱数生成手段とを具備することを特徴とする。

An embodiment of the pseudo-random number generator according to the present invention is a tent mapping calculation means that performs a mapping calculation by a tent mapping, and when the maximum section of the tent mapping is multiplied by an integer in order to enable the tent mapping by an integer calculation. Detects whether the equation (P-1) / 2 using the prime number P of is a prime number, and if (P-1) / 2 is not a prime number, factor (P-1) / 2 into a prime number to obtain the prime factor. Based on whether (P-1) / 2 is a prime number or the prime factor satisfies a predetermined conditional expression, the tent mapping parameter selection means for selecting the prime number P and giving it to the tent mapping calculation means, and the tent. It is characterized by comprising a random number generation means for generating a prime number sequence having a predetermined length based on the calculation result by the mapping calculation means.

本発明に係る疑似乱数生成装置の実施形態の構成を示すブロック図。The block diagram which shows the structure of embodiment of the pseudo-random number generation apparatus which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態の動作を示すフローチャート。The flowchart which shows the operation of the embodiment of the pseudo-random number generator which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態で用いるテント写像のマップを示す図。The figure which shows the map of the tent map used in the embodiment of the pseudo-random number generator which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態で用いるテント写像の時系列変化を示す図。The figure which shows the time-series change of the tent map used in the embodiment of the pseudo-random number generator which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態で用いるテント写像と位相共役の関係にあるロジスティック写像のマップを示す図。The figure which shows the map of the logistic map which has the relationship of topological conjugation with the tent map used in the embodiment of the pseudo-random number generator which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態で用いるテント写像と位相共役の関係にあるロジスティック写像の時系列変化を示す図。The figure which shows the time-series change of the logistic map which has a phase conjugation relationship with the tent map used in the embodiment of the pseudo-random number generator which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態で用いるテント写像とロジスティック写像の位相共役の関係を示すための時系列の値変動を示す図。The figure which shows the value fluctuation of the time series for showing the relationship of the phase conjugation of the tent map and the logistic map used in the embodiment of the pseudo-random number generator which concerns on this invention. 2の乗数を、素数Pで法を採った場合の値を示す図。The figure which shows the value when the method of the multiplier of 2 is adopted by the prime number P. いくつかの素数Pを用いて式(8)によって、テント写像演算を行った場合の時系列変化を数値で示す図。The figure which shows the time-series change numerically when the tent mapping operation is performed by the equation (8) using some prime numbers P. 本発明に係る疑似乱数生成装置のテント写像パラメータ選択手段の第1の実施形態による動作を示すフローチャート。The flowchart which shows the operation by 1st Embodiment of the tent mapping parameter selection means of the pseudo-random number generation apparatus which concerns on this invention. 素数Pが行方向の値を採るときの“(P-1)/2”の値、“(P-1)/2”が素数であるか否かの情報(素数である場合に「(P-1)/2が素数」欄に“○”をつけた)、“(P-1)/2”の素因数分解した結果値などを一覧としたテーブルを示す図。Information on whether or not "(P-1) / 2" is a prime number and "(P-1) / 2" when the prime number P takes a value in the row direction (when it is a prime number, "(P-1) / 2" -1) A diagram showing a table listing the result values obtained by factoring "(P-1) / 2" into "(P-1) / 2" with "○" in the "2 is a prime number" column. 本発明に係る疑似乱数生成装置の乱数抽出方法の一例によって実現される2系列のテント写像演算値と乱数ビットの値を列方向に時系列で示す図。The figure which shows the tent mapping operation value of 2 series and the value of a random number bit realized by an example of the random number extraction method of the pseudo-random number generation apparatus which concerns on this invention in time series in a column direction. 本発明に係る疑似乱数生成装置の乱数抽出方法実施形態の一例である第2の乱数生成方法の処理を示すフローチャート。The flowchart which shows the processing of the 2nd random number generation method which is an example of the random number extraction method embodiment of the pseudo-random number generation apparatus which concerns on this invention. 図12の方法における前段のテント写像演算のテント写像マップを示す図。The figure which shows the tent mapping map of the tent mapping operation of the previous stage in the method of FIG. 本発明に係る疑似乱数生成装置の乱数抽出方法実施形態の一例として、乱数生成手のため、テント写像演算の結果と素数Pの値の全部または一部との演算を行い、この演算結果から所定長の乱数列とするときの数値例を示す図。As an example of the random number extraction method embodiment of the pseudo-random number generator according to the present invention, for the random number generator, the result of the tent mapping calculation and all or part of the value of the prime number P are calculated, and a predetermined value is obtained from this calculation result. The figure which shows the numerical example when it is a long random number sequence. 本発明に係る疑似乱数生成装置の乱数抽出方法実施形態の一例である第3の乱数生成方法の処理によるPとして7を採用した場合の計算の流れを示す図。The figure which shows the flow of calculation when 7 is adopted as P by the processing of the 3rd random number generation method which is an example of the random number extraction method embodiment of the pseudo-random number generation apparatus which concerns on this invention. 本発明に係る疑似乱数生成装置の乱数抽出方法の実施形態の一例である第3の乱数生成方法の処理によるPとして43を採用した場合の計算の流れを示す図。It is a figure which shows the flow of calculation when 43 is adopted as P by the processing of the 3rd random number generation method which is an example of the embodiment of the random number extraction method of the pseudo-random number generation apparatus which concerns on this invention. 本発明に係る疑似乱数生成装置の実施形態が採用する「あり得ない短い周期を除外する判定」を含めたP選択処理の実施形態のフローチャート。The flowchart of the embodiment of the P selection process including the "determination excluding an impossible short cycle" adopted by the embodiment of the pseudo-random number generator according to the present invention. 合同算術による余りの掛算の性質を示す図。The figure which shows the nature of the multiplication of the remainder by the joint arithmetic.

本実施形態では、テント写像にて生成される乱数系列で1度出現した値は2度と出現さないことを実現する。これにより、その1周期内で保証する乱数列を生成可能にし、際限なく周期の延長を可能とする。 In the present embodiment, it is realized that the value that appears once in the random number sequence generated by the tent map never appears again. As a result, it is possible to generate a random number sequence guaranteed within that one cycle, and it is possible to extend the cycle endlessly.

テント写像は、ロジスティック写像と位相共役の関係にあり、テント写像はロジスティック写像の位相に相当するものである。位相が元に戻る写像の回数に着目すると、テント写像を整数演算で可能とするために最大区間[0,1]をP倍する値Pが上記「位相が元に戻る写像の回数」に相当し、フェルマーの小定理から写像の周期長を知ることができる。 The tent map has a topological conjugation relationship with the logistic map, and the tent map corresponds to the phase of the logistic map. Focusing on the number of maps whose phase returns to the original, the value P obtained by multiplying the maximum interval [0,1] by P in order to enable tent mapping by integer operation corresponds to the above "number of maps whose phase returns to the original". However, the period length of the map can be known from Fermat's little theorem.

このため、最大周期についてはこの値Pに素数(1またはそれ自身の数以外では割り切れなく余りが出る自然数)を用いることで実現を図る。つまり、上記値Pとして素数を採用する。そして、最大周期と一様性の保証についてフェルマーの小定理または本実施形態において後に示す式を用いて判定を行い、選定した素数を利用してテント写像による写像を、1周期分行い乱数を取得する。 Therefore, the maximum period is realized by using a prime number (a natural number that is indivisible and has a remainder other than 1 or its own number) for this value P. That is, a prime number is adopted as the above value P. Then, the maximum period and the guarantee of uniformity are determined by using Fermat's little theorem or the formula shown later in this embodiment, and the selected prime number is used to perform mapping by tent mapping for one cycle to obtain a random number. do.

テント写像の反復が1周期分を周回したら、次の素数候補を用意し最大周期と一様性の保証ができるか再び判定し、素数を選定してゆく手法を採用する(後に示すパラメータ遷移制御手段40)。素数にて実現できるテント写像を最大周期の1周期分行い、次に異なる素数を選定してテント写像の写像を1周期ずつ繰り返していくことで、実質的に際限なく周期を拡張できる系を生成して一様性を保証する乱数列を取得可能にする。 When the iteration of the tent map goes around one cycle, the next prime number candidate is prepared, it is judged again whether the maximum period and uniformity can be guaranteed, and the method of selecting the prime number is adopted (parameter transition control shown later). Means 40). By performing a tent map that can be realized with a prime number for one cycle of the maximum cycle, then selecting a different prime number and repeating the mapping of the tent map one cycle at a time, a system that can expand the cycle virtually endlessly is generated. And make it possible to obtain a random number sequence that guarantees uniformity.

テント写像を用いるメリットとしては、従来の疑似乱数生成方法と比較し、引き算とシフト演算のみのシンプルな演算で構成できる点を挙げることができる。このため、計算負荷が少なく、かつ最大周期と一様性を保証するエルゴード性のある乱数列を際限なく長い周期で取得できる。 The merit of using the tent map is that it can be configured by a simple operation of subtraction and shift operation as compared with the conventional pseudo-random number generation method. Therefore, a random number sequence having an ergodic property that has a small calculation load and guarantees the maximum period and uniformity can be acquired in an endlessly long period.

また、本実施形態では、傾き2のテント写像の反復毎の数値をそのまま使用すると乱数性能が悪いため、数値Xiから乱数列を抽出する方法についても言及する。 Further, in the present embodiment, since the random number performance is poor if the numerical value for each iteration of the tent mapping with the slope 2 is used as it is, a method of extracting a random number sequence from the numerical value X i is also described.

<実施形態1> テント写像の最大区間[0,1]をP倍する値Pとして素数を採用
以下添付図面を参照して、本発明に係る疑似乱数性装置の実施形態を説明する。本実施形態では、テント写像を用いた乱数生成を行う場合においてテント写像を整数演算で可能とするために最大区間[0,1]をP倍する値Pとして素数を用いるによって生成される乱数値の周期長を一様にし、且つ十分に周期の長いものが得られるようにする。
<Embodiment 1> A prime number is adopted as a value P that P times the maximum interval [0,1] of the tent map. Hereinafter, an embodiment of the pseudo-random number device according to the present invention will be described with reference to the accompanying drawings. In the present embodiment, in the case of performing random number generation using a tent map, a random number value generated by using a prime number as a value P obtained by multiplying the maximum interval [0,1] by P in order to enable the tent map by an integer operation. Make the cycle length uniform and obtain a sufficiently long cycle.

本発明に係る擬似乱数生成装置の実施形態は、図1Aに示すように、テント写像演算手段10と、テント写像パラメータ選択手段20と、乱数生成手段30とを備えている。テント写像演算手段10は、テント写像による写像演算を行うものである。テント写像パラメータ選択手段20は、上記テント写像を整数演算で可能とするために、最大区間を整数倍するときの値Pとして、素数で且つ(P-1)/2に基づき最大周期長の条件を満足するPを選択して前記テント写像演算手段10へ与えるものである。乱数生成手段30は、上記テント写像演算手段10による演算結果に基づき所定長の数列を生成するものである。 As shown in FIG. 1A, an embodiment of the pseudo-random number generation device according to the present invention includes a tent map calculation means 10, a tent map parameter selection means 20, and a random number generation means 30. The tent mapping calculation means 10 performs a mapping calculation by tent mapping. The tent map parameter selection means 20 is a prime number and a maximum cycle length condition based on (P-1) / 2 as a value P when multiplying the maximum interval by an integer in order to enable the tent map by an integer operation. Is selected and given to the tent mapping calculation means 10. The random number generation means 30 generates a sequence of predetermined lengths based on the calculation result by the tent mapping calculation means 10.

本実施形態では、パラメータ遷移制御手段40を備える。パラメータ遷移制御手段40は、上記テント写像演算手段10がテント写像の1周期分演算を行う毎に、その通知を受けて、上記テント写像パラメータ選択手段20から新たなPを与えるように制御する。疑似乱数の生成が、テント写像の1周期分演算以内に終了する構成の疑似乱数生成装置においては、このパラメータ遷移制御手段40は不要とすることができる。 In this embodiment, the parameter transition control means 40 is provided. The parameter transition control means 40 receives the notification every time the tent map calculation means 10 performs a calculation for one cycle of the tent map, and controls the tent map parameter selection means 20 to give a new P. The parameter transition control means 40 can be omitted in the pseudo-random number generation device having a configuration in which the generation of the pseudo-random numbers is completed within one cycle of the tent map.

(写像)
○テント写像について
テント写像は以下の式(1)で定義される。

Figure 0007079546000001
(Map)
○ About the tent map The tent map is defined by the following equation (1).
Figure 0007079546000001

テント写像のマップを図2に示し、式(1)のiを横軸にとり、縦軸をXiとした時系列を図3に示す。 A map of the tent map is shown in FIG. 2, and a time series in which i of the equation (1) is taken on the horizontal axis and the vertical axis is X i is shown in FIG.

特開2016-039418号公報においては、テント写像型のA/D変換回路を用いて、“Xi<0.5”のとき、ビット0を取得し、“0.5≦Xi”のとき、ビット1を取得し連続して4ビット得る場合、初期値X0について区間[0,1]を均等に16分割した各区間から選択すると16通りのビット列が得られることが示されている。このため、テント写像ではあらゆるパターンを潜在的に生成できることから、初期値X0の採り方により乱数検定に合格できるビット列を生成すれば、高い乱数性能を持つ乱数生成器として利用できることが判る。 In Japanese Unexamined Patent Publication No. 2016-039418, a tent mapping type A / D conversion circuit is used to acquire bit 0 when “X i <0.5” and when “0.5 ≦ X i ”. , It is shown that when bit 1 is acquired and 4 bits are continuously obtained, 16 bit strings can be obtained by selecting from each interval in which the interval [0, 1] is evenly divided into 16 with respect to the initial value X 0 . Therefore, since any pattern can be potentially generated by the tent map, it can be seen that if a bit string that can pass the random number test is generated by the method of taking the initial value X 0 , it can be used as a random number generator having high random number performance.

また、テント写像の初期値X0の設定次第で、あらゆるバイナリ値を採ることができるため、周期的な振る舞いをする系列も考えられる限り与えることができる。このため、テント写像の初期値X0により周期長を予め知ることができれば、その周期長分のテント写像を行って乱数列として出力し、更にその後に異なる周期長を持つ周期帯の写像を行うというように、繰り返し周期の異なる写像の繰り返しを行うことで無制限に周期の異なる疑似乱数列を取得できると考えられる。つまり初期値X0で1周期分のテント写像を行い乱数列として出力し、次に初期値X0を変更して次の1周期分のテント写像を行い乱数列として出力にすることを繰り返し行うことで無制限に周期の異なる疑似乱数列を取得できると考えられる。 Further, since any binary value can be taken depending on the setting of the initial value X 0 of the tent map, a series having periodic behavior can be given as long as possible. Therefore, if the cycle length can be known in advance from the initial value X 0 of the tent map, the tent map for that cycle length is performed and output as a random number sequence, and then the mapping of the cycle band having a different cycle length is performed. Thus, it is considered that an unlimited number of pseudo-random numbers with different cycles can be obtained by repeating mappings with different repetition cycles. That is, the initial value X 0 is used to map the tent for one cycle and output as a random number sequence, then the initial value X 0 is changed and the tent map for the next cycle is performed and output as a random number sequence. Therefore, it is considered that an unlimited number of pseudo-random numbers with different cycles can be obtained.

このようにテント写像の初期値X0を設定することを考えると、循環する小数(有理数[分数で表される数])を設定すればよい。更に、初期値X0から予め周期長が判れば乱数の設計に有利である。ここで、テント写像はロジスティック写像と位相共役にあることが知られていることを利用できる。つまり、ロジスティック写像の位相はテント写像に該当するため、位相が元に戻る最大周期の判定を以下で説明するフェルマーの小定理を用いて導くことで、一様な乱数生成系列を得ることへ繋げる。 Considering that the initial value X 0 of the tent map is set in this way, a circular decimal number (rational number [a number represented by a fraction]) may be set. Further, if the cycle length is known in advance from the initial value X 0 , it is advantageous for the design of random numbers. Here, it can be utilized that the tent map is known to be in topological conjugation with the logistic map. In other words, since the phase of the logistic map corresponds to the tent map, it is possible to obtain a uniform random number generation sequence by deriving the determination of the maximum period at which the phase returns to the original state using Fermat's little theorem explained below. ..

○テント写像とロジスティック写像との位相共役について
ロジスティック写像は以下の式(2)で定義される。

Figure 0007079546000002
○ Topological conjugation between the tent map and the logistic map The logistic map is defined by the following equation (2).
Figure 0007079546000002

ロジスティック写像のマップを図4に示し、式(2)のiを横軸とし、縦軸をXiとした時系列を図5に示す。
図5の時系列では初期値X0=0.3を設定し、式(2)の写像遷移は、
1=4x0.3(1-0.3)=0.84
である。
A map of the logistic map is shown in FIG. 4, and a time series in which i of the equation (2) is the horizontal axis and the vertical axis is X i is shown in FIG.
In the time series of FIG. 5, the initial value X 0 = 0.3 is set, and the mapping transition of Eq. (2) is
X 1 = 4x0.3 (1-0.3) = 0.84
Is.

結果のX1=0.84が反復入力され、
2=4x0.84(1-0.84)=0.5376
が得られる。このように、出力値が入力値として反復され縦軸Xiが開区間(0,1)において遷移されて行く。
The result X 1 = 0.84 is repeatedly input and
X 2 = 4x0.84 (1-0.84) = 0.5376
Is obtained. In this way, the output value is repeated as an input value, and the vertical axis X i is transitioned in the open interval (0, 1).

テント写像は式(1)で定義され、写像の反復区間は開区間(0,1)になるが、ここで円周率π(3.14159…)倍した区間(0,π)としXiをθiとした式と置き換えると次の式(3)に変形できる。

Figure 0007079546000003
The tent map is defined by Eq. (1), and the iterated interval of the map is an open interval (0,1), where the interval (0, π) multiplied by the pi (3.14159 ...) is used as X i . Can be transformed into the following equation (3) by replacing with the equation with θ i .
Figure 0007079546000003

ここで式(3)のθを式(1)のθ1として代入し、このときロジスティック写像はX1として、次の式(4)の変数変換を行う。

Figure 0007079546000004
Here, θ of the equation (3) is substituted as θ 1 of the equation (1), and at this time, the logistic map is set to X 1 and the variable transformation of the following equation (4) is performed.
Figure 0007079546000004

これについてテント写像式(3)の写像を式(4)の位相として捕えることで、ロジスティック写像は常に次に式と同期する位相共役な関係にあることが判る。

Figure 0007079546000005
By capturing the mapping of the tent mapping equation (3) as the phase of the equation (4), it can be seen that the logistic mapping always has a phase-conjugated relationship that synchronizes with the equation (4).
Figure 0007079546000005

Figure 0007079546000006
Figure 0007079546000006

図6からテント写像の系とロジスティック写像の系が同期していることが判り、位相共役の関係にあることが視覚的に読み取れる。
ロジスティック写像の式(2)の初期値X0を三角関数sin2θの場合として代入すると、
From FIG. 6, it can be seen that the tent map system and the logistic map system are synchronized, and it can be visually read that there is a topological conjugation relationship.
Substituting the initial value X 0 of the logistic map equation (2) for the trigonometric function sin 2 θ,

Figure 0007079546000007
Figure 0007079546000007

図6から初期値X0の選択によりロジスティック写像式(2)を変形した式(5)の三角関数の位相“2nθ”に注目すると、初期値θにπを単純に任意の整数(ここでは素数とする)で割った値を入れた場合、短い周期でロジスティック写像の反復が遷移されることが判る。 Focusing on the phase "2 n θ" of the trigonometric function of the equation (5), which is a modification of the logistic mapping equation (2) by selecting the initial value X 0 from FIG. 6, simply adding π to the initial value θ is an arbitrary integer (here). Then, when the value divided by (the prime number) is entered, it can be seen that the iteration of the logistic map transitions in a short cycle.

例えばπを11で割った値“θ=π/11(0.285599332…)”を設定したとき、式(5)よりX11まで計算すると
0=sin20(π/11)=sin2(π/11)
1=sin21(π/11)=sin2(2π/11)
2=sin22(π/11)=sin2(4π/11)
3=sin23(π/11)=sin2(8π/11)
4=sin24(π/11)=sin2(16π/11)
=sin2(π+5π/11)=(-sin(5π/11))2
=sin2(5π/11)
5=sin25(π/11)=sin2(32π/11)
=sin2(2π+10π/11)=sin2(10π/11)
=sin2(π-10π/11)=sin2(π/11)
6=sin26(π/11)=sin2(64π/11)
=sin2(4π+π+9π/11)=(-sin(9π/11))2
=sin2(9π/11)=sin2(π-9π/11)
=sin2(2π/11)
7=sin27(π/11)=sin2(128π/11)
=sin2(10π+π+7π/11)=(-sin(7π/11))2
=sin2(7π/11)=sin2(π-7π/11)
=sin2(4π/11)
8=sin28(π/11)=sin2(256π/11)
=sin2(22π+π+3π/11)=(-sin(3π/11))2
=sin2(3π/11)=sin2(π-3π/11)=sin2(8π/11)
9=sin29(π/11)=sin2(512π/11)
=sin2(46π+6π/11)=sin2(6π/11)
=sin2(π-6π/11)=sin2(5π/11)
10=sin210(π/11)=sin2(1024π/11)
=sin2(92π+π+π/11)=(-sin(π/11))2
=sin2(π/11)
11=sin211(π/11)=sin2(2048π/11)
=sin2(186π+2π/11)=sin2(2π/11)
For example, when the value “θ = π / 11 (0.2855599332 ...)” obtained by dividing π by 11 is set, when X 11 is calculated from the equation (5), X 0 = sin 2 20 (π / 11) = sin. 2 (π / 11)
X 1 = sin 2 2 1 (π / 11) = sin 2 (2π / 11)
X 2 = sin 2 2 2 (π / 11) = sin 2 (4π / 11)
X 3 = sin 2 2 3 (π / 11) = sin 2 (8π / 11)
X 4 = sin 2 2 4 (π / 11) = sin 2 (16π / 11)
= Sin 2 (π + 5π / 11) = (-sin (5π / 11)) 2
= Sin 2 (5π / 11)
X 5 = sin 2 25 (π / 11) = sin 2 (32π / 11)
= Sin 2 (2π + 10π / 11) = sin 2 (10π / 11)
= Sin 2 (π-10π / 11) = sin 2 (π / 11)
X 6 = sin 2 2 6 (π / 11) = sin 2 (64π / 11)
= Sin 2 (4π + π + 9π / 11) = (-sin (9π / 11)) 2
= Sin 2 (9π / 11) = sin 2 (π-9π / 11)
= Sin 2 (2π / 11)
X 7 = sin 2 2 7 (π / 11) = sin 2 (128π / 11)
= Sin 2 (10π + π + 7π / 11) = (-sin (7π / 11)) 2
= Sin 2 (7π / 11) = sin 2 (π-7π / 11)
= Sin 2 (4π / 11)
X 8 = sin 2 2 8 (π / 11) = sin 2 (256π / 11)
= Sin 2 (22π + π + 3π / 11) = (-sin (3π / 11)) 2
= Sin 2 (3π / 11) = sin 2 (π-3π / 11) = sin 2 (8π / 11)
X 9 = sin 2 2 9 (π / 11) = sin 2 (512π / 11)
= Sin 2 (46π + 6π / 11) = sin 2 (6π / 11)
= Sin 2 (π-6π / 11) = sin 2 (5π / 11)
X 10 = sin 2 2 10 (π / 11) = sin 2 (1024π / 11)
= Sin 2 (92π + π + π / 11) = (-sin (π / 11)) 2
= Sin 2 (π / 11)
X 11 = sin 2 2 11 (π / 11) = sin 2 (2048π / 11)
= Sin 2 (186π + 2π / 11) = sin 2 (2π / 11)

となり、“X0”と“X5”に着目すると位相θは“π/11”と元に戻っており、“X10”の位相θも“π/11”となっているため、ロジスティック写像の“初期値X0=sin2(π/11)”としたとき周期長5の周期を持ち写像が遷移することが読み取れる。また、テント写像の式(3)では“初期値X0=π/11”としたとき、ロジスティック写像との位相共役との関係からも周期長5で写像が半永久的に反復することが判る。
テント写像の式(1)では式(3)の最大区間は[0,π]のためπで割った“初期値X0=1/11”を設定すれば、周期長5で写像が反復することが判る。
When focusing on "X 0 " and "X 5 ", the phase θ returns to "π / 11", and the phase θ of "X 10 " is also "π / 11", so the logistic map When "initial value X 0 = sin 2 (π / 11)" is set, it can be read that the map has a period of 5 and the mapping changes. Further, in the tent map equation (3), when “initial value X 0 = π / 11”, it can be seen that the map repeats semipermanently with a period length of 5 from the relationship with the topological conjugation with the logistic map.
In the tent mapping equation (1), the maximum interval of the equation (3) is [0, π], so if "initial value X 0 = 1/11" divided by π is set, the mapping repeats with a period length of 5. It turns out.

ここで位相“2nθ”に着目すると、初期値“θ=π/11”に対し“2n”の乗算を行った位相となり、位相は2π(360°)で元に戻るため例えば上記の“n=11”を見ると2を11乗した位相は、
11(π/11)=2048π/11=186π+2π/11=2π/11
となり、これは211=2048に対して“11”で割ると余りが2(商は186)となる。従って、位相では“2048π/11”と“2π/11”は同義となる。この余りの値に着目すると、2の11乗数に対して11で割った余りを示す合同算術の“法(modulo)”が“2π/11”の分子の値2が相当する。
Focusing on the phase "2 n θ", the initial value "θ = π / 11" is multiplied by "2 n " to obtain the phase, and the phase returns to the original value at 2π (360 °). Looking at "n = 11", the phase obtained by raising 2 to the 11th power is
2 11 (π / 11) = 2048π / 11 = 186π + 2π / 11 = 2π / 11
This is 2 11 = 2048, and when divided by "11", the remainder is 2 (quotient is 186). Therefore, in phase, "2048π / 11" and "2π / 11" are synonymous. Focusing on the value of this remainder, the value 2 of the numerator whose "modulo" of the joint arithmetic indicating the remainder obtained by dividing 2 to the 11th power by 11 corresponds to "2π / 11".

合同算術は以下の式で表される。

Figure 0007079546000008
Modular arithmetic is expressed by the following formula.
Figure 0007079546000008

上記合同算術の式は、211=2048に対して11で割ると余りが2となることを示し、11の法(modulo)を採ると剰余は2となる意味を表している。 The above modulo formula shows that when 2 11 = 2048 is divided by 11, the remainder is 2, and when the modulo 11 method is adopted, the remainder is 2.

フェルマーの小定理では合同算術において“p”を素数とし、“a”を“p”の倍数でない整数(“a”と“p”は互いに素[最大公約数が1]、つまり“p”が素数であればよい)とするときに以下の式(6)が成り立つことが知られている。

Figure 0007079546000009
In Fermat's little theorem, "p" is a prime number in congruence arithmetic, and "a" is an integer that is not a multiple of "p"("a" and "p" are relatively prime [greatest common divisor is 1], that is, "p" is It is known that the following equation (6) holds when the number is prime).
Figure 0007079546000009

上記の例では素数“p”は11であり、“a”は2とすると式(6)の関係が成り立っている。また“a”の“p-1”乗を“p”で割った余りは1であるという以下の式(7)が成り立つこと(式(6)の両辺を“a”で割る意)も判る。

Figure 0007079546000010
In the above example, assuming that the prime number "p" is 11 and "a" is 2, the relationship of the equation (6) is established. It can also be seen that the following equation (7) that the remainder of dividing "a" to the "p-1" power by "p" is 1 holds (meaning that both sides of equation (6) are divided by "a"). ..
Figure 0007079546000010

図7に、“p”を素数7から47まで“a=2”とした場合の式(6)の計算結果を示す。
数値の1を網掛けにして示しているが“p=11”のとき、つまり乗数が“p-1=10”のとき、法を採った値は1、“p=19”では乗数が“p-1=18”のとき、法を採った値も1となっており、式(7)が成り立っていることが確認できる。
FIG. 7 shows the calculation result of the equation (6) when “p” is set to “a = 2” from the prime numbers 7 to 47.
The numerical value 1 is shaded, but when "p = 11", that is, when the multiplier is "p-1 = 10", the value adopted by the method is 1, and when "p = 19", the multiplier is ". When p-1 = 18 ”, the value obtained by the method is also 1, and it can be confirmed that the equation (7) holds.

上記からロジスティック写像の式(5)の位相の初期値として素数“p”を分母として与えて“2p”の乗算を行ったとき、式(6)から割り切れない数は、仮分数(2pπ/p)から帯分数(186)の真分数が“2π/p”となるため、真分数の分子の2は割り算の余りとして示される。このことからフェルマーの小定理により分母“p”を素数としたときにロジスティック写像と、その位相となるテント写像が“p-1”のとき値が戻る周期を持つことが判る。
即ち、テント写像の式(1)では、“初期値X0=1/p”を与えれば、Xp-1は“1/p”と初期値X0に戻り、“p-1”の周期を持つことが予想される。
From the above, when the prime number "p" is given as the denominator as the initial value of the phase of the equation (5) of the logistic mapping and the product is multiplied by "2 p ", the number that is not divisible from the equation (6) is the improper fraction (2 p ). Since the true fraction of the mixed fraction (186) from π / p) is "2π / p", 2 of the element of the true fraction is shown as the remainder of the division. From this, it can be seen from Fermat's little theorem that there is a logistic map when the denominator "p" is a prime number and a period in which the value returns when the tent map whose phase is "p-1".
That is, in the tent mapping equation (1), if "initial value X 0 = 1 / p" is given, X p-1 returns to "1 / p" and the initial value X 0 , and the period of "p-1". Is expected to have.

ここで、式(1)を整数で演算が行えるように、最大区間を[0,1]からP倍に拡大したものが以下の式(8)になる。

Figure 0007079546000011
Here, the following equation (8) is obtained by expanding the maximum interval from [0,1] to P times so that the equation (1) can be calculated with an integer.
Figure 0007079546000011

上記式(8)では区間をP倍しているため、式(1)では“初期値X0=1/p”だが、式(8)では“初期値X0=1”を与えることになる。 Since the interval is multiplied by P in the above equation (8), "initial value X 0 = 1 / p" is given in equation (1), but "initial value X 0 = 1" is given in equation (8). ..

図8に、Pを素数7から47を用いてテント写像において“初期値X0=1”を与えて写像の反復を行ったときに得られる各Xiを示す。ここでXiの値はテント写像の式(8)から全て2倍され偶数を採るはずだが、初期値X0に奇数を採った場合に初期値X0が元に戻る値が確認できるように、式(8)が“P/2≦Xi”のときは“(P-Xi)”の値をXiとして示している。
図7の2p-1にPで法(modulo)を採った値が1となっているが、同様に図8のテント写像では“P-1”回目の写像の値は1に戻っていることが読み取れる。
FIG. 8 shows each X i obtained when P is given a “initial value X 0 = 1” in a tent mapping using prime numbers 7 to 47 and the mapping is repeated. Here, the value of X i should be doubled from the tent map equation (8) and take an even number, but if an odd number is taken for the initial value X 0 , the value that the initial value X 0 returns to the original value can be confirmed. , When the equation (8) is “P / 2 ≦ X i ”, the value of “(P—X i )” is shown as X i .
In 2 p-1 of FIG. 7, the value obtained by the method (modulo) by P is 1, but similarly, in the tent map of FIG. 8, the value of the “P-1” th mapping is returned to 1. Can be read.

ここで、素数11の列に注目すると左側の2の乗数を採った結果は“n”が10のとき法をとった値が1となっており周期が10だが、テント写像では“n”が5のときの値も1になっており周期が5になっている。
これはロジスティック写像の式(5)の初期値X0の位相“θ=π/11を与えてトレースした例を見ると判るように、X5にてX0と同じ値になっているが三角関数のため、
5=sin25(π/11)=sin2(32π/11)
= sin2(2π+10π/11)=sin2(10π/11)
となるが、三角関数の補角公式では “sin(10π/11)
=sin(π-10π/11)”となるため、
=sin2(π-10π/11)=sin2(π/11)
が得られ、初期値X0に戻るためである。
Here, paying attention to the column of prime numbers 11, the result of taking the multiplier of 2 on the left side is that the value obtained by the method is 1 when "n" is 10, and the period is 10, but "n" is in the tent map. The value at 5 is also 1, and the cycle is 5.
As you can see from the example of tracing by giving the phase "θ = π / 11" of the initial value X 0 of the logistic map equation (5), it is the same value as X 0 at X 5 , but it is trigonometric. Because of the function
X 5 = sin 2 25 (π / 11) = sin 2 (32π / 11)
= Sin 2 (2π + 10π / 11) = sin 2 (10π / 11)
However, in the trigonometric complement angle formula, "sin (10π / 11)"
= Sin (π-10π / 11) ”, so
= Sin 2 (π-10π / 11) = sin 2 (π / 11)
Is obtained and returns to the initial value X 0 .

つまり、図7のように2の乗数に11の法を採った値は{1,2,3,4,5,6,7,8,9,10}それぞれ1回を採り、周期長10で繰り返されるが、サイン関数の位相“2nθ”にあてた場合、位相が
{6π/11,7π/11,8π/11,9π/11,10π/11}と{5π/11,4π/11,3π/11,2π/11,1π/11}のとき、サイン関数(sinθ)では同じ値をとるため、ロジスティック写像とテント写像の周期長は5となることが判り、図8のテント写像の採る値は{1,2,3,4,5}それぞれ1回になる。
That is, as shown in FIG. 7, the value obtained by taking the method of 11 for the multiplier of 2 is taken once for each {1,2,3,4,5,6,7,8,9,10}, and the cycle length is 10. Again, when the phase of the sine function is "2 n θ", the phases are {6π / 11, 7π / 11, 8π / 11, 9π / 11, 10π / 11} and {5π / 11, 4π / 11}. , 3π / 11 / 2π / 11, 1π / 11}, since the sine function (sinθ) takes the same value, it is found that the period length of the logistic map and the tent map is 5, and it is found that the period length of the logistic map and the tent map is 5. The value to be taken is {1,2,3,4,5} once each.

図7のフェルマーの小定理の規則では、n=5のとき25の11の法(modulo)を採った値は10になるが、n=5からn=9までの値を列記すると{10,9,7,3,6}となっており、それぞれの値を11から引いた数は{1,2,4,8,5}となることが判り、ロジスティック写像の式(5)の位相に当てはめることで、ロジスティック写像は周期長5で繰り返すことが確認される。 According to the rule of Fermat's little theorem in FIG. 7, when n = 5 , the value obtained by adopting the modulo of 25 is 10, but when the values from n = 5 to n = 9 are listed, {10 , 9, 7, 3, 6}, and it can be seen that the number obtained by subtracting each value from 11 is {1, 2, 4, 8, 5}, and the phase of the logistic map equation (5). By applying to, it is confirmed that the logistic map repeats with a period length of 5.

上記の例では素数11を法とした場合を示したが素数を変数Pで表すとロジスティック写像とテント写像はP=11のため、“(P-1)/2=5”の周期で繰り返されることが判る。
しかしながら、図8の素数{7,17,31,41,43}に注目すると素数Pとしたときの最大周期が“(P-1)/2”を採らないことが確認できる。例えば“43”ではテント写像の式(8)の最大周期は(43-1)/2=21の周期長で1~21の数値をそれぞれ1回ずつ周期内で一様性確保のために取得したいところだが周期長が7となっており{1,2,4,8,16,11,21}で1に戻り繰り返されるため1~21の数値が全て一様に採れないことが確認できる。
In the above example, the case where the prime number 11 is used as the method is shown, but when the prime number is represented by the variable P, the logistic map and the tent map have P = 11, so they are repeated in a cycle of "(P-1) / 2 = 5". It turns out.
However, paying attention to the prime number {7,17,31,41,43} in FIG. 8, it can be confirmed that the maximum period when the prime number P is taken does not take "(P-1) / 2". For example, in "43", the maximum period of the tent map equation (8) is (43-1) / 2 = 21, and the numerical values of 1 to 21 are acquired once each to ensure uniformity within the period. However, since the cycle length is 7, it returns to 1 at {1,2,4,8,16,11,21} and is repeated, so it can be confirmed that all the values from 1 to 21 cannot be obtained uniformly.

このため、最大周期長(P-1)/2で1度採った値は2度と採ることが無い一様な値が採れることを保証できるよう以下の実施形態2のようなアルゴリズムを採用する。 Therefore, the following algorithm as in the second embodiment is adopted so as to guarantee that the value once taken at the maximum cycle length (P-1) / 2 is never taken again and a uniform value can be taken. ..

<実施形態2> 最大周期にて一様性を満たす素数を選別
本実施形態においては、図1Aに示したテント写像パラメータ選択手段20は、(P-1)/2が素数であることを最大周期長の条件としてPを選択することを特徴とする。
図8では、式(8)の各素数Pを当て、初期値X0=1から始めたテント写像の反復毎の“Xi”or“P-Xi”を示している。上記で説明した通り、ロジスティック写像とテント写像が位相共役の関係にあることから、周期長は“(P-1)/2”で“Xi=1”に戻ることが全ての素数において生じていると確認できる。
<Embodiment 2> Selection of prime numbers that satisfy uniformity in the maximum period In this embodiment, the tent mapping parameter selection means 20 shown in FIG. 1A maximizes that (P-1) / 2 is a prime number. It is characterized in that P is selected as a condition of the cycle length.
In FIG. 8, each prime number P of the equation (8) is applied, and “X i ” or “PX i ” for each iteration of the tent map starting from the initial value X 0 = 1 is shown. As explained above, since the logistic map and the tent map are in a phase-conjugated relationship, the period length is "(P-1) / 2" and returns to "X i = 1" in all prime numbers. You can confirm that it is there.

しかしながら、一様な乱数列を取得したいという要望から、“(P-1)/2”を最大周期とした場合に、1度採った値は2度と採ることが無いような数列を得たいものである。例えば、P=43の数列は(43-1)/2=21の周期内で数列が{1,2,4,8,16,11,21}となる周期長7の周期となり、周期長21で一様な数列となっていない。 However, from the desire to acquire a uniform random number sequence, we want to obtain a sequence in which the value once taken is never taken again when "(P-1) / 2" is set as the maximum cycle. It is a thing. For example, the sequence of P = 43 has a cycle length of 7 in which the sequence becomes {1,2,4,8,16,11,21} within the cycle of (43-1) / 2 = 21, and the cycle length is 21. It is not a uniform sequence.

ここで、試しにその数列で採ることが無かった初期値X0=3を設定した場合、{3,6,12,19,5,10,20}という周期7の数列となる。1つ目と2つ目の数列で採っていない値を調べると、“初期値X0=5”が当て嵌まることが判り、この数列は{5,10,20,3,6,12,19}という周期長7の数列であり、この3つを合わせれば1~21の数値を1つずつ採ることができる。 Here, when the initial value X 0 = 3, which was not taken in the sequence as a trial, is set, the sequence becomes a sequence of period 7 of {3, 6, 12, 19, 5, 10, 20}. Examining the values not taken in the first and second sequences, it is found that "initial value X 0 = 5" is applicable, and this sequence is {5,10,20,3,6,12,19. }, Which is a sequence with a period length of 7, and if these three are combined, the numerical values 1 to 21 can be taken one by one.

また、P=43のとき、の“(P-1)/2”は21となるが、21を素因数分解すると、“3×7”に分解され、初期値X0=1の場合、周期長3で“X3=1”に戻るかあるいは周期長7で“X7=1”に戻るケースが考えられる。
ここに、テント写像の式(8)から“初期値X0=1”の次は必ず“X1=2”となるため、“(P-1)/2>3”であれば周期長1は有り得ない。また、上記で説明したようにフェルマーの小定理の式(7)により、周期長“P-1”にてPで法(modulo)を採った値は必ず“1”をとる。
Further, when P = 43, “(P-1) / 2” becomes 21, but when 21 is factored into prime factors, it is decomposed into “3 × 7”, and when the initial value X 0 = 1, the cycle length A case where 3 returns to "X 3 = 1" or a cycle length of 7 returns to "X 7 = 1" is conceivable.
Here, from the tent mapping equation (8), "X 1 = 2" always follows "initial value X 0 = 1", so if "(P-1) / 2>3", the cycle length is 1. Is impossible. Further, as described above, according to Fermat's little theorem (7), the value obtained by modulo with P at the period length "P-1" always takes "1".

このため、“(P-1)/2”が素数ではなく合成数のとき、素因数分解を行いその素因数で“(P-1)/2”を割ってみることで、割った周期長の短い周期が存在する可能性が推測される。しかし、“(P-1)/2”が素数であれば周期は最大“(P-1)/2”を採り一様な数列を得ることが保証できる。なぜなら、“(P-1)/2”が何れかの素因数で割り切れるならば割った周期長で何回か周回して“1”に戻っている可能性はあるが、割り切れない数値(2以上の素数)であれば、“(P-1)/2”より小さい周期に分解できない構造となり、“(P-1)/2”で“1”に戻ることが推測される。上記で位相共役の関係を示したが、フェルマーの小定理から周期は“P-1”にてPで法(modulo)を採った値は必ず“1”に戻るからである。 Therefore, when "(P-1) / 2" is not a prime number but a composite number, the prime factorization is performed and "(P-1) / 2" is divided by the prime factor to shorten the divided cycle length. It is speculated that there may be a period. However, if "(P-1) / 2" is a prime number, the maximum period is "(P-1) / 2", and it can be guaranteed that a uniform sequence is obtained. Because, if "(P-1) / 2" is divisible by any prime factor, there is a possibility that it laps several times with the divided cycle length and returns to "1", but it is an indivisible numerical value (2 or more). If it is a prime number), the structure cannot be decomposed into a period smaller than "(P-1) / 2", and it is presumed that it returns to "1" at "(P-1) / 2". The relationship of phase conjugation is shown above, but from Fermat's little theorem, the period is "P-1" and the value obtained by using the P method (modulo) always returns to "1".

つまり、“(P-1)/2”が素数ならば初期値X0=1から始めて、この周期内でXi=1を採ることは無く、Xp-1で周回して元の値Xp-1=1に戻る。ここで素因数として、P=37を例にとると“(P-1)/2=18”であり、18を素因数分解すると“2×3×3”となる。従って、素因数として2,3が挙げられ、周期を調べるときは“(P-1)/2=18”を素因数2で割ると9となり周期長9を持つ可能性があり、他の素因数3では“(P-1)/2=18”を割ると6となるため周期長6を持つ可能性があると推量できる。 That is, if "(P-1) / 2" is a prime number, the initial value X 0 = 1 is started, X i = 1 is not taken within this cycle, and the original value X is circulated by X p-1 . Return to p-1 = 1. Here, as a prime factor, taking P = 37 as an example, it becomes “(P-1) / 2 = 18”, and when 18 is factored into prime factors, it becomes “2 × 3 × 3”. Therefore, a few prime factors can be mentioned, and when examining the cycle, dividing "(P-1) / 2 = 18" by the prime factor 2 gives 9 and may have a cycle length of 9, and other prime factors 3 may have a cycle length of 9. When "(P-1) / 2 = 18" is divided, it becomes 6, so it can be inferred that there is a possibility of having a cycle length of 6.

以上から、“(P-1)/2”が素数であれば周期内で1度出力された数は2度と出力されない一様な数列を得ることができる。図1Aに示すテント写像パラメータ選択手段20の第1の実施形態が行う処理に相当する図9のフローチャートに示すように、“(P-1)/2”が素数であるかを判定して素数であればその値を採用し、式(8)に適用する。式(8)を実行して周期長“(P-1)/2”の数列を出力した後に、“P”かつ“(P-1)/2”が素数となる別の素数Pを選定して式(8)により周期長“(P-1)/2”で数列を出力することを繰り返し行っていくことで最大周期長が保証され、かつ一様な値を連続して出力可能となることが了解される。 From the above, if "(P-1) / 2" is a prime number, it is possible to obtain a uniform sequence in which the number output once in the cycle is not output twice. As shown in the flowchart of FIG. 9, which corresponds to the process performed by the first embodiment of the tent mapping parameter selection means 20 shown in FIG. 1A, it is determined whether "(P-1) / 2" is a prime number and a prime number. If so, the value is adopted and applied to the equation (8). After executing equation (8) and outputting a sequence with a cycle length of "(P-1) / 2", another prime number P whose "P" and "(P-1) / 2" are prime numbers is selected. By repeatedly outputting a sequence with a cycle length of "(P-1) / 2" according to equation (8), the maximum cycle length is guaranteed and uniform values can be continuously output. It is understood.

図10に、素数Pが行方向の値を採るときの“(P-1)/2”の値、“(P-1)/2”が素数であるか否かの情報(素数である場合に「(P-1)/2が素数」欄に“○”をつけた)、“(P-1)/2”の素因数分解した結果値などを一覧としたテーブルを示す。この図10に示されている素数は、「エラストテネスのふるい」というアルゴリズムを利用して素数判定して得たものである。本実施形態は、“(P-1)/2”が素数であるか否かを判定し、素数である場合に写像演算を行って乱数列出力するアルゴリズムを採用する。1つの素数を用いた写像演算では“(P-1)/2”回のテント写像演算が行われ、この写像演算が終了となると、図10の「(P-1)/2が素数P」欄において次に“○”が付されている素数候補を採用し、また“(P-1)/2”回の写像を行い乱数出力する構成とすることができる。以上のように、“(P-1)/2が素数”という判定基準は、素数Pがテント写像の最大区間[0,1]をP倍する値Pとして採用できるか否かの判定基準であるということができ、「テント写像の最大区間の倍化値として採用の判定基準」と言うことにする。 In FIG. 10, the value of “(P-1) / 2” when the prime number P takes a value in the row direction, and the information on whether or not “(P-1) / 2” is a prime number (when it is a prime number). Shows a table listing the results of prime factorization of "(P-1) / 2") and "(P-1) / 2" in the "(P-1) / 2 is a prime number" column. The prime numbers shown in FIG. 10 are obtained by primality testing using an algorithm called "Elastotenness Sieve". This embodiment employs an algorithm that determines whether or not "(P-1) / 2" is a prime number, performs a mapping operation if it is a prime number, and outputs a random number sequence. In the mapping operation using one prime number, "(P-1) / 2" tent mapping operations are performed, and when this mapping operation is completed, "(P-1) / 2 is a prime number P" in FIG. In the column, the prime number candidate marked with "○" can be adopted next, and the mapping can be performed "(P-1) / 2" times to output a random number. As described above, the criterion of "(P-1) / 2 is a prime number" is a criterion of whether or not the prime number P can be adopted as a value P obtained by multiplying the maximum interval [0,1] of the tent map by P. It can be said that there is, and it is said to be "a criterion for adoption as a doubled value of the maximum section of the tent map".

○乱数生成方法
ここで、乱数生成方法について触れる。即ち、図1Aにおける乱数生成手段30の具体的動作例を示す。
式(8)のテント写像Xiの値そのものを乱数として用いることを考える。この場合には、演算を初期値X0=1から始めて“X1=2,X2=4,・・・”という数列が得られる。即ち、2を掛け算した結果に限られるため、乱数として利用するには数列のパターンが周期毎に限られてしまい乱数性能が悪い。このため、本実施系形態に係る図1Aにおける乱数生成手段30は、以下のようにテント写像のXiから乱数を取得する方法を採用する。
○ Random number generation method Here, we will touch on the random number generation method. That is, a specific operation example of the random number generation means 30 in FIG. 1A is shown.
Consider using the value of the tent map X i in equation (8) itself as a random number. In this case, the operation is started from the initial value X 0 = 1 and a sequence of "X 1 = 2, X 2 = 4, ..." is obtained. That is, since it is limited to the result of multiplying by 2, the pattern of the sequence is limited to each cycle in order to use it as a random number, and the random number performance is poor. Therefore, the random number generation means 30 in FIG. 1A according to the present embodiment adopts a method of acquiring a random number from X i of the tent map as follows.

特開2016-039418号公報には、テント写像によるA/D変換回路が紹介されている。この公報に記載の手法は、初期値X0の区間[0,1]を均等に分けた写像の反復毎に“Xi”が0.5未満のときビット“0”を取得し、“Xi”が0.5以上のときにビット“1”を取得し、連続して得られた初期値X0に相当するビット列を得るというものである。このため、出力された数列をそのまま乱数として利用するのではなく、“Xi<0.5”のときはビット“0”を抽出し、“0.5≦Xi”のときにはビット“1”を抽出する規則にて1ビットずつを連続してビット列を得て乱数列とする手法が考えられる。つまり、第1の乱数生成法は、テント写像による写像結果を順次並べて、乱数とするものである。この手法によれば、初期値X0の採り方次第で乱数検定に合格するであろうと推測できるため、予め乱数検定に合格する初期値X0を設定すれば良いことになる。しかしながら、写像の度に1ビットずつのみの乱数抽出を行う手法では、乱数生成速度が遅くなる。そこで、乱数列として使える値を出力させるために図11に示すような乱数抽出方法が考えられる。 Japanese Unexamined Patent Publication No. 2016-039418 introduces an A / D conversion circuit using a tent map. The method described in this publication acquires a bit "0" when "X i " is less than 0.5 for each iteration of the mapping in which the interval [0, 1] of the initial value X 0 is evenly divided, and "X". When i "is 0.5 or more, bit" 1 "is acquired, and a bit string corresponding to the continuously obtained initial value X 0 is obtained. Therefore, instead of using the output number sequence as a random number as it is, bit "0" is extracted when "X i <0.5", and bit "1" when "0.5 ≤ X i ". A method is conceivable in which a bit string is continuously obtained one bit at a time and used as a random number string according to the rule of extracting. That is, in the first random number generation method, the mapping results by the tent mapping are sequentially arranged to obtain a random number. According to this method, it can be estimated that the random number test will pass depending on how the initial value X 0 is taken, so it is sufficient to set the initial value X 0 that passes the random number test in advance. However, the random number generation speed becomes slow in the method of extracting random numbers of only one bit at a time of mapping. Therefore, in order to output a value that can be used as a random number sequence, a random number extraction method as shown in FIG. 11 can be considered.

図11は、テント写像式(8)にP=83を与えるものとすると、“(P-1)/2=41”となって、「テント写像の最大区間の倍化値として採用の判定基準」を満たす素数である。このため周期長が41に確定される系列となるように、図12に示すフローチャートに示す処理を行う構成を採用することができる。即ち、ステップS21に示すように、テント写像の初期値AX0と初期値BX0とを用意する。また、テント写像としては、ステップS23に示す異なる2つのテント写像Aとテント写像Bを用意する。このように異なる初期値X0を二つ用意したテント写像Aとする“初期値AX0=1”を与え、もう一方のテント写像Bに“初期値BX0=23”を与えて同時に2つ実行する(S21~S23)。乱数抽出はステップS22に示す基準で行う。ここでは、図13のテント写像マップに示すように、式(8)のPが、“Xi<P/4(=20.75)”のときビット“0”を出力し、“P/4(=20.75)≦Xi<P/2(=41.5)”のときビット“1”を出力し、“P/2(=41.5)≦Xi<3P/4(=62.25)”のときビット“0”を出力し、“3P/4(=62.25)≦Xi”のときビット“1”を出力する(S22)。図12の例は、2つの異なる初期値X0=1とX0=23を与えた2つの式を同時に実行して2ビット分の出力が乱数ビット列として得られた例である。つまり、この第2の乱数生成法は、2系列のテント写像の系列を備え、各系列に異なる初期値を与えてテント写像を繰り返し、各テント写像毎に1系列から1ビットずつ、合計2ビットを得る処理を繰り返し、並べて所定長の乱数列とするというものである。 In FIG. 11, assuming that P = 83 is given to the tent mapping formula (8), “(P-1) / 2 = 41” is obtained, and “a criterion for adoption as a doubling value of the maximum section of the tent mapping”. Is a prime number that satisfies. Therefore, it is possible to adopt a configuration in which the processing shown in the flowchart shown in FIG. 12 is performed so that the cycle length is determined to be 41. That is, as shown in step S21, the initial value AX 0 and the initial value BX 0 of the tent map are prepared. Further, as the tent map, two different tent maps A and tent map B shown in step S23 are prepared. In this way, "initial value AX 0 = 1" is given as the tent map A prepared with two different initial values X 0 , and "initial value BX 0 = 23" is given to the other tent map B, and two at the same time. Execute (S21 to S23). Random number extraction is performed according to the reference shown in step S22. Here, as shown in the tent map of FIG. 13, when P in the equation (8) is “X i <P / 4 (= 20.75)”, the bit “0” is output and “P / 4” is output. When (= 20.75) ≤ X i <P / 2 (= 41.5) ", bit" 1 "is output, and" P / 2 (= 41.5) ≤ X i <3P / 4 (= 62). When "0.25)", the bit "0" is output, and when "3P / 4 (= 62.25) ≤ X i ", the bit "1" is output (S22). The example of FIG. 12 is an example in which two equations given two different initial values X 0 = 1 and X 0 = 23 are executed at the same time, and the output for two bits is obtained as a random number bit string. That is, this second random number generation method includes two series of tent maps, gives different initial values to each series, repeats the tent map, and repeats the tent map, one bit from one series for each tent map, for a total of 2 bits. Is repeated to obtain a random number sequence of a predetermined length by arranging them.

なお、図11では“2(P-AXi)”と“2(P-BXi)”の結果は数列が1~41を各一回採っていることが判るように、“(P-AXi)”もしくは“(P-BXi)”の値をAXiもしくはBXiの列として表示している。
このようにXiをそのまま乱数として利用するのではなく、Xiからビット抽出を行い、初期値X0が異なる系列を並列(同時)に計算を実行することで、素数Pに応じる周期長が確定し、一様な値を保証できる乱数パターンがよりバリエーション多く生成可能となる。
In addition, in FIG. 11, the result of "2 (P-AX i )" and "2 (P-BX i )" is "(P-AX)" so that it can be seen that the sequence takes 1 to 41 once each. The value of " i )" or "(P-BX i )" is displayed as a column of AX i or BX i .
In this way, instead of using X i as a random number as it is, by extracting bits from X i and executing calculations in parallel (simultaneously) with series with different initial values X 0 , the period length corresponding to the prime number P can be increased. It is possible to generate more variations of random number patterns that can be confirmed and guarantee uniform values.

他の実施形態を説明する。異なる初期値X0を3つ与え、式(8)を並列に3つ実行するものである。1つ目の初期値X0では下位ビット桁2番目と6番目から2ビット抽出、2つ目の初期値X0では下位ビット桁4番目と7番目から2ビット抽出、3つ目の初期値X0では下位ビット桁1番目と3番目と5番目と8番目から4ビット抽出する。これら3つの出力を、図1の乱数抽出部で合わせて8ビット分を出力することで、より分散された乱数を得ることが期待できる。なお、桁数は式(8)より写像は閉区間[1,P-1]の最大値Pの桁で包含できることが前提である。このため、初期設定値として並列(同時)に式(8)を演算する数とそれぞれの初期値X0、乱数を抽出するビット桁が設定値として挙げられる。つまり、第3の乱数生成法は、3系列のテント写像の系列を備え、各系列に異なる初期値を与えてテント写像を繰り返し、各テント写像毎に第1の系列から所定ビット、第2の系列から所定ビット、第3の系列から所定ビットを得て、並べて所定長の乱数列とするというものである。即ち、1回の写像により所定長の乱数列を得るものである。なお、系列は3以上であっても良いことは勿論である。 Other embodiments will be described. Three different initial values X 0 are given, and three equations (8) are executed in parallel. The first initial value X 0 extracts the lower bit digits 2nd and 6th to 2 bits, and the second initial value X 0 extracts the lower bit digits 4th and 7th to 2 bits, and the third initial value. In X 0 , 4 bits are extracted from the 1st, 3rd, 5th, and 8th low-order bit digits. By outputting these three outputs in total for 8 bits by the random number extraction unit of FIG. 1, it can be expected that a more distributed random number can be obtained. It is assumed that the number of digits can be included in the digit of the maximum value P of the closed interval [1, P-1] from the equation (8). Therefore, as the initial setting values, the number of operations of the equation (8) in parallel (simultaneously), each initial value X 0 , and the bit digit for extracting a random number are given as the initial setting values. That is, the third random number generation method includes a series of three series of tent maps, gives different initial values to each series, repeats the tent map, and for each tent map, a predetermined bit from the first series, a second. A predetermined bit is obtained from a series and a predetermined bit is obtained from a third series, and the bits are arranged to form a random sequence having a predetermined length. That is, a random number sequence having a predetermined length is obtained by one mapping. Of course, the number of series may be 3 or more.

更に、素数Pの切り替わりで、これらの初期設定を変更することで乱数のバリエーションを加えられるようにしても良い。図14に示すように例えば素数P=83を2進数展開すると“(1010011)2”となるが、このビット情報から下位4ビット分“(0011)2”を抽出し、式(8)においてP=83とし、更に初期値X0=1を設定して式(8)の反復演算を行う。各“Xi”から図14の“Xi”の下位4ビット”の列のように4ビットを取り出し、素数83から取った下位4ビット分“(0011)2”と排他的論理和を行い図14の一番右の列のように乱数として取り出す。このように素数が変更される度に、変更された素数からビット桁を抽出することで、乱数値としてバリエーションを増やしていくことが考えられる。この第4の例は、4ビットであるから、2回の写像により所定長ビットを得るようにすることができる。また、第1~第3の乱数生成法において、素数Pから所定ビットを取り出し、各系列の写像値との排他的論理和を得て、これを第1~第3の乱数生成法によって並べるようにしても良い。また、上記Pの値の一部に限らず、上記Pの値の全部と各系列の写像値との演算(排他的論理和に限定されない)を行っても良い。 Further, a variation of random numbers may be added by changing these initial settings by switching the prime number P. As shown in FIG. 14, for example, when the prime number P = 83 is expanded in binary, it becomes “(1010011) 2 ”. From this bit information, the lower 4 bits “(0011) 2 ” are extracted, and P in the equation (8). = 83, and the initial value X 0 = 1 is set, and the iterative operation of the equation (8) is performed. 4 bits are extracted from each "X i " as in the column of "lower 4 bits" of "X i " in FIG. 14, and exclusive-OR is performed with "(0011) 2 " for the lower 4 bits taken from the prime number 83. Extract as a random number as shown in the rightmost column of FIG. 14. Every time the prime number is changed in this way, it is conceivable to increase the variation as a random number value by extracting the bit digit from the changed prime number. Since this fourth example has 4 bits, it is possible to obtain a predetermined length bit by mapping twice. Further, in the first to third random number generation methods, a predetermined bit is derived from the prime number P. Is taken out, an exclusive OR with the mapping value of each series is obtained, and these may be arranged by the first to third random number generation methods. Further, the present invention is not limited to a part of the value of P. An operation (not limited to exclusive-OR) may be performed on all the values of P and the mapping values of each series.

また、上記の実施形態では、乱数生成において周期長“(P-1)/2”を保証する数列を採るために、P/2≦Xiの場合(P-Xi)の値から乱数を取得するが、人為的に周期長を2倍した“Xi”を採ることも可能である。例えば、図8の素数11を例にとると、数列は{1,2,4,3,5}の周期長となっているが、P/2≦Xiの場合に(P-Xi)を採るのではなく第一順目はXiをとると、数列は{1,2,4,8,6}となる。そして、テント写像において周期が一順した後に、Pから第一順目の数列全ての引き算を行って数列{P-1,P-2,P-4,P-8,P-6}を得る。ここで、P=11を当て嵌めると{10,9,7,3,5}となり、上記第一順目の結果と合わせて{1,2,4,8,6,10,9,7,3,5}と言う周期長10を採ることができる。他のP値にも適応すれば周期長“P-1”を採れることが考えられ、周期長を2倍にした数列を取得しそれらから乱数列を取得できる。この第5の乱数生成法は、第一周期分の写像値の数列を得た後に、1周期分の写像値の数列を「テント写像の最大区間の倍化値として採用の判定基準を満たす素数P」から引いて第2の数列を求め、第一周期分の写像値の数列に上記第2の数列をつなげて並べ、この並べたものから所定長分を取り出すものである。取り出し方は、予め用意した位置(数列の位置)から所定長を取り出す(末尾の数を取り出しても所定長とならぬ場合には数列の先頭へ戻って取り出しを行う)。この処理を1周期毎に素数Pを変えて行う。 Further, in the above embodiment, in order to take a sequence that guarantees the cycle length "(P-1) / 2" in random number generation, a random number is obtained from the value in the case of P / 2≤X i (P-X i ). However, it is also possible to artificially double the cycle length of "X i ". For example, taking the prime number 11 in FIG. 8 as an example, the sequence has a period length of {1, 2, 4, 3, 5}, but when P / 2 ≤ X i (P-X i ). If X i is taken in the first order instead of taking, the sequence becomes {1, 2, 4, 8, 6}. Then, after the period is aligned in the tent map, the sequence {P-1, P-2, P-4, P-8, P-6} is obtained by subtracting all the sequences in the first order from P. .. Here, when P = 11 is applied, it becomes {10,9,7,3,5}, and together with the result of the first order above, {1,2,4,8,6,10,9,7, It is possible to take a cycle length of 10 called 3,5}. If it is applied to other P-values, it is conceivable that the cycle length "P-1" can be obtained, and a sequence of numbers whose cycle length is doubled can be obtained and a random number sequence can be obtained from them. In this fifth random number generation method, after obtaining a sequence of mapping values for the first cycle, a sequence of mapping values for one cycle is used as a "double value of the maximum interval of the tent mapping" and a prime number satisfying the criterion of adoption. The second sequence is obtained by subtracting from "P", the second sequence is connected to the sequence of mapping values for the first cycle, and the sequence is arranged, and a predetermined length is extracted from the sequence. The method of taking out is to take out a predetermined length from a position (position of a sequence) prepared in advance (if the number at the end does not reach the predetermined length, return to the beginning of the sequence and take out). This process is performed by changing the prime number P for each cycle.

なお、各実施形態において、素数Pの選択切り替えは昇順に選択していく方法が考えられる。例えば、乱数のバリエーションを増やすために昇順をいくつかを飛ばして選択する、飛ばす個数をそれまで出力した乱数を用いて毎回変動する方法などが乱数性向上させる手法として考えられる。また、擬似乱数生成装置としては、上記各乱数生成手法をすべて備え、オペレータやユーザが1つの手法を選択するようにしても良い。 In each embodiment, a method of selecting the prime number P in ascending order can be considered. For example, in order to increase the variation of random numbers, some ascending orders are skipped and selected, and the number of skipped numbers is changed every time by using the random numbers output so far, which can be considered as a method for improving the randomness. Further, the pseudo-random number generation device may include all of the above random number generation methods, and the operator or the user may select one method.

<実施形態3> 最大周期にて一様性を満たす素数を数式により選別
実施形態2では“(P-1)/2”が素数でない場合はスキップし、“(P-1)/2”が素数であるか探索し、1周期内で1度出力された数は2度と出力されない数列をテント写像の反復から得るアルゴリズムであった。ところが、図8のテント写像の列では“(P-1)/2”が素数とならない数値13、数値19、数値29、数値37において、周期長が“(P-1)/2”となっていることが確認できる。このように、“(P-1)/2”が素数でなくとも、1周期内で1度出力された数は2度と出力されない数列を得ることができる数値が存在することが判る。そこで以下に、これらを乱数生成に利用できるようにアルゴリズムを採用する。
<Embodiment 3> Select a prime number that satisfies the uniformity in the maximum period by a mathematical formula. In the second embodiment, if "(P-1) / 2" is not a prime number, it is skipped and "(P-1) / 2" is It was an algorithm that searches for a prime number and obtains a sequence of numbers that are output once in one cycle and never output again from iterations of tent mapping. However, in the column of the tent map in FIG. 8, the cycle length is "(P-1) / 2" in the numerical values 13, the numerical value 19, the numerical value 29, and the numerical value 37 in which "(P-1) / 2" is not a prime number. It can be confirmed that it is. As described above, even if "(P-1) / 2" is not a prime number, it can be seen that there is a numerical value capable of obtaining a sequence in which the number output once in one cycle is not output twice. Therefore, in the following, an algorithm is adopted so that these can be used for random number generation.

本実施形態に係るテント写像パラメータ選択手段20は、(P-1)/2を素因数分解して求めた素因数Cmにより算出された周期長候補Kmが、Km≦(log2P-1)が成り立つことを最大周期長の条件としてPを選択することを特徴とする。更に、本実施形態に係るテント写像パラメータ選択手段20は、2Km±1≡0(mod P)の成立を判定し、成立する場合には当該Pを用いないこと構成とすることができる。 In the tent map parameter selection means 20 according to the present embodiment, Km ≦ (log 2 P-1) holds for the period length candidate Km calculated by the prime factor Cm obtained by factoring (P-1) / 2 into prime factors. It is characterized in that P is selected as a condition of the maximum cycle length. Further, the tent map parameter selection means 20 according to the present embodiment may determine the establishment of 2 Km ± 1≡0 (mod P), and if it is established, the P may not be used.

テント写像式(8)の振る舞いに着目し、テント写像の初期値X0=1から始めて“P-Xi=1”に戻るときの周期の長さを、図8の“素数P=7”の例にトレースして見積る数式を考える。最初に、式(8)において、素数P=7、初期値X0=1を設定して開始する。 Focusing on the behavior of the tent mapping formula (8), the length of the cycle when starting from the initial value X 0 = 1 of the tent mapping and returning to "PX i = 1" is set to "prime number P = 7" in FIG. Consider a formula that traces and estimates in the example of. First, in the equation (8), the prime number P = 7 and the initial value X 0 = 1 are set and started.

図15に計算の流れを示す。式(8)に着目するとP/2=3.5以上のとき、“7-Xi”を実行するため3.5以上になるまで2のべき乗を実行する。X0=1のためX1=2(=2X0),X2=4(=2X1)にて“7-X2”が実行される。 FIG. 15 shows the flow of calculation. Focusing on equation (8), when P / 2 = 3.5 or more, the power of 2 is executed until it becomes 3.5 or more in order to execute "7-X i ". Since X 0 = 1, "7-X 2 " is executed at X 1 = 2 (= 2 X 0 ) and X 2 = 4 (= 2 X 1 ).

図15では“X2=7-22”で示され、ここでの2の指数を“z1=2”と示す。X2=3となり再び“7-Xi”を実行するため3.5以上になるまで2のべき乗が実行されるため、X3=21×3=6(=2X2)にて“7-X2”が実行され“7-6=1”になり初期値X0=1に戻るため、周期長3で式(8)が繰り返されることが判る。ここで、2の指数z2=1となる。 In FIG. 15, it is indicated by “X 2 = 7-22”, and the index of 2 here is indicated as “z 1 = 2”. Since X 2 = 3 and "7-X i " is executed again, the power of 2 is executed until it becomes 3.5 or more, so "7" at X 3 = 2 1 x 3 = 6 (= 2 X 2 ). Since "-X 2 " is executed, "7-6 = 1" and the initial value X 0 = 1 are returned, it can be seen that the equation (8) is repeated with a cycle length of 3. Here, the index z 2 = 1 of 2.

以上の流れを代数式に当て嵌めると、
7-21(7-22)=1
が成り立つことがわかる。ここで素数7を変数P、指数を図15に示すようにz1(=2),z2(=1)を使用すると、

Figure 0007079546000012
Applying the above flow to algebraic expressions,
7-2 1 (7-2 2 ) = 1
It turns out that holds true. Here, if the prime number 7 is the variable P and the exponent is z 1 (= 2) and z 2 (= 1) as shown in FIG. 15, then
Figure 0007079546000012

となり展開すると、

Figure 0007079546000013
When expanded next to
Figure 0007079546000013

が得られ、Pでくくり変形すると以下の式(9)を最終的に得る。

Figure 0007079546000014
Is obtained, and when it is deformed by P, the following equation (9) is finally obtained.
Figure 0007079546000014

また、もう一例として素数P=43、初期値X0=1を設定して同じくXi=1に戻るまでをトレースする。図16に計算の流れを示す。式(8)に着目すると、P/2=21.5以上のとき、“43-Xi”を実行するため21.5以上になるまで2のべき乗を実行する。 Further, as another example, a prime number P = 43, an initial value X 0 = 1 is set, and tracing is performed until X i = 1 is returned. FIG. 16 shows the flow of calculation. Focusing on the equation (8), when P / 2 = 21.5 or more, the power of 2 is executed until it becomes 21.5 or more in order to execute "43-X i ".

0=1のため、“X1=2(=2X0),X2=4(=2X1),X3=8(=2X2),X4=16(=2X3),X5=32(=2X4)”にて“43-X5”が実行される。図16では、“X5=43-25”で示され、ここでの2の指数を“z1=5”と示す。X5=11となり、再び“43-Xi”を実行するため、21.5(43/2)以上になるまで2のべき乗が実行される。このため、X6=21×11=22(=2X5)にて“43-X6”が実行され、“43-21×11=21”になり、ここでの2の指数を“z2=1”と示す。 Since X 0 = 1, "X 1 = 2 (= 2 X 0 ), X 2 = 4 (= 2 X 1 ), X 3 = 8 (= 2 X 2 ), X 4 = 16 (= 2 X 3 ), X 5 "43-X 5 " is executed at "= 32 (= 2X 4 )". In FIG. 16, it is indicated by “X 5 = 43-25”, and the index of 2 here is indicated as “z 1 = 5 ”. Since X 5 = 11, the power of 2 is executed until 21.5 (43/2) or more is executed in order to execute "43-X i " again. Therefore, "43-X 6 " is executed at X 6 = 2 1 x 11 = 22 (= 2 X 5 ), and "43-2 1 x 11 = 21" is obtained, and the index of 2 here is set to "". It is shown as "z 2 = 1".

次の“43-Xi”の実行は、X7=21×21=42(=2X6)となり、“43-X7”が実行されて“43-42=1”になり、ここでの2の指数を“z3=1”とする。初期値X0=1に戻るため周期長7で式(8)が繰り返されることが判り、周期長7=z1+z2+z3(=5+1+1)として表せられる。 The next execution of "43-X i " is X 7 = 21 x 21 = 42 (= 2 X 6 ), and "43-X 7 " is executed to be "43-42 = 1", where Let the exponent of 2 be "z 3 = 1". Since the initial value X 0 = 1 is returned, it is found that the equation (8) is repeated with a cycle length of 7, and it is expressed as a cycle length of 7 = z 1 + z 2 + z 3 (= 5 + 1 + 1).

以上の流れを代数式に当て嵌めると、
43-21(43-21(43-25))=1
が成り立つ。同様に素数43を変数P、指数を図16に示すようにz1,z2,z3を使用すると、

Figure 0007079546000015
Applying the above flow to algebraic expressions,
43-2 1 (43-2 1 ( 43-25 )) = 1
Is true. Similarly, if the prime number 43 is the variable P and the exponent is z 1 , z 2 , z 3 as shown in FIG. 16, then
Figure 0007079546000015

となり展開すると

Figure 0007079546000016
When deployed next to
Figure 0007079546000016

が得られ、Pでくくり変形すると以下の式(10)を最終的に得る。

Figure 0007079546000017
Is obtained, and when it is deformed by P, the following equation (10) is finally obtained.
Figure 0007079546000017

以上テント写像式(8)にて初期値X0=1を当て嵌め、Xi=1に戻るまでをトレースした。
次に“z1,z2,z3,…,zr-1,zr”である数列を仮定して式(9)と式(10)より、この後に示す式(11)にできることが予測できる。ここで、

Figure 0007079546000018
As described above, the initial value X 0 = 1 was applied by the tent mapping formula (8), and the trace was made until the value returned to X i = 1.
Next, assuming a sequence of "z 1 , z 2 , z 3 , ..., z r-1 , z r ", equation (9) and equation (10) can be changed to equation (11) shown below. Can be predicted. here,
Figure 0007079546000018

として式を展開したものが、

Figure 0007079546000019
The one that expanded the formula as
Figure 0007079546000019

になり、最後の項“(-1)r”についてはzrの添え字“r”が奇数のとき、“-2Zm”であり、偶数のとき“+2Zm”になることが式(9)と式(10)からも読み取れる。最終的には以下の式(11)が得られる。

Figure 0007079546000020
For the last term "(-1) r ", the formula (9) is " -2 Zm " when the subscript "r" of z r is odd, and "+2 Zm " when it is even. ) And equation (10). Finally, the following equation (11) is obtained.
Figure 0007079546000020

“Zm”は上記で示したようにPを素数として、“(P-1)/2”を素因数分解したときに得られる素因数で“(P-1)/2”を割ったときの値がテント写像式(8)の周期長“Zm”となっている可能性がある。例えば、P=43の場合に(P-1)/2=21となり、これを素因数分解すると素因数は“3”,“7”の2つが得られる。得られた素因数“3”,“7”で“(43-1)/2”を割る。 As shown above, "Zm" is the value when "(P-1) / 2" is divided by the prime factor obtained by factoring "(P-1) / 2" into prime factors, with P as the prime number. There is a possibility that the period length "Zm" of the tent mapping formula (8) is set. For example, when P = 43, (P-1) / 2 = 21, and when this is factored into prime factors, two prime factors, “3” and “7”, are obtained. Divide "(43-1) / 2" by the obtained prime factors "3" and "7".

すると、(43-1)/2/3=7と(43-1)/2/7=3になるため、“Zm”として数値7,数値3が当て嵌められ、P=43を式(8)に代入して写像を反復すると周期長が7か3になる可能性があることが判る。実際は図8のP=43を見ると周期長7で写像が反復していることが判る。ここでZmは、を式(8)による演算を行うときに生じる2の冪乗の指数の和であり、式(10A)により表わされる。従って、Zmの添字mに数値を入れた表現で“(P-1)/2”の素因数を表現すると、式(10A)の2の冪乗の指数と混同を生じるので、以下“(P-1)/2”の素因数或いは周期長を表現するときには“Km(m=1,2,3、・・・)”と表現する。 Then, since (43-1) / 2/3 = 7 and (43-1) / 2/7 = 3, the numerical values 7 and 3 are applied as “Zm”, and P = 43 is expressed in the equation (8). It can be seen that the period length may be 7 or 3 when the mapping is repeated by substituting into). In fact, looking at P = 43 in FIG. 8, it can be seen that the mapping is repeated with a period length of 7. Here, Zm is the sum of the exponents of the powers of 2 generated when the operation is performed by the equation (8), and is expressed by the equation (10A). Therefore, if the prime factor of "(P-1) / 2" is expressed by putting a numerical value in the subscript m of Zm, it will be confused with the exponent of the power of 2 in the equation (10A). When expressing the prime factor or cycle length of 1) / 2 ", it is expressed as" Km (m = 1, 2, 3, ...) ".

ここで、周期長についてX0=1から始めた場合を考えると、式(8)から2s+1(“s+1”とプラス1であるのは、“P-Xi=1”のときXi=2から始まるため1追加しておく)がPまで最低限確保される周期長は、“s”以上のときになることが保証される。なぜなら“P-Xi”の演算を行うまでXiがP未満のときになるため、それまで“2s+1”の演算を行えるからである。このため最低限の周期長は“2s+1<P”まで採れることになり、2を底とする対数を採ることで、次の式(12)が得られる。

Figure 0007079546000021
Here, considering the case where the cycle length is started from X 0 = 1, 2 s + 1 from Eq. (8) (“s + 1” and plus 1 are X when “PX i = 1”. Since i = 2 starts, 1 is added), and the minimum cycle length secured up to P is guaranteed to be "s" or more. This is because X i is less than P until the operation of "P-X i " is performed, so that the operation of "2 s + 1 " can be performed until then. Therefore, the minimum cycle length can be taken up to "2 s + 1 <P", and the following equation (12) can be obtained by taking the logarithm with the base of 2.
Figure 0007079546000021

P=43の場合、log2P=5.426265であるため、“s=4”(24+1<43)となるため、周期長は最低4以上となる。従って、周期長Kmの候補はK1=7,K2=3であるが、K2=3は(周期長3はあり得ないことがわかり)除外対象となる。このように“(P-1)/2”をそれぞれの素因数で割るときは、小さい素因数から割って求めた周期長候補のKmを(大きい順番に)算出し、式(12)より“Km≦s”になる場合は除外しても良いことが判る。 In the case of P = 43, since log 2 P = 5.426265, “s = 4” (24 + 1 <43), so that the cycle length is at least 4 or more. Therefore, the candidates for the cycle length Km are K 1 = 7, K 2 = 3, but K 2 = 3 is excluded (it is found that the cycle length 3 is impossible). When dividing "(P-1) / 2" by each prime factor in this way, Km of the cycle length candidate obtained by dividing from the smaller prime factors is calculated (in descending order), and " Km " is calculated from the equation (12). It can be seen that if ≦ s ”, it may be excluded.

式(11)から左の式の計算結果は必ず整数を採るため、右の計算では素数Pで割った値は余りの生じない割り切れる数になることが判る。このためテント写像式(8)より“(P-1)/2”を素因数分解して得られた素因数で割った周期長の候補をKmとするとき、式(9)と式(10)の形態から以下の式(13)が与えられる。

Figure 0007079546000022
Since the calculation result of the formula on the left from the formula (11) always takes an integer, it can be seen that the value divided by the prime number P is a divisible number with no remainder in the calculation on the right. Therefore, when Km is a candidate for the period length obtained by dividing "(P-1) / 2" from the tent mapping equation (8) by the prime factor obtained by factoring it into prime factors, the equations (9) and (10) The following equation (13) is given from the form.
Figure 0007079546000022

式(13)が成り立たつとき、式(8)の周期長は“(P-1)/2”より小さいものが存在するといった定理が導かれる。
テント写像の式(8)では、“Km=(P-1)/2”のときは写像の値Xiは元に戻るため“2Km+1”あるいは“2Km-1”のどちらかが必ず素数Pで割り切れる。因みに、このときは下記のオイラーの基準と同等であることが判る。
When the equation (13) holds, the theorem that the period length of the equation (8) is smaller than "(P-1) / 2" is derived.
In the tent mapping formula (8), when "Km = (P-1) / 2", the mapping value Xi returns to the original value, so either "2 Km + 1" or "2 Km -1" must be used. It is divisible by the prime number P. By the way, at this time, it can be seen that it is equivalent to the Euler's criterion below.

<オイラーの基準>
“P”を素数とし,“a”と“P”が互いに素な整数とするとき,以下が成り立つ。

Figure 0007079546000023
<Euler's criterion>
When "P" is a prime number and "a" and "P" are relatively prime integers, the following holds.
Figure 0007079546000023

ルジャンドル記号と言われ、初等整数論の基本定理として取り上げられておりここでは詳細な説明は割愛するが、“a”が“mod P"で平方剰余のとき“+1”、“a”が“mod P"で平方非剰余のとき“-1”を採ることが知られており、次の式が成り立つ。

Figure 0007079546000024
It is called the Legendre symbol and is taken up as the basic theorem of elementary number theory. Although detailed explanation is omitted here, when "a" is "mod P" and quadratic residue, "+1" and "a" are "mod". It is known that "-1" is taken when P "is quadratic non-residue, and the following equation holds.
Figure 0007079546000024

式(13)で“Km=(P-1)/2”、“a=2”としたものと同じとなることが判り、整数演算化したテント写像式(8)の周期においてオイラーの基準が当て嵌まることが判る。 It was found that it was the same as the one in which "Km = (P-1) / 2" and "a = 2" were set in the equation (13), and Euler's criterion was set in the period of the tent mapping equation (8) which was converted into an integer calculation. It turns out that it applies.

テント写像式(8)による乱数生成では、周期長“(P-1)/2”となる素数Pを選択して一様な“Xi”を取得したいため、式(13)が成り立つかを確認して、余り(modulo)が“0”になる場合は“(P-1)/2”より短い周期長が存在することが判ることから、その素数Pを除外することができる。次の素数候補を取得して再び短周期があるかをチェックすることで周期長が“(P-1)/2”となるかを調べて、周期が“(P-1)/2”であることを保証できればその素数Pを採用し乱数を生成して行けば良い。 In the random number generation by the tent mapping equation (8), it is desired to select a prime number P having a period length of "(P-1) / 2" and obtain a uniform "X i ", so whether the equation (13) holds. After confirmation, when the remainder (modulo) becomes "0", it is found that a cycle length shorter than "(P-1) / 2" exists, so that the prime number P can be excluded. By acquiring the next prime number candidate and checking if there is a short cycle again, it is checked whether the cycle length is "(P-1) / 2", and the cycle is "(P-1) / 2". If it can be guaranteed that there is, the prime number P may be adopted and a random number may be generated.

図17に、式(12)によるあり得ない短い周期を除外する判定を含めたP選択処理の実施形態のフローチャートを示す。このP選択処理は、第2の実施形態である“(P-1)/2が素数”という条件が満たされている場合には、このPを選択するようにしている。即ち、図9に示したフローチャートの処理を含むものである。 FIG. 17 shows a flowchart of an embodiment of the P selection process including a determination for excluding an impossible short cycle according to the equation (12). In this P selection process, when the condition that "(P-1) / 2 is a prime number", which is the second embodiment, is satisfied, this P is selected. That is, it includes the processing of the flowchart shown in FIG.

以下、図17のフローチャートを参照してPを選択する処理を説明する。まず、任意の素数をPとして取り込む(S31)。次に、“(P-1)/2” が素数であるかを検出する(S32)。ここでYesとなると、この値のPを採用する。ステップS32においてNoとなると、“(P-1)/2”を素因数分解し、素因数Cmを算出する(S33)。 Hereinafter, the process of selecting P will be described with reference to the flowchart of FIG. First, an arbitrary prime number is taken in as P (S31). Next, it is detected whether "(P-1) / 2" is a prime number (S32). If Yes, this value of P is adopted. If No in step S32, "(P-1) / 2" is factored into prime factors and the prime factor Cm is calculated (S33).

次に、求めた各々の素因数Cmで“(P-1)/2”を割算し、周期長候補Kmを求める(S34)。ここに、周期長Kmは、
1=(P-1)/2/C1
2=(P-1)/2/C2
3=(P-1)/2/C3
・・・・・・・・・・・・・
m=(P-1)/2/Cm
Next, "(P-1) / 2" is divided by each of the obtained prime factors Cm to obtain the cycle length candidate Km (S34). Here, the cycle length Km is
K 1 = (P-1) / 2 / C1
K 2 = (P-1) / 2 / C2
K 3 = (P-1) / 2 / C3
・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・
K m = (P-1) / 2 / Cm

次に、Km≦log2P-1が成り立つかを調べる(S35)。Noとなると、
Km±1≡0(mod P)の成立を判定する(S36)。ここで、Noとなると、Kmのmを1インクリメントし(S37)、ステップS35へ戻って処理を続ける。
Next, it is examined whether Km ≦ log 2 P-1 holds (S35). When it becomes No,
It is determined that 2 Km ± 1≡0 (mod P) is established (S36). Here, when No, m of Km is incremented by 1 (S37), and the process returns to step S35 to continue the process.

また、ステップS36においてYesとなると、ステップS31へ戻って次の素数を“P”として、選択して処理を続ける。また、ステップS35においてYesとなると、この値のPを採用する。 If Yes in step S36, the process returns to step S31, the next prime number is set to "P", and the process is continued. Further, when Yes in step S35, P of this value is adopted.

上記ステップS32においてYesとなった場合のPと、上記ステップS35においてYesとなった場合のPが、乱数生成に必要な数だけ収集されると、この図17の処理は停止され。ここで選択されたPを用いた乱数生成へと処理が進められる。 When the number of Ps in the case of Yes in step S32 and the number of Ps in the case of Yes in step S35 are collected as many as necessary for random number generation, the process of FIG. 17 is stopped. The process proceeds to random number generation using the P selected here.

図17の判定フローチャートによる処理プログラムを実装し、“(P-1)/2”が素数とならない場合、“(P-1)/2”を素因数分解してKmを求め、式(13)により短周期が存在するかを調べることができる。ここで、“(P-1)/2”より短い周期があると判定された素数Pの結果が、図10において“×”によって示されている。図10における2Km±1の欄は式(13)により素数Pで法(modulo)を取った結果、余りが“0”となったときの数値Kmを示している。 When the processing program based on the determination flowchart of FIG. 17 is implemented and "(P-1) / 2" is not a prime number, "(P-1) / 2" is factored into prime numbers to obtain Km, and the equation (13) is used. You can check if there is a short cycle. Here, the result of the prime number P determined to have a period shorter than "(P-1) / 2" is indicated by "x" in FIG. The column of 2 Km ± 1 in FIG. 10 shows the numerical value Km when the remainder becomes “0” as a result of modulo using the prime number P according to the equation (13).

判定の結果、図10における上記欄に示されるマークが“○”となった素数P使って、式(8)のテント写像による反復演算を行い周期長“(P-1)/2”が保証された“Xi”を出力して乱数生成を行うことができる。実施形態2と比較して、Kmの算出と式(13)による周期長と一様性が保証できる素数Pであるか確認する計算を要する。しかしながら、利用できる素数を増すことができるため、素数の選択の範囲を広げて多くの素数が使えるといったメリットが得られる。 As a result of the determination, using the prime number P whose mark shown in the above column in FIG. The generated "X i " can be output to generate a random number. Compared with the second embodiment, it is necessary to calculate Km and to confirm whether the prime number P can guarantee the period length and uniformity according to the equation (13). However, since the number of prime numbers that can be used can be increased, there is an advantage that the range of selection of prime numbers can be expanded and many prime numbers can be used.

式(13)では、2のべき乗になるため指数が大きくなるほど桁数は莫大になるが2進数では指数分を左シフトで行えば良く、素数Pを2進数展開してビット値同士の割り算を行い割り切れるか否か(余りが出ないか)を確認すれば良い。従って、コンピュータ実装での計算を考えるならば、割り算は引き算の演算を実装すれば良いため計算量はそれほど問題とならないと推測される。 In equation (13), since it is a power of 2, the number of digits becomes enormous as the exponent becomes larger, but in binary numbers, the exponent should be shifted to the left, and the prime number P is expanded into binary numbers to divide the bit values. You just have to check if it is divisible (whether there is a remainder). Therefore, when considering the calculation in the computer implementation, it is presumed that the amount of calculation does not matter so much because the division can be implemented by the subtraction operation.

また、指数が大きいほど桁が莫大になるが、合同算術では法(modulo)を採ることにより、或る値Q同士を掛け算した結果の余りにもう一度或る値Qを掛け算して余りを出すと、元の掛け算(Q3)の余りに等しくなるといった性質があり、桁を抑えて演算できる。この手法を図18に示す。 In addition, the larger the exponent, the larger the digit becomes. It has the property of being equal to the remainder of the original multiplication (Q 3 ), and can be calculated with a reduced number of digits. This method is shown in FIG.

例として図10の“素数P=41”の行の2Km±1の欄から27+1の結果は、素数P=43で割り切れることを示している。
つまり、27+1≡0(mod43)であるため、正直に指数をかけた場合は、129≡0(mod43)と129を43で割った余りを出すことになる。ここで、上式において“+1"を右辺に移項すると27≡-1(mod43)となる。この式で“-1"は“43-1"を意味するため27≡42(mod43)であるかを確認するために、図18に示すように1を余りに対し2を掛け算して、法(modulo)を採り、一つ一つ計算してゆくことで桁数を増やさずに演算できるのである。
As an example, the result of 27 + 1 from the column of 2 Km ± 1 in the row of "prime number P = 41" in FIG. 10 shows that it is divisible by the prime number P = 43.
In other words, since it is 27 + 1≡0 (mod43), when the index is honestly multiplied, the remainder of 129≡0 (mod43) and 129 divided by 43 is obtained. Here, when "+1" is transferred to the right side in the above equation, it becomes 27 ≡ -1 (mod 43). In this equation, "-1" means "43-1", so in order to confirm whether it is 27 ≡ 42 (mod 43), 1 is multiplied by 2 with the remainder as shown in FIG. By taking (modulo) and calculating one by one, it is possible to perform calculations without increasing the number of digits.

但し、大きな桁の素数同士の掛け算による合成数は、桁が大きいほど素因数分解の計算に莫大な時間がかかるとされている。従って、現実的には、現在のコンピュータでそれほど計算時間がかからない程度の桁数の素数を選択することが推奨される。 However, it is said that the larger the digit, the longer it takes to calculate the prime factorization of the composite number by multiplying the prime numbers of large digits. Therefore, in reality, it is recommended to select a prime number with a number of digits that does not take much calculation time on the current computer.

従来のカオスを利用した疑似乱数系列は、一様性の面では理論的な構築がなされておらず、数値に偏りが起こる懸念があった。これに対し上記に示した実施形態は、周期が見積ることができるようになったことで、一様性が保証でき良質な疑似乱数列を生成できる効果を奏する。 The conventional pseudo-random number sequence using chaos has not been theoretically constructed in terms of uniformity, and there is a concern that the numerical values may be biased. On the other hand, in the embodiment shown above, since the period can be estimated, the uniformity can be guaranteed and a good quality pseudo-random number sequence can be generated.

更に、上記実施形態では、一周期内で一様性を保証できる素数か確認し、その素数を用いて乱数列を出力し、周回したら一様性を保証する別の素数を採用して乱数列を生成して行くものである。このため、素数は無限に存在することが知られており、実質的に際限のない周期長を持った疑似乱数列を生成することが可能となるという効果を奏することが期待できる。 Further, in the above embodiment, it is confirmed whether the prime number can guarantee the uniformity within one cycle, the random number sequence is output using the prime number, and another prime number that guarantees the uniformity is adopted after the lap, and the random number sequence is adopted. Is to generate. For this reason, it is known that prime numbers exist infinitely, and it can be expected to have the effect of being able to generate a pseudo-random number sequence having a substantially unlimited period length.

以上の実施形態の疑似乱数生成装置は、全て図1Bに示すフローチャートに対応するプログラムによりコンピュータが処理を行うものとして実現できる。以下、この図1Bを用いて動作説明を行う。まず、取得する(生成する)乱数の容量(乱数列長)“M”を設定する(S11)。 All of the pseudo-random number generators of the above embodiments can be realized by a computer performing processing by a program corresponding to the flowchart shown in FIG. 1B. Hereinafter, the operation will be described with reference to FIG. 1B. First, the capacity (random number sequence length) "M" of the random numbers to be acquired (generated) is set (S11).

次に、“P”として素数を取得し、この“P”が、テント写像を行ったときに最大周期“(P-1)/2”を実現する数値であるものを設定する(S12)。次に、テント写像に最大演算精度Pと初期値X0を設定し、レジスタiを0に設定する(S13)。次に、テント写像演算の結果が出ていなければステップS14をスキップして、ステップS15のテント写像演算を実行する(S15)。このステップS15においては、レジスタiの値を1インクリメントし、レジスタjの値をLインクリメントしておく。ここに、Lは1回の乱数演算結果を用いて作成される乱数の長さを示す。 Next, a prime number is acquired as "P", and a numerical value that realizes the maximum period "(P-1) / 2" when tent mapping is performed is set (S12). Next, the maximum calculation accuracy P and the initial value X 0 are set in the tent map, and the register i is set to 0 (S13). Next, if the result of the tent mapping calculation is not obtained, step S14 is skipped and the tent mapping calculation in step S15 is executed (S15). In this step S15, the value of the register i is incremented by 1, and the value of the register j is incremented by L. Here, L indicates the length of a random number created by using the result of one random number operation.

次に、レジスタiの値が“(P-1)/2”となったかを検出し(S16)、Noとなると既に説明した乱数生成手段30による乱数生成処理が行われる(S14)。ステップS14からステップS6までの処理の繰り返しによって1周期分のテント写像が終了すると、ステップS16においてYesへ分岐し、レジスタjの値が乱数の容量(乱数列長)“M”を超えたかを検出し(S17)、NoとなるとステップS12へ戻って処理が続けられ、ステップS17にてYesとなると処理を終了する。 Next, it is detected whether the value of the register i is "(P-1) / 2" (S16), and if it becomes No, the random number generation process described above is performed by the random number generation means 30 (S14). When the tent mapping for one cycle is completed by repeating the processes from step S14 to step S6, the tent map is branched to Yes in step S16, and it is detected whether the value of the register j exceeds the random number capacity (random number sequence length) "M". (S17), if No, the process returns to step S12 and the process is continued, and if Yes in step S17, the process ends.

10 テント写像演算手段
20 テント写像パラメータ選択手段
30 乱数生成手段
40 パラメータ遷移制御手段
10 Tent mapping calculation means 20 Tent mapping parameter selection means 30 Random number generation means 40 Parameter transition control means

Claims (18)

テント写像による写像演算を行うテント写像演算手段と、
前記テント写像を整数演算で可能とするために、前記テント写像の最大区間を整数倍するときの素数Pを用いた式(P-1)/2が素数であるかを検出し、(P-1)/2が素数でない場合には(P-1)/2を素因数分解して素因数を求め、(P-1)/2が素数であるかまたは前記素因数が所定条件式を満たすかに基づき、当該素数Pを選択して前記テント写像演算手段へ与えるテント写像パラメータ選択手段と、
前記テント写像演算手段による演算結果に基づき所定長の数列を生成する乱数生成手段と
を具備することを特徴とする擬似乱数生成装置。
A tent mapping calculation means that performs mapping calculation by tent mapping,
In order to enable the tent mapping by an integer operation, it is detected whether the equation (P-1) / 2 using the prime number P when multiplying the maximum interval of the tent mapping by an integer is a prime number, and (P- 1) When / 2 is not a prime number, (P-1) / 2 is factored into prime factors to obtain a prime factor, and based on whether (P-1) / 2 is a prime number or the prime factor satisfies a predetermined conditional expression. , The tent mapping parameter selection means that selects the prime number P and gives it to the tent mapping calculation means, and
A pseudo-random number generation device including a random number generation means for generating a sequence of predetermined lengths based on a calculation result by the tent mapping calculation means.
前記テント写像パラメータ選択手段は、(P-1)/2が素数である場合には、Pを選択することを特徴とする請求項1に記載の擬似乱数生成装置。 The pseudo-random number generator according to claim 1, wherein the tent mapping parameter selection means selects P when (P-1) / 2 is a prime number. 前記テント写像パラメータ選択手段は、(P-1)/2を素因数分解して求めた素因数Cmにより算出されたKmにより作成した条件式Km≦(log2P-1)が成り立つ場合に、Pを選択することを特徴とする請求項1に記載の擬似乱数生成装置。 The tent map parameter selection means sets P when the conditional expression Km ≦ (log 2 P-1) created by Km calculated by the prime factor Cm obtained by factoring (P-1) / 2 into prime factors holds . The pseudo-random number generator according to claim 1, wherein the pseudo-random number generator is selected. 前記テント写像パラメータ選択手段は、2Km±1≡0(mod P)の成立を判定し、成立する場合には当該Pを用いないことを特徴とする請求項3に記載の擬似乱数生成装置。 The pseudo-random number generation device according to claim 3, wherein the tent mapping parameter selection means determines the establishment of 2 Km ± 1≡0 (mod P), and if it is established, the P is not used. 前記テント写像演算手段がテント写像の1周期分演算を行う毎に、前記テント写像パラメータ選択手段から新たなPを与えるように制御するパラメータ遷移制御手段を具備することを特徴とする請求項1乃至4のいずれか1項に記載の擬似乱数生成装置。 The first aspect of the present invention is characterized in that the tent map calculation means includes a parameter transition control means for controlling so as to give a new P from the tent map parameter selection means each time the tent map calculation means performs a calculation for one cycle of the tent map. 4. The pseudo-random number generator according to any one of 4. 前記乱数生成手段は、テント写像による写像結果を順次並べて、乱数とすることを特徴とする請求項1乃至5のいずれか1項に記載の擬似乱数生成装置。 The pseudo-random number generation device according to any one of claims 1 to 5, wherein the random number generation means sequentially arranges mapping results by tent mapping to obtain random numbers. 前記テント写像演算手段は、2系列のテント写像の系列を備え、各系列に異なる初期値を与えてテント写像を繰り返し、
前記乱数生成手段は、各テント写像毎に1系列から1ビットずつ、合計2ビットを得る処理を繰り返し、並べて所定長の乱数列とすることを特徴とする請求項1乃至6のいずれか1項に記載の擬似乱数生成装置。
The tent map calculation means includes two series of tent maps, gives different initial values to each series, and repeats the tent map.
One of claims 1 to 6, wherein the random number generation means repeats a process of obtaining a total of 2 bits, one bit from one series for each tent map, and arranges them to form a random number sequence having a predetermined length. Pseudo-random number generator described in.
前記テント写像演算手段は、3系列のテント写像の系列を備え、各系列に異なる初期値を与えてテント写像を繰り返し、
前記乱数生成手段は、各テント写像に第1の系列から所定ビット、第2の系列から所定ビット、第3の系列から所定ビットを得て、並べて所定長の乱数列とすることを特徴とする請求項1乃至6のいずれか1項に記載の擬似乱数生成装置。
The tent map calculation means includes three series of tent maps, gives different initial values to each series, and repeats the tent map.
The random number generation means obtains a predetermined bit from a first series, a predetermined bit from a second series, and a predetermined bit from a third series in each tent map, and arranges them to form a random number sequence having a predetermined length. The pseudo-random number generator according to any one of claims 1 to 6 .
前記乱数生成手段は、テント写像演算の結果と前記Pの値の全部または一部との演算を行い、この演算結果から所定長の乱数列とすることを特徴とする請求項1乃至8のいずれか1項に記載の擬似乱数生成装置。 Any of claims 1 to 8, wherein the random number generation means performs an operation on the result of the tent mapping operation and all or a part of the value of P, and obtains a random number sequence having a predetermined length from the operation result. The pseudo-random number generator according to item 1. コンピュータを、
テント写像による写像演算を行うテント写像演算手段、
前記テント写像を整数演算で可能とするために、前記テント写像の最大区間を整数倍するときの素数Pを用いた式(P-1)/2が素数であるかを検出し、(P-1)/2が素数でない場合には(P-1)/2を素因数分解して素因数を求め、(P-1)/2が素数であるかまたは前記素因数が所定条件式を満たすかに基づき、当該素数Pを選択して前記テント写像演算手段へ与えるテント写像パラメータ選択手段、
前記テント写像演算手段による演算結果に基づき所定長の数列を生成する乱数生成手段
として機能させることを特徴とする擬似乱数生成プログラム。
Computer,
Tent mapping calculation means that performs mapping calculation by tent mapping,
In order to enable the tent mapping by an integer operation, it is detected whether the equation (P-1) / 2 using the prime number P when multiplying the maximum interval of the tent mapping by an integer is a prime number, and (P- 1) When / 2 is not a prime number, (P-1) / 2 is factored into prime factors to obtain a prime factor, and based on whether (P-1) / 2 is a prime number or the prime factor satisfies a predetermined conditional expression. , The tent mapping parameter selection means, which selects the prime number P and gives it to the tent mapping calculation means,
A pseudo-random number generation program characterized in that it functions as a random number generation means for generating a sequence of predetermined lengths based on the calculation result by the tent mapping calculation means.
前記コンピュータを、前記テント写像パラメータ選択手段として、(P-1)/2が素数である場合には、Pを選択するように機能させることを特徴とする請求項10に記載の擬似乱数生成プログラム。 The pseudo-random number generation program according to claim 10, wherein the computer functions as the tent mapping parameter selection means to select P when (P-1) / 2 is a prime number. .. 前記コンピュータを、前記テント写像パラメータ選択手段として、(P-1)/2を素因数分解して求めた素因数Cmにより算出されたKmにより作成した条件式Km≦(log2P-1)が成り立つ場合に、Pを選択するように機能させることを特徴とする請求項10に記載の擬似乱数生成プログラム。 When the conditional expression Km ≦ (log 2 P-1) created by Km calculated by the prime factor Cm obtained by factoring (P-1) / 2 into the prime factor Cm is satisfied by using the computer as the tent mapping parameter selection means. The pseudo-random number generation program according to claim 10 , further comprising functioning to select P. 前記コンピュータを、前記テント写像パラメータ選択手段として、2Km±1≡0(mod P)の成立を判定させ、成立する場合には当該Pを用いないように機能させることを特徴とする請求項12に記載の擬似乱数生成プログラム。 12. The computer is characterized in that, as the tent mapping parameter selection means, it is made to determine the establishment of 2 Km ± 1≡0 (mod P), and if it is established, the computer is made to function so as not to use the P. Pseudo-random number generator described in. 前記コンピュータを、前記テント写像演算手段がテント写像の1周期分演算を行う毎に、前記テント写像パラメータ選択手段から新たなPを与えるように制御するパラメータ遷移制御手段として機能させることを特徴とする請求項10乃至13のいずれか1項に記載の擬似乱数生成プログラム。 The computer is characterized by functioning as a parameter transition control means for controlling the tent map parameter selection means to give a new P each time the tent map calculation means performs a calculation for one cycle of the tent map. The pseudo-random number generation program according to any one of claims 10 to 13. 前記コンピュータを、前記乱数生成手段として、テント写像による写像結果を順次並べて、乱数とするように機能させることを特徴とする請求項10乃至14のいずれか1項に記載の擬似乱数生成プログラム。 The pseudo-random number generation program according to any one of claims 10 to 14, wherein the computer, as the random number generation means, sequentially arranges mapping results by tent mapping and functions to generate random numbers. 前記コンピュータを、前記テント写像演算手段として、2系列のテント写像の系列を備え、各系列に異なる初期値を与えてテント写像を繰り返すように機能させ、
前記コンピュータを、前記乱数生成手段として、各テント写像毎に1系列から1ビットずつ、合計2ビットを得る処理を繰り返し、並べて所定長の乱数列とするように機能させることを特徴とする請求項10乃至15のいずれか1項に記載の擬似乱数生成プログラム。
The computer is provided with two series of tent maps as the tent map calculation means, and each series is given a different initial value to function so as to repeat the tent map.
The present invention is characterized in that, as the random number generation means, the computer is repeatedly processed to obtain a total of 2 bits, one bit from one series for each tent map, and arranged so as to form a random number sequence having a predetermined length. The pseudo-random number generation program according to any one of 10 to 15.
前記コンピュータを、前記テント写像演算手段として、3系列のテント写像の系列を備え、各系列に異なる初期値を与えてテント写像を繰り返すように機能させ、
前記コンピュータを前記乱数生成手段として、各テント写像に第1の系列から所定ビット、第2の系列から所定ビット、第3の系列から所定ビットを得て、並べて所定長の乱数列とするように機能させることを特徴とする請求項10乃至15のいずれか1項に記載の擬似乱数生成プログラム。
The computer is provided with three series of tent maps as the tent map calculation means, and each series is given a different initial value to function so as to repeat the tent map.
Using the computer as the random number generating means, each tent map obtains predetermined bits from the first series, predetermined bits from the second series, and predetermined bits from the third series, and arranges them to form a random number sequence having a predetermined length. The pseudo-random number generation program according to any one of claims 10 to 15 , characterized in that it functions.
前記コンピュータを、前記乱数生成手段として、テント写像演算の結果と前記Pの値の全部または一部との演算を行い、この演算結果から所定長の乱数列とするように機能させることを特徴とする請求項10乃至17のいずれか1項に記載の擬似乱数生成プログラム。 As the random number generation means, the computer is characterized in that it performs an operation on the result of a tent mapping operation and all or a part of the value of P, and causes the computer to function as a random number sequence having a predetermined length from the operation result. The pseudo-random number generation program according to any one of claims 10 to 17.
JP2018168348A 2018-09-07 2018-09-07 Pseudo-random number generator and pseudo-random number generator Active JP7079546B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018168348A JP7079546B2 (en) 2018-09-07 2018-09-07 Pseudo-random number generator and pseudo-random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018168348A JP7079546B2 (en) 2018-09-07 2018-09-07 Pseudo-random number generator and pseudo-random number generator

Publications (2)

Publication Number Publication Date
JP2020042453A JP2020042453A (en) 2020-03-19
JP7079546B2 true JP7079546B2 (en) 2022-06-02

Family

ID=69798360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018168348A Active JP7079546B2 (en) 2018-09-07 2018-09-07 Pseudo-random number generator and pseudo-random number generator

Country Status (1)

Country Link
JP (1) JP7079546B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003152706A (en) 2001-11-12 2003-05-23 Toshiba Information Systems (Japan) Corp Encryption generating device, encryption decrypting device, encryption generating program, encryption decrypting program, authentication system, and electronic device
JP2010237735A (en) 2009-03-30 2010-10-21 Nihon Univ Device, method and program for generation of pseudo random number

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003152706A (en) 2001-11-12 2003-05-23 Toshiba Information Systems (Japan) Corp Encryption generating device, encryption decrypting device, encryption generating program, encryption decrypting program, authentication system, and electronic device
JP2010237735A (en) 2009-03-30 2010-10-21 Nihon Univ Device, method and program for generation of pseudo random number

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
岩野 隆 Takashi IWANO,一次元写像を用いた擬似乱数生成におけるパラメータ可変の効果について On the Study of the Effect of Variable Parameter in Pseudo Random Number Generation using 1-Dimensional Mapping,電子情報通信学会技術研究報告 Vol.106 No.594 IEICE Technical Report,日本,社団法人電子情報通信学会 The Institute of Electronics,Information and Communication Engineers,2007年03月08日,第47-51頁

Also Published As

Publication number Publication date
JP2020042453A (en) 2020-03-19

Similar Documents

Publication Publication Date Title
Tlelo-Cuautle et al. FPGA realization of multi-scroll chaotic oscillators
JP5038488B2 (en) Digital generation of chaotic numerical series
US7486789B2 (en) Device and method for calculation on elliptic curve
Masoodi et al. An analysis of linear feedback shift registers in stream ciphers
US8732510B2 (en) Digital forced oscilation by direct digital synthesis to generate pulse stream having frequency relative to a reference clock signal and to eliminate an off-chip filter
Li et al. Design of a high throughput pseudorandom number generator based on discrete hyper-chaotic system
CN107202979A (en) Relevant logarithm normal distribution radar clutter real time simulation method and system
JP7079546B2 (en) Pseudo-random number generator and pseudo-random number generator
Abdel-Gawad et al. Solution of systems of Boolean equations via the integer domain
JP2004258141A (en) Arithmetic unit for multiple length arithmetic of montgomery multiplication residues
CN117331530A (en) Method, device, electronic equipment and storage medium for fast jump of long pseudo-random sequence
Kowalenko Properties and applications of the reciprocal logarithm numbers
JP5101253B2 (en) Random error generator, M-sequence generator, and design method thereof
JP4629300B2 (en) Cryptographic pseudorandom number generator and program
Beletsky Factorization of the Degree of Semisimple Polynomials Over the Galois Fields of Arbitrary Characteristics
JP2801150B2 (en) Chaos signal generator
Azim et al. Graphs and codes produced by a new method for dividing a natural number by two
JP5455664B2 (en) Pseudorandom number generator and pseudorandom number generation program
Beletsky Factorization of the Degree of Sphenic Polynomials over the Galois Fields of Arbitrary Characteristics
Mukherjee et al. High-speed on-chip event counters for embedded systems
Solomko et al. Summation of binary codes without carry
Lefèvre An Algorithm that Computes a Lower Bound on the Distance Between a Segment and ℤ 2
RU2761766C1 (en) Apparatus for generating pseudorandom numbers
Green Linear complexity of modulo-m power residue sequences
Alhakim et al. De Bruijn Sequences with Varying Combs.

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210122

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211124

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220118

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: 20220517

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220517

R150 Certificate of patent or registration of utility model

Ref document number: 7079546

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150