N-Dimensional LLL Reduction Algorithm with Pivoted Reflection

The Lenstra-Lenstra-Lovász (LLL) lattice reduction algorithm and many of its variants have been widely used by cryptography, multiple-input-multiple-output (MIMO) communication systems and carrier phase positioning in global navigation satellite system (GNSS) to solve the integer least squares (ILS) problem. In this paper, we propose an n-dimensional LLL reduction algorithm (n-LLL), expanding the Lovász condition in LLL algorithm to n-dimensional space in order to obtain a further reduced basis. We also introduce pivoted Householder reflection into the algorithm to optimize the reduction time. For an m-order positive definite matrix, analysis shows that the n-LLL reduction algorithm will converge within finite steps and always produce better results than the original LLL reduction algorithm with n > 2. The simulations clearly prove that n-LLL is better than the original LLL in reducing the condition number of an ill-conditioned input matrix with 39% improvement on average for typical cases, which can significantly reduce the searching space for solving ILS problem. The simulation results also show that the pivoted reflection has significantly declined the number of swaps in the algorithm by 57%, making n-LLL a more practical reduction algorithm.


Introduction
With the rapid development of the Beidou System (BDS), the Galileo system, the Global Positioning System (GPS) and the GLONASS system, the Global Navigation Satellite System (GNSS) is serving more and more people with higher positioning accuracy [1,2]. Alongside the standard point positioning, carrier-phase based precise positioning techniques with cm-level to mm-level accuracy, such like real-time kinematic (RTK) and precise point positioning (PPP), have started to show their potential in public services other than in specific areas such as ground surveying. The commercial continuous operational reference station (CORS) network providers have enabled the precise positioning applications in unmanned aerial vehicle (UAV), unmanned autonomous vehicle and so on [3][4][5].
The main computational effort in carrier-phase precise positioning is to resolve the carrier phase integer ambiguity which is contaminated by all kind of noises during the signal propagation. Several efficient ambiguity resolution methods were proposed during the last several decades such as: Least-Square Ambiguity Searching Technique (LSAST) [6], Triple Frequency Ambiguity Resolution (TCAR) [7], Least-squares AMBiguity Decorrelation Adjustment (LAMBDA) [8,9]. The great breakthrough of LAMBDA algorithm is bringing the "decorrelation" process into integer ambiguity resolution, dividing the whole process into: estimation, decorrelation (also known as Z-transformation), search and back transformation.
As the measurements of pseudo-range and carrier phase are strongly correlated in time and space, the coefficient matrix to resolve the ambiguities is so ill-conditioned that the search space is huge

The LLL Reduction
A lattice is defined as: where b i denote m independent liner vectors defined on R n and are called a basis of lattice L. So, a lattice can be seen as a discrete point set inside the real value space R n . Then the typical weighted ILS problem like: can be described as: finding a vector a ∈ L that is closest toâ ∈ R n (Qâ is the covariance matrix of vector a), which is also known as a CVP. As a CVP is an NP-hard problem, one efficient approach to acquire an approximate solution is lattice basis reduction. To simplify the demonstration, the discussions below involve only square matrix. For a basis B = (b 1 , b 2 , b 3 · · · b m ) of lattice L, obviously B o = B·T is also a basis of L, where T is a unimodular matrix. Then the weighted ILS problem (2) can be rewritten as: Assuming that we are able to find a proper unimodular matrix T that makes all the column vectors of B o mutually orthogonal, the optimized solution of z can be obtained by rounding each entry inẑ and the solution for a can be calculated accordingly, which is also known as the Babai's method [23]. However, such kind of matrix T cannot be found in general cases. As a result, the best way we can do is to find an approximate solution for matrix T that makes B o as orthogonal as possible and the column vectors as short as possible, which is the so called "reduction" process. Figure 1 shows the difference between a "bad" and a "good" reduced lattice basis and how they affect the search process. The basis vectors in Figure 1a are relatively long and have smaller angle, which will bring larger error when estimating the CVP solution for real value vector w. On the contrary, the basis vectors in Figure 1b are mutually orthogonal, enabling the Babai's method to find the solution instantly.
Assuming that we are able to find a proper unimodular matrix T that makes all the column vectors of o B mutually orthogonal, the optimized solution of z can be obtained by rounding each entry in ẑ and the solution for a can be calculated accordingly, which is also known as the Babai's method [23]. However, such kind of matrix T cannot be found in general cases. As a result, the best way we can do is to find an approximate solution for matrix T that makes o B as orthogonal as possible and the column vectors as short as possible, which is the so called "reduction" process. Figure 1 shows the difference between a "bad" and a "good" reduced lattice basis and how they affect the search process. The basis vectors in Figure 1a are relatively long and have smaller angle, which will bring larger error when estimating the CVP solution for real value vector w . On the contrary, the basis vectors in Figure 1b are mutually orthogonal, enabling the Babai's method to find the solution instantly. (a)

The LLL Reduction Algorithm
The two primary goals of reduction process are:  To make the column vectors in o B as mutually orthogonal as possible. As mentioned above, if the vectors are mutually orthogonal, then a simple rounding process will solve the ILS problem. Thus, the orthogonality of the vectors actually defines shape of search space, which will have significant influence on search efficiency; With the two goals, several reduction algorithm were proposed in the last decades and among those was the most famous LLL reduction algorithm proposed by Lenstra et al. [14].
The LLL reduction algorithm is consisted of two parts: size reduction and vector swap. The size reduction uses Gram-Schmidt orthogonalization. Let be a basis of lattice L and a Gram-Schmidt basis * B can be described as: where:

The LLL Reduction Algorithm
The two primary goals of reduction process are: • To make the column vectors in B o as mutually orthogonal as possible. As mentioned above, if the vectors are mutually orthogonal, then a simple rounding process will solve the ILS problem. Thus, the orthogonality of the vectors actually defines shape of search space, which will have significant influence on search efficiency; • To minimize the length of vectors b i . Note that gives an upper bound of the volume of searching space, which means minimizing the vector length will shrinking the search space.
With the two goals, several reduction algorithm were proposed in the last decades and among those was the most famous LLL reduction algorithm proposed by Lenstra et al. [14].
The LLL reduction algorithm is consisted of two parts: size reduction and vector swap. The size reduction uses Gram-Schmidt orthogonalization. Let B = (b 1 , b 2 , b 3 · · · b m ) be a basis of lattice L and a Gram-Schmidt basis B * can be described as: where: Definition 1. Given a basis B ∈ R m×m of lattice L and its Gram-Schmidt orthogonal matrix B * , B is LLL reduced if it satisfies the following two conditions: Sensors 2018, 18, 283 5 of 20 where parameter δ satisfies 1 4 < δ < 1.
The LLL reduction algorithm starts with setting b * 1 = b 1 and then b i is replaced by b i − µ i,j round b j if µ i,j ≤ 1 2 for 1 ≤ j < i ≤ m to satisfy the size condition (7). If Lovász condition (8) is violated for 1 < i ≤ m, then the column vectors b i−1 and b i are swapped and the size reduction process will go back to b i−1 again. After as much as O n 2 log B iterations [14], when the Lovász condition is satisfied between b m−1 and b m , the LLL reduction is done.
As we can see from the process of LLL reduction algorithm shown in Algorithm 1, the size reduction process adjusts the angle of b i by rounded Gram-Schmidt orthogonalization and the length of b i is reduced at the same time.

Algorithm 1: The LLL reduction algorithm
Clearly, the performance of size reduction process is strongly dependent on the order of the column vectors. Putting shorter vectors ahead will help improving the performance because shorter vectors kind of "push" the vectors after them to a more orthogonal angle in order to satisfy the size condition. Ideally, if we have: and then the lattice can be most reduced. But unfortunately, there is still no algorithm can achieve (9) in polynomial time. As a result, Lovász set the condition to (8), where δ is usually set to 0.75 [14], in order to make the algorithm finish within polynomial time.

The LLL Reduction with Pivoted Reflection
As can be seen from Algorithm 1, the loop indicator i decreases only when the swaps take place, which means the number of iterations is highly dependent on the number of swaps. Hence, if the column vectors b i are in ascending order or at least as ascending ordered as possible before the LLL reduction is executed, the number of swaps as well as the reduction time will surely decline.
Motivated by Chang's MLAMBDA [11] which utilizes the symmetric pivoting strategy to improve the efficiency of the reduction process and Wübben's MMSE Sorted QR decomposition [24] which extends the V-BLAST algorithm, we introduce the pivoted reflection strategy into LLL algorithm to pre-sort the column vectors.
As the Gram-Schmidt orthogonalization process in the original LLL algorithm is not an isometric process, the pivoting of the vectors has limited influence on the reduction time. Therefore, we chose the Householder transformation which is an elementary reflection transformation proposed by Turnbull and Aitken in 1932. The typical usage of the Householder reflection is QR decomposition. Given a none-zero vector b ∈ R n , one can construct vector u = b + ρe with e =   1, 0 · · · 0 n−1zeros   T and ρ = sign(b 1 )· b . Then the transformation matrix can be constructed as: Assuming i − 1 vectors of B have been transformed and B i is the submatrix: then the ith transformation matrix can be calculated as: where H B i is the transformation matrix for submatrix B i according to (10). Then we get: with B = Q·R, where Q is an orthogonal matrix and R is an upper triangle matrix. In order to make the column vectors as ascending ordered as possible, before each Householder transformation the shortest vector in submatrix is moved ahead and the corresponding column vector in B is swapped with b i accordingly. The whole LLL reduction with pivoted reflection is given in Algorithm 2.
Set k = k + 1 End End Furthermore, the algorithm can be more efficient by applying Givens transformation to the rotations in the swap process instead of Householder reflection, because only b i,i−1 needs to be transformed to zero when swapping b i−1 and b i . It should also be emphasized that the pivoted reflection strategy does not always sort the vectors in perfect ascending order, because the reflection on b i also transforms the vectors after it, which may create shorter vector. But as can be seen in the simulations in Section 4, the pivoted reflection is proved to be very effective in minimizing the number of vector swaps in LLL algorithm in many cases of interest.

N-Dimensional Expansion of LLL Reduction
As discussed at the end of Section 2.1, the reduction quality and the improvement of search space are both highly dependent on the order of the basis vectors. We propose the n-LLL reduction algorithm, which inherits the basic outline of the LLL reduction algorithm and strengths the constraint of the order of basis vectors.

The N-Dimensional LLL Reduction Algorithm
Look back at the two conditions of LLL reduction again: and the reduction process can be described in another way as: applying a series of Gaussian reductions in the 2-dimensional lattice spanned by a Lovász condition optimized vector pair b i−1 and b i . However, the Lovász condition here only focuses on local optimization within two neighbor vectors which ignores the global optimization. In order to improve the effect of the optimization to enhance the ordering constraint, we extend the 2-dimensional condition to n-dimension. Like the LLL reduction defined in Definition 1, the n-dimensional LLL reduction is defined as: Definition 2. Given a basis B ∈ R m×m of Lattice L and its Gram-Schmidt orthogonal matrix B * , B is n-LLL reduced (2 ≤ n < m) if it satisfy the following two conditions: where parameter δ satisfies: Condition (15) can also be rewritten as: where b i k is the column vector in submatrix B i and λ 1 (B) implies the length of the shortest none-zero vector in B.
Both condition (15) and (16) ensure that b i−1 is the optimized choice in the following n vectors, which brings stronger constraint to the reduced basis than the original Lovász condition. The n-LLL reduction becomes LLL reduction when n = 2.
Note that the extend Lovász condition in the n-LLL reduction is similar to Block Korkine-Zolotarev (BKZ) [21] reduction that applies Korkine-Zolotarev (KZ) reduction within a k-block. This paper extends the original Lovász condition instead of introducing KZ reduction basis. As the constraint in n-LLL is stronger than in the original one, the increase of reduction time is predictable. Thus, pivoted reflection mentioned in Section 2.2 plays a vital role in controlling the total reduction time of the algorithm. So, we fuse QR decomposition and reduction together by deeply coupling the pivoted reflection and n-LLL reduction process.
One possible algorithm to achieve n-LLL reduction is shown in Algorithm 3: The n-LLL reduction with pivoted reflection Set R = B and Q = I m×m (Move the shortest vector to r 1 ) While i ≤ m (Pivoted reflection and reduction process) The algorithm above uses the "Pivoting-Reduction-Reflection" strategy for each vector of B instead of "Pivoting-Reflection and Reduction" strategy of Algorithm 2. The pivoting process in the fusion strategy gives better result as it takes the influence of the rotations in vector swap into consideration. Note that vector r i may have less than m − i zero entries because the vector pivoted to r i has not been reflected yet. However, as the Householder reflection is an isometry, it will not be a problem in the swap process. The vector is then reflected after swapped to a proper place. The whole algorithm is actually executing the pivoted QR decomposition and n-LLL reduction in parallel, making it more efficient.

The Performance
The n-LLL reduction algorithm strengthens the Lovász condition, which will certainly improve the quality of reduced basis. In this section, the performance improvement between the n-LLL and LLL reduction is detailed analyzed.
In order to compare the performance of reduction algorithm, we need to introduce measures to evaluate the reduction quality. As the size reduction processes of the two algorithms are the same, we only need to compare the orthogonality of the reduced basis according to the two goals mentioned in Section 2. One of the mostly used way to measure the orthogonality defects is imported from the Hadamard inequality: Theorem 1. (Hadamard Inequality): Given a lattice L and one of its basis B ∈ R m×m , we have: and it becomes an equation if and only if all the vectors are mutually orthogonal. Then, the orthogonality defect factor can be defined as: [25].
According to (15), we have: and the size reduction process makes sure that µ i,j ≤ 1 2 . As a result, (19) can be rewritten as: By combining (23) and (20), we can get: Repeatedly: Furthermore, by substituting (25) into the Gram-Schmidt orthogonalization (5), we get: where a denotes the integer no larger than a. By considering 1 < δk 2 < k n ≤ k 2 ≤ k n−1 n , (26) can be further rewritten to: Then the orthogonality defect factor is calculated: It can be seen clearly from (28) and (25) that the upper bound of the orthogonality defect factor declines as the parameter n increasing, which proves that the reduction quality of n-LLL reduction algorithm with n > 2 is better than the original LLL reduction (which is equivalent to 2-LLL).
It should be emphasized that the orthogonality does not directly affect the search time according to [26,27]. However, as the two algorithms compared through the orthogonality defect factor share the same size reduction constraint, the difference of the factor actually measures the performance of vector ordering, or in another way measures the efficiency of size reduction. So, the conclusion of (28) still holds in numerical simulations in Section 4.

The Complexity
As can be seen in Algorithm 3, the loop indicator i goes back to temp after each vector swap, where temp indicates the final position that b i is placed. Therefore, with temp < i, it is hard to determine that whether the algorithm will converge. Here we give the proof that the n-LLL reduction algorithm will converge in polynomial time. Let: be a sub-lattice of lattice L and we define: In the n-LLL algorithm, the value of D i changes only when the vector swap is executed. To be more accurate, only the elements from d α to d β−1 in D i will change when swapping b α and b β . And the swap happens only when the extended Lovász condition is violated, which means: which also means: As a result, the value of D m has a certain lower bound, which means only finite number of swaps are executed during the whole algorithm. Assuming that D m = D start at the beginning of the algorithm and D m = D end at the end, we have: where N denotes the total number of vector swaps. Considering that δ < 1, (36) can be rewritten as: and we also have: where B denotes the longest vector in B. Therefore, the total number swaps in the algorithm is: The fact is that the number of swaps declines as parameter n increases. However, the actual calculation effort is related to the number of loops. As the loop indicator i goes back as much as n steps after each vector swap instead of 1 step in the original LLL reduction algorithm which makes the maximum number of loops n·N + m, which means each swap takes O(n· log n) basic steps to satisfy extended Lovász condition in the n dimensional lattice space. Thus, O log n·m 3 log B basic steps are needed just to check all the vectors. Obviously, given an m rank basis, the calculation effort increases along with the increase of parameter n and the total reduction time remains polynomial for all n ≥ 2.

Measures of Reduction Quality
In Section 3.2, we introduced the orthogonality defect factor to compare the n-LLL and the original LLL reduction algorithm. And we also mentioned that the orthogonality defect factor only measures the orthogonal quality of the two algorithms. In this section, we introduce a more practical measures, which is easier to calculate through the reduced matrix: the condition number [10].
The searching region which contains the nearest solution of ILS problem (3) can be written as: and shape of this hyper-ellipsoid is determined by the ratio of the major and minor axes, which can be described as: where κ(Qẑ) is defined as the condition number of Qẑ, λ max and λ min are the maximum and minimum eigenvalues of Qẑ.
As a matter of fact, the condition number measures the elongation of the searching hyper-ellipsoid. Clearly, a lower condition number leads to a more sphere like search region and that will make the search more efficient and fast.
In order to illustrate the influence of condition number on the search time, Figure 2 shows a red ellipsoid defined by the original matrix and a reduced ellipsoid. The initial value for the search is often acquired by using Babai's method [23]. Supposing that we use the sphere search, then the minimum searching radius is the major axe of the hyper-ellipsoid. Clearly, by reducing it to the green ellipsoid showed in Figure 2, the size of the searching sphere is significantly shrunk down. Therefore, the condition number in some way reflects the search space for sphere searching method, which can be taken as an effective measure of reduction quality.

Experiment Design
To evaluate the performance of the reduction algorithm thoroughly, the simulation matrix B should be designed carefully. Therefore, two major parameter should be focused on in particularly: the dimension m and the condition number  . We first generate matrix B with two settings and then the covariance matrix Q z is calculated accordingly. Note that the weight matrix W is set to I without losing generality, as it has been incorporated into the basis as  16 2 will cover most of the situations [12]. The first case covers most of the general purpose matrixes. As we paid more attention to the GNSS carrier phase resolution application of the lattice reduction algorithm, the unique features of the real GNSS signal should be taken into consideration. In RTK applications, the integer candidates are estimated mainly by sequential integer least-squares method. As Teunissen reported in [28,29], the spectrum of conditional variances shows great discontinuity during the sequential search. And the most significant gap always shows up between the third and the forth conditional variances.
This phenomenon can be briefly explained as follows. When solving the single short-baseline RTK positioning equations with double-difference carrier phase measurement, (m + 3) unknowns are involved: m double-difference ambiguities and a 3-dimensional baseline vector. Assuming that three

Experiment Design
To evaluate the performance of the reduction algorithm thoroughly, the simulation matrix B should be designed carefully. Therefore, two major parameter should be focused on in particularly: the dimension m and the condition number κ. We first generate matrix B with two settings and then the covariance matrix Qẑ is calculated accordingly. Note that the weight matrix W is set to I without losing generality, as it has been incorporated into the basis as B = W 1/2 B . The two simulation settings are: Case 1: The m × m coefficient matrix B orignal is firstly generated randomly by using the standard Gaussian normal distribution and then decomposed into matrixes U·S·V with the singular value decomposition. To control the condition number of the covariance matrix Qẑ, the singular value matrix S is replaced by a diagonal matrix S , where s 1 = 2 −κ 4 , s m = 2 κ 4 and other entries of S are randomly distributed between s 1 and s m . The matrix B is then reconstructed as B = U·S ·V and the covariance matrix is calculated as Qẑ = B T ·B accordingly. Therefore, the condition number κ orig of Qẑ is set to 2 κ with κ = 5, 6, 7 · · · 16. For typical RTK application with all GNSS constellations like GPS, GLONASS, Galileo and BDS, setting the dimension of coefficient between 10 and 30 and the condition numbers between 2 8 and 2 16 will cover most of the situations [12].
The first case covers most of the general purpose matrixes. As we paid more attention to the GNSS carrier phase resolution application of the lattice reduction algorithm, the unique features of the real GNSS signal should be taken into consideration. In RTK applications, the integer candidates are estimated mainly by sequential integer least-squares method. As Teunissen reported in [28,29], the spectrum of conditional variances shows great discontinuity during the sequential search. And the most significant gap always shows up between the third and the forth conditional variances.
This phenomenon can be briefly explained as follows. When solving the single short-baseline RTK positioning equations with double-difference carrier phase measurement, (m + 3) unknowns are involved: m double-difference ambiguities and a 3-dimensional baseline vector. Assuming that three out of the m double difference ambiguities are already resolved, the baseline vector is then solvable with the corresponding three observation equations. At this moment, the other (m − 3) double-difference ambiguities can also be solved precisely with (m − 3) remaining observation equations. The conclusion is thus reached that once 3 ambiguities (with high conditional variances) are known, the remaining ambiguities can be determined with a very high precision (which means lower conditional variances).
Here we use Case 2 to generate matrixes with this discontinuity features.
1 , mimicking this discontinuity in the spectrum of the conditional variances.
Note that Case 2 is unlike the simulation case 4 in [11]. Instead of controlling the shape of the spectrum of conditional variances (the diagonal matrix in L T DL decomposition) directly, Case 2 here controls the distribution of eigenvalues, which makes the generated matrixes share the same condition number.
In addition, the parameter δ is set to 0.75 for all the simulations considering of generality.

Reduction Quality
The condition number κ mentioned in Section 4.1 describes how the search area looks like. In order to compare the LLL reduction algorithm and the n-LLL reduction algorithm, we let Q orig = B T orig ·B orig , Q L 3 = B T L 3 ·B L 3 and Q nL 3 = B T nL 3 ·B nL 3 be the original covariance matrix, the LLL reduced covariance matrix and the n-LLL reduced covariance matrix and let κ orig , κ L 3 , κ nL 3 be the condition numbers accordingly. Therefore, the improvement of the searching area can be described as: We run the two cases mentioned above with three variables: (i) m, the dimension of the original coefficient matrix from 10 to 30 with an interval of 2; (ii) κ orig , the condition number of covariance matrix from 8 to 16 with an interval of 1; (iii) n, the parameter for n-LLL reduction algorithm from 2 to m with an interval of 2. And for each setting, we perform 1000 independent random simulations to evaluate the algorithm.
Firstly, we pick out a set of simulations where κ orig = 2 12 (for Case 1 only), m = 20 and n = 4 and the probability density function of the dκ is plotted in Figure 3. It can be seen clearly in Figure 3a,b (dκ o−L 3 ) and Figure 3c,d (dκ o−nL 3 ) that both the LLL reduction algorithm and the n-LLL reduction algorithm are able to reduce the condition number significantly. Furthermore, Figure 3e,f shows the difference between the two algorithms dκ L 3 −nL 3 , which proves the 4-LLL reduction algorithm has larger probability to perform better than the original LLL reduction. Statistically, among the 1000 independent runs of this particular simulation setting, 64.7% results of the 4-LLL is better than that of the LLL with a maximum improvement factor of 5.85. And the average improvement is about 39%. It should be pointed out that for all the simulation settings mentioned above, the conclusion showed in Figure 3 holds in general. In Section 3.2, inequality (28) implies that the lower bound of the reduction quality (the orthogonality of the coefficient matrix) improves as the parameter n increases. To prove this conclusion, we take  20 m for example and let the parameter n vary from 4 to 20. The results shown in Figure 4 is not as expected and an upper limit shows up for the  d as the n increases. And the condition number of the output matrix changes no more after n reaches a certain number. The explanation for this phenomenon is that the column vectors in B cannot become "more ordered" to In Section 3.2, inequality (28) implies that the lower bound of the reduction quality (the orthogonality of the coefficient matrix) improves as the parameter n increases. To prove this conclusion, we take m = 20 for example and let the parameter n vary from 4 to 20. The results shown in Figure 4 is not as expected and an upper limit shows up for the dκ as the n increases. And the condition number of the output matrix changes no more after n reaches a certain number. The explanation for this phenomenon is that the column vectors in B cannot become "more ordered" to improve the orthogonality anymore at this point. However, Figure 4 still shows that n = 2 (the original LLL) is generally not this upper limit and there is space to improve reduction performance by increasing the parameter n. improve the orthogonality anymore at this point. However, Figure 4 still shows that  2 n (the original LLL) is generally not this upper limit and there is space to improve reduction performance by increasing the parameter n.  This can be clearly seen in the thermodynamic diagram Figure 5, where the temperature denotes d . The highest temperature shows up when the dimension of the coefficient matrix is around 20 with a relatively high  orig for Case 1, which indicates that the n-LLL reduction algorithm maximum its performance in that area. And for Case 2, the highest temperature also shows up around the dimension of 18 to 20. However, the difference between LLL and n-LLL becomes less significant when dealing with matrixes with higher dimension but lower condition number.
As can be seen later in Section 4.3.2, setting a higher parameter n always results in a longer reduction time. Thus, finding an optimized n to balance the performance and the reduction time is important. We analyzed the simulation results deeply and found that parameter n is relevant to the square of the dimension. We give out the fit result based on our simulation in Figure 6 and (43). The goodness of the first order polynomial surface fitting in Figure 6b   This can be clearly seen in the thermodynamic diagram Figure 5, where the temperature denotes dκ max L 3 −nL 3 = log 10 . The highest temperature shows up when the dimension of the coefficient matrix is around 20 with a relatively high κ orig for Case 1, which indicates that the n-LLL reduction algorithm maximum its performance in that area. And for Case 2, the highest temperature also shows up around the dimension of 18 to 20. However, the difference between LLL and n-LLL becomes less significant when dealing with matrixes with higher dimension but lower condition number.
original LLL) is generally not this upper limit and there is space to improve reduction performance by increasing the parameter n. This can be clearly seen in the thermodynamic diagram Figure 5, where the temperature denotes reduction algorithm maximum its performance in that area. And for Case 2, the highest temperature also shows up around the dimension of 18 to 20. However, the difference between LLL and n-LLL becomes less significant when dealing with matrixes with higher dimension but lower condition number.
As can be seen later in Section 4.3.2, setting a higher parameter n always results in a longer reduction time. Thus, finding an optimized n to balance the performance and the reduction time is important. We analyzed the simulation results deeply and found that parameter n is relevant to the square of the dimension. We give out the fit result based on our simulation in Figure 6 and (43). The goodness of the first order polynomial surface fitting in Figure 6b  As can be seen later in Section 4.3.2, setting a higher parameter n always results in a longer reduction time. Thus, finding an optimized n to balance the performance and the reduction time is important. We analyzed the simulation results deeply and found that parameter n is relevant to the square of the dimension. We give out the fit result based on our simulation in Figure 6 and (43). The goodness of the first order polynomial surface fitting in Figure 6b reaches 0.6851, which means it can be taken as an empirical reference formula within the simulation setting range.

Complexity
In order to evaluate the effect of pivoted reflection, we compared the n-LLL reduction without pivoted reflection (PR), the n-LLL reduction with pivoted reflection and the original LLL reduction algorithm. The simulation is performed on an E5-2650 CPU which makes the executing time is relatively short. Thus, matrixes with high dimension and high condition number are chosen in this simulation to obtain more accurate time measurements. 1000 independent runs are performed for 30dimensional matrixes with condition number range from 10 2 to 16 2 . And to evaluate the worst case of the n-LLL reduction algorithm, parameter n is fixed to 30 accordingly. Table 1 shows the simulation results, indicating that the pivoted reflection is very effective on improving the efficiency of the algorithm.
The conclusion is obvious that the pivoted reflection can reduce the reduction time by up to 57% and it is also clear that the n-LLL reduction algorithm with pivoted reflection causes no significant rise on the total reduction time compared with the original LLL reduction. And in the worst case scenario of all our simulations, the n-LLL reduction algorithm consumes no more than 1.72 times of the original LLL reduction time, which can also be observed in Figure 7a.

Complexity
In order to evaluate the effect of pivoted reflection, we compared the n-LLL reduction without pivoted reflection (PR), the n-LLL reduction with pivoted reflection and the original LLL reduction algorithm. The simulation is performed on an E5-2650 CPU which makes the executing time is relatively short. Thus, matrixes with high dimension and high condition number are chosen in this simulation to obtain more accurate time measurements. 1000 independent runs are performed for 30-dimensional matrixes with condition number range from 2 10 to 2 16 . And to evaluate the worst case of the n-LLL reduction algorithm, parameter n is fixed to 30 accordingly. Table 1 shows the simulation results, indicating that the pivoted reflection is very effective on improving the efficiency of the algorithm.  13 628 ms 316 ms 220 ms 2 14 651 ms 341 ms 222 ms 2 15 672 ms 369 ms 235 ms 2 16 714 ms 412 ms 239 ms The conclusion is obvious that the pivoted reflection can reduce the reduction time by up to 57% and it is also clear that the n-LLL reduction algorithm with pivoted reflection causes no significant rise on the total reduction time compared with the original LLL reduction. And in the worst case scenario of all our simulations, the n-LLL reduction algorithm consumes no more than 1.72 times of the original LLL reduction time, which can also be observed in Figure 7a.
Take another look at the results in Figure 7a in a different angle where the parameter n is present in logarithm to base 10. The executing time in Figure 7b shows great linearity to the logarithm of parameter n, which meets the conclusion presented in Section 3.3 well. Figure 8 shows the relationship between the matrix dimension, the inverse of parameter n and the average number of swaps in the reduction process. As we analyzed in Section 3.3, (39) shows that the number of swaps will actually decline with the increase of parameter n as long as both the dimension and the condition number of the original matrix is determined. And this conclusion can be clearly seen in Figure 8 that the number of swaps declines by n times.

Conclusions
This paper has presented a new kind of lattice reduction algorithm motivated by the original LLL reduction. In order to put more emphasize on the order of the basis vectors, the Lovász condition is further strengthened, expanding the 2-dimensional local optimization to n-dimensional global optimization. The pivoted reflection method based on the Householder transformation and QR decomposition is added to the algorithm in order to reduce the additional computational effort brought by the extra vector swaps.
By utilizing the Hadamard Inequality and the orthogonality defect factor, the relation between the n parameter of n-LLL and the reduction quality is illustrated. Analysis shows that with the increase of the parameter n, the basis vectors will become more orthogonal or at least its orthogonality Take another look at the results in Figure 7a in a different angle where the parameter n is present in logarithm to base 10. The executing time in Figure 7b shows great linearity to the logarithm of parameter n, which meets the conclusion presented in Section 3.2.2 well. Figure 8 shows the relationship between the matrix dimension, the inverse of parameter n and the average number of swaps in the reduction process. As we analyzed in Section 3.2.2, (39) shows that the number of swaps will actually decline with the increase of parameter n as long as both the dimension and the condition number of the original matrix is determined. And this conclusion can be clearly seen in Figure 8 that the number of swaps declines by n times. Take another look at the results in Figure 7a in a different angle where the parameter n is present in logarithm to base 10. The executing time in Figure 7b shows great linearity to the logarithm of parameter n, which meets the conclusion presented in Section 3.3 well. Figure 8 shows the relationship between the matrix dimension, the inverse of parameter n and the average number of swaps in the reduction process. As we analyzed in Section 3.3, (39) shows that the number of swaps will actually decline with the increase of parameter n as long as both the dimension and the condition number of the original matrix is determined. And this conclusion can be clearly seen in Figure 8 that the number of swaps declines by n times.

Conclusions
This paper has presented a new kind of lattice reduction algorithm motivated by the original LLL reduction. In order to put more emphasize on the order of the basis vectors, the Lovász condition is further strengthened, expanding the 2-dimensional local optimization to n-dimensional global optimization. The pivoted reflection method based on the Householder transformation and QR decomposition is added to the algorithm in order to reduce the additional computational effort

Conclusions
This paper has presented a new kind of lattice reduction algorithm motivated by the original LLL reduction. In order to put more emphasize on the order of the basis vectors, the Lovász condition is further strengthened, expanding the 2-dimensional local optimization to n-dimensional global optimization. The pivoted reflection method based on the Householder transformation and QR decomposition is added to the algorithm in order to reduce the additional computational effort brought by the extra vector swaps.
By utilizing the Hadamard Inequality and the orthogonality defect factor, the relation between the n parameter of n-LLL and the reduction quality is illustrated. Analysis shows that with the increase of the parameter n, the basis vectors will become more orthogonal or at least its orthogonality defect factor will have a smaller lower bound. The complexity of the n-LLL algorithm is estimated afterwards, which shows the n-LLL algorithm consumes more elementary steps than the original LLL with n > 2. However, the analysis also proves that the n-LLL algorithm still remains a polynomial-time algorithm.
In the numerical simulation, two basic cases are covered to mimic the features of GNSS double-difference carrier-phase measurements. The simulation results show that the reduction quality of n-LLL algorithm is better than the original LLL reduction algorithm, especially for highly ill-conditioned matrixes. However, with the increase of the parameter n, a certain upper bound of the reduction quality of n-LLL is found during the simulation. At this certain point, the effect of permutation reaches its limit and further permutation will not significantly affect the reduction quality. In this case, a first-order surface fit is given to estimate this certain parameter n.
In order to evaluate the effect of pivoted reflection, the n-LLL reduction with and without pivoted reflection as well as the original LLL reduction are compared. The results clearly show the power of pivoted reflection, especially for matrix with relatively low condition number. And in the worst case scenario of all our simulation, the pivoted reflection ensures the n-LLL reduction algorithm consumes no more than 1.72 times of the original LLL reduction executing time.
Both the analysis and the simulation results have shown that the n-LLL algorithm is better than the original LLL reduction algorithm, especially for highly ill-conditioned matrixes. And the increase of the total reduction time is fairly acceptable, which makes the n-LLL a new practical algorithm for lattice basis reduction.