Write a prolog program to solve the sudoku puzzle

Assignment Help Programming Languages
Reference no: EM13725403

Question: Write a Prolog program to solve the 6 by 6 Sudoku puzzle distributed in class. Do not use a solution downloaded from the Internet or elsewhere. Write your own. It should be designed along these lines: Label the squares X1, X2, ..., X36 as discussed in class. The X1,..., X36 represent the 36 squares in the Sudoku puzzle (row by row). Set the known values of the X's and then generate needed permutations and test for compliance with problem constraints. Your query should be
sudoku (X1,X2,X3,X4,X5,X6,X7,X8,X9,X,X11,X12,X13,X14, X15,X16,X17,X18,X19,X20,X21,X22, X23,X24,X25,X26,X27,X28,X29,X30,X31,X32,X33,X34,X35,X36).

The result will be values for X1, ... , X36 that solve the problem. Find all possible solutions. Your program should be general, in the sense that it could be easily modified to handle another 6 by 6 Sudoku problem.


Your program should run in less than a 2 minutes. If it takes a "long time" try to speed it by checking more constraints earlier in the program. You should be able to get your program to run is less than a minute.

Reference no: EM13725403

Questions Cloud

What was life like for bound servants : William Moraley saw the British colonies from the perspective of a poor laborer. What was life like for bound servants and poor free workers in the colonies?
Community-based healthcare costs for children : 1. Explain the process of finding your article and how you determined it was peer-reviewed. 2. Summarize the article and its findings.
Case study- alcatel-lucent chops away at years of failure : Case Study- Alcatel-Lucent Chops Away at years of Failure. What kind of decisions has chief executive Ben Verwaayen been making at Alcatel-Lucent
Write an essay on aztec of inca peoples and their contact : Write an essay comparing the perspectives, issues and concerns of Aztec of Inca peoples and their contact with Europe. Religion how did the Incas and Aztecs regard the Europeans from a religious perspective?
Write a prolog program to solve the sudoku puzzle : Write a Prolog program to solve the 6 by 6 Sudoku puzzle distributed in class. Do not use a solution downloaded from the Internet or elsewhere. Write your own. It should be designed along these lines: Label the squares X1, X2, ..., X36 as discuss..
Security threats to mobile devices and counter measures : Provide your published (to the forum/blog) research report on the chosen topic with brief supportive descriptions about the challenges, problems, relevant technologies, applications of the technologies, clarify vague areas and research questions.
Show your b2c plan and your b2b plan : Marketing Objectives: Show 2 marketing objectives (one each for your B2C plan and your B2B plan). An objective is more specific than a strategy, but not as detailed as a SMART goal
Learning programming easily : C++ LECTURE : Best Lectures: Easy understanding: Learn programming easily, Easy Examples , Easy and simple english used to eloborate. Helping codes included.
What makes the ugly american in the minds of the burdick : What makes the "Ugly American" ugly in the minds of the Burdick and Lederer? Do you think that the authors have a point? Do you find their supposedly un-ugly Americans more attractive?

Reviews

Write a Review

Programming Languages Questions & Answers

  Advantages of using invisible html table to create web page

What advantages do you see in using an invisible HTML table to structure an entire Web page? What disadvantages does the table structure pose?

  Create user friendly application-display name-button clicked

Create a user friendly application which can do the following: displays the name and address when button is clicked and permit user to choose a state, and when a user clicks a button.

  Explain programming language is machine independent

Explain what does it mean to say that programming language is machine independent? What do you mean by operator precedence? Depending on operator precedence, what values could be related with expression 6 + 2 * 3?

  Op-codes-add microcode to overlapping address ranges

Bmov a,b,n. This Block Move instruction moves n bytes of data from location a in memory to location b. Deal correctly with case of overlapping address ranges.

  Smallest number using class-friend function and overloading

C++program which can neither be two integers or two floating point number and output smallest number using class, friend function and overloading.

  Write program to operate as point of sale application

Write down program which will operate as the point of sale (POS) application at carpet retailer. Carpet will be sold by square yard. Padding will be sold by square yard.

  Write code for largest value of parking tickets

Without using any additional variables, and without changing the values of ndays or the elements of the parkingTickets array, write some code that results in mostTickets containing the largest value found in parkingTickets .

  Create new method public to create and return new picture

Create a new method public Picture frame (int frameSize, Color frameColor) this method will create and return a new picture object.

  Create program to counts number of bytes located in memory

Create the program which Counts the number of bytes located in memory from DS:1000h to DS:1200h which are greater than 77h. Put the count on register CX.

  Computer sales and repair store system

It is required to design a relational database system for a "realistic" application

  Write looping structure pseudocode accepting employee data

Write looping structure pseudocode which prompts user for employee data; application continues to accept data for new employees until user enters 0 for ID number to indicate desire to quit.

  Pseudocode for a program to solve mathematical problem

Pseudocode for a program to solve the following problem. A student borrows $3,000 at an interest rate 2% per month on the unpaid balance.

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