How a simple backward chaining interpreter could be used

Assignment Help Computer Engineering
Reference no: EM131198749

Unit 3 A

Be sure to carefully follow the syntax and semantics of each representational scheme.

For pictorial/graphical representations, you may hand draw them, scan them, and import them into your document. Or, you may use the drawing tools available in your software app.

For quantifiers in predicate logic, feel free to use A and E if you are unable to produce the specialized symbols (∀ and ∃)

For help with logic, review the handout online. There are many other resources available on predicate logic, for example: https://www.cs.odu.edu/~toida/nerzic/content/logic/pred_logic/intr_to_pred_logic.html

1) Represent the following facts as a set of frames:

"The aorta is a particular kind of artery which has a diameter of 2.5 cm.
An artery is a kind of blood vessel.
An artery always has a muscular wall, and generally has a diameter of 0.4 cm.
A vein is a kind of blood vessel, but has a fibrous wall.
Blood vessels all have tubular form and contain blood."

2) Represent the following facts in the language of predicate logic:

Every apple is either green or yellow.
No apple is blue.
If an apple is green then it is tasty.
Every man likes a tasty apple.

3) "Herbert is a small hippopotamus who lives in Edinburgh zoo. Like all hippopotamuses he eats grass and likes swimming."

Represent the above:
• as a semantic network;
• in predicate logic
For quantifiers, feel free to use "A" and "E" if you are unable to produce the specialized symbols

Unit 3 B

1. Develop a simple set of rules for diagnosing respiratory symptom diseases given patient symptoms, using the following knowledge of typical symptoms. Describe how a simple backward chaining interpreter could be used to go through the possible diagnoses, asking the user questions about their symptoms. If you have an expert system shell available, try implementing a simple diagnosis system based on the above.

o Influenza: Symptoms include a persistent dry cough and a feeling of general malaise.

o Hayfever: Symptoms include a runny nose and sneezing. The patient will show a positive reaction to allergens, such as dust or pollen.

o Laryngitis: Symptoms include a fever, a dry cough, and a feeling of general malaise. A "laryngoscopy" will reveal that the person has an inflamed larynx.

o Asthma: Symptoms include breathlessness and wheezing. If it is triggered by an allergen, such as dust or pollen, it is likely to be "extrinsic asthma". "Intrinsic asthma" tends to be triggered by exercise, smoke or a respiratory infection.

2. What do you think are the main problems and limitations of the rule-set developed for the question above? What additional knowledge might be useful to deal with more complex or subtle diagnoses?

Unit 3 E

In exercise 1, create the parse tree for each sentence. Sentences which can be recognized will have a complete parse tree while unrecognized sentences will have incomplete parse trees. Be sure to indicate which sentences are recognized.

In exercise 2, list the full DCG notation for the extended grammar. Test your grammar by using Amzi prolog.

Amzi Prolog allows DCG to be input directly. Therefore, you can enter your grammar exactly as you would create it for problem #2, page 123. For example, you can enter: sentence --> np(N), vp(N). etc.

The only "trick" is how to specify the sentence to check for proper grammar. Here's how:
?- sentence([word1,word2,word3,etc],[]).

note the use of square brackets within the parentheses, each word of the sentence is entered between commas, and the final argument [] (open bracket, close bracket). Thus to check whether "All rabbits eat carrots" is syntactically correct, enter
?- sentence([all,rabbits,eat,carrots],[]).

Examples:

?- sentence([the,rabbit,eats,the,carrot],[]).
yes
?- sentence([rabbit,the,carrot,eats,the],[]).
no

Submit the .pro file as text copied within the document you submit here. Please upload one document with all exercise answers along with your name and ID#

The following is a grammar of a subset of English in DCG notation:

• sentence --> np(N), vp(N).
• np(N) -->det, noun(N).
• vp(N) --> verb(N), np(_).
• noun(s) --> [carrot].
• noun(s) --> [rabbit].
• noun(p) --> [rabbits].
• verb(s) --> [eats].
• det --> [the].

1. Which of the following sentences can be recognized with this Grammar?

o The carrot eats the carrot.
o The rabbits eats the carrot.
o The rabbit eats carrots.
For each sentence which is recognized by the grammar, show its parse tree.

2. Extend the grammar to handle sentences like the following. "All" and "some" should be treated as kinds of determiner (det).

o All rabbits eat carrots.
o Some rabbits eat the carrot.
o The rabbit eats every carrot.

The grammar should NOT allow sentences that are grammatically incorrect because a plural noun (e.g. carrots) is used with a determiner that can only be used with singular nouns (e.g., a, every) or vice versa, e.g.,

o All rabbit eat the carrot.
o A rabbits eat the carrot
o Every rabbits eat the carrots.

Try out your grammar using Prolog.

Unit 4 B

Apply the difference operator mask on page 129 to the image on page 128. Notes: use a threshold of 2; use the absolute value of the difference operation; the resulting matrix will be 7x7 rather than 8x8 (as the original is).

List the resulting matrix and show your work in computing it. This is a difficult assignment; don't panic, but work carefully and deliberately.

Reference no: EM131198749

Questions Cloud

Cost concepts and break-even : With your favorite restaurant in mind (yet again), determine the types of costs that would fall under the categories of fixed, variable, and mixed. Based on what you know about the restaurant in question, develop a break-even analysis.
Calculate the number of theoritical trays : Use the analythical Kremser equation with the geometric average A, calculate the number of theoritical trays.
How disaster protocols will mitigate threats to organization : How the disaster response protocols will mitigate the threats to and vulnerabilities of the organization. Support your justification with information assurance research and best practices.
What are the basic elements of a contract : What are the basic elements of a contract? Under contract law, what is consideration? Give an example within higher education. (This is a challenging one to grasp and explain, but give it your best.)
How a simple backward chaining interpreter could be used : Describe how a simple backward chaining interpreter could be used to go through the possible diagnoses, asking the user questions about their symptoms.
Benefits of organizing the business as a corporation : You are approached by a client who would like to start his own business. The client plans to take the company public in five years. What are the benefits of organizing the business as a corporation? 200 word both question.
Do agree with decision to transfer juvenile to adult court : Research a case where a juvenile was transferred to adult court. What kind of waiver was used? Summarize the details of the case. Do you agree with the decision to transfer a juvenile to adult court? Why or why not?
Country of cuba for the purposes of negotiating : The Governor of the State of Florida traveled to the country of Cuba for the purposes of negotiating a treaty to promote the trade and importation of tobacco into his state for the benefit of Florida's cigar industry.
Explain why development of private correctional facilities : Explain why the development of private correctional facilities is or is not necessary in the U.S. and How the opening of more private facilities may affect the relationship with other criminal justice agencies.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Calculates a result needed for a physics lab on ballistics

Program that calculates a result needed for a physics lab on ballistics. Using the angle of the launch and the initial velocity, the program will calculate how far the object traveled.

  Questionuse the following system printprimes for questions

questionuse the following system printprimes for questions a-f below.a illustrate the control flow graph for the

  What advice do you have for the project manager

What advice do you have for the project manager? How likely does it seem that Pete will achieve his desired goals of being on time and within budget if nothing is done?

  Find how many values were specified on the command line

Write down a program in PERL that have two subroutines add() and multiply() that will add or multiply its arguments and print the result to screen.

  Write down an application that plays "guess the number"

Write an application that plays "guess the number" as follows: Your application chooses number to be guessed by selecting an integer at random in range 1-1000.

  Write down a program which prompts the user to enter the

write a program that prompts the user to enter the year and displays the chinese zodiac for the year. the chinese

  What is the value shown by the bit string

What is the value shown by the bit string 101101 if - Negate the following binary numbers in 4-bit 2's complement representation - How large a value can be represented by each of the unsigned binary quantities?

  Identify the independent and dependent variables

Assignment: Explain whether you chose to use an independent-samples t test or a matched-samples t test. Provide a rationale for your choice. Identify the independent and dependent variables

  Write a program that allows two individuals to play

Write a program that allows two individuals to play a single game of Tic-Tac-Toe.

  Write down fucntion defintion for the line class constructor

write down fucntion defintion for the Line class constructor.

  Find the class declaration

utalize the member function max() as an external function.

  Meaning and significance of hash code collision

Explain what a hash code is and meaning and significance of hash code collision.

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