Write a parallel program to solve the 8-queens problem; that is, find all the positions of eight queens on an 8 × 8 chessboard such that no two queens can attack each other (not on the same column or diagonal). Since each queen must be placed on a different row of the chessboard, each solution can be represented by the column position of each queen; that is, an 8-tuple (x1, x2,… , xi , …, x8), where xi is the column position of queen i. The constraint of xi is1 ≤ xi ≤ 8. Also note that two queens at positions (a, b) and (c, d) cannot be on the same diagonal if a − b = c − d or a + b = c + d.
#Sales Offer!| Get upto 25% Off: