Write, test, and document a program that determines the satisfiability of a set of propositional Horn clauses by forward chaining and that runs in linear time, relative to the size of the input. Use the following data structures: (a) a global variable STACK containing a list of atoms known to be true, but waiting to be propagated forward; (b) for each clause, an atom CONCLUSION, which is the positive literal appearing in the clause (or NIL if the clause contains only negative literals), and a number REMAINING, which is the number of atoms appearing negatively in the clause that are not yet known to be true; (c) for each atom, a flag VISITED indicating whether or not the atom has been propagated forward, and a list ON-CLAUSES of all the clauses where the atom appears negatively. You may assume the input is in suitable form. Include in the documentation an argument as to why your program runs in linear time. (If you choose to use LISP property lists for your data structures, you may assume that it takes constant time to go from an atom to any of its properties.)

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!