Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Programming Language Expert

prepare Prolog programs for each of given problems. For each of your programs:

a) Execute your code and draw a graph of search space.
b) Modify the rule ordering to produce alternative solution paths.

problem 1: A Prolog code to answer Wirth’s “I am my own grandfather” problem:

I married a widow (let’s call her W) who has a grown-up daughter (call her D). My father (F), who visited us quite frequently, fell in love with my step-daughter and married her. Therefore my father became my son-in-law and my step-daughter became my mother. Some months later, my wife gave birth to a son (S1), who became the brother-in-law of my father, and also my uncle. The wife of my father, that is, my step-daughter, as well had a son (S2).

problem 2: A Prolog code to solve the farmer, wolf, goat and cabbage problem:

A farmer with his wolf, goat and cabbage come to the edge of the river they wish to cross. There is a boat at the river’s edge, however of course, only the farmer can row. The boat as well can carry only two things, including the rower, at a time. If the wolf is ever left alone with the goat, the wolf will eat the goat; likewise if the goat is left alone with the cabbage, the goat will eat the cabbage. Devise a series of crossings of the river so that all four characters arrive safely on the other side of river.

problem 3: A Prolog code for the missionary and cannibal problem:

Three missionaries and three cannibals come to the bank of a river they wish to cross. Three is a boat which will hold only two, and any of the group is capable to row. If there are ever more missionaries than cannibals on any side of the river the cannibals will get converted. Devise a series of moves to get all the people across the river with no conversions.

problem 4: A Prolog code for the water jugs problem:

There are two jugs, one holding 3 and the other 5 gallons of water. A number of things can be completed with the jugs: they can be filled, emptied and dumped one into the other either till the poured-into jug is full or till the poured-out-of jug is empty. Devise a sequence of actions which will produce 4 gallons of water in the larger jug.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9896
  • Price:- $110

Guranteed 48 Hours Delivery, In Price:- $110

Have any Question? 


Related Questions in Programming Language

In this lab you will write a program that simulates the

In this lab you will write a program that simulates the dialing of a phone number. The phone number may have either digits, letters, or both. (See sample output below) Here are the letters associated with each digit. 0 5 ...

Assignmenta near expert at introductory problem solving and

Assignment A near expert at introductory problem solving and programming, you've decided to put your skills to good use by volunteering at SecurityCon, a security conference for IT professionals. The conference has space ...

Resources appendices a amp dexamine the following

Resources: Appendices A & D Examine the following situation: Your company, Datamax, Inc., is in the process of automating its payroll systems. Your manager has asked you to create a program that calculates overtime pay f ...

Object-oriented design for the ordering systemyou will

object-oriented design for the ordering system You will continue development of the object-oriented design for the ordering system. The new content this week will be the Sequence and Collaboration Diagram for the system. ...

Assignmentthe fourth programming project involves writing a

Assignment The fourth programming project involves writing a program to manage a student database. The interface to the program should be a GUI that looks similar to the following: A combo box should allow the user to se ...

Write a program which1 asks the user to enter a letter

Write a program which: 1. Asks the user to enter a letter grade (A, B, C, D, F) or (a, b, c, d, f) 2. Validates that the entry is a letter grade (A, B, C, D, F) or (a, b, c, d, f) 3. The program then asks the user to ent ...

Create a program that allows the user to enter sets of

Create a program that allows the user to enter sets of integer values, in any order.Per set of data,the program is to output the largest number. EXAMPLE 1 Given the set of supplied values:(1,-3,22,-30),the program should ...

Assignmentthe assignment is as follows use the program

Assignment The assignment is as follows: Use the program, Arrays of Pointers, on p. 188 of the text "Ch. 4, of Ivor Horton's Beginning Visual C++ 2010" as a starting point for this assignment. Refer to Appendix C for ful ...

Handling exceptions in the guestbook applicationgeneral

Handling Exceptions in the Guestbook Application General guideline In this project, you will need to implement exception handling mechanism in the Guestbook application created in Lab. The code I provide to you does not ...

Question 1briefly explain these main programming paradigm

Question 1: Briefly explain these main programming paradigm (Logic, Functional, Object Oriented, Procedural, Imperative and Aspect-oriented), and for each of these paradigms name at least one language that can be used fo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro