Question: Question 1 and 2 not a planet. 8901 8, use the perator. ror exalmple, planet(P) would be true if P is 3. A comment at
Question 1 and 2 
not a planet. 8901 8, use the perator. ror exalmple, \planet(P) would be true if P is 3. A comment at the top of the file giving your name and section After you have created your program as they should with the given facts nd, using gprolog on lectura, verified that your rules are working , submit your completed program file(s) using the turnin command on ectura. The submission directory is cs245h4. Instructions are available from the brief turnin tutorial linked to the class web page. (The same tutorial explains one way to get files from your home PC to lectura.) emember to name your database fle planets.pl so that we don't have to guess which file to test. Finally, provide written answers (you can write them after the set answers) to the following questions: 1. Can your siblings(x,y) rule be expressed as a Horn clause? If so, show the resulting Horn clause. If not, explain why not. (Horn Clauses are discussed in the Prolog Tutorial.) 2. Consider this fact/rule pair: power (L,o,1). power (L,M, N) : D is M-1, power (L,D,P), N is PL. This rule demonstrates how Prolog handles basic arithmetic in rules. When presented with the query power (2,5,P) . , Prolog will report that P 32, (Try it!) The underlying idea is that 25-24-2, e definition of exponentiation. In Prolog, "is" serves as the assignment operator, and ANDs are used to produce sequential evaluation of the st When you're convinced that power will indeed compute positive integer powers, answer this question: After reporting the answer, Prolog will ask if you want it to continue searching for answers. If you enter the semicolon, Prolog will crash. Explain why Prolog crashes, in detail. (Don't quote the error message; instead, study the rule and explain why the rule allows the error to occur.) not a planet. 8901 8, use the perator. ror exalmple, \planet(P) would be true if P is 3. A comment at the top of the file giving your name and section After you have created your program as they should with the given facts nd, using gprolog on lectura, verified that your rules are working , submit your completed program file(s) using the turnin command on ectura. The submission directory is cs245h4. Instructions are available from the brief turnin tutorial linked to the class web page. (The same tutorial explains one way to get files from your home PC to lectura.) emember to name your database fle planets.pl so that we don't have to guess which file to test. Finally, provide written answers (you can write them after the set answers) to the following questions: 1. Can your siblings(x,y) rule be expressed as a Horn clause? If so, show the resulting Horn clause. If not, explain why not. (Horn Clauses are discussed in the Prolog Tutorial.) 2. Consider this fact/rule pair: power (L,o,1). power (L,M, N) : D is M-1, power (L,D,P), N is PL. This rule demonstrates how Prolog handles basic arithmetic in rules. When presented with the query power (2,5,P) . , Prolog will report that P 32, (Try it!) The underlying idea is that 25-24-2, e definition of exponentiation. In Prolog, "is" serves as the assignment operator, and ANDs are used to produce sequential evaluation of the st When you're convinced that power will indeed compute positive integer powers, answer this question: After reporting the answer, Prolog will ask if you want it to continue searching for answers. If you enter the semicolon, Prolog will crash. Explain why Prolog crashes, in detail. (Don't quote the error message; instead, study the rule and explain why the rule allows the error to occur.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
