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

  Identify work task that you believe you could perform

Read the article titled "Use Microsoft Excel for (Nearly) Everything". Next, identify one personal or work task that you believe you could perform by using Microsoft Excel 2013.

  Recursive function to print the arrangements

Warm-up Assignment You are given R red marbles and B blue marbles. Your task is to arrange the R + B marbles in a line such that certain restrictions are satisfied (see below).

  Explain the concept of quality function deployment

Explain the concept of quality function deployment. Link your answer to the leadership commitment to quality and the development of a robust and effective quality strategy. This answer must be in your own words-significant cut and paste from the t..

  What campaigns already exists-breakdown

Prove the problem exists-Summarize the research from your secondary sources proving that the issue exists and what you understand about the problem. (Minimum 200 words)

  Formatting worksheets project

In this project, you will work on an attendance log for a 16-week college course. For one section of the course, you will set up the sheet to print as an attendance sign-in sheet

  Software engineering process methods and tools

1. Describe the relationships among software engineering process methods and tools? 2. What are the primary advantages of the component based process model for Software engineering?

  Characters of a word are stored in a character

The characters of a word are stored in a character array A1 of dimension 10. Assuming a stack data structure S and push(S, char c) and char pop(S) procedures on S are available, write a program in pseudocode or C with brief comments that will push..

  Write a program that checks a text file for several

Write a program that checks a text file for several formatting and punctuation matters. The program asks for the names of both an input file and an output file.

  Write a program that creates a random object

Write a program that creates a Random object with seed 1000 and displays the first 50 random integers between 0 and 100 using the nextInt(100) method.

  Design a class named queue for storing integers

The method dequeue() that removes and returns the element from the queue. ¦ The method empty() that returns true if the queue is empty. ¦ The method getSize() that returns the size of the queue.

  Contribution to computer science

Write a 250-300 word description for each person stating who they are, what their contribution to Computer Science was, and why it was significant. Include at least 3 references for each person. Please use proper grammar and important content. (W..

  Discuss which design would best fit the clients needs

Use the unit 6 seminar/project case scenario (above) and use Visio 2007 to generate a diagram for the network topology. Briefly discuss which design would best fit the client's needs.

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