Enhancing the Efficiency of N-Queen Problem Solutions: An Algorithmic Perspective

Categories: ScienceTechnology

Introduction

The exemplary issue, N-queen is a regularly testing issue in software engineering/Computer Science. Current writing means to say current literature gives numerous answers for this issue, yet they endure with its computational complexities. An outstanding answer for this Queen puzzle is backtracking which is with exceptionally high time multifaceted nature. The multifaceted nature exponentially increments as n increments. A fascinating reality is that there is no certification to increment the quantity of arrangements as the n increments. For a case the number answers for 6-Queen confuse is lesser than the quantity of answers for 5-Queen issue.

In back following calculation, technique begins from a point of client decision and continue with any of the decision of next step. From the present advance, attempt to discover next dimension of arrangement from a rundown of decisions. This procedure will be iterated until either a last arrangement arrived or no conceivable arrangement. At that point begin to backtracked to a past advance, and rehash its past advance of procedure by choosing another decision.

Get quality help now
Dr. Karlyna PhD
Dr. Karlyna PhD
checked Verified writer

Proficient in: Science

star star star star 4.7 (235)

“ Amazing writer! I am really satisfied with her work. An excellent price as well. ”

avatar avatar avatar
+84 relevant experts are online
Hire writer

Naive Algorithm shows the technique where all the queen setups are recognized and show some of them which are fulfilled the given obliges. The given oblige is the rulers ought not to assault each other in this given setup. On the off chance that such a design is accessible at that point select and print.

This calculation gives a general view that it issue implies. The test is laid under the multifaceted nature to discover a design which pursues the conditions.

Get to Know The Price Estimate For Your Paper
Topic
Number of pages
Email Invalid email

By clicking “Check Writers’ Offers”, you agree to our terms of service and privacy policy. We’ll occasionally send you promo and account related email

"You must agree to out terms of services and privacy policy"
Write my paper

You won’t be charged yet!

Experimentation strategy can be pursued, yet it is very costly in calculation. The point is to organize the Queen one after other in various columns, client can start this process furthest left line and when client put a queen in a crude, client look for any contentions with accessible queen. In the current line, assume the player discover a section for which there is no contention, at that point player take this segment and line some portion of the arrangement. On the off chance that player neglected to discover a segment with no conflict at that point back track.

The correct decision of the size n is eight if there should arise an occurrence of this great issue. Since n = 8 is vast enough to show the magnificence, challenges and unpredictability of the riddle. In the event that you could locate a proficient answer for this 8-ruler issue, at that point it tends to be expanded to N-Queen. Backtracking is a general calculation to discover total answers for some computational issues which have progressively number of arrangements.

This calculation manufactures the arrangement by adding qualified contender to arrangement one by one. This will promptly dismiss the applicant on the off chance that it recognized as this competitor can't be a piece of the arrangement. The fractional competitor arrangement is the l rulers masterminded in firs l lines. The backtracking is just material if the arrangement is a gradual model and it is supporting an unexpected approach to discover applicant answers for achieve the last arrangements.

The N-Queen Problem: The 4-queen issue is the least complex case of the n-queen issue with arrangements. The issue is to put four rulers on a 4 chessboard with the goal that no two queen can catch one another. That is, no two queen are permitted to be put on a similar line, a similar segment, or a similar slanting. In the general n-queen issue, a lot of n queen is to be put on a n chessboard with the goal that no two rulers assault one another. In the accompanying talk, we accept that each line will be involved by a solitary queen. The four queen, in the 4-queen issue, are marked with the numbers 1 through 4. Any conceivable arrangement of the 4-queen issue can be spoken to as the 4-tuple (q1, ..., q4), where qi is a segment position on which the queen in the I-th push is put.

One technique for taking care of the n-queen issue which efficiently creates all conceivable solutions is known as backtracking seek. Since the idea of backtracking look is exponential in time, backtracking seek can't understand the substantial size n-queen issue. Ongoing outcomes demonstrate that we may just take care of the n-queen issue with n up to around 100.

Literature Review

Algorithm techniques are the way to deal with settle computational issues. It might join numerous methodologies together to take care of an issue. We pursue various techniques in light of the issue. Algorithm can be executed either emphasis or recursive in structure. Dynamic Programming, Branch-and-Bound, Bruit Force, Backtracking, Greedy, Recursive, Heuristic, and so on are a few the significant calculation techniques.

Backtracking Strategy

Backtracking calculations are pertinent for NP-Complete issues. Priestley and Ward [1] exhibited the subtleties about the backtracking and its applications. They have obviously clarified the primers of the calculation and gave an unmistakable image of the 8-ruler bewilder. The answer for the issue could be accomplished through tree structure portrayal of the decisions. The proposed technique could decrease the quantity of experiments to an entirety of 15,720. The time unpredictability was diminished by lessening experiments. Pre – investigation was utilized to decrease the experiments. They utilized shrubbery pruning method for further improvement.

At last cross breed approach of pre-examination and bust pruning gave better outcome. Ginsberg presented dynamic backtracking calculation in any case, that does not take care of imperative fulfillment issue powerfully. Gerald and Thomas proposed a few change to help a dynamic requirement fulfillment. Yet this technique endures because of overwhelming time complexities. M Noori and B T Razaie uncover and executed an improved backtracking calculation for distinguishing t-structures which is proposed by J. Combin. Des. As indicated by Noori, the calculation utilizes a precise technique to determine new helpful conditions from the underlying conditions which are valuable in accelerating the traditional backtracking calculation. The per user can allude to get brief portrayal of backtracking calculations and their applications.

Bessière et al. proposed a no concurrent backtracking calculation for conveyed limitation fulfillment issues. This depends on circulated backtracking with capacity of the past outcomes to diminish the absolute number of preliminaries. M.A. Gutierrez-Naranjo et al. exhibited the N-ruler issue in conjunctive typical structure. They portrayed the ruler issue as a SAT issue by accepting the each Systems send truth esteems as Yes or No. Pioneer arrangement have displayed to the N-rulers perplex dependent on Membrane Registering. Calculation 1 gives an understanding on back following calculation which depends on profundity first recursive look.

Computational Complexities

Vipin Kumar gives a definite study on limitation Constraint satisfaction Problem some of them comprehend the issues by limitation proliferation and rest of them are taking care of issue by direct methodology however backtracking. A review on intricacy examination of room limited Algorithm for constraint satisfaction problems is proposed by J Roberto et al. They spread unhindered, measure limited, pertinence limited learning and their complexities. J. H Patterson exhibited the computational consequences of the limited and amplified issues in a general manner. They have thought about both centralized computer and individual PC encounters. Ideal answer for little issues is all around effectively accomplished in PCs yet for extensive issues very hard to accomplish result in PCs. John Gaschnig proposed a quick backtracking Algorithm which is diminished its computational complexities by wiping out repetitive tests. He endeavored to abuse space-time exchange off greatest in his Algorithm.

As indicated by John, it is difficult to dispense with every single excess test in computationally proficient way. In any case, it is conceivable to dispense with all repetitive experiments with heuristic methodology. In, Jordan Bell and Brett Stevens talked about the computational methodologies of n Queen's concern. In this overview paper they have given focus for various methodologies and results for a similar issue. Erbak and Tanik given a point by point investigation of Algorithm utilized for n-Queen issue. They assembled the aggregate Algorithm in various classifications dependent on the result of the Algorithm. According to their view they are three kinds of Algorithm dependent on their results. Some of them create all arrangements and others are produce basic or subset of complete number of arrangements. Savage power experimentation and backtracking are instances of Algorithm which create complete arrangements. The Algorithm dependent on gathering properties of results, symmetric disposal and test-based produce just fundamental arrangements.

Proposed Algorithm: In this segment, talk about the insights concerning the proposed Algorithm for the N-Queen issue. The N is a positive whole number. In this Algorithm, predicts the arrangement deliberately and after that check for the rightness of the arrangement by performing preliminary on the real design. The likelihood to quality this as arrangement is roughly 73%. The effectiveness of this Algorithm is improved by decreasing the time multifaceted nature. The expectation of the arrangement is finished by numerical movement approach. At first, assign each column of the N X N lattice with the esteem 0 to N-1. For example, first column is assigned as '0', second column is '1, etc. The mixes of the esteem from 0 to N-1 speak to the game plan of the Queens on the board.

For instance, in 5 X 5 board, 13042 is speaking to the rulers positions on the board, where ruler in first segment is at line 2, in second section push 4, third segment push 1, fourth segment push 4 and fifth column row 3. These mixes of the numbers can be taken as the number with N digits with base N. For this situation of this precedent 13042 is the number with 5 digits and base 5. The given 13042 is an answer for the 5 X 5 algorithm riddle. Close investigation of this number is giving a knowledge that the contiguous digits of the numbers have distinction with esteem 2. The digit 1 and 3 have distinction 2, the digits 3 and 0 has distinction 2, etc.

This point is a significant piece of information in this calculation that we can discover next arrangement simply after a separation of 2* 55 if the main incentive to change to 3 or 4. By including the esteem 2 * 55 to the given arrangement 13042 will give next anticipated esteem. For the rightness of the esteem place the rulers in the individual lines and check for the conflicts. On the off chance that there is no conflict, at that point show it as an answer, else dismiss that hopeful arrangement and anticipate next potential competitor.

Algorithm: Candidate Selection

Function Candidate-Selection (N, Init)

If Init >= NN

While k < N do

Check digits in init at k and at k+1

If difference is greater than one

k=k + 1

Init = Init + predict value (N, Init)

This Algorithm, is giving the applicant determination for the arrangement. This calculation gets the esteem N and Init as contentions. Where N is the quantity of sections and Init is the underlying worth. For example, 0 2 4 1 3. This is the arrangement with least esteem, as in the event that base 5. The foresee esteem capacity will observe next conceivable incentive to be included with Init to get next possibility for arrangement. Perhaps the following arrangement is 0 3 1 4 2. The distinction of the estimations of first and second arrangements is 03142 - 02431= 711, which around 54. Since the digits with weight 53, 52, 51 and 50 are changed in the main answer for get second arrangement. The esteem 52 is change as negative and others are sure. So while emphasizing by skirting this numerous means is diminishing the time multifaceted nature with a broaden level.

Here, the queen in section 6 conflict with different rulers. There is no decision to put the ruler in sixth section. So it is fundamental to backtrack to the fifth position, for example fifth section's arrangement of ruler. At that point, attempt to locate some other answer for spot the ruler in the fifth section. It is conceivable to put the ruler in first line of fifth segment. At that point it is conceivable to put the ruler in the sixth segment third column. After fruitful arrangement of sixth ruler at that point continue to put the ruler. It is conceivable to discover a spot at seventh line of seventh segment. At long last, eighth ruler will be neglected to discover a spot in eighth section without a class. So it is important to backtrack to seventh stage, at that point sixth thus on. Be that as it may, this isn't essential in this proposed calculation. Since the expectation will decrease number of preliminaries and give arrangement.

Performance Improvement

The proposed Algorithm discovers answer for the issue proficiently. Despite the fact that the intricacy increments as the measurement builds, it is giving better outcome when analyze with existing Algorithm. The backtracking Algorithm considers as the best calculation for Queen Baffle, be that as it may, it is computationally very costly. It is communicated as O (n!). The proposed calculation decreases time unpredictability by precluding much cycle. The cycles of the hopeful determination process is diminished by foreseeing the following conceivable hopeful. By forecast of the potential hopefuls, it is conceivable to diminishing O (n3) cycles. The multifaceted nature of the calculation is diminished by O (n3). Furthermore, genuine running time is less when contrasted with backtracking calculation. This is an extraordinary fulfillment for this situation of branch kind of issues.

The quantity of trails for 13-Queen gets decreased to 84,034,432 where the partner has 89,088,384. In this paper, I consider the aftereffects of a half breed Algorithm which is running on single hub. The consequence of the calculation dependent on the precision of the forecast. Despite the fact that expectation is progressively precise yet it should be improved to get 100% exactness. Complete exact forecast is unimaginable as the extent of the issue increments exponentially. Computational unpredictability is decreased in a significant way. Single hub calculation is considered here. It is conceivable to execute this calculation in parallel or circulated condition. By giving appropriate Init incentive to each hub in the given condition we can lessen the running time in factor of n, where n is the quantity of hubs. The hubs can process the calculation freely if getting appropriate Init esteem. So there ought to be a pioneer/initiator to ascertain and disseminate Init values among various hubs in the framework. Each hub can complete their activity autonomously and parallel.

Conclusion

The proposed algorithm presents a novel approach to solving the N-Queen problem with reduced computational complexity and improved efficiency. By leveraging arithmetic progression for candidate prediction, the algorithm offers a promising solution to the challenges posed by the exponential increase in complexity as N increases. Future work could explore the application of this algorithm in parallel or distributed computing environments to further enhance its efficiency and scalability.

Updated: Feb 17, 2024
Cite this page

Enhancing the Efficiency of N-Queen Problem Solutions: An Algorithmic Perspective. (2024, Feb 17). Retrieved from https://studymoose.com/document/enhancing-the-efficiency-of-n-queen-problem-solutions-an-algorithmic-perspective

Live chat  with support 24/7

👋 Hi! I’m your smart assistant Amy!

Don’t know where to start? Type your requirements and I’ll connect you to an academic expert within 3 minutes.

get help with your assignment