Ai Second Job

Source: Internet
Author: User
Tags pear

2.9 With the following statements, please use the corresponding predicate formula to express them separately

(1) Some people like plum blossom, some people like Chrysanthemum, some people both like plum blossom and like chrysanthemum.

Solution:

P (x):x is human

L (x, y):x likes y

wherey 's individual domain is { plum, chrysanthemum }

The knowledge is represented by a predicate as:

(x) (P (x) →l (x, plum )∨l (x, chrysanthemum ) ∨l (x, plum )∧l (x, chrysanthemum ) )

(2) someone goes to play basketball every afternoon.

Solution: defining predicates

P (x):x is human

B (x):x play basketball

A (y):y is afternoon

The knowledge is represented by a predicate as:

(x) (y) (A (y) →b (x) ∧p (x))

(3) the new type of computer is fast and the storage capacity is large.

Solution: defining predicates

NC (x):x is a new type of computer

F (x):fastx speed

B (x):largex capacity

The knowledge is represented by a predicate as:

(x) (NC (x) →f (x) ∧b (x))

(4) Not every computer department student likes to creates Macintosh programs in the computer.

Solution: defining predicates

S (x):x is a student of computer science

L (x, pragramming):x likes programming

U (x,computer):x use computer

The knowledge is represented by a predicate as:

¬ (x) (S (x) →l (x, pragramming) ∧u (X,computer))

(5) Anyone who likes to program is fond of computers.

Solution: defining predicates

P (x):x is human

L (x, y):x likes y

The knowledge is represented by a predicate as:

(x) (P (x) ∧l (x,pragramming) →l (x, Computer))

2.11 The problem of farmer, wolf, goat and cabbage by means of predicate notation.

The farmer, the wolf, the goat, the cabbage all put on the left bank of a river, now want to send them all to the right bank of the river, the farmer has a boat, when the river crosses, except the farmer outside the ship can carry the wolf, the goat, the cabbage one. A wolf eats a goat, and a goat eats cabbage unless the farmer is there. Planning a plan to ensure all the safe crossing of the river. Please write out the definition of the predicate used, and give the function of each predicate and the individual domain of the variable.

Solution:

The definition predicate is as follows:

AL (x):x on the left Bank, ¬al (x) means x on the right bank

wherex 's individual domain is { farmer, ship, wolf, sheep, cabbage }.

Initial state of the problem:

Al ( farmer ), AL ( ship ), AL ( Wolf ), Al ( sheep ), AL ( Cabbage )

The target state of the problem:

¬al ( farmer ), ¬al ( ship ), ¬al ( Wolf ), ¬al ( sheep ), ¬al ( Cabbage )

Defines a predicate that describes an operation:

L-r: The farmer himself rowed from the left bank to the right bank

L-r (x): Farmer with x Boating from left bank to right bank

R-l: The farmer himself rowed from the right bank to the left bank

R-l (x) : Farmer with x Boating from right bank to left bank

wherex 's individual domain is { wolf, sheep, cabbage }.

For each of these operations, both the condition and the action are included. They correspond to the following conditions and actions:

L-r: Farmers rowing from the left bank to the right bank

     Condition: al ( boat ) al ( farmer ) Wolf ) ∨¬al ( sheep ) ¬al (" ∨¬al ( cabbage )

Action: Delete table:al ( ship ),al ( farmer )

Add Table: ¬al ( ship ),¬al ( farmer )

L-r ( Wolf ): Farmer boating with wolves from left bank to right bank

     Condition: al ( boat ) al ( farmer ) al ( Wolf ) , ¬al ( sheep )

Action: Delete table:al ( ship ),al ( farmer ),al ( Wolf )

Add Table: ¬al ( ship ),¬al ( farmer ),¬al ( Wolf )

L-r ( sheep ): Farmer boating from left bank to right bank with sheep

Conditions:al (ship ),al ( farmer ),al ( Sheep ), al ( Wolf ),al ( cabbage )

          or: al ( ship ) al ( farmer ) al ( sheep ) , ¬al ( Wolf ) , ¬al ( cabbage )

Action: Delete table:al ( ship ), al ( farmer ),al ( Sheep )

Added tables: ¬al ( ship ),¬al ( farmer ),¬al ( sheep )

L-r ( cabbage ): Farmer boating from left bank to right bank with cabbage

Conditions:al ( ship ),al ( farmer ),al ( Cabbage ),¬al ( Wolf )

Action: Delete table:al ( ship ), al ( farmer ),al ( cabbage )

Add Table: ¬al ( ship ),¬al ( farmer ),¬al ( cabbage )

R-l: Farmer boating from right bank to left bank

Conditions: ¬al ( ship ),¬al ( farmer ),AL ( Wolf )∨al ( Sheep ),AL ( sheep )∨al ( cabbage )

Or: ¬al ( ship ),¬al ( farmer ) ,¬al ( Wolf ), ¬al ( Cabbage ),AL ( sheep )

Action: Delete table: ¬al ( ship ),¬al ( farmer )

Add Table:al ( ship ),al ( farmer )

R-l ( sheep ) : Farmer boating from right bank to left bank with sheep

     conditions: ¬al ( boat , ¬al ( farmer ) , ¬al ( sheep ) , ¬al ( Wolf ) , ¬al ( sheep ) al (

Action: Delete table: ¬al ( ship ),¬al ( farmer ), ¬al ( sheep )

Add Table:al ( ship ),al ( farmer ),al ( Sheep )

2.16 write out their semantic networks for the following propositions, respectively:

(1) Each student has a computer.

(2) High teacher from 3 months to 7 months to the computer department students to talk about the "computer network" class.

(3) There are men, women, graduate students, and undergraduates in the classes.

(4) Innovation Company in the section of the Sea Avenue , Liu Yang is the company's manager, he is a year-old, master's degree.

(5) The red team played football with the Blue team and ended with a score of 3: 2 .

2.17 Please represent the following propositions in a semantic network:

(1) trees and grasses are plants;

(2) both the tree and the grass have leaves and roots;

(3) weeds are grass, and grow in water;

(4) fruit trees are trees and will result;

(5) pear Tree is a kind of fruit tree, it will knot pear.

Ai Second Job

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.