How long it would take to find all solutions to the problem

Assignment Help Basic Computer Science
Reference no: EM131263690

a. Implement the backtracking algorithm for the n-queens problem in the language of your choice. Run your program for a sample of n values to get the numbers of nodes in the algorithm's state-space trees. Compare these numbers with the numbers of candidate solutions generated by the exhaustivesearch algorithm for this problem

b. For each value of n for which you run your program in part (a), estimate the size of the state-space tree by the method described in Section 12.1 and compare the estimate with the actual number of nodes you obtained.

Exercise 3.4

Problem 9

Eight-queens problem Consider the classic puzzle of placing eight queens on an 8 × 8 chessboard so that no two queens are in the same row or in the same column or on the same diagonal. How many different positions are there so that

a. no two queens are on the same square?

b. no two queens are in the same row?

c. no two queens are in the same row or in the same column?

Also estimate how long it would take to find all the solutions to the problem by exhaustive search based on each of these approaches on a computer capable of checking 10 billion positions per second.

Reference no: EM131263690

Questions Cloud

What data structure would you use to keep track of live node : Solve the same instance of the assignment problem as the one solved in the section by the best-first branch-and-bound algorithm with the bounding function based on matrix columns rather than rows.
Analyze peis macro external environment : Please apply the framework PESTEL to analyze PEI's macro external environment. Please apply the framework Five Forces + complementors to analyze PEI's external environment at the industry level.
Explain the manner in which each step in the process : Create a detailed three (3) step system for completing the legal research process. Explain the manner in which each step in the process would ensure thorough research in your legal assignments. Justify your response.
Wholesale fair-trade coffee bean prices force : Rising world wholesale fair-trade coffee bean prices force the local Dunkin' Donuts franchise to raise its price of coffee from 89 cents to 99 cents a cup.
How long it would take to find all solutions to the problem : Implement the backtracking algorithm for the n-queens problem in the language of your choice. Run your program for a sample of n values to get the numbers of nodes in the algorithm's state-space trees.
Describe the publication and codification of statutory law : Identify the source(s) from which the authority to legislate is derived. Determine whether or not Congress has unreasonably and unlawfully expanded upon an identified source's authority to legislate. Provide a rationale for your response.
Sale price of single-family residences in massachusetts : You wish to predict the sale price of single-family residences in Massachusetts. You collect price and property features data on each property sold in the state for the years 2008 - 2014.
Calculate consumer surplus : Mayor Grinch imposes a $1 tax on Slurp. What is consumption per person now? Calculate consumer surplus, the external cost, government revenue, and total surplus per person.
Accounting errors in nonprofit organizations : College of Business and the Deloitte Foundation for financial support - Short introduction to the report setting out what the aims and objectives of the report are, what the report will cover and why. Work distribution among the group members shoul..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Operating systems for mainframe computers

What are the main differences between operating systems for mainframe computers and personal computers?

  What differences might you expect to find

What differences might you expect to find

  Calculate the total due for a restaurant bill

Write a program that will calculate the total due for a restaurant bill. The program will ask the user how much was the meal charge. The program will then compute the tip amount and the tax amount and display the total.

  Diversity of approaches

Diversity of Approaches

  Give the contents of eax

in each additional instruction in this problem, assume that EAX contains a given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the instruction is executed:

  Why computer literacy has become fourth fundamental skill

Explain whether today, computer literacy (knowledge of how to properly use computer and its software applications) has become fourth basic skill.

  Main industries-main exports and main imports

Economy: GDP per capita (compared to the US), Main industries, main exports, and main imports (what), main trading partners (with whom, top 5)

  What is the stock required rate of return

What is the stock's required rate of return according to CAPM? What is the stock's present market price per share, assuming this required return?

  What risks and safeguards are associated

Are you more at risk using a wireless connection via laptop or a connection via a smart phone?

  Determines if a circle and a square intersect

However, as illustrated by Figure 13.13, the x and y ranges might overlap without the circle actually intersecting the square. Write a function that accurately determines if a circle and a square intersect.

  What do u get when u type in that subarray and why?

so there is an array called arr2=[ 1 2 3; -2 -3 -4; 3 4 5]; what does it mean to access the subarray arr2(:, 1:2:3)? like what do u get when u type in that subarray and why?

  Wiser to quarantine infected files

Why is it wiser to quarantine infected files instead of automatically deleting them using anti-virus?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd