Question: Exercise 8.13 To implement the function add constraint(A0 < A1, Constraints) used in the partial-order planner, you have to choose a representation for a partial
Exercise 8.13 To implement the function add constraint(A0 < A1, Constraints)
used in the partial-order planner, you have to choose a representation for a partial ordering. Implement the following as different representations for a partial ordering:
(a) Represent a partial ordering as a set of less-than relations that entail the ordering
– for example, as the list [1 < 2, 2 < 4, 1 < 3, 3 < 4, 4 < 5].
b) Represent a partial ordering as the set of all the less-than relations entailed by the ordering – for example, as the list [1 < 2, 2 < 4, 1 < 4, 1 < 3, 3 <
4, 1 < 5, 2 < 5, 3 < 5, 4 < 5].
(c) Represent a partial ordering as a set of pairs E, L, where E is an element in the partial ordering and L is the list of all elements that are after E in the partial ordering. For every E, there exists a unique term of the form E, L.
An example of such a representation is [1, [2, 3, 4, 5], 2, [4, 5], 3, [4, 5], 4, [5], 5, [ ]).
For each of these representations, how big can the partial ordering be? How easy is it to check for consistency of a new ordering? How easy is it to add a new less-than ordering constraint? Which do you think would be the most efficient representation?
Can you think of a better representation?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
