Individual 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

London Metropolitan University

Semantic Technologies CS7051


Coursework – I
Individual Report
Microworld -My Transport

Submitted to: Submitted by:


Contents

Satisfiability.....................................................................................................................................3
Deduce conclusion using inference rules:.......................................................................................4
Converting Facts and heuristics into horn clause............................................................................5
Applying Resolution:.......................................................................................................................7
Satisfiability

1. Heuristic: Each passenger is associated with a vehicle.


 ∀p ∈ P, ∃v ∈ V, AssociatedVehicle (p, v)
 Satisfiability: For each passenger p in the set P, there exists at least one vehicle v
in the set V associated with the passenger.

2. Heuristic: Every dispatcher manages a set of vehicles.


 ∀dr ∈ DR, ∃V' ⊆ V, Manage (dr, V')
 Satisfiability: For each dispatcher dr in the set DR, there exists at least one subset
V' of vehicles in the set V managed by the dispatcher.

3. Heuristic: Gas stations offer multiple fuel options.


 ∀g ∈ G, ∃F' ⊆ F, OfferedFuel(g, F')
 Satisfiability: For each gas station g in the set G, there exists at least one subset
F' of fuel types in the set F offered by the gas station.

4. Heuristic: Every lane is part of a road.


 ∀l ∈ L, ∃r ∈ R, PartOf(l, r)
 Satisfiability: For each lane l in the set L, there exists at least one road r in the set
R of which the lane is a part.

5. Heuristic: Traffic lights control traffic flow at intersections.


 ∀t ∈ T, ∃r1, r2 ∈ R, Controls (t, r1, r2)
 Satisfiability: For each traffic light t in the set T, there exist at least two roads r1
and r2 in the set R controlled by the traffic light at their intersection.
Deduce conclusion using inference rules:

1. Modus Ponens:
 If a vehicle is parked in a designated area, then it is stationary.
 ∀v ∈ V, ∀pk ∈ PK, Parked (v, pk) → Stationary(v)
 Vehicle v1 is parked in designated area pk1.
 Parked (v1, pk1)
 Conclusion: Vehicle v1 is stationary.
 Stationary(v1)
2. Modus Tollens:
 If a vehicle is not stationary, then it is not parked in a designated area.
 ∀v ∈ V, ∀pk ∈ PK, ¬Stationary(v) → ¬Parked(v, pk)
 Vehicle v2 is not stationary.
 ¬Stationary(v2)
 Conclusion: Vehicle v2 is not parked in any designated area.
 ∀pk ∈ PK, ¬Parked(v2, pk)
3. Hypothetical Syllogism:
 If a dispatcher manages a set of vehicles, and each vehicle is associated with a
driver, then the dispatcher manages a set of drivers.
∀dr ∈ DR, ∀V' ⊆ V, Manage (dr, V') ∧ (∀v ∈ V', AssociatedDriver (v,
dr)) → ManageDrivers (dr, {d | ∀d ∈ D, ∃v ∈ V', AssociatedDriver (v,

d)})
 Dispatcher dr1 manages vehicles in set V'1 and each vehicle in V'1 is associated
with a driver.
 Manage (dr1, V'1) ∧ (∀v ∈ V'1, AssociatedDriver (v, dr1))
 Conclusion: Dispatcher dr1 manages a set of drivers.
 ManageDrivers (dr1, {d1, d2, ...})
4. Addition:
 If a vehicle is associated with a driver, then the vehicle is driven by the driver.
 ∀v ∈ V, ∀d ∈ D, AssociatedDriver (v, d) → DrivenBy(v, d)
 Vehicle v3 is associated with driver d3.
 AssociatedDriver (v3, d3)
 Conclusion: Vehicle v3 is driven by driver d3.
 DrivenBy (v3, d3)
5. Simplification:
 If a vehicle is driven by a driver, then the vehicle is associated with the driver.
 ∀v ∈ V, ∀d ∈ D, DrivenBy(v, d) → AssociatedDriver(v, d)
 Vehicle v4 is driven by driver d4.
 DrivenBy(v4, d4)
 Conclusion: Vehicle v4 is associated with driver d4.
 AssociatedDriver(v4, d4)
6. Resolution:
 If a vehicle is parked in a designated area, then it is stationary.
 ∀v ∈ V, ∀pk ∈ PK, Parked(v, pk) → Stationary(v)
 Vehicle v5 is not stationary.
 ¬Stationary(v5)
 Conclusion: Vehicle v5 is not parked in any designated area.
 ∀pk ∈ PK, ¬Parked(v5, pk)

Converting Facts and heuristics into horn clause

Facts:
1. Each passenger is associated with a vehicle.
 ∀p∈P,∃v∈V,AssociatedVehicle(p,v)
2. Every dispatcher manages a set of vehicles.
 ∀dr∈DR,∃V′⊆V,Manage(dr,V′)
3. Gas stations offer multiple fuel options.
 ∀g∈G,∃F′⊆F,OfferedFuel(g,F′)
4. Every lane is part of a road.
 ∀l∈L,∃r∈R,PartOf(l,r)
5. Traffic lights control traffic flow at intersections.
 ∀t∈T,∃r1,r2∈R,Controls(t,r1,r2)

Heuristics:
1. If a vehicle is parked in a designated area, then it is stationary.
 ∀v∈V,∀pk∈PK,Parked(v,pk)→Stationary(v)
2. If a vehicle is associated with a driver, then the vehicle is driven by the driver.
 ∀v∈V,∀d∈D,AssociatedDriver(v,d)→DrivenBy(v,d)
3. If a dispatcher manages a set of vehicles, then the dispatcher manages a set of drivers.
 ∀dr∈DR,∀V′⊆V,Manage(dr,V′)∧(∀v∈V
′,AssociatedDriver(v,dr))→ManageDrivers(dr,{d∣∀d∈D,∃v∈V
′,AssociatedDriver(v,d)})

Converted into Horn-clause theory:


1. Passenger p is associated with vehicle v.
 AssociatedVehicle(p, v)
2. Dispatcher dr manages vehicles in subset ′V′ of vehicles.
 Manage(dr, V')
3. Gas station g offers fuel types in subset ′F′ of fuel types.
 OfferedFuel(g, F')
4. Lane l is part of road r.
 PartOf(l, r)
5. Traffic light t controls roads 1r1 andr2 at intersection.
 Controls (t, r1, r2)
6. If a vehicle v is parked in area pk, then it is stationary.
 Parked (v, pk) \rightarrow Stationary(v)
7. If a vehicle v is associated with driver d, then v is driven by d.
 AssociatedDriver (v, d) \rightarrow DrivenBy (v, d)
8. If a dispatcher dr manages vehicles in subset ′V′, and each vehicle in ′V′ is associated
with driver dr, then dr manages drivers in set D.
 Manage (dr, V') \land (\forall v \in V', AssociatedDriver (v, dr)) \rightarrow
ManageDrivers (dr, D)

Applying Resolution:

Existing facts and heuristics:


1. {∀l ∈ L, ∃r ∈ R, PartOf(l, r)}
2. {∀v ∈ V, ∀pk ∈ PK, Parked(v, pk) → Stationary(v)}
Assume:
1. {∃r1 ∈ R, ¬PartOf(l1, r1)} (Lane l1 is not part of any road)
2. {¬Stationary(v1)} (Vehicle v1 is parked but not stationary)
From Fact: ∃r1 ∈ R, ¬PartOf(l1, r1) From Heuristic: ∀l ∈ L, ∃r ∈ R, PartOf(l, r) (Converted
fact)
Applying the resolution rule, we get: ¬Stationary(v1)
Existing facts and heuristics:
1. {∀l ∈ L, ∃r ∈ R, PartOf(l, r)}
2. {∀v ∈ V, ∀d ∈ D, AssociatedDriver(v, d) → DrivenBy(v, d)}
Assume:
1. {AssociatedDriver(v2, d2)} (Vehicle v2 is associated with driver d2)
2. {¬DrivenBy(v2, d2)} (Vehicle v2 is not driven by driver d2)
3. {∃r2 ∈ R, ¬PartOf(l2, r2)} (Lane l2 is not part of any road)
From Fact: ∃r2 ∈ R, ¬PartOf(l2, r2) From Heuristic: ∀l ∈ L, ∃r ∈ R, PartOf(l, r) (Converted
fact)
Applying the resolution rule, we get: ¬DrivenBy(v2, d2)

You might also like