Common use of Simulating relations Clause in Contracts

Simulating relations. Before we start with the simulation, we run a short sieving test. In order to get a rep- resentative selection of the actual relations, we ensure that the points we are sieving in this test form a representative sample of the entire sieving area. The parameters for the sieving are set in such a way that we have at most two large primes both on the rational side and on the algebraic side. In the case of lattice sieving we have one additional special prime on one of the sides. In this section we describe the process of simulating relations both for line sieving and for lattice sieving. Note that we only simulate the large primes; for the primes in the factorbase we use a correction as will be explained in Section 4.3. ∈ { } The first step after the sieving test consists of splitting the relations according to the number of large primes occurring in the relation. The set of relations with i large primes on the rational side and j large primes on the algebraic side is denoted by riaj for i, j 0, 1, 2 . This leads to nine different sets and the mutual ratios of their cardinalities determine the ratios by which we will simulate the relations. In the case of lattice sieving we split the relations in the same way, treating the special prime separately. Our first experiments with simulating the large primes for the set r1a0 (and re- moving singletons) concentrated on the large primes at hand. We tried linear inter- polation between two consecutive large primes, Lagrange polynomials, and splines, but all these local approaches did not give a satisfying result: the number of relations after singleton removal was too far from the original data. We then tried a more global approach, looking at all the large primes and seeing if we could find a distribu- tion for them. We found in this case that an exponential distribution simulates best the distribution of these large primes over the interval [F, L] (cf. [7], Ch. 6) and the result after singleton removal was satisfying. The inverse of this distribution function g(x) = F − a log 1 − x 1 − e F −L , 0 ≤ x ≤ 1, (4.1) where a is the average of the large primes in the set r1a0. Note that g(0) = F and g(1) = L. In order to generate primes according to the actual distribution of the large primes, we generate a random number between 0 and 1, substitute this number in g(x), round the number g(x) to the nearest prime, and repeat this for each prime that we want to generate. To avoid expensive prime tests, we work with the index of the primes p, defined as ip = π(p), rather than with the prime itself. This index can be found by using a look-up table or the approximation i being the nearest integer to p + p + 2p p log p log2 p log3 p [37]. Experiments showed that this third order approximation gives almost the same results as looking up indices in a table. It is more efficient to use the approximation when L is large. We choose for the simulation of the indices the same type of exponential distri- bution. This may seem strange, as prime numbers have a different distribution, but experiments showed that this choice gave good results after singleton removal. So we choose for simulating the indices of the large primes in the set r1a0 G(x) = iF − a′ log 1 − x 1 − e iF −iL a′ , 0 ≤ x ≤ 1, (4.2) where iF stands for the index of the first prime above F , iL for the index of the prime just below L, and a′ for the average of the indices of the large primes in the set r1a0. During our experiments with various choices of functions for simulating the dis- tributions of the large primes in the different sets of relations riaj, we found that it is convenient to distinguish between two cases: the case in which the ratio F/L is approaching 1 (Case I) and the case in which this ratio is approaching 0 (Case II). These two cases ask for different choices of the distribution functions (described below). Table 4.18 in Section 4.5 gives an overview of the experiments which we have carried out for each case to illustrate our method for simulating relations. All functions that we give for simulating relations in the following two subsections were found experimentally. We have no theoretical proof of why the distributions of the large primes found during the sieving stage follow these distributions, only ex- perimental proof that the result after removing singletons of the simulated relations, generated with these functions, is good. 4.2.1 Case I If F and L are relatively close, we use the following approach for the different types of relations.

Appears in 1 contract

Sources: Doctoral Thesis

Simulating relations. Before we start with the simulation, we run a short sieving test. In order to get a rep- resentative selection of the actual relations, we ensure that the points we are sieving in this test form a representative sample of the entire sieving area. The parameters for the sieving are set in such a way that we have at most two large primes both on the rational side and on the algebraic side. In the case of lattice sieving we have one additional special prime on one of the sides. In this section we describe the process of simulating relations both for line sieving and for lattice sieving. Note that we only simulate the large primes; for the primes in the factorbase we use a correction as will be explained in Section 4.3. ∈ { } The first step after the sieving test consists of splitting the relations according to the number of large primes occurring in the relation. The set of relations with i large primes on the rational side and j large primes on the algebraic side is denoted by riaj for i, j 0, 1, 2 . This leads to nine different sets and the mutual ratios of their cardinalities determine the ratios by which we will simulate the relations. In the case of lattice sieving we split the relations in the same way, treating the special prime separately. Our first experiments with simulating the large primes for the set r1a0 (and re- moving singletons) concentrated on the large primes at hand. We tried linear inter- polation between two consecutive large primes, Lagrange polynomials, and splines, but all these local approaches did not give a satisfying result: the number of relations after singleton removal was too far from the original data. We then tried a more global approach, looking at all the large primes and seeing if we could find a distribu- tion for them. We found in this case that an exponential distribution simulates best the distribution of these large primes over the interval [F, L] (cf. [7], Ch. 6) and the result after singleton removal was satisfying. The inverse of this distribution function g(x) = F − a log . 1 − x . 1 − e F −L ΣΣ , 0 ≤ x ≤ 1, (4.1) where a is the average of the large primes in the set r1a0. Note that g(0) = F and g(1) = L. In order to generate primes according to the actual distribution of the large primes, we generate a random number between 0 and 1, substitute this number in g(x), round the number g(x) to the nearest prime, and repeat this for each prime that we want to generate. To avoid expensive prime tests, we work with the index of the primes p, defined as ip = π(p), rather than with the prime itself. This index can be found by using a look-up table or the approximation i being the nearest integer to p + p + 2p p log p log2 p log3 p [37]. Experiments showed that this third order approximation gives almost the same results as looking up indices in a table. It is more efficient to use the approximation when L is large. We choose for the simulation of the indices the same type of exponential distri- bution. This may seem strange, as prime numbers have a different distribution, but experiments showed that this choice gave good results after singleton removal. So we choose for simulating the indices of the large primes in the set r1a0 G(x) = iF − a′ log . 1 − x 1 − e iF −iL a′ , 0 ≤ x ≤ 1, (4.2) where iF stands for the index of the first prime above F , iL for the index of the prime just below L, and a′ for the average of the indices of the large primes in the set r1a0. During our experiments with various choices of functions for simulating the dis- tributions of the large primes in the different sets of relations riaj, we found that it is convenient to distinguish between two cases: the case in which the ratio F/L is approaching 1 (Case I) and the case in which this ratio is approaching 0 (Case II). These two cases ask for different choices of the distribution functions (described below). Table 4.18 in Section 4.5 gives an overview of the experiments which we have carried out for each case to illustrate our method for simulating relations. All functions that we give for simulating relations in the following two subsections were found experimentally. We have no theoretical proof of why the distributions of the large primes found during the sieving stage follow these distributions, only ex- perimental proof that the result after removing singletons of the simulated relations, generated with these functions, is good. 4.2.1 Case I If F and L are relatively close, we use the following approach for the different types of relations.

Appears in 1 contract

Sources: Doctoral Thesis