_{1},x

_{2},x

_{3},x

_{4},x

_{5},x

_{6},x

_{7},x

_{8}and y

_{1},y

_{2},y

_{3},y

_{4},y

_{5},y

_{6,}y

_{7},y

_{8}; the xs represent the rows and ys the column. Now a solution for this problem is to assign values for x and for y such that the constraint is satisfied.

P={(x_{1},y_{1}),(x_{2},y_{2}),……………………..(x_{8},y_{8})} where (x_{1},y_{1}) gives the position of the first queen and so on. So it can be clearly seen that the domains for x_{i }and y_{i}are Dx = {1,2,3,4,5,6,7,8}and Dy ={1,2,3,4,5,6,7,8} respectively. The constraints are

i. No two queens should be in the same row, |

i.e y_{i}≠y_{j} for i=1 to 8;j=1 to 8;i≠j |

ii. No two queens should be in the same column, |

i.e x_{i}≠x_{j }for i=1 to 8;j=1 to 8;i≠j |

iii. There should not be two queens placed on the same diagonal line |

i.e (y_{i}-y_{j}) ≠ ±(x_{i}-x_{j}). |