0% found this document useful (0 votes)
93 views5 pages

Exercise 4

This document describes a scheduling problem involving assigning five activities (A, B, C, D, E) to four time slots. The constraints are: A must be after D; D must be after E; C cannot be the same as A or D and must be after E; B must be the same or after A; B cannot be the same as C; and C cannot be the same as or one more than D. The document asks to: (1) Show how backtracking solves this problem by drawing the search tree; (2) Show how arc consistency solves this problem by drawing the constraint graph and showing the domain deletions at each step.

Uploaded by

Amadou BA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views5 pages

Exercise 4

This document describes a scheduling problem involving assigning five activities (A, B, C, D, E) to four time slots. The constraints are: A must be after D; D must be after E; C cannot be the same as A or D and must be after E; B must be the same or after A; B cannot be the same as C; and C cannot be the same as or one more than D. The document asks to: (1) Show how backtracking solves this problem by drawing the search tree; (2) Show how arc consistency solves this problem by drawing the constraint graph and showing the domain deletions at each step.

Uploaded by

Amadou BA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Exercise 4.

6
Consider a scheduling problem, where there are five activities to be scheduled in four time slots.
Suppose we represent the activities by the variables A, B, C, D, and E, where the domain of each
variable is {1,2,3,4} and the constraints are A > D, D  > E, C ̸= A, C  > E, C ̸= D, B ≥ A, B ̸= C,
and C ̸= D  + 1.
[Before you start this, try to find the legal schedule(s) using your own intuitions.]
(a) Show how backtracking solves this problem. To do this, you should draw the
search tree generated to find all answers. Indicate clearly the valid schedule(s). Make
sure you choose a reasonable variable ordering.
To indicate the search tree, write it in text form with each branch on one line. For example,
suppose we had variables X, Y, and Z with domains t, f and constraints X ̸= Y and Y ̸= Z. The
corresponding search tree is written as:
X=t Y=t Y=f
X=f Y=t Y=f
failure
Z=t solution Z=f failure Z=t failure Z=f solution failure
[Hint: It may be easier to write a program to generate such a tree for a particular
problem than to do it by hand.]
(b) Show how arc consistency solves this problem. To do this you must
 draw the constraint graph;
 show which elements of a domain are deleted at each step, and which arc is
responsible for removing the element;
 show explicitly the constraint graph after arc consistency has stopped; and
 show how splitting a domain can be used to solve this problem.
Below is the initial constraint graph.
 
 
Embed YOUR arc consistent constraint diagram here:

Exercise 4.7 Which of the following methods can


(a) determine that there is no model, if there is not one
(b) find a model if one exists
(c) find all models?
The methods to consider are
i) arc consistency with domain splitting
ii) variable elimination
iii) stochastic local search
iv) genetic algorithms.
Ans (a):
Ans (b):
Ans (c):
Exercise 5.1 Suppose we want to be able to reason about an electric kettle plugged into one of
the power outlets for the electrical domain of Figure 5.2 on page 183. Suppose a kettle must be
plugged into a working power outlet, it must be turned on, and it must be filled with water, in
order to heat.
 

Write axioms in terms of definite clauses that let the system determine whether kettles
are heating. AILog code for the electrical environment is available from the book
website.
You must
• give the intended interpretation of all symbols used
• write the clauses so they can be loaded into AILog
• show that the resulting knowledge base runs in AILog.
Example ans (note \% are comments:

\% heating_k1 is ______ if kettle k1 is _______ 


heating____ <- plugged_into_k1_____ 
& _____p1
& ______on_k1
& filled_with_______k1.
\% plugged_into_k1_p1 is true if k1 is plugged into ______ outlet
p1 plugged_into_______p1.
plugged_into_______p2.
Ans with blanks filled in:
 

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy