 # Welcome to Authorea!

•  Hank

Hey, welcome. Double click anywhere on the text to start writing. In addition to simple text you can also add text formatted in boldface, italic, and yes, math too: $$E=mc^{2}$$! Add images by drag’n’drop or click on the ”Insert Figure” button.

Citing other papers is easy. Voilà: (CMS/CERN 2012) or (Holstein 2009). Click on the cite button in the toolbar to search articles and cite them. Authorea also comes with a powerful commenting system. Don’t agree that $$E=mc^{3}$$?!? Highlight the text you want to discuss or click the comment button. Find out more about using Authorea on our help page.

N-queens puzzles can be viewed as constraint satisfaction problems.

In a $$n\times n$$ chessboard, the goal is to place n queens such that no two queens can attack each other.

Variable $$\{X_{i}\}$$. Let $$X=\{x_{1},x_{2},...,x_{n}\}$$ where $$X_{i}$$ represents the there is a queen on the chessboard $$(X_{i},i)$$.

Domain $$D=\{1,2,....,n\}$$

Constraints $$\{C_{1},C_{2}\}$$:

$$C_{1}:\forall i\forall j$$ $$X_{i}\neq X_{j}$$ , it represents that no two queens are in the same row.

$$C_{2}:\forall i\forall j$$ $$|X_{i}-X_{j}|\neq|i-j|$$ , it represents that no two queens are in the same diagonal.

\chessboard

[style=4x4,setwhite=Qd4, pgfstyle=straightmove,arrow=to,linewidth=0.2ex, color=red,pgfstyle=straightmove,markmoves=d4-h8,d4-a7,d4-a1,d4-g1,d4-d8,d4-d1,d4-a4,d4-h4,shortenstart=1ex,showmover=false]