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: defining predicates
P (x): X is Human
L (x, y): x likes y
Where Y'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 plays the basket 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))
Ball.
(3) The new computer is fast and the storage capacity is large.
Solution: defining predicates
NC (x): X is a new type of computer
F (x): Fast x speed
B (x): Large x capacity
The knowledge is represented by a predicate as:
(∀x) (NC (x) →f (x) ∧b (x))
(4) not every computer department student likes the computer creates Macintosh program.
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 Use predicate notation to denote farmers, wolves, goats, cabbage problems.
Set the farmer, the wolf, goat, cabbage all on the left bank of a river, now to send them all to the right bank of the river, the farmer has a boat, when the river, in addition to the farmer on the ship can carry a wolf, goat, cabbage, wolf to eat goats, goats to eat cabbage, unless the farmer is where, is to plan out a plan to ensure all safe crossing Write out the definition of the predicate you are using, and give the individual fields of each predicate's function and its variables
Solution: (1) First define a predicate that describes the state
To describe the problem, you need to be able to explain where the farmer, wolf, sheep, cabbage, and boat are located, and for the simplification of the problem, cancel the ship's state of travel in the river, describing only the left and right bank states. And because the state of the Left bank and the right bank are complementary, it is possible to directly describe the state of the left bank or the right bank. The method of choosing a direct description of the left bank is to define the predicate as follows:
AL (x): X on the left bank
where X's individual domain is {farmer, ship, wolf, sheep, cabbage}. Correspondingly, ¬al (x) indicates that x is on the right bank.
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)
(2) redefine the predicate that describes the operation
The following 4 verbs are required to describe an action:
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
where X'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
Conditions: Al (ship), Al (Farmer), ¬al (Wolf) ∨¬al (sheep), ¬al (sheep) ∨¬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
Conditions: Al (ship), 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 (ship), ¬al (farmer), ¬al (sheep), ¬al (Wolf), ¬al (sheep), AL (cabbage)
Action: Delete table: ¬al (ship), ¬al (farmer), ¬al (sheep)
Add Table: Al (ship), Al (Farmer), Al (sheep)
(3) Problem solving process
Al (Farmer) Al (Wolf) Al (Farmer) Al (cabbage)
Al (ship) l-r (sheep) al (cabbage) r-l al (ship) l-r (Wolf) ¬al (farmer) r-l (sheep)
Al (Wolf) =====>¬al (farmer) =====> AL (Wolf) =====>¬al (ship) =====>
Al (sheep) ¬al (ship) Al (cabbage) ¬al (Wolf)
AL (cabbage) ¬al (sheep) ¬al (sheep) ¬al (sheep)
Al (Farmer) Al (sheep) Al (farmer) ¬al (farmer)
Al (ship) l-r (cabbage) ¬al (farmer) r-l AL (ship) l-r (sheep) ¬al (ship)
Al (sheep) =====>¬al (ship) =====> al (sheep) =====>¬al (sheep)
AL (cabbage) ¬al (cabbage) ¬al (cabbage) ¬al (cabbage)
¬al (Wolf) ¬al (Wolf) ¬al (Wolf) ¬al (Wolf )
2.16 write out their semantic networks for the following propositions, respectively
(1) Each student has a computer.
(2) Teacher Gao, from March to July, spoke to the students of computer Science "computer network class"
(3) The students of the workshop were male, female, graduate students and undergraduates.
(4) The innovation Company at 56th Hoi An avenue, Liu Yang is the company's manager, he is 32 years old, Master's degree.
(5) The Red team played with the Blue team and ended with a 3:2 score.
2.17 Please express the following proposition 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
Second homework sun List ting