Instructor’sManual: sd
ExerciseSolutions ds
for sd
Artificial Intelligence sd
A Modern Approach
sd sd
Second Edition sd
Stuart J. Russell and Peter Norvig
sd sd sd sd sd
Upper Saddle River, New Jersey 07458
sd sd sd sd sd
,Library of Congress Cataloging-in-Publication Data
sd sd sd sd
Russell, Stuart J. (Stuart Jonathan)
sd sd sd sd
Instructor’s solution manual for artificial intelligence : a modern sd sd sd sd sd sd sd sd
approach (second edition) / Stuart Russell, Peter Norvig.
sd sd sd sd sd sd sd sd
Includes bibliographical references and index. sd sd sd sd
1. Artificial intelligence I. Norvig, Peter. II. Title.
sd sd sd sd sd sd
Vice President and Editorial Director, ECS: Marcia J. Horton
sd sd sd sd sd sd sd sd
Publisher: Alan R. Apt sd sd sd
Associate Editor: Toni Dianne Holm sd sd sd sd
Editorial Assistant: Patrick Lindner sd sd sd
Vice President and Director of Production and Manufacturing, ESM: David W. Riccardi
sd sd sd sd sd sd sd sd sd sd sd
Executive Managing Editor: Vince O’Brien sd sd sd sd
Managing Editor: Camille Trentacoste
sd sd sd sd
Production Editor: Mary Massey
sd sd sd sd
Manufacturing Manager: Trudy Pisciotti
sd sd sd sd
Manufacturing Buyer: Lisa McDowell
sd sd sd sd
Marketing Manager: Pamela Shaffer
sd sd sd sd
c 2003 Pearson Education, Inc.
s d sd sd sd
Pearson Prentice Hall
sd sd sd
Pearson Education, Inc. sd sd
Upper Saddle River, NJ
s d sd sd sd
07458
sd
All rights reserved. No part of this manual may be reproduced in any form or by any means, without
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
permission in writing from the publisher.
sd sd sd sd sd sd
Pearson Prentice Hall R is a trademark of Pearson Education, Inc.
sd sd sd s d sd sd sd sd sd sd
Printed in the United States of America
sd sd sd sd sd sd
10 s d s d 9 8 s d s d 7 6 s d s d 5 4 s d s d 3 2 s d s d 1
ISBN: 0-13-090376-0 sd
Pearson Education Ltd., London sd sd sd
Pearson Education Australia Pty. Ltd., Sydney
sd sd sd sd sd
Pearson Education Singapore, Pte. Ltd.
sd sd sd sd
Pearson Education North Asia Ltd., Hong
s d sd sd sd sd sd
Kong Pearson Education Canada, Inc.,
sd sd sd sd sd
Toronto Pearson Educacio´n de Mexico, S.A.
sd sd sd sd sd sd
de C.V. Pearson Education—Japan, Tokyo
sd sd sd sd sd
Pearson Education Malaysia, Pte. Ltd.
sd sd sd sd
Pearson Education, Inc., Upper Saddle River, New Jersey
sd sd sd sd sd sd sd
,Preface
This Instructor’s Solution Manual provides solutions (or at least solution sketches)
sd sd sd sd sd sd sd sd sd sd
for almost all of the 400 exercises in Artificial Intelligence: A Modern Approach
sd sd sd sd sd sd sd sd sd sd s d sd sd
(Second Edi- tion). We only give actual code for a few of the programming exercises;
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
writing a lot of code would not be that helpful, if only because we don’t know what
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
language you prefer.
sd sd sd
In many cases, we give ideas for discussion and follow-up questions, and we try to
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
explain why we designed each exercise.
sd sd sd sd sd sd
There is more supplementary material that we want to offer to the instructor, but we
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
have decided to do it through the medium of the World Wide Web rather than through a
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
CD or printed Instructor’s Manual. The idea is that this solution manual contains the material
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
that must be kept secret from students, but the Web site contains material that can be updated
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
and added to in a more timely fashion. The address for the web site is:
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
http://aima.cs.berkeley.edu
and the address for the online Instructor’s Guide is:
sd sd sd sd sd sd sd sd
http://aima.cs.berkeley.edu/instructors.html
There you will find:
sd sd sd
Instructions on how to join the aima-instructors discussion list. We strongly sd sd sd sd sd sd sd sd s d sd
recom- mend that you join so that you can receive updates, corrections, notification
sd sd sd sd sd sd sd sd sd sd sd sd sd
of new versions of this Solutions Manual, additional exercises and exam questions,
sd sd sd sd sd sd sd sd sd sd sd sd
etc., in a timely manner.
sd sd sd sd sd
Source code for programs from the text. We offer code in Lisp, Python, and Java,
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
and point to code developed by others in C++ and Prolog.
sd sd sd sd sd sd sd sd sd sd sd
Programming resources and supplemental texts. sd sd sd sd
Figures from the text; for overhead transparencies.
sd sd sd sd sd sd sd
Terminology from the index of the book.
sd sd sd sd sd sd sd
Other courses using the book that have home pages on the Web. You can see
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
example syllabi and assignments here. Please do not put solution sets for AIMA
sd sd sd sd sd s d sd sd sd sd sd sd sd
exercises on public web pages!
sd sd sd sd sd
AI Education information on teaching introductory AI courses.
sd sd sd sd sd sd sd
Other sites on the Web with information on AI. Organized by chapter in the book; check
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
this for supplemental material.
sd sd sd sd
We welcome suggestions for new exercises, new environments and agents, etc.
sd sd sd sd sd sd sd sd sd sd
The book belongs to you, the instructor, as much as us. We hope that you enjoy teaching
s d sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
from it, that these supplemental materials help, and that you will share your supplements
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
and experi- ences with other instructors.
sd sd sd sd sd sd
iii
,
ExerciseSolutions ds
for sd
Artificial Intelligence sd
A Modern Approach
sd sd
Second Edition sd
Stuart J. Russell and Peter Norvig
sd sd sd sd sd
Upper Saddle River, New Jersey 07458
sd sd sd sd sd
,Library of Congress Cataloging-in-Publication Data
sd sd sd sd
Russell, Stuart J. (Stuart Jonathan)
sd sd sd sd
Instructor’s solution manual for artificial intelligence : a modern sd sd sd sd sd sd sd sd
approach (second edition) / Stuart Russell, Peter Norvig.
sd sd sd sd sd sd sd sd
Includes bibliographical references and index. sd sd sd sd
1. Artificial intelligence I. Norvig, Peter. II. Title.
sd sd sd sd sd sd
Vice President and Editorial Director, ECS: Marcia J. Horton
sd sd sd sd sd sd sd sd
Publisher: Alan R. Apt sd sd sd
Associate Editor: Toni Dianne Holm sd sd sd sd
Editorial Assistant: Patrick Lindner sd sd sd
Vice President and Director of Production and Manufacturing, ESM: David W. Riccardi
sd sd sd sd sd sd sd sd sd sd sd
Executive Managing Editor: Vince O’Brien sd sd sd sd
Managing Editor: Camille Trentacoste
sd sd sd sd
Production Editor: Mary Massey
sd sd sd sd
Manufacturing Manager: Trudy Pisciotti
sd sd sd sd
Manufacturing Buyer: Lisa McDowell
sd sd sd sd
Marketing Manager: Pamela Shaffer
sd sd sd sd
c 2003 Pearson Education, Inc.
s d sd sd sd
Pearson Prentice Hall
sd sd sd
Pearson Education, Inc. sd sd
Upper Saddle River, NJ
s d sd sd sd
07458
sd
All rights reserved. No part of this manual may be reproduced in any form or by any means, without
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
permission in writing from the publisher.
sd sd sd sd sd sd
Pearson Prentice Hall R is a trademark of Pearson Education, Inc.
sd sd sd s d sd sd sd sd sd sd
Printed in the United States of America
sd sd sd sd sd sd
10 s d s d 9 8 s d s d 7 6 s d s d 5 4 s d s d 3 2 s d s d 1
ISBN: 0-13-090376-0 sd
Pearson Education Ltd., London sd sd sd
Pearson Education Australia Pty. Ltd., Sydney
sd sd sd sd sd
Pearson Education Singapore, Pte. Ltd.
sd sd sd sd
Pearson Education North Asia Ltd., Hong
s d sd sd sd sd sd
Kong Pearson Education Canada, Inc.,
sd sd sd sd sd
Toronto Pearson Educacio´n de Mexico, S.A.
sd sd sd sd sd sd
de C.V. Pearson Education—Japan, Tokyo
sd sd sd sd sd
Pearson Education Malaysia, Pte. Ltd.
sd sd sd sd
Pearson Education, Inc., Upper Saddle River, New Jersey
sd sd sd sd sd sd sd
,Preface
This Instructor’s Solution Manual provides solutions (or at least solution sketches)
sd sd sd sd sd sd sd sd sd sd
for almost all of the 400 exercises in Artificial Intelligence: A Modern Approach
sd sd sd sd sd sd sd sd sd sd s d sd sd
(Second Edi- tion). We only give actual code for a few of the programming exercises;
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
writing a lot of code would not be that helpful, if only because we don’t know what
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
language you prefer.
sd sd sd
In many cases, we give ideas for discussion and follow-up questions, and we try to
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
explain why we designed each exercise.
sd sd sd sd sd sd
There is more supplementary material that we want to offer to the instructor, but we
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
have decided to do it through the medium of the World Wide Web rather than through a
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
CD or printed Instructor’s Manual. The idea is that this solution manual contains the material
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
that must be kept secret from students, but the Web site contains material that can be updated
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
and added to in a more timely fashion. The address for the web site is:
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
http://aima.cs.berkeley.edu
and the address for the online Instructor’s Guide is:
sd sd sd sd sd sd sd sd
http://aima.cs.berkeley.edu/instructors.html
There you will find:
sd sd sd
Instructions on how to join the aima-instructors discussion list. We strongly sd sd sd sd sd sd sd sd s d sd
recom- mend that you join so that you can receive updates, corrections, notification
sd sd sd sd sd sd sd sd sd sd sd sd sd
of new versions of this Solutions Manual, additional exercises and exam questions,
sd sd sd sd sd sd sd sd sd sd sd sd
etc., in a timely manner.
sd sd sd sd sd
Source code for programs from the text. We offer code in Lisp, Python, and Java,
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
and point to code developed by others in C++ and Prolog.
sd sd sd sd sd sd sd sd sd sd sd
Programming resources and supplemental texts. sd sd sd sd
Figures from the text; for overhead transparencies.
sd sd sd sd sd sd sd
Terminology from the index of the book.
sd sd sd sd sd sd sd
Other courses using the book that have home pages on the Web. You can see
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
example syllabi and assignments here. Please do not put solution sets for AIMA
sd sd sd sd sd s d sd sd sd sd sd sd sd
exercises on public web pages!
sd sd sd sd sd
AI Education information on teaching introductory AI courses.
sd sd sd sd sd sd sd
Other sites on the Web with information on AI. Organized by chapter in the book; check
sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
this for supplemental material.
sd sd sd sd
We welcome suggestions for new exercises, new environments and agents, etc.
sd sd sd sd sd sd sd sd sd sd
The book belongs to you, the instructor, as much as us. We hope that you enjoy teaching
s d sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd sd
from it, that these supplemental materials help, and that you will share your supplements
sd sd sd sd sd sd sd sd sd sd sd sd sd sd
and experi- ences with other instructors.
sd sd sd sd sd sd
iii
,