I am reading about Back tracking algorithms in Introduction to design and analysis of algorithms by Anany Levition.
Following is the page which I am referring.
Here author has mentioned as below.
There are several tricks that might help reduce the size of a state-space tree. One is to exploit the symmetry often present in combinational problems. For example, the board of the n-queens problem has several symmetries so that some solutions can be obtained from others by reflection or rotation. This implies, in particular, that we need not consider placements of the first queen in the last floor(n/2) columns, because any solution with the first queen in square (1,i), ceiling(n/2)<= i <=n, can be obtained by reflection (which?) from a solution with the first queen in square(1, n-i+1). This observation cuts the size of the tree by about half.
My questions on above text are
What does author mean by exploit the symmetry often present in combinational problems?
What does author mean by reflection in above context?
In example given above what does author mean by following statement "we need not consider placements of the first queen in the last floor(n/2) columns, because any solution with the first queen in square (1,i), ceiling(n/2)<= i <=n, can be obtained by reflection (which?) from a solution with the first queen in square(1, n-i+1)" ? Here request with example n=4.
I will try to answer by example on a simplified variation of the problem, it's the same queens problem but on 4x4 board.
One possible solution to the problem is (1,2), (2,4), (3,1),(4,3)
Another solution is (2,1), (4,2), (1,3), (4,3):
However, by generating one solution, I could immediately create the other, no need to keep on searching, by simply traversing the coordinates of queen.
The same thing goes the other way around to. If I found that there is no solution that starts with the queens
(1,1), (2,1), (_,_), (_,_)
I could trim beforehand also all the solution that start with the queens
(1,1),(1,2),(_,_),(_,_)
:Using symetrical attributes of this problem, whenever I backtrack and trim an unsuccesful branch, I can actually trim other symetrical branches with him as well.