• Nenhum resultado encontrado

complexity, expressivity, inference The joy of Probabilistic Answer Set Programming: Semantics, International Journal of Approximate Reasoning

N/A
N/A
Protected

Academic year: 2022

Share "complexity, expressivity, inference The joy of Probabilistic Answer Set Programming: Semantics, International Journal of Approximate Reasoning"

Copied!
22
0
0

Texto

(1)

Contents lists available atScienceDirect

International Journal of Approximate Reasoning

www.elsevier.com/locate/ijar

The joy of Probabilistic Answer Set Programming: Semantics, complexity, expressivity, inference

Fabio Gagliardi Cozman

a,∗

, Denis Deratani Mauá

b

aCenterforArtificialIntelligence(C4AI)andEscolaPolitécnica,UniversidadedeSãoPaulo,Brazil

bCenterforArtificialIntelligence(C4AI)andInstitutodeMatemáticaeEstatística,UniversidadedeSãoPaulo,Brazil

a rt i c l e i n f o a b s t ra c t

Articlehistory:

Received31December2019 Receivedinrevisedform14May2020 Accepted17July2020

Availableonline31July2020

Keywords:

Logicprogramming AnswerSetProgramming Probabilisticprogramming Credalsets

Computationalcomplexity Descriptivecomplexity

Probabilistic Answer Set Programming (PASP) combines rules, facts, and independent probabilisticfacts.Wearguethataveryusefulmodelingparadigmisobtainedbyadopting aparticular semanticsfor PASP,where one associatesacredal set witheachconsistent program. We examine the basic properties of PASP under this credal semantics, in particularpresentingnovelresultsonitscomplexityanditsexpressivity,andweintroduce aninferencealgorithmtocompute(upper)probabilitiesgivenaprogram.

©2020ElsevierInc.Allrightsreserved.

1. Introduction

Combinations of probabilities and rules have been investigated for decades under the banner of “probabilistic logic programming”.MostresearchandpracticehasgraduallyconcentratedonSato’sdistributionsemanticsanditsvariants.The keyideainSato’sdistributionsemanticsistohaveprobabilitiesassociatedwithasetofindependenteventsinsuchaway thatauniqueprobabilitymeasureisinducedoverallinterpretationsofgroundatoms.

However,ifwetrytoapplySato’sstrategytogeneralanswersetprograms,thedistributionsemanticsfailstoguarantee the specification of a single probability distribution over ground atoms under the usual two-valued logic. One possible solutionistoextendSato’ssemanticssothatsetsofprobabilitymeasurescanbespecifiedbyanswersetprograms.

ThemaingoalofthispaperistoshowthatProbabilisticAnswerSetProgramming(PASP)offersanelegantandenjoyable modelinglanguagewhencoupledwithaparticularsemanticsbasedonsetsofprobabilitymeasures.Assuchsetsareoften referred toascredalsets,werefertothelatterextendedsemanticsasthecredalsemantics.Insteadoflookingatthecredal semantics of PASPmerely asa wayto lendmeaning to pathologicallogic programs that defy Sato’ssemantics, herethe credalsemanticsisviewedasaprobabilisticprogrammingparadigmthatgoesbeyondexistingmodelinglanguages.Inshort, we proposeaprogrammingstylewhereonecanaskquestionsaboutprobabilitydistributionssatisfyingsetsofconstraints.

Asimilar movementhappenedsometwentyyearsago inlogicprogramming,whenitbecameclearthatthestablemodel semanticswasnotjustastrategytohandlepathologicalprograms,butinfactanattractiveprogrammingparadigminitself.

We alsoexaminesome keypropertiesofPASP.Wedevelop analoguestocombinedanddatacomplexity thattake into accounttheprobabilisticcharacterofPASP.WederivethedescriptivecomplexityofPASP,provinginessencethatitcaptures

*

Correspondingauthor.

E-mailaddress:fgcozman@usp.br(F.G. Cozman).

https://doi.org/10.1016/j.ijar.2020.07.004

0888-613X/©2020ElsevierInc.Allrightsreserved.

(2)

the class PP

p

2; that is, the class of polynomial nondeterministic Turing machines that count accepting paths with the supportofNPNPoracles.

Finally, we introduce an inference algorithm that calculates upperprobabilities given a PASP program. The algorithm uses the fact that answer set programs can be translated intosatisfiability problems, andbuilds upon existing counting techniquesforextendedsatisfiabilityproblems.

Thepaperisorganizedasfollows.Section2reviewsbasicconceptsoflogicprogramming,andfixessomeneededtermi- nologyandnotation.Section3surveystherelevantliteratureonprobabilisticlogicprogrammingfromaparticularhistorical perspective.Section4discussestheproposedprogrammingparadigm.Section5examinespropertiesofPASPandSection6 presentsourinferencealgorithm.AfewconcludingcommentsarecollectedinSection7.

2. AbitofAnswerSetProgramming

In this section we present relevant syntactic and semantic notions related to Answer Set Programming (ASP). More detailedtechnicaldiscussioncanbefoundinRef. [28].

Inthispaperweemployatoms,whereanatomiswrittenasr(t1,. . . ,tk)withrapredicateofaritykandeachtj either aconstantoralogicalvariable.Wedonotusefunctionsinthispaper.Anatomwithoutvariablesisagroundatom.Aliteral iseitheranatom r(t1,. . . ,tk)wherer isapredicateofarityk andeachti iseitheraconstantoralogicalvariable,oran atomprecededby¬(thenwesaytheatomisstronglynegated;thelogicalvalueoftheexpressionisgivenbyusualBoolean negation).

AnASPprogramisasetofrulessuchas H1

∨ · · · ∨

Hm

:−

S1

, . . . ,

Sn

.,

whereeach Hi isa literal,each Sj iseitheraliteral A oraliteral A precededby not(thatis,notA),andm+n>0.The expression H1∨ · · · ∨Hmiscalledtheheadoftherule,andS1,. . . ,Sn isthebody;each Si iscalledasubgoal.Forinstance, hereisarulemeaningthatifsomeindividual X isanodethatisnotknowntobebarred,then X isredorgreenorblue:

red

(

X

)∨

green

(

X

)∨

blue

(

X

) :−

node

(

X

),

notbarred

(

X

)..

Ifarule issuchthat m1,itissaid tobe nondisjunctive;ifm=1 it issaid tobenormal. Arulewithm=0 iscalleda constraint.Anexampleofconstraintis:

:−

edge

(

X

,

Y

),

red

(

X

),

red

(

Y

).,

meaning that two adjacent nodescannot both be colored red. Anormal rule withn=0 is calleda fact,and instead of writingH:−

.

,wejustwrite H

.

.

Thedependencygraphofaprogramisagraphwhereeachgroundedatomisanode,andwhere,foreachgroundedrule, there are edges from the atomsin the body to the atomsin the head.The edge isnegative ifthe atom is the body is preceded by not(for some rule), andispositive otherwise. An acyclicprogramis a program withan acyclicdependency graph.

Aprogramwithnormalrulesissaidtobenormal.Aprogramthatisnormalandcontainsnonotandno¬issaidtobe definite.Aprogramisstratifiedifandonlyifthereisnocycleinthedependencygraphthatcontainsanegative edge(that is,anedgethatgoesthroughanegation).Everydefiniteprogramisstratified.Apropositionalprogramisaprogramwithout logicalvariables.

The Herbrandbase of aprogram is the setof groundliterals(ground atomsand their stronglynegated versions) that canbe producedbycombiningall predicatesandconstants intheprogram.Aninterpretationisa consistentsubsetofthe Herbrandbaseoftheprogram(thatis,itdoesnotcontainanatomanditsstrongnegation).Agroundliteralistrue(resp., false)withrespecttoaninterpretationwhenitis(resp.,isnot)intheinterpretation.Similarly,agroundsubgoal A,where A isagroundliteral,istrue(resp.,false)withrespecttoan interpretationwhen A is(resp.,isnot)inthe interpretation, whilenotA istrue(resp.,false)when Aisnot(resp.,is)intheinterpretation.Itisworthexaminingthesemanticsofnot:

intuitively,notA meansthatliteral A isnotknownexplicitlytobetrue(infactwemayhavenot¬Awhere A isanatom, meaningthatatom A isnotknownexplicitlytobefalse).Agroundruleissatisfiedbyaninterpretationifandonlyifeither someofthesubgoalsinthebodyarefalseorallthesubgoalsinthebodyandsomeoftheliteralsintheheadaretruewith respecttotheinterpretation.Inthatdefinitionwe assumethattheheadofaconstraintisneversatisfied(i.e.,aconstraint issatisfiedifandonlyifsomeofitssubgoalsarefalse).

Amodelofaprogramisaninterpretationthatsatisfiesalltherulesoftheprogram.AmodelIofaprogramisminimal ifandonlyifthereexistsnomodelJ oftheprogramsuchthatJI.

Every definite program has a unique minimal model; henceit isnatural to take this model asthe semantics of the program.Withnegation,theremaybenouniqueminimalmodel,andthereareseveralproposedsemantics [18].

The stablemodel semantics isbased on reducts,definedasfollows. Givena program P and an interpretation I, their reductPI isthepropositionalprogramobtainedbyfirstremovingallgroundedruleswithnotA intheir bodyand AI, andthenby removing eachsubgoal notA fromallremaining groundedrules. AstablemodelofP is aninterpretation I

(3)

that isaminimal modelofthereductPI.ThesetofstablemodelsisthesemanticsofP.Notethataprogrammayfailto haveastablemodel:anexampleisthesingle-ruleprogram A:−notA

.

.

Intuitively:ifwethinkofaninterpretationasthesetofatomsthat areassumedtrue/false,thenthestablemodelsofa programarethoseinterpretations that,onceassumed, areagainobtainedbyapplyingtherulesoftheprogram.Thestable modelsofalogicprogramareitsanswersets.

Answersets were proposed asa newprogrammingparadigm in1999[68,78],whereone writesdown rulesandcon- straints thatcharacterizeaprobleminsuchawaythatanswersetsaresolutionsoftheproblem.Solversthat findanswer setsforASParenowpopular,usuallyoperatingwithina“Guess&Check”methodology.Theideaistousedisjunctiverules to guess solutions nondeterministically, andconstraints to check whether interpretations are actually solutions [48]. An exampleshouldillustratetheidea.

Supposewearegivenagraph,encodedbyspecifyingitsnodesandedges,saynode(n1)

.

,node(n2)

.

,. . . ,edge(n1,n2)

.

,. . .. The followingprogram assertsthateach nodemust haveonecolor,andthat notwo adjacentnodesmaysharethesame color:

red

(

X

)

green

(

X

)

blue

(

X

) :−

node

(

X

).

:−

edge

(

X

,

Y

),

red

(

X

),

red

(

Y

).

:−

edge

(

X

,

Y

),

green

(

X

),

green

(

Y

).

:−

edge

(

X

,

Y

),

blue

(

X

),

blue

(

Y

)..

Any answer set forthe above programis a three-coloring; failure to havean answer setsignals failure tohave a three- coloring. One can think of the program asfirst guessing a colorfor each node, and then checking whetherthe required constraintisrespected.

PopularASPpackageshaveadditionalfeaturessuchasaggregates[29].Weavoidthesefeatureshereastheywouldtake ustoofar.

3. FromtheoriginsofPrologtothecredalsemantics

Inthissectionwereviewsomeofthehistorybehindprobabilisticlogicprogramming,emphasizingdesigndecisionsthat havegraduallymovedinthedirectionofthecredalsemantics.Thereaderwhowishestoskiphistoricalmattersmayjump tothenextsection.

3.1. Mixinglogicprogramsanduncertainty

Alargepartoflogicprogramming,whoseoriginscanbetracedbacktothesixties[55],isbasedonrulessuchas:

H

B1

B2

∧ · · · ∧

Bn

,

(1)

whereall HandBiareatoms.ProgramswithrulessuchasExpression(1) haveasingleminimalmodel.

During theseventies rules were enlargedwithnegation asfailure,where each atom Bi inExpression (1) mayappear negatedasnotBi.Therewasthenalongdebateonthebestsemanticstoadoptinthepresenceofnegationasfailure.

Another relevant feature of the seventies was the gradual development of expert systems, many of them based on rules. OnenotableexpertsystemwasMYCIN,where“certainty factors”werecoupledtoif-thenrules,onthegroundsthat probability theory would face difficulties against scarce data and uncertaininformation [94].1 The same term“certainty factor”wasusedbyShapiroin1983toattachnumberstoatomsinProlog-stylerules[93],latertobegivenaprobabilistic interpretation [52].Sayforinstancethat asingle rule ABC ispresentwithboth B andC getting0.5; thentherule assigns 0.25 to A.

During theeightiesvarious facetsofuncertaintywere capturedby“annotated”extensionsoflogic programming,often withconnectionstopossibilisticandfuzzylogics[53,100].Thetypicalannotatedlogicrulehassyntax:

H

: ν

B1

: μ

1

B2

: μ

2

∧ · · · ∧

Bn

: μ

n

,

(2)

with H and each Bi as before, perhaps with negation in the body, while

ν

and each

μ

i are annotations. Usually the annotations arenumbers,butmanyotherpossibilitieshavebeencontemplated;forinstance,annotationsmaybeintervals carryingbeliefandplausibilityasprescribedbyDempster-Shafertheory[105].

At the cost of sacrificing some chronological consistency, in the remainder of this section we review a long line of proposalsthatmixrulesandprobabilityintervals.

A notable approach by Ng and Subrahmanian appeared in 1992 [76] by pursuing interval-valued annotations. They considered annotatedclauses asin Expression (2), butwhere annotations are probability intervals. If A: [0.2,0.3] is an

1 ThesemanticsofcertaintyfactorsgeneratedmuchdebateandeventuallywaslinkedtoDempster-Shafertheory[40],whereeacheventisassociated withanintervalbetweenitsbeliefanditsplausibility.ThebelieffunctionsemployedinDempster-ShafertheoryareinfinitelymonotoneChoquetcapacities, objectsthatwillbeimportantlaterinthispaper.

(4)

annotatedatom,theintendedreadingis“The probabilityof A belongstotheinterval[0.2,0.3]”.TouseanexamplebyNg andSubrahmanian,thefollowingannotatedclause

path

(

X

,

Y

) : [

0

.

85

,

1

] ←

connect

(

X

,

Z

) : [

1

,

1

] ∧

path

(

Z

,

Y

) : [

0

.

75

,

1

]

saysthatifthereisaconnectionbetweenX and Z,andapathfromZ andY withprobabilityatleast0.75,thenthereisa pathbetweenX andY withprobabilityatleast0.85.NgandSubrahmanianstudiedthemodelsofsuchannotatedclauses andtechniquestocomputeprobabilityintervals,inworkthatwaslaterexpandedinmanydirections[95].

LakshmananandSadriproposedasomewhatintimidatingsyntaxforrules [56]:

H

←−−−−−−

[a,b],[c,d] B1

B2

∧ · · · ∧

Bn

,

where [a,b] conveys the “belief” in favor of H and [c,d] conveys the “doubt” against H, both of them endowed with probabilisticmeaning.AmorerecenteffortbyDekhtyarandSubrahmanianinvestigatedhybridprobabilisticprograms,where onecanspecifyrelationsofdependenceorindependenceaswellasoperationstocombineprobabilitiesinannotatedrules [23].

We must also mention the probabilistic logic programmingscheme proposed by Lukasiewicz [63], where the syntax (H|B)[a,b] is used to indicate that the conditional probability of H given B is in [a,b]. Thus each “rule” is in fact a constraintonconditionalprobabilities.Similarly, anotherresearchprogram thatstartedduring thenineties[42,51] looked intorulesoftheform

H

←−−

[a,b] B1

B2

∧ · · · ∧

Bn

,

where a and b are interpreted respectively as lower andupper bounds on conditional probabilities for the head given thebody.ThatworkemphasizedindependencerelationsandconnectionswithBayesiannetworks(eventuallyinvestigating Bayesiannetworksendowedwithprobabilityintervals[96]).

3.2. Thepathtothedistributionsemanticsanditscloserelatives

Dantsinproposedin1990todividealogicprogramintwoparts[17].ThefirstpartconsistsofasetofrulesasExpression (1), enlargedwithnegation asfailure.The second partconsistsoffactsthatare associatedwithprobabilities (referredto asuncertainclauses). Atthe time therewas considerable debateover thesemantics ofnegation, thus tosimplify matters Dantsinassumedthatclauseswerestratified.2 Dantsinshowedthatthemaximumentropydistributionoveruncertainfacts is a product measure that makes all uncertain facts independent (Dantsin adopted maximum entropy as suggested by Nilssonin the context of probabilistic logic [79]).This single product probability measure inturn induces a distribution over allgroundatoms, giventhat therules arestratifiedandthus inducea single truth-valueassignment overthe(non- uncertain) atoms.Hence every programwithin Dantsin’sguidelinesspecifiesa single probabilitymeasure overall ground atoms.

Pooleproposed,in1991,alanguageconsistingofrulesandassumables,wherean assumableisanatomassociatedwith aprobabilityvalue [81].Theassumablesaretakentobeindependent,thusaproductprobabilitymeasureisimposedover them.PooleshowsthatsuchalanguagecanspecifyBayesiannetworks,insome casesproducingverynaturaldescriptions.

Thisschemewas refined byPoole ina veryinfluential1993paper,withaddedmaterial onabduction, explanations,cau- sation[82].3 AcriticaldecisioninPoole’soriginal proposalwas tofocuson setsofrules wheredependenciesoveratoms are acyclic(hencestratified),thus guaranteeingthat anyselection ofassumables inducesa singleminimalmodelover all groundatoms.Consequently,theproductprobabilitymeasureoverassumablesinducesasingleprobabilitymeasureoverall groundatoms.Consideratrivialexample,writteninasimplesyntax.Supposewehaveassumables A,B,C withassociated probabilities

P(

A

) =

0

.

2

, P(

B

) =

0

.

4

, P (

C

) =

0

.

6

,

andrules

D

A

B and D

B

C

.

ThenD istruewheneverAandBaretrueorBandCaretrue;thatis,P(D)=0.0.4+0.0.6−0.0.0.0.6= 0.3008.

SimilarideaswerepursuedalmostsimultaneouslybyFuhrandbySato.

2 Wediscussstratifiedprogramslater;fornowitsufficesto saythatastratifiedprogramhasasingleminimalmodelthatassignseithertrueorfalseto everygroundatom.

3 Recentworkhasreturnedtoabductiontechniquesinthecontextofprobabilisticlogicprogramming[98].

(5)

Fuhr’s Probabilistic Datalog4 [33] usedstratified rules andallowed for additional groundfacts to be associated with probabilitiessuchas

0

.

9 indterm

(

d1

,

db

).

Fuhrassumesthatthesefactsareindependent,sotheybehaveasDantsin’suncertainfactsandasPoole’sassumables,thus inducingasingleprobabilitymeasureoverallinterpretationsofgroundatoms.

Likewise, Satoproposedtohavetwodistinct setsofsentences[90].Oneofthemconsistsofusualrules.Theothercon- sistsofrandomfactsthatareatomsassociatedwithprobabilityvalues.Sato’sdistributionsemanticsprescribesthefollowing interpretation. Eachrandomfactis associatedwithaswitch; theseswitches areindependentandthey selectoneofa set ofassociated randomfactswithits prescribedprobability.Thus wehaveaproduct probabilitymeasure overselectionsof random facts. Foreach such selection, we obtain a complete logic program (selected factsplus original rules). Thus the product probability measure over switches induces a probability measure over programs. As Satodid not use negation, each realizationofrandomfactsproducesasingle minimalmodel,henceanyprobabilisticlogic programinduces asingle probability measure. Satoimplemented hisdistribution semanticsinthe popularPRISM package [91],andhis ideaswere graduallyadoptedbymostoftherelatedliterature.

It is perhaps fairto say that Dantsin, Poole, Fuhr, and Sato proposed the same overall strategy to guarantee that a probabilisticlogicprogramspecifiesasingleprobabilitymeasure.However,toguaranteeuniquenesstheyemployeddifferent assumptions;Satodiscardednegation,whilePooledemandedacyclicity,andDantsinandFuhrrequiredstratification.

3.3. Probabilisticrelationalmodelsandprobabilisticinductivelogicprogramming

The ninetiesalsowitnessedagrowing,andeventuallyexplosive, interestinprobabilisticmodelsspecifiedby relational means, withparticular interest in enlargingBayesian networks withthe abilityto handle uncertaintyover relations and individuals. Startingfromtemplate-basedlanguages [5,37,45,66,106],manyspecificationschemesweredevised byimport- ing features offirst-order logic.The term“ProbabilisticRelational Model”(PRM) was coined[32,54];relatedspecification languageswerevariouslydiagramatic[44] ortextual,sometimesrelyingonlogicprogramming—ruleswereusedprimarily astemplatespecificationdevices[11,16,30,38,50].Therearealsousefullanguagesbasedonfunctionalprogramming[39,46]

that arelesscloselyrelatedtothetopicofthispaper.Thevastensuingliteraturewasunitedinonepurpose:tofindways tospecifyasingle probabilitydistribution,preferablyonethatcouldbeviewedasaBayesianoraMarkovnetwork,froma set ofpredicatesandindividuals. Recentlythere havebeeneffortstoanalyzecomplexity ofsuchlanguagesinan abstract manner[14].Therewasparticularexcitementaroundlearningtechniquesforthesemodels.Severalexcellentsurveysabout thatmaterialareavailable,someinbookformat[12,36,49,71,85,99].

Interestinlearningprobabilisticlogicprogramsalsosurgedafter1995,oftenunderthebannerof“ProbabilisticInductive Logic Programming”. Many such learning techniques gravitatedaround the distribution semantics, while others contem- platedalternativesemantics basedonprobabilitiesoverproofs. Againtheliterature isvastbutthereare excellentsurveys available,severalinbookformat[20,21,88,89].

As a digression, we mentionan idiosyncraticproposalthat appeared in themid-nineties: NgoandHaddawy’s combi- nation of annotated rules andprobabilistic relational assessments [77], where one can use probabilisticsentences of the form

(P(

H0

|

H1

, . . . ,

Hm

) = α )

B1

B2

∧ · · · ∧

Bn

,

whereeach Hi is(inessence)anatom,andeachBjis(inessence)anatompossiblyprecededbynegation[77].Intuitively, theprobabilisticsentencereads“ifthecontextgivenbytheconjunctionB1...Bn holds,thentheconditionalprobability for H0 holds”. Theyintroduced assumptions ofindependenceand combiningfunctionsto merge informationfromtwo or moreruleswithidenticalheadsandnon-independentbodies.Theproposalwasveryrichandrequiredheavymachineryto produceinferences.

3.4. Theevolutionandthechallengesofthedistributionsemantics

Through the morethantwenty yearsofthe distributionsemantics,several languageshavebeenproposed andseveral implementationshavebeenreleased.(Duringthattime,AnswerSetProgrammingmatured,firstthroughtheconsensusover the semanticsfornegation[34,101],thenover disjunctiveprograms [72],andalsooveradditionalfeatures suchasstrong negation[28].)

Alanguagethat emergedaround2007,andwhoseconventionsandsyntaxwelateradopt,isProbLog[31].ProbLoghas beenimplementedinafreely availablepackagewithexcellentinterface andstate-of-artinferencealgorithmsforstratified probabilisticlogicprograms.

4 Datalogdoesnotallowfunctions.Asnotedalready,wedonotallowforfunctionsinthispaper.

(6)

Anotherexampleofevolutionwithinthedistributionsemantics isthelanguage ofLogicProgramswithAnnotatedDis- juctions(LPADs),wherearuleiswrittenintheform[103]:

H1

: ν

1

;

H2

: ν

2

; . . . ;

Hm

: ν

m

B1

B2

∧ · · · ∧

Bn

,

where all Hi and Bj are asbefore (each Bj maybe preceded by negation), and the

ν

i are probability values that add up toone.The interpretationissimple: ifthebodyis satisfied,then an atominthe headisselectedwiththeassociated probability.Anddespiteitsapparentdistancefrompreviouslanguages,LPADscanbetranslatedintoProbLog,thussatisfying thedistributionsemantics[87].Itisnotnecessarytogooverotherextensionshere,speciallybecausetheexcellenttextbook byRiguzzi [87] presentsadetailedpictureofthe state-of-artinprobabilisticlogic programmingbasedonthedistribution semantics.

However,despiteall ofthisprogress,thedistributionsemantics stillhasaweakspot.Forthedistributionsemanticsto yielda probabilitymeasurewe musthavealanguage suchthat anyrealizationofrandomfactsproduces alogicprogram withasingle minimalmodel.Ifonehasrulesthat containnegationandthatarenotstratified,aprogrammayhavemany minimalmodels,ornomodel;thenonecannotgenerateasingleprobabilitymeasure.Riguzzireservestheadjective“non- sound” forprobabilistic logic programs that, for atleast one realizationof the randomfacts, havemore than one orno minimalmodels.

Refinedassumptionsortechniqueshavebeenproposedtogobeyondacyclicandstratifiedlogicprograms[43,83,84,86, 91,92],eitherbykeepingrestrictions thatavoidthe“non-sound”status,orbyresortingto three-valuedsemantics. Inthis latterscheme,we shouldallowthree truth-valuestobe associatedwithatoms:“true”,“false”, “undefined”.The extentto which one can makesense ofthe mixturebetween probabilities andundefinedvalues is unclear[13].We prefer not to followthisroute.

Mattersgetmorecomplicatedforthedistributionsemanticswhenoneconsidersdisjunctiveheads.Thereisoverwhelm- ingsupport infavorofanswersetsemantics fordisjunctive heads,andeventhesimplestlogicprograms withdisjunctive headsyieldseveralanswersets.ThusadirectextensionofSato’ssemanticstoAnswerSetProgrammingseemselusive.

Thereareafewformalismsthatdealwithseveralanswersetsperrealizationofrandomfactsbysomehowselectingone probability measureover theanswersets.This ideaispursued intheP-log language [6], whereauniformdistributionis adoptedover answersets whenevermorethan oneanswer setisproduced. Anotherstrategyisadopted bythe language LPM LN,where a unique Markovrandom field is always generated overall ground atoms [58,59]. The challenge there, of course, isto justifythe selectionof a particularprobability measure. ThePrASPlanguage, a flexible formalism that even allowsfirst-ordersentencesandinterval-valuedprobabilisticrules,employsmaximumentropytoselectasingledistribution [74].TheuseofPrASPtorepresentavarietyofscenarioshasbeenexploredusingafull-fledgedimplementation[75].

3.5. Semanticsbasedoncredalsets

The semantics for logic programs (with disjunctive heads, negation, cycles) we explore in this paper comes from a proposalbyLukasiewicz[64,65].Theideaissimple:ifaprobabilisticlogicprogramissuchthatithasmorethanaminimal model for some realization of the random facts, we simply build the credal set consisting of all possible distributions inducedby theproductmeasureoverrandom facts.Anexampleisperhapsthebestwaytoclarify thisidea [13,Example 9];weformalizethecredalsemanticslater.

Example1.Supposewehavearandomfact Aassociatedwithprobability0.3,andrules S

:−

notW

,

notA

.,

W

:−

notS

..

Thislogicprogramisnotstratifiedanditfailstohaveadistributionsemantics.Withprobability 0.3, A isincludedinthe program;usingthestablemodelsemanticsdefinedlater, theresultinglogicprogramhasasinglemodelwhereW istrue andS isfalse.Andwithprobability0.7, Aisnotincludedintheprogramandisfalse;thenwegettwomodels,onewhere W istrueand S isfalse, andanotherwhere W isfalseand S istrue.Thus P(A=true)=0.3 butP(W=true)∈ [0.3,1] and P(S=true)∈ [0,0.7]. In fact all probability measures that satisfy both the probabilistic fact and the rules can be parameterizedas

P(

A

=

true

) =

0

.

3

, P (

W

=

true

) =

0

.

3

+

0

.

7

α , P (

S

=

true

) =

0

.

7

(

1

α ),

for

α

∈ [0,1].

Thissemanticswasreferredtosimplyasthe“stablemodel”semanticsby Lukasiewicz,butthisisperhapsconfusingas theanswersetsemanticsisassociatedwith(pure)logicprograms.Weinsteaduse“credalsemantics”,inspiredbytheterm

“credalset”[60].

Wehavepreviouslystudiedthecomplexityofinferencesunderthecredalsemantics [13];inthatinvestigationwehave studiedthecredalsemantics undermanyfeaturesofAnswerSetProgramming,suchasdisjunctive heads, strongnegation, andevenaggregates[69].

(7)

Despitetheflexibility ofthecredalsemantics,one mightaskwhetheritisonlya technicaldeviceto lendmeaningto pathologicalprobabilistic logicprograms.The mainpurposeofthispaperistoshowthat thecredalsemanticsallowsone tospecifyandtosolveinterestingproblems.

To conclude this section, we note that relatedinterest incredal sets can be found in recent literature;for instance, Michelsetal. [70] considera languagewhosesemantics alsoreliesoncredalsets,eventhoughthey arebuiltindifferent ways.Similarly,AntonucciandFacchini [1] enlargePoole’slanguagetoallowformoregeneralspecification,thiswayobtain- ingasemanticsbasedoncredalsets.AnevenmoreambitiouslanguageisexploredbyDekhtyarandDekhtyar [22] asthey inessencecombineNgandSubrahmanian’sannotatedlogic [76] withdisjunctiveheads—thusobtainingverygeneralsets ofprobabilitymeasuresassemantics.

4. ThejoyofProbabilisticAnswerSetProgramming

In thissection we explore Answer Set Programming enriched with the idea that probabilities are associated with a selected number offacts. We adoptthe conventionsandsyntax of the ProbLog package [31]. Thus we refer to thefacts associatedwithprobabilitiesasprobabilisticfacts;theyinessencecorrespondtoSato’srandomfacts.

Aprobabilisticfactconsistsofanatom A associatedwithaprobability

α

,assumedtobearationalnumberin[0,1];the probabilisticfactiswrittenasfollows:

α ::

A

..

Aprobabilistic factmaycontainlogicalvariables; forinstancewe maywrite 0.25::edge(X,Y)

.

.Ifwethen haveconstants node1andnode2,thelatterprobabilisticfactcanbegroundedinto

0

.

25

::

edge

(

node1

,

node1

).,

0

.

25

::

edge

(

node1

,

node2

).,

0

.

25

::

edge

(

node2

,

node1

).,

0

.

25

::

edge

(

node2

,

node2

)..

ProbabilisticAnswerSetProgramming(PASP)dealswithprogramsconsistingofprobabilisticfacts,probabilisticfacts,and rules.InProbLog,theinterpretationoftheprobabilisticfact

α

::A

.

isasfollows:withprobability

α

,theprobabilisticfactis replaced bythefact A

.

;withprobability1−

α

,theprobabilisticfactissimplyremovedfromtheprogram.Thissemantics inducesaprobabilitydistributionoverlogicprograms.

However,adifferentsemanticsforprobabilisticfactsisadoptedinthispaper,where:

weadd A

.

totheprogramwithprobability

α

;and

weadd¬A

.

totheprogramwithprobability1−

α

. WediscusstherationaleforthissemanticsinSection4.3.

So,take thesetofprobabilisticfactsoftheprogramofinterest,andgroundthemasneededtoobtainasetofground probabilistic factsF= {

α

i::Ai

.

}iI.Atotalchoice θ isasubset oftheselatterprobabilisticfacts. Oncewecollectthefacts fromθ andthe stronglynegatedfactsfromF\θ,andaddthemto thefactsandrulesoftheoriginal program,weobtain an ASPprogram.So,ifwehave N groundprobabilisticfacts,wehave2N totalchoices,andwe thushave2N possibleASP programs. Theremainingbitistodefine theprobability ofeachtotalchoice(hencetheprobabilitythat eachASPprogram isgenerated),butthisissimpleenough:groundprobabilisticfactsaresupposedstochasticallyindependent,hence

P (θ ) =

i:(αi::Ai)∈θ

α

i

i:(αi::Ai) /∈θ

(

1

α

i

)

.

(3)

NowsaythataPASPprogramisconsistentifandonlyifthereisatleastoneanswersetforthelogicprogramgenerated byeachtotalchoiceofprobabilisticfacts.

Definition1.AprobabilitymodelforaconsistentPASPprogramisaprobabilitymeasureP overinterpretationsoftheground atoms ofthe program,such that for each totalchoice θ we have P(θ ) givenby Expression(3) andP(·|θ ) aprobability distributionovertheanswersetsinducedbyθ.

Definition2.ThecredalsemanticsofaPASPprogramisthecredalsetofallitsprobabilitymodels.

Underthecredalsemanticswecannotnecessarilyassociateeachgroundatom Awithasharpprobabilityvalue.Instead, wecanassociate A withalowerprobabilityP(A)andanupperprobabilityP(A).Thelowerprobabilityistheinfimumover all probabilityvaluesfor A,forallpossibleprobabilitymodels;likewise,theupperprobabilityisthesupremumoverthese probabilityvalues.

(8)

θ2

θ1

.. .

Fig. 1.Thecredalsemantics.Thesetoftotalchoicesisshowntotheleft;thereisasingleproductprobabilitymeasureoverthem.Eachtotalchoicedefines anASPprogramthatmapstoasetofanswersets,showntotheright:totalchoiceθ1mapstothreeanswersets,θ2totwoanswersets,andsoon.

0.01::trip

.

0.5::smoking

.

tuberculosis:−trip,a1

.

0.05::a1

.

tuberculosis:−nottrip,a2

.

0.01::a2

.

cancer:−smoking,a3

.

0.1::a3

.

cancer:−notsmoking,a4

.

0.01::a4

.

or:−tuberculosis

.

or:−cancer

.

test:−or,a5

.

0.98::a5

.

test:−notor,a6

.

0.05::a6

.

trip smoking

tuberculosis cancer

or

test

Fig. 2.Left:AnacyclicPASPprogram,basedonapopularBayesiannetwork [57].Right:theacyclicdependencygraphoftheprogram(exceptauxiliary predicates);thegraphisalsothestructureofthecorrespondingBayesiannetwork.

Thefollowingresultwillbeusefullater.5Basically,itclarifiesthestructureofthecredalsemanticsbyconnectingitwith thetheoryofinfinitelymonotoneChoquetcapacities[2,73].

Theorem1.SupposewehaveaPASPprogramwhosesemanticsisacredalsetK.Then:1)thelowerprobabilitywithrespecttoKis aninfinitelymonotoneChoquetcapacity;2)Kisthelargestcredalsetdominatingthiscapacity;3)Kisclosedandconvex.

Proof. Referto Fig.1: wehave aspaceendowedwitha single probability distribution,andamulti-valued mappinginto asecond space. ResultsfromthetheoryofChoquetcapacitiesthen leadtothedesiredrepresentationthroughcredalsets [2,73].

OnevaluableconsequenceofTheorem1isthat weimmediatelyobtainexpressionsforlower/upperconditional proba- bilities byapplyingwell-knownresultsfromthetheory ofinfinitelymonotoneChoquetcapacities.We have,foreventsA andB:

P(

A

|

B

) = P (

A

B

) P (

A

B

) + P(

Ac

B

) , P(

A

|

B

) = P (

A

B

)

P (

A

B

) + P(

Ac

B

) .

Theseexpressionsholdbecausewiththemulti-valuedmappingintheproofofTheorem1wecanplaceasmuchprobability as possible in AB by removing as much probability as possible from AcB (and vice-versa). In fact, P(AB)+ P

AcB

isthevalueofP(B)fortheprobabilitymeasureP thatattainsP(A|B),aresultweuselater.

Intheremainder ofthissection weshow howthecredalsemantics ofPASP canbeused torepresentmanynontrivial probabilisticproblems.Westartwithnondisjunctiveacyclicprograms,averysimpleandwell-knowncase.Wethenlookat nondisjunctivestratifiedones,andthenfacethegeneralcase.

4.1. Nondisjunctiveacyclicprograms

The shortnondisjunctive PASPprogram inFig.2 isacyclic.Because itis acyclic,thepropositional programin Fig.2is quiteeasytoread,asitsprobabilisticfactsandrulestranslatedirectlyintoprobabilities.Theprobabilitiesareasfollows:

P(

trip

=

1

) =

0

.

01

, P(

smoking

=

1

) =

0

.

5

,

P(

tuberculosis

=

1

|

trip

=

1

) =

0

.

05

, P(

tuberculosis

=

1

|

trip

=

0

) =

0

.

01

, P(

cancer

=

1

|

smoking

=

1

) =

0

.

1

, P(

cancer

=

1

|

smoking

=

0

) =

0

.

01

, P(

test

=

1

|

or

=

1

) =

0

.

98

, P(

test

=

1

|

or

=

0

) =

0

.

05

,

5 Notethatthisresulthasbeenalludedtobefore[13] inconnectionwithSato’ssemanticsforprobabilisticfacts.

(9)

0.6::edge(1,2)

.

0.1::edge(1,3)

.

0.4::edge(2,5)

.

0.3::edge(2,6)

.

0.3::edge(3,4)

.

0.8::edge(4,5)

.

0.2::edge(5,6)

.

1

2 3

4 5

6

0.6 0.1

0.4 0.3

0.3

0.8 0.2

Fig. 3.A random undirected graph.

andadditionally,

or

= {

tuberculosis

=

1

} ∨ {

cancer

=

1

}.

Notethathereweconflateatomsandtherandomvariablestheycorrespondto(randomvariablesthataredefinedoverthe spaceofallinterpretations).

InFig.2weemploythepattern A

:−

B1

,

B2

. α ::

B2

..

Wemighttakethispairasa“probabilisticrule”(infactProbLogacceptsthesyntax

α

::A:−B1,B2

.

torepresentthispair).

Inthispaperwedonotusespecialsyntaxforprobabilisticrulesforthesakeofsimplicity.

Any acyclicpropositional program canbe viewedasthespecificationofa Bayesiannetwork overbinary random vari- ables: thestructureoftheBayesiannetworkisthedependencygraph;therandomvariablescorrespondtotheatoms;the probabilities can be read off ofthe probabilistic factsandrules. Conversely, anyBayesian network over binary variables can bespecifiedbyan acyclicnondisjunctive PASPprogram[84].Infact,theprograminFig.2hasbeengeneratedfroma well-knownBayesiannetwork[57].

Acyclic programs can be usedto specify“relationalBayesian networks”aswell.6 Forinstance,hereis an acyclicPASP programthatcapturespartofthewell-knownUniversityWorld[35],wherewehavecourses,students,andgrades:

apt

(

X

) :−

student

(

X

),

a1

.

0

.

7

::

a1

.

easy

(

Y

) :−

course

(

X

),

a2

.

0

.

4

::

a2

.

pass

(

X

,

Y

) :−

student

(

X

),

apt

(

X

),

course

(

Y

),

easy

(

Y

).

pass

(

X

,

Y

) :−

student

(

X

),

apt

(

X

),

course

(

Y

),

noteasy

(

Y

),

a3

.

0

.

8

::

a3

..

Thisisunrealisticallysimplebutitconveystheidea:aptstudentsdowellineasycourses,andevenincoursesthatarenot easywithprobability0.8(andastudentisaptwithprobability0.7;acourseiseasywithprobability0.4).

4.2. Nondisjunctivestratifiedprograms

Aprogramstillspecifiesasingleprobabilitydistributionifitisnondisjunctiveandstratified.Becauseanynondisjunctive stratifiedprogramhasauniqueminimalmodel[18],anytotalchoiceinducesauniquemodelandthereforetheprobabilistic programinducesauniqueprobabilitydistributionoverinterpretations.Mostoftheliteratureonprobabilisticlogicprograms isrestrictedtothisclassofprograms[31].

Hereisaprototypicalexampleofnondisjunctivestratifiedprogram:

edge

(

X

,

Y

) :−

edge

(

Y

,

X

).

path

(

X

,

Y

) :−

edge

(

X

,

Y

).

path

(

X

,

Y

) :−

edge

(

X

,

Z

),

path

(

Z

,

Y

)..

Theserulescanbespelledoutasfollows:thereisapathbetweentwonodesifthereisanundirectededgebetweenthem, orifthereisan undirectededgefromoneofthem tosomenode fromwhichthereisa pathtotheother node.Coupled withan explicitdescription ofthepredicateedge,thisprogramallows one todeterminewhetherit ispossibleornot to findapathbetweentwogivennodes.Forinstance,ifwehavearandomgraphspecifiedasinFig.3(thedrawingdepictsa visualrepresentationoftherandomgraph,withedgesannotatedwithprobabilities),thenP(path(1,4))=0.2330016.

Asillustratedbythisexample,stratifiedPASPprogramscanencoderecursion.Thisisafeaturethatcannotbereproduced withProbabilisticRelationalModels(Section3.3)basedonfirst-orderlogic,asrecursiongoesbeyondtheresourcesoffirst- orderlogic[24].

6 AsnotedinSection3.3,thereareseveralotherlanguagesthatcompactlydescribeBayesiannetworksoverrepetitivedomains.

(10)

4.3. Thegeneralcase

Ifwehaveanondisjunctiveandnon-stratifiedprogram,oradisjunctiveprogram,thenitmaybethecasethatforsome totalchoicesthe programhasno answerset,orthat forsome totalchoicestheprogram hasmanyanswersets. Suppose firstthat some totalchoice leadsto aprogram withoutanyanswerset;inthiscasewe takethat thewhole probabilistic programisinconsistentandhasnosemantics.Otherstrategiesmightbepossible;wemighttrytorepairtheinconsistency [8], or perhaps resort to some three-valuedsemantics that can accommodate such failures.We leave such strategies to futuredebate.

Themoreinterestingcaseistheoneinwhichanytotalchoiceinducesatleastoneanswerset,andsometotalchoices leadtomanyanswersets.Asatotalchoiceθ isassociatedwithaprobability P(θ ),theindividualanswersetsinducedby θ collectivelygetmassP(θ ),butnootherstipulationsarepresent.ThuswecandistributeP(θ )arbitrarilyovertheanswer sets,andwecanusesuchafreedomtoouradvantage.Afewexamplesillustratepossiblestrategies.

Considerasanexamplethethree-colorabilityproblemforundirectedgraphs:

red

(

X

)

green

(

X

)

blue

(

X

) :−

node

(

X

).

edge

(

X

,

Y

) :−

edge

(

Y

,

X

).

:−

edge

(

X

,

Y

),

red

(

X

),

red

(

Y

).

:−

edge

(

X

,

Y

),

green

(

X

),

green

(

Y

).

:−

edge

(

X

,

Y

),

blue

(

X

),

blue

(

Y

).

(4)

plustheprobabilisticfactsinFig.3andthefacts

red

(

1

).,

green

(

4

).,

green

(

6

)..

(5)

Each totalchoice fixes a graph; for thisparticular graph,each answer setis a three-coloring. Ifit so happensthat each totalchoiceinducesasingle three-coloring,thentheprogramdefinesasingleprobabilitydistributionoverinterpretations.

If insteadsome totalchoices induce severalthree-colorings, then the program defines a non-singletonset of probability distributions:foreach totalchoice θ,the probabilitymass P(θ ) canbe attachedtoeach oneof theanswersets induced by θ.Take forinstance node 3. Ifboth edges to 1and 4are present (withprobability 0.03), then all answer sets must contain blue(3).And ifbothedges are absent,then thereare answersets containing eitherred(3) orblue(3)or green(3). Otherconfigurationsareproducedbythepresence/absenceofedges.

Wehavethat,inthelastexample,P(blue(3))=0.03;P(blue(3))=1;P(red(3))=0.0;P(red(3))=0.9.

Supposenowthatontop ofprobabilistic factsinFig.3andhard factsinExpression (5),wealsohavetheprobabilistic fact

0

.

2

::

blue

(

5

)..

(6)

Inthiscasesometotalchoicesfailtoproduceathree-coloring:forinstance,ifalledgesare present,thenthereisnoway toproduceathree-coloringwhenblue(5)issettohold. Tohaveaconsistentprogram,wemustworkdifferently.Consider thePASPprogram:

red

(

X

)

green

(

X

)

blue

(

X

) :−

node

(

X

).

edge

(

X

,

Y

) :−

edge

(

Y

,

X

).

¬

colorable

:−

edge

(

X

,

Y

),

red

(

X

),

red

(

Y

).

¬

colorable

:−

edge

(

X

,

Y

),

green

(

X

),

green

(

Y

).

¬

colorable

:−

edge

(

X

,

Y

),

blue

(

X

),

blue

(

Y

).

red

(

X

) :− ¬

colorable

,

node

(

X

),

not

¬

red

(

X

).

green

(

X

) :− ¬

colorable

,

node

(

X

),

not

¬

green

(

X

).

blue

(

X

) :− ¬

colorable

,

node

(

X

),

not

¬

blue

(

X

).

colorable

:−

not

¬

colorable

..

(7)

Thisprogramiscertainlynon-trivial.Basically,ifthereisathree-coloringforthe inputgraph,the correspondinginter- pretationisananswerset.Butifthereisnothree-coloring,thencolorableissettofalse,andallgroundingsofred,blueand greenaresettotrueexceptforthosegroundingsthataresettofalseviaprobabilisticfacts.Toguaranteethelatterbehavior theprogram resortsto theidiom not¬A,where A is an atom:basically thisis truewheneveritis notknownexplicitly that A isfalse. Asanswersets mustbe minimal,colorable istrueifandonly ifthereisathree-coloring.In ourexample, P(colorable,blue(3))=0.976.Infact,wecanaskformore:wecandeterminetheprobabilitythatthereisnocoloringatall;

thisisprecisely0.024.Ascolorable indicatesthepossibilityofathree-coloringforeachtotalchoice,thereisasharpvalue foritsprobability.

ThusinPASPwecanformulate acombinatorialproblemandaskforthelower/upperprobabilityofitsatoms;also,we canaskfortheprobabilitythatthereisasolutionatall.

(11)

Usingthethree-coloringexamplewecananalyzeinmoredetailthesemanticsofprobabilisticfacts.RecallthatProbLog’s semantics takesprobabilistic fact

α

::A

.

tomeanthatwe shouldimpose A

.

withprobability

α

anddiscarditwithproba- bility1−

α

.Ourapproachisdifferentinthat

α

::A

.

means:

takeAwith probability

α ;

take

¬

Awith probability 1

α .

Ofcourse wecandoso becausestrongnegationisavailable inASP;however,mereavailability of¬isnotthekey point.

To understand our proposal, take againthe three-coloring program in Expression (7) with probabilistic facts in Expres- sions (5) and(6).Ifweadoptourproposedsemanticsfortheprobabilisticfacts,thecredalsemanticsyieldsP(blue(5))=0.2 and P(colorable,blue(5))=0.1856 (some probability mass is “lost” to configurations without three-colorings). Ifwe use ProbLog’s semantics for the probabilistic facts, and continue with the construction of the credal semantics, we obtain P(colorable,blue(5))=0.1856 butP(colorable,blue(5))=0.9280!ThisbehaviorofProbLog’ssemanticsmaybemanageable in acyclicprograms,where theeffectofprobabilistic factsisrelativelyeasy to grasp.7 Inthepresence ofcyclicrulesand constraints,suchastheonestypicallyfoundinASPprogramming,itdoesnotseemappropriate toleavethismanagement totheprogrammer,anditseemsbettertoalertheraboutproblemsthroughinconsistency.

Tofinishthissection,webrieflycommentontheabilityofPASPtosolvecomplexproblems.

SupposewehaveacollectionofcompaniesC= {c1,. . . ,cm},suchthateachcompanymanufacturesarangeofproducts.

Each product gj is manufactured by two companies, asspecified by atom produce(ci1,ci2,gj). Eachcompany c may be ownedbythreeothercompanies,asspecifiedbythepredicatecontrol(ci1,ci2,ci3,c)(acompanymaybecontrolledbymore than one triple). A strategicset C ofcompanies is aminimal subset of C (minimalwith respectto inclusion)such that:

1) the setof all products manufactured by C is identical to the setof all products manufactured by C; 2) if the three controlling companies of a company c are in C, then c is alsoin C.The question is, givena company c, is it insome strategicset?ThisproblemisNPNP-complete(AppendixA),henceitiswidelybelievedtobeharderthanthethree-coloring problem.Amazingly,the“strategiccompany”problemcanbesolvedbyashortASPprogram [25]:

strategic

(

C1

)

strategic

(

C2

) :−

produce

(

C1

,

C2

,

G

).

strategic

(

C

) :−

control

(

C1

,

C2

,

C3

,

C

),

strategic

(

C1

),

strategic

(

C2

),

strategic

(

C3

)..

The first rule guarantees that all products are still sold by the strategic set. The second rule guarantees that, if three companies areinthestrategicset,then acompanytheycontrolisalsointhestrategicset.Theminimalityofanswersets guaranteestherequiredminimalityofstrategicsets.

Nowsuppose,asitsohappensinreallife,thatthereissomeuncertaintyastowhichcompanycontrolswhich.Wemay then beinterestedintheprobabilitythatsomecompanycomp isinsome strategicset.Wemustsimplystatetherelevant probabilisticfactssuchas

0

.

9

::

control

(

comp1

,

comp2

,

comp3

,

comp

)..

andthencomputeP(strategic(comp)).InsodoingwemustgothroughthesetofsolutionsofanNPNP-completeproblem.

4.4. Somecommentsoninterpretation

We haveso fardiscussed oursuggestedprogrammingstyleby posingquestionssuch as“What istheprobability that thereisathree-coloring?”or“Whatistheprobabilitythatacertainnodeisred?”.Intheremainderofthissectionwefocus ontheinterpretationofthelower/upperprobabilitiesobtainedinansweringsuchquestions.

So,takeaPASPprogramlikethethree-coloringone(Expression(4)).Althoughtotalchoicesmaybeassociatedwithnon- singleton credalsets,theatom colorable hasa uniquevalue per totalchoice; hencetheprobability ofthisatom issharp.

However,probabilitiesonthecolorofparticularnodesmayofcoursefailtobesharp.WhatisthentheimportofP(red(2))? Basically, thereisatleast probabilityP(red(2))that node 2getsredifathree-coloringisselected aftertheuncertaintyis resolved (thatis,aftertheatomsassociatedwithprobabilitieshavetheirvaluesset).Similarly,wehaveatmostprobability P(red(2))thatnode2getsredifathree-coloringisselectedaftertheuncertaintyisresolved.Wecanthustakelower/upper probabilitiesasvaluesgeneratedbydecisionstakenaftertheresolutionofuncertainty.Thisiscertainlyincontrasttomost decision-makingmodelswheredecisionsaremadebeforedicearerolled[10].

In fact we may choose to attach a more active role to the agent, supposing that she selects a three-coloring after uncertaintyisresolved:thelowerprobability istheprobability iftheagentisadversariallyworkingagainstredinnode2, whiletheupperprobabilityobtainsiftheagentworksonbehalfofredinnode2.

Inadditionlower/upperprobabilitiescanbeviewedassharpprobabilitieswithrespecttoappropriate(quantified)ques- tions.Forinstance,ifoneasks“WhatistheprobabilitythatIwillbeabletoselectathree-coloringwherenode2isred?”,

7 Evenforacyclicprogramsweproducesomesurprises.Considerthesimpleacyclicprogramconsistingof0.2::r(a)

.

and0.8::r(X)

.

;thenP(r(a))= 0.2+0.80.2×0.8=0.84 inProbLog(notP(r(a))=0.2 asonemightthink).

Referências

Documentos relacionados

À tarde, ocorreram as Apresentações de Trabalhos, realizadas simultaneamente em duas salas, de acordo com Grupos Temáticos estabelecidos para o IV CIDIL: (GT1)

Definition 2.2.3 (Well–founded semantics with pseudo negation) A 3–valued inter- pretation I is a partial stable model of an extended logic program P iff I ′ is a partial stable

Definition 2.4.4 (Perfect Model Semantics). By the perfect model semantics of Π we mean the semantics determined by the unique perfect model MΠ of Π. It follows immediately from

We outline the important properties of a 2-valued semantics for Normal Logic Programs, proceed to define the new Minimal Hypotheses se- mantics with those properties and explore how

 Managers involved residents in the process of creating the new image of the city of Porto: It is clear that the participation of a resident designer in Porto gave a

Nesse sentido, para a realização da pesquisa foram levantadas as seguintes questões: Como é realizado o gerenciamento de resíduos sólidos (produção, coleta, tratamento e

Now we can list the main topics that must be included in the contents of any LP course: Programming Language: concept, formal definition, syntax versus semantics, general purpose

“as relações entre o volume e a complexidade do circuito inferior e o tamanho da população diminui do centro para a periferia, da metrópole para a cidade” (SANTOS,