After reading the scenario below, trace a data-driven execution of the financial advisor for the case of
Question:
After reading the scenario below, trace a data-driven execution of the financial advisor for the case of an individual with four dependents, $18,000 in the bank, and a steady income of $25,000 per year. Based on a comparison of this problem and the example in the text, suggest a generally “best” strategy for solving the problem.
Assume that the individual has two dependents, $20,000 in savings, and a steady income of $30,000. As discussed in Chapter 2, we can add predicate calculus expressions describing these facts to the set of predicate calculus expressions. Alternatively, the program may begin the search without this information and ask the user to add it as needed. This has the advantage of not requiring data that may not prove necessary for a solution. This approach, often taken with expert systems, is illustrated here. In performing a consultation, the goal is to find an investment; this is represented with the predicate calculus expression ∃ X investment(X), where X in the goal variable we seek to bind. There are three rules (1, 2, and 3) that conclude about investments, because the query will unify with the conclusion of these rules. If we select rule 1 for initial exploration, its premise savings_account(inadequate) becomes the subgoal, i.e., the child node that will be expanded next. In generating the children of savings_account(inadequate), the only rule that may be applied is rule 5. This produces the and node: 116 PART II / ARTIFICIAL INTELLIGENCE AS REPRESENTATION AND SEARCH amount_saved(X) ∧dependents(Y) ∧ ¬ greater(X,minsavings(Y)). If we attempt to satisfy these in left-to-right order, amount_saved(X) is taken as the first subgoal. Because the system contains no rules that conclude this subgoal, it will query the user. When amount_saved(20000) is added the first subgoal will succeed, with unification substituting 20000 for X. Note that because an and node is being searched, a failure here would eliminate the need to examine the remainder of the expression. Similarly, the subgoal dependents(Y) leads to a user query, and the response, dependents(2), is added to the logical description. The subgoal matches this expression with the substitution {2/Y}. With these substitutions, the search next evaluates the truth of ¬ greater(20000, minsavings(2)). This evaluates to false, causing failure of the entire and node. The search then backtracks to the parent node, savings_account(inadequate), and attempts to find an alternative way to prove that node true. This corresponds to the generation of the next child in the search. Because no other rules conclude this subgoal, search fails back to the top-level goal, investment(X). The next rule whose conclusions unify with this goal is rule 2, producing the new subgoals savings_account(adequate) ∧ income(adequate). Continuing the search, savings_account(adequate) is proved true as the conclusion of rule 4, and income(adequate) follows as the conclusion of rule 6.
Federal Taxation 2016 Comprehensive
ISBN: 9780134104379
29th edition
Authors: Thomas R. Pope, Timothy J. Rupert, Kenneth E. Anderson