Effcient automated inferencing system - automated reasoning

Assignment Help Computer Engineering
Reference no: EM1378322

We will be using a very robust, fast, and efficient automated inferencing system with support for disjuction and functions called DLV to practice with knowledge representation and reasoning. For many people, representing knowledge in a form that can be used by a computer for automated reasoning, although really just another form of computer programming, can seem rather difficult (much in the same way that some students happy to write 500 lines of C code fall apart when asked to write a 3-line Lisp/Scheme recursion :-)  In any case, there are other ways to conceptualize the act of programming besides "imperative" (C/Java/Pascal/Fortran-like) and "functional" (Lisp/Scheme/Racket/Scala/Haskell) programming. So-called "Logic Programming" or "Declarative Programming" is one of these other ways.

Example 1: Propositional Logic

Consider the following logic puzzle:

 Mr. Black, Mr. Red, and Mr. White were having a conversation.

"It's funny," said Mr. Black to the other two men, "that we are all wearing different colors, but none of us is wearing the color that is the same as his name."

"True," agreed another man, who was wearing white.

We can represent this in DLV with the following sentences:

% Proposition mrblack_wears_red means Mr. Black wears red.
% none wear color same as name disjunctive facts

mrblack_wears_red v mrblack_wears_white.
mrwhite_wears_red v mrwhite_wears_black.
mrred_wears_black v mrred_wears_white.
% alldiff constraints
:- mrblack_wears_red, mrwhite_wears_red.
:- mrblack_wears_white, mrred_wears_white.
:- mrwhite_wears_black, mrred_wears_black.
% the clue "...agreed another man, who was wearing white"
~mrblack_wears_white.

RareVosMBP:DLV decker$ ./dlv misterRBW.txt -nofacts
DLV [build BEN/Dec 17 2012 gcc 4.2.1 (Apple Inc. build 5666) (dot 3)]
{mrblack_wears_red, mrwhite_wears_black, mrred_wears_white}
{mrblack_wears_white, mrwhite_wears_red, mrred_wears_black}

But with the last sentence back in the KB, we get only a single model, the desired solution:

RareVosMBP:DLV decker$ ./dlv misterRBW.txt -nofacts
DLV [build BEN/Dec 17 2012 gcc 4.2.1 (Apple Inc. build 5666) (dot 3)]
{mrblack_wears_red, mrwhite_wears_black, mrred_wears_white}

First-Order Logic Example

Here is the Colonel West example from the book (Section 9.3.1) in dlv:

% "... it is a crime for an American to sell weapons to hostile nations"
criminal(X) :- american(X), weapon(Y), sells(X,Y,Z), hostile(Z).
% Nono has some missiles
missile(m1).
owns(nono,m1).
% All of its missiles were sold to it by Colonel West
sells(west,X,nono) :- missile(X), owns(nono,X).
% background: missiles are weapons.
weapon(X) :- missile(X).
% background: an enemy of America is "hostile" (to America)
hostile(X) :- enemy(X,america).
% "West, who is an American..."
american(west).

% "The country of Nono, an enemy of America..."
enemy(nono,america).
"
And the only model is the desired one, which includes the predicate criminal(west) as true:

RareVosMBP:DLV decker$ ./dlv west.txt -nofacts
DLV [build BEN/Dec 17 2012 gcc 4.2.1 (Apple Inc. build 5666) (dot 3)]
{criminal(west), weapon(m1), sells(west,m1,nono), hostile(nono)}

1. Getting Acquainted. Consider the following axioms:

• Horses are faster than dogs

• There is a greyhound that is faster than every rabbit

• Harry is a horse

• Ralph is a rabbit

We would like to prove Harry is faster than Ralph

1a. Write each sentence in FOL.

1b. Write any additional assumptions that you need (world knowledge) in FOL.

1c. Convert each sentence into CNF.

1d. Convert each sentence (or your CNF) into Datalog/DLV format.

1e. By hand, do a resolution proof with the CNF version that Harry is faster than Ralph. (show your work)

1d. Use DLV to prove the same thing (e.g. Harry is faster than Ralph in all models)

2. Three people, Amy, Bob, and Cal, are each either a liar or a truth-teller. Assume that liars always lie, and truth-tellers always tell the truth. 

• Amy says, "Cal and I are truthful."
• Bob says, "Cal is a liar."
• Cal says, "Bob speaks the truth or Amy lies."

What can you conclude about the truthfulness of each?

3. Use DLV to solve problem 5 on HW#2 (the "Sara had quadruplets" problem).

4. Use DLV to play the game Mastermind.

You should have a set of rules about the game in general (the intensional KB), and a set of speci?c facts about a speci?c game (the set of guesses and their responses). Probably the best way to think about this is that you are trying to compute all the models of the game rules and given facts. If there is only one model, then that is the solution.

663_Propositional Logic.png

Develop a predicate BestGuess(color,color,color,color) that tells you what to guess next (even if there is no unique solution yet). At this point you have essentially written a full game player, although I am not asking you to hook the inputs and outputs together.

Reference no: EM1378322

Questions Cloud

Discuss presentation objective : Suppose you have been asked to make 4-presentations on "Effective Presentation Skills" for 4-very different viewers. What would be your presentation target for each group?
Evaluate the required monthly mortgage payment : Evaluate the required monthly mortgage payment for Mr. Davidson and construct the 2014~2018 amortization table for Mr. Davidson.
Find new product mix and the total profit : Mallory Furniture purchases two items for resale: big shelves and medium shelves. Each big shelf costs $500 and requires one hundred cubic feet of storage space,
Linear programing problem : The linear programming problem whose output follows is used to determine how many bottles of fire red nail polish, bright red nail polish
Effcient automated inferencing system - automated reasoning : A very robust, fast, and efficient automated inferencing system with support for disjuction and functions called DLV to practice with knowledge representation and reasoning.
Maximization problem : For a maximization problem, Suppose that a constraint is binding. If the original value of a resource is four lbs., and the range of feasibility for this constraint is from
Develop the emotional intelligence of managers : Suppose you are on your way to motivating your team from a group perspective, but you are still having trouble connecting with your team as individuals.
Student benefits of distance learning : Discuss how would you write an outline for a presentation on the profits of distance learning from a student's perspective, if the audience was students and teachers with very little computer experience and may be somewhat fearful of the concept?
Question about caloric intake : The dietician for local hospital is trying to control calorie intake of the heart surgery patients. Tonight's dinner menu could consist of the following food product:

Reviews

Write a Review

Computer Engineering Questions & Answers

  Find the budget areas and the resulting balance

You are to make a budgeting report for a local company using a C++ program. There are two input files. The first input file lists the individual areas a budget has been defined for. Two of these are two checking accounts where the budget is the am..

  What are the major issues with wi-fi in homes

What are the main differences between Wi-Fi, Wireless and 3G? What are their advantages and disadvantages. What are the main issues with Wi-Fi in homes?

  Show the current selections made by the user

construct a program that demonstrates the enhanced options for the MessageBox class. Use three GroupBox controls with RadioButton controls contained within each.

  Modifying the label properties

Perform some of the changes, the WebTime example to consists of drop-down lists that enable the user to alter such Label properties as the BackColor, ForeColor and Font-Size.

  Plan a flowchart of the decision structure

A telephone company plan charges 25 cents for each call made. In addition, it charges 5 cents a minute for all calls made to a phone number that has a service plan with the company.

  What are outputs and inputs to schedule control

What are the SMART criteria? What are the 5key points of using project milestones.

  Difference between odbc and jdbc database interfaces

Why is it important to have effective and powerful interfaces like these for databases.

  Inheritance is a method in object-oriented programming

Inheritance is a method in object-oriented programming that you derive new classes from existing classes in your code.

  What are the feelings positive or negative

IT administrators in small companies must often execute several functions at the same time like network administrator, database administrator, user consultant and others. Compared to their situation, their colleagues in larger companies can get mo..

  Design a visual c-sharp program for an ice cream shop

design a Visual C-Sharp program for an Ice Cream Shop. The program will store data about ice cream cones and customers.

  Design phase of the project management life cycle

A project analysis, definition, design, implementation, mainatenace, and support phases. how do we find out what tasks are assigned to each phase? also provide examples.

  Find significant inversions in the input sequence

offer an O(n*log(n)) algorithm to count the number of significant inversions in the input sequence.

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