FASTER BACKTRACKING ALGORITHMS FOR THE GENERATION OF SYMMETRY-INVARIANT PERMUTATIONS

A new backtracking algorithm is developed for generating classes of permutations, that are invariant under the group G4 of rigid motions of the square generated by reflections about the horizontal and vertical axes. Special cases give a new algorithm for generating solutions of the classical n-queens problem, as well as a new algorithm for generating Costas sequences, which are used in encoding radar and sonar signals. Parallel implementations of this latter algorithm have yielded new Costas sequences for length n, 19 ≤ n ≤ 24.


Introduction
Backtracking is a general procedure for solving a problem by systematically generating all possible solutions.Such a process can be described by a search tree in which each node corresponds to a partial solution.Going down the tree corresponds to progress toward obtaining a complete solution.Going up the tree, that is, backtracking, corresponds to returning to a partial solution from which it might be hopeful to proceed forward again.
In this paper, we give a new backtracking algorithm for the generation of certain permutation matrices, that is, square matrices of 0's (or blanks) and 1's (or dots), in which each column or row contains exactly one 1.An example of such a matrix is given in Figure 2.1.
It is convenient to represent n × n permutation matrices by sequences x i , i = 1, 2, . . ., n, where each x i is the row number in which column i has its dot.Such a sequence is a permutation of the elements of N n = {1, 2, . . ., n}, or more precisely, the sequences of images of a bijection π : N n → N n .We denote the set of bijections π : N n → N n by Π n .We will denote permutations interchangeably by either bijections π or the sequence of images π(N n ) = π(1)π(2) • • •π(n).
We develop an algorithm for generating classes of permutations of N n , that are invariant under the group G 4 of rigid motions of the square generated by reflections about the horizontal and vertical axes.This algorithm uses backtracking, but differs from usual backtracking algorithms in two aspects.
First, our algorithm adds terms to both (not just one) sides of a sequence.An intuitive comparison between ordinary backtracking and ours is as follows.An application of ordinary backtracking would not distinguish between unwanted patterns at the beginning and at the end of a sequence.That is, a sequence could be rejected because of an unwanted pattern at the beginning, but ordinary backtracking would generate another sequence with the same pattern, say closer to the end.The idea of the algorithm presented here is that adding characters to both sides of the sequence would eliminate this redundancy, thus making the algorithm much faster.
The second source of speedup exploits invariance under the group G 4 .Using this fact, it is necessary to use backtracking to generate only as few as one-fourth of the permutations of a given class and a given size.
The rest of this paper is organized as follows: in Section 2, we define the above-mentioned symmetries and develop the background necessary to present the algorithm.In Section 3, we give the algorithm and prove its correctness.In Section 4, we briefly discuss results of applying the algorithm to the generation of Costas arrays.

Permutation symmetries
The group of symmetries G 4 greatly reduces the size of the search space for certain sets of permutations.G 4 is a subgroup of the group of rigid motions of the square onto itself, namely, the group generated by reflections about vertical and horizontal axes, that is, reversing the columns or the rows of the permutation matrix, respectively.Thus the result of reflecting the array of Figure 2.1 about the vertical axis gives the array in Figure 2.2, and the result of reflecting it about the horizontal axis gives the array in Figure 2.3.
In the sequence representation σ = π(N n ) of a permutation matrix, the reflection about the vertical axis is represented by the sequence obtained from σ by reversing its terms, and the reflection about the horizontal axis is represented by the sequence obtained from σ by replacing each term π(i) by its complement n + 1 − π(i).We denote these operations on permutation sequences by f 1 (σ) = σ and f 2 (σ) = −σ, respectively.Clearly, , where e denotes the identity operation, constitutes a group under composition •.
For any property P of permutations, that is, where N is the set of positive integers, let U P be the set of permutation sequences of one or more elements of N that satisfy P , and let

Examples
(1) Costas sequences.The condition under which a permutation π ∈ Π is a Costas sequence can be stated in terms of the difference triangle.The first row of the difference triangle is formed by taking differences of adjacent terms.The second row is formed by taking differences π(i + 2) − π(i), i = 1, 2, . . ., n − 2 of distance 2 apart.In general, the jth row of the difference triangle is given by π(i + j) − π(i), i = 1, 2, . . ., n − j.The Costas condition states that no row of the difference triangle should have repeated terms.The set of Costas sequences is symmetry-invariant.
(2) n-queens sequences.These sequences arise from the n-queens problem, which is the problem of placing n queens on an n × n chessboard, so that no two queens are in the same row, column, or diagonal.A permu- It is important to note that not all sets of permutations have fixed points.Consider, for example, a property P for which P (π) is true if and only if no two differences of distinct adjacent terms are equal.Such a P is called an adjacent difference property.An important special case is the Costas condition.Lemma 2.2.If P is an adjacent difference property, then the set U P has no fixed points.
Proof.Suppose to the contrary that there exists a fixed point σ = π(N n ) in P .Then σ = − σ, and so π(m) + π(n − m + 1) = n + 1 for all m = 1, 2, . . ., n.In particular, π(1) In what follows, r denotes an arbitrary but fixed number in N n , and q r or q denotes the complement of r, that is, q = n + 1 − r.Now let Note that all elements of S r n (P ) have the property that r precedes q, and that the number of positions to the right of q is not less than the number of positions to the left of r. Let (2.4) We will denote S r n (P ) by S r n when there is no ambiguity.Similarly, for A r n (P ), B r n (P ), −S r n (P ), Sr n (P ), and − Sr n (P ).
Lemma 2.3.The sets S r n , Sr n , −S r n , and − Sr n are pairwise disjoint for any fixed P .
Proof.First note that none of the above sets contains a fixed point.Thus, we can assume that there exists a least index m for which π(m) + π(n + m − 1) = n + 1.Also note that the r in any σ ∈ S r n ∪ − Sr n precedes the q, whereas the r in any σ ∈ −S r n ∪ Sr n follows q.Hence (2.5) n , the number of positions to the right of q is n − j ≥ 0. If n − j = 0, then σ ∈ B r n , and so which contradicts that σ ∈ − Sr n .Thus n > j, and so σ ∈ A r n .In this case, n − j ≥ i − 1 > 0. But since σ ∈ − Sr n , we also have that the number of positions in − σ to the right of q is greater than or equal to the number of positions to the left of r.That is, Theorem 2.5.For any symmetry-invariant property P , (2.9) (2.10) Then either π(i) = r precedes π(j) = q in σ or not.Suppose it does.Case 1. Suppose that i = 1.If j < n, then σ ∈ S r n ∪ F r n .Now suppose j = n.Then either σ ∈ F r n or there exists a least index m for which π(m) and so σ ∈ −S r n .Now, suppose that n − j < i − 1.The number of positions to the left of r in − σ is n + 1 − j − 1 = n − j, and the number of positions to the right of q is n − n , and so σ ∈ − Sr n .We have thus shown that for each σ ∈ U n P , where r precedes q, either σ ∈ S r n or σ ∈ − Sr n .Now consider σ ∈ U n P in which q precedes r.Then either σ ∈ S r n or σ ∈ − Sr n .Hence either σ ∈ Sr n or σ ∈ −S r n .
x  (e) a red node with label σs i is marked if and only if σs i ∈ U P unless i = k and s k = q, σs k is at depth n − 1, and ) a yellow child with label σ is marked if and only if σ ∈ U P and the number of elements to the right of q is greater than the number of elements to the left of r or n − j = i − 1 and either σ ∈ F r n or π(m) + π(n − m + 1) < n + 1, where σ = π(N n ) and m is the least index for which π(m) + π(n − m + 1) = n + 1. Suppose, for example, that n = 4, r = 1, q = 4, and P is the "adjacent difference" property, that is, for any π ∈ π(N n ), P (π) is true if and only if no two differences of distinct adjacent terms are equal.Then T 1 (P ) is as follows (Figure 3.1), where red nodes are denoted by circles, yellow nodes by rectangles, and marked nodes are indicated by an "x" written within the circle or rectangle.Theorem 3.1.For any SI property P , and these labels are nonrepeating.
Proof.A node v with label σ of T 1 is a leaf of depth n − 1 if and only if there is a path from the root of T 1 to v in which the label of each node on each level k on the path is a sequence σ of length k for which σ ∈ U P , and σ = τ 1 σ τ 2 for some τ 1 and τ 2 .A red child adds an element to the right of the label of its parent, and a yellow child adds an element to the left of the label of its parent.Furthermore, each level k contains all sequences of length k that belong to U P ∪ F r n .
greater than the number of processors available.This insures that each of the processors is kept busy.It turns out in fact that our implementations achieved speedups close to p where p is the number of processors.Furthermore, the only communications necessary are between master and slave and for fixed d, the number of these is polynomial in n.Thus, the communication to computation ratio tends to zero as n → ∞.

Call for Papers
As a multidisciplinary field, financial engineering is becoming increasingly important in today's economic and financial world, especially in areas such as portfolio management, asset valuation and prediction, fraud detection, and credit risk management.For example, in a credit risk context, the recently approved Basel II guidelines advise financial institutions to build comprehensible credit risk models in order to optimize their capital allocation policy.Computational methods are being intensively studied and applied to improve the quality of the financial decisions that need to be made.Until now, computational methods and models are central to the analysis of economic and financial decisions.However, more and more researchers have found that the financial environment is not ruled by mathematical distributions or statistical models.In such situations, some attempts have also been made to develop financial engineering models using intelligent computing approaches.For example, an artificial neural network (ANN) is a nonparametric estimation technique which does not make any distributional assumptions regarding the underlying asset.Instead, ANN approach develops a model using sets of unknown parameters and lets the optimization routine seek the best fitting parameters to obtain the desired results.The main aim of this special issue is not to merely illustrate the superior performance of a new intelligent computational method, but also to demonstrate how it can be used effectively in a financial engineering environment to improve and facilitate financial decision making.In this sense, the submissions should especially address how the results of estimated computational models (e.g., ANN, support vector machines, evolutionary algorithm, and fuzzy models) can be used to develop intelligent, easy-to-use, and/or comprehensible computational systems (e.g., decision support systems, agent-based system, and web-based systems) This special issue will include (but not be limited to) the following topics: • Computational methods: artificial intelligence, neural networks, evolutionary algorithms, fuzzy inference, hybrid learning, ensemble learning, cooperative learning, multiagent learning

•
Application fields: asset valuation and prediction, asset allocation and portfolio selection, bankruptcy prediction, fraud detection, credit risk management • Implementation aspects: decision support systems, expert systems, information systems, intelligent agents, web service, monitoring, deployment, implementation