Suppose we define a node to be a pair (Topics, Books) where Books is a list of the books that will make up a customised textbook and Topics is a list of topics that must be covered by the customised textbook but are not already covered by Books. Therefore, a node is only valid if none of the books in Books covers any of the topics in Topics.
Child nodes are obtained by selecting a topic from Topics, then selecting a book that covers this topic, then adding this book to Books and finally removing all of the topics that are covered by this book from the Topics list. For example, if we have the node ([introduction_to_AI, classification],[]) and we select the topic ‘introduction_to_AI’ then the child nodes will be ([],[book3]) and ([classification],[book1]). Thus, each arc in the graph adds one book which covers one or more topics. Suppose that the cost of an arc is equal to the number of pages in the selected book.
The goal is to design a customised textbook that covers all of the topics requested by the teacher, i.e., the topics in list Topics. The start node is (Topics,[]) and the goal nodes have the form ([],CustomisedTextbook), where CustomisedTextbook is a list of books selected from the catalogue. The cost of the path from the start node to a goal node is equal to the total number of pages in the customised textbook, and an optimal customised textbook is one that covers all of the requested topics (i.e., all of the topics in Topics) with the fewest pages.