Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Labs-

Lab - Create a KB called sjsu that contains the following information:

Turing is the instructor for CS152. Godel, Escher, Bach, and VonNeumann are enrolled in CS152.

Create a rule that defines the relationship Instructor X teaches student Y.

Lab: Recursion

Create and test a knowledge bases for the following scenario.

Homer is the parent of Bart, Lisa, and Maggie. Abe and Mona are Homer's parents.

Marge is also the parent of Bart, Lisa, and Maggie. Clancy and Jacquelin are her parents.

Clancy and Jacquelin are also the parents Selma and Patty.

Parents are ancestors as are ancestors of parents.

Siblings share a parent.

Lab: Arithmetic

We can use structures to represent positive integers in Prolog. For example:

0 = zero

1 = inc(zero)

2 = inc (inc (zero))

3 = inc (inc (inc (zero)))

etc.

Here inc(x) stands for the increment (add one) function.

Define and test the predicate add(X, Y, Z), which represents the relationship Z = X + Y.

Here's a start:

add(zero, X, ???).

add(inc(X), Y, inc(Z)) :- ???.

Define and test the predicate mul(X, Y, Z) which represents the relationship Z = X * Y.

Define and test the predicate exp(X, Y, Z) which represents the relationship Z = X ^ Y.

Define and test the predicate less(X, Y), which represents the relationship X < Y.

Lab: Org Charts, etc.

Define and test the following predicates:

supervises(X, Y) which represents the relationship X supervises Y or a supervisor of Y.

friend(X, Y) which represents the relationship X is a FB friend of Y.

equals(X, Y) which represents the relationship X == Y.

distance(X, Y, Z) which represents the relationship the distance from X to Y is Z hops where X and Y are nodes on an Ethernet wire.

Lab: Evaluating expressions

We can use structures to represent syntax trees in Prolog. For example, the expression

(3 * 4) + (5 + 6)

can be represented by the syntax tree:

sum(prod(num(3), num(4)), sum(num(5), num(6)))

Write an evaluator for the language of sums and products:

?-eval(sum(prod(num(3), num(4)), sum(num(5), num(6))), X).

X = 23.

Lab: Trees

Implement height(Tree, H) where H is the height of a tree of the form leaf or parent(LeftChild, RightChild)

Lab: Proplog

Proplog is a simplified version of Prolog that doesn't allow variables.

Attachment:- Assignment.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91976975
  • Price:- $80

Guranteed 48 Hours Delivery, In Price:- $80

Have any Question?


Related Questions in Computer Engineering

A student raises her hand in class and states i can legally

A student raises her hand in class and states, "I can legally copy any DVD I get from Netflix because Netflix purchased the DVD and the copyright only applies to the company who purchased the product." Explain whether th ...

Question after reading this weeks materials please respond

Question : After reading this week's materials, please respond to TWO of the following questions. CITATION IN APA 1. Compare mean time between repair (MTTR) and mean time between failures (MTBF). Why can more components ...

With regards to data mining business analytics why is it

With regards to data mining/ business analytics, Why is it not ideal to evaluate a classifier's performance on the training data set?

Mccann co has identified an investment project with the

McCann Co. has identified an investment project with the following cash flows. Year Cash Flow  1   $800  2    1,090 3    1,350 4    1,475 a. If the discount rate is 7 percent, what is the present value of these cash flow ...

Determine the number of moles of oleic acid in the

Determine the number of moles of oleic acid in the monolayer. Assume the nubmer of grams of oleic acid in the monolayer is  7.12×10 -6  g MW for oleic acid is 282 g/mol.

List the common development failures and errors that

List the common development failures and errors that results from poor software security efforts

Why regulated industries should be required to follow

Why regulated industries should be required to follow security standards. Provide 2 examples of industries that would fall under this category.

Question a file is to be shared among different processes

Question : A file is to be shared among different processes, each of which has a unique id number and a priority level number. The file can be accessed simultaneously by several processes, subject to the following constr ...

Questionif a string is stored at the memory address 0 times

Question: If a string is stored at the memory address 0 times 20008000 and the string is "Cortex-M", show the memory content in hex format starting at 0 times 20008000. How many bytes does this string take in the memory? ...

Not all context free grammars define regular languages

Not all context free grammars define regular languages. However, the following two DO define regular languages. For each grammar below, (a) describe the corresponding language and (b) draw the corresponding finite state ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As