Week11 Quiz - ASP

Ace your homework & exams now with Quizwiz!

[ASP] Consider the following ASP program P for 8-Queens. const size = 8. col(1..size). row(1..size). not_in(X,Y) :- row(X), col(Y), col(YY), not eq(Y,YY), in(X,YY). not_in(X,Y) :- row(X), col(Y), row(XX), not eq(X,XX), in(XX,Y). in(X,Y) :- row(X), col(Y), not not_in(X,Y). __________________ %% missing code What is the missing code?

:- row(X), col(Y), row(XX), col(YY), not eq(X,XX), not eq(Y,YY), in(X,Y), in(XX,YY), eq(abs(X-XX),abs(Y-YY)). :- row(X), col(Y), in(X,Y), eq(X,Y). :- row(X), row(XX), not eq(X,XX). :- row(X), col(Y), row(XX), col(YY), not eq(X,XX), not eq(Y,YY).`

[ASP-Eiter] The ASP core language is first proposed by ____.

Gelfond and Lifschitz

[ASP] concept. Consider the following program P1. Which one of the statements is NOT correct? Program P. fly(X) :- bird(X), not abnormal(X). bird(X) :- penguin(X). abnormal(X) :- penguin(X). penguin(tweety).

There are four function symbols.

[ASP] concept. Answer Set Programming is ___.

bottom-up reasoning

[ASP] syntax. This is an example of ___ rule of Answer Set Programming. pass(course) :- 2 {pass(test1), pass(test2), pass(test3)} 3.

cardinality rule

[ASP] syntax. This is an example of ___ rule of Answer Set Programming. {buy(pizza), buy(soda), buy(fruit)} :- at(grocery).

choice rule

[ASP] syntax. This is an example of ___ rule of Answer Set Programming. :- fail(test).

constraint rule

[ASP] syntax. This is an example of ___ rule of Answer Set Programming. const n=10. box(1..n).

fact

[ASP-Eiter] A model I of a program P is _____, if there exists no model J of P such that J ⊂ I.

minimal

[ASP] syntax. Consider ASP syntax for a rule r, as shown below. b1 or . . . or bm ← a1, . . . , an, not an+1, . . . , not an+k Which one of the following selections is NOT correct?

n should be greater than 0.

[ASP] syntax. This is an example of ___ rule of Answer Set Programming. in(X,Y) :- number(X), box(Y), not not_in(X,Y).

normal rule

[ASP-Eiter] Every _____ logic program P has a single minimal model.

positive

[ASP-Eiter] The ____ of a program P w.r.t. an interpretation X, denoted PX, is a program obtained by removing rules with "not a" in the body for each a ∈ X, and then removing literals "not a" from all other rules.

reduct

[ASP-Eiter] An interpretation M of P is a(n) ____ model of P , if M is the least model of P M

stable

[ASP] syntax. This is an example of ___ rule of Answer Set Programming. 10 {course(db)=6, course(ai)=6, course(xml)=3} 20

weight rule


Related study sets

Communicating in Today's Air Force

View Set

Quiz 19 Technology Management - cp

View Set

Chapter 20 & 21: ECON study questions

View Set

Lewis: MED-SURG: Chapter 50: Endocrine Problems, Lewis Chapter 48, Endocrine, Lewis Chapter 50, Lewis: Chapter 50: Endocrine Problems, Lewis: Chapter 50 : DI & SIADH, Lewis: Chapter 50, Endocrine: Lewis: chapter 50, Lewis Ch 50 Nursing Management: En...

View Set

FIN 1115 01---Personal Finance Question Set #3: Financial Instruments & Institutions

View Set

A&P- Chapter 5: The Integumentary System

View Set