Implementation of N Queen Problem with Parallel Programming

Verified

Added on  2021/11/13

|6
|413
|74
Project
AI Summary
This project focuses on solving the N Queen problem using parallel programming techniques. The goal is to find unique solutions for placing N queens on an N*N chessboard such that no two queens attack each other. The implementation utilizes native threading to control and enhance the performance of the algorithm, which is based on a backtracking approach. The code identifies the number of queens that can be placed on the board and visualizes the solution as a matrix, where ‘Q’ represents a queen and ‘#’ represents an empty cell. The report includes screenshots of the code and its output, along with references to relevant research papers on the N Queen problem and parallel programming.
Document Page
Parallel programming
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Table of Contents
1. N queen problem................................................................................................................................2
2. Screenshots.........................................................................................................................................3
3. References..........................................................................................................................................5
Document Page
1. N queen problem
N queen problem is the way for finding the different number of unique solutions on a chess
board. The ultimate aim of the N queen problem is to place the queens in the chess board and
after placing the queen's none of the two queens won't attack each other on the chess board and
for that, we need to align the queens in the chess board simultaneously by arranging the queens
into different combinations. In this scenario we are going to implement the N queen problem
using three parameters for finding the N queens, a number of threads and sequential mode
switching. In this project, the code developed to identify the number of queens placed in the N*N
chess board. For example, consider the 4 * 4 chess board. And the solution is 4. So the code must
give the solution as a four and the orientation. For better visualization, the orientation is shown
as a matrix. In the matrix, the value ‘Q’ symbolize the Queen. And the remaining elements of the
matrix are ‘#’. This code is works based on Backtrack algorithm [1]. N queen algorithm uses the
native threading for controlling and powering the implementations over the chess board. All
these are concepts are implemented using parallel programming. Parallel programming is the
kind of computing the different processes simultaneously and using this parallel programming
we can able to perform different processes in the same time and it also used for converts the
larger number of problems or processes and solves them in a single period of time [2].
Document Page
2. Screenshots
Coding
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Document Page
Output
3. References
[1]S. Lim, K. Son, S. Park and S. Lee, "The Improvement of Convergence Rate in n-
Queen Problem Using Reinforcement learning", Journal of Korean Institute of
Intelligent Systems, vol. 15, no. 1, pp. 1-5, 2005.
[2]A. S.Farhan, W. Z. Tareq and F. H. Awad, "Solving N Queen Problem using
Genetic Algorithm", International Journal of Computer Applications, vol. 122,
no. 12, pp. 11-14, 2015.
chevron_up_icon
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]