Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem
The N-Queens problem plays an important role in academic research and practical application. Heuristic algorithm is often used to solve variant 2 of the N-Queens problem. In the process of solving, evaluation of the candidate solution, namely, fitness function, often occupies the vast majority of ru...
Main Authors: | , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
Hindawi-Wiley
2021-01-01
|
Series: | Complexity |
Online Access: | http://dx.doi.org/10.1155/2021/6694944 |
id |
doaj-ddce06f8ab404affbf3cd453295402d9 |
---|---|
record_format |
Article |
spelling |
doaj-ddce06f8ab404affbf3cd453295402d92021-03-08T02:00:33ZengHindawi-WileyComplexity1099-05262021-01-01202110.1155/2021/6694944Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens ProblemJianli Cao0Zhikui Chen1Yuxin Wang2He Guo3School of Software TechnologySchool of Software TechnologySchool of Computer Science and TechnologySchool of Software TechnologyThe N-Queens problem plays an important role in academic research and practical application. Heuristic algorithm is often used to solve variant 2 of the N-Queens problem. In the process of solving, evaluation of the candidate solution, namely, fitness function, often occupies the vast majority of running time and becomes the key to improve speed. In this paper, three parallel schemes based on CPU and four parallel schemes based on GPU are proposed, and a serial scheme is implemented at the baseline. The experimental results show that, for a large-scale N-Queens problem, the coarse-grained GPU scheme achieved a maximum 307-fold speedup over a single-threaded CPU counterpart in evaluating a candidate solution. When the coarse-grained GPU scheme is applied to simulated annealing in solving N-Queens problem variant 2 with a problem size no more than 3000, the speedup is up to 9.3.http://dx.doi.org/10.1155/2021/6694944 |
collection |
DOAJ |
language |
English |
format |
Article |
sources |
DOAJ |
author |
Jianli Cao Zhikui Chen Yuxin Wang He Guo |
spellingShingle |
Jianli Cao Zhikui Chen Yuxin Wang He Guo Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem Complexity |
author_facet |
Jianli Cao Zhikui Chen Yuxin Wang He Guo |
author_sort |
Jianli Cao |
title |
Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem |
title_short |
Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem |
title_full |
Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem |
title_fullStr |
Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem |
title_full_unstemmed |
Parallel Implementations of Candidate Solution Evaluation Algorithm for N-Queens Problem |
title_sort |
parallel implementations of candidate solution evaluation algorithm for n-queens problem |
publisher |
Hindawi-Wiley |
series |
Complexity |
issn |
1099-0526 |
publishDate |
2021-01-01 |
description |
The N-Queens problem plays an important role in academic research and practical application. Heuristic algorithm is often used to solve variant 2 of the N-Queens problem. In the process of solving, evaluation of the candidate solution, namely, fitness function, often occupies the vast majority of running time and becomes the key to improve speed. In this paper, three parallel schemes based on CPU and four parallel schemes based on GPU are proposed, and a serial scheme is implemented at the baseline. The experimental results show that, for a large-scale N-Queens problem, the coarse-grained GPU scheme achieved a maximum 307-fold speedup over a single-threaded CPU counterpart in evaluating a candidate solution. When the coarse-grained GPU scheme is applied to simulated annealing in solving N-Queens problem variant 2 with a problem size no more than 3000, the speedup is up to 9.3. |
url |
http://dx.doi.org/10.1155/2021/6694944 |
work_keys_str_mv |
AT jianlicao parallelimplementationsofcandidatesolutionevaluationalgorithmfornqueensproblem AT zhikuichen parallelimplementationsofcandidatesolutionevaluationalgorithmfornqueensproblem AT yuxinwang parallelimplementationsofcandidatesolutionevaluationalgorithmfornqueensproblem AT heguo parallelimplementationsofcandidatesolutionevaluationalgorithmfornqueensproblem |
_version_ |
1714797431756947456 |