欢迎来到天天文库
浏览记录
ID:34122227
大小:719.87 KB
页数:41页
时间:2019-03-03
《计算机科学中的逻辑》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、LogicinComputerScienceYongmeiLiuymliu@mail.sysu.edu.cnDept.ofComputerScienceSunYat-senUniversityDecember14,2009Y.LiuLogicinComputerScience1/41IntroductionandoutlineFocusonapplicationsoflogicincomputerScience1SATsolversandapplications2Programverication3Modelchecking4CognitiveroboticsY.LiuLogicin
2、ComputerScience2/41AmotivatingexampleWewouldliketoselectpeoplefromAnn,Bob,CarolandDanforacertainjob.Thefollowingconstraintsmustbesatised:BoborCarolshouldbeselectedAnnandDancannotbebothselectedIfBobisselected,DanshouldalsobeselectedHowshouldweselectthepeople?(b_c)^(:a_:d)^(:b_d)fB;DgWhatifwehave
3、manypeopleandmanyconstraints?Y.LiuLogicinComputerScience3/41WhatisSAT?AliteralisanatomorthenegationofanatomAclauseisadisjunctionofliteralsAformulaisinConjunctiveNormalForm(CNF)ifitisaconjunctionofclausesExample:(b_c)^(:a_:d)^(:b_d)SAT:GivenapropositionalformulainCNF,decideifthereexistsatruthassi
4、gnmentthatsatisestheformulaY.LiuLogicinComputerScience4/41TimecomplexityofalgorithmsExpressedintermsofthenumberofoperationsusedDecideifatruthassignmentsatisesaCNFformula:O(m)NaivealgorithmtosolveSAT:O(2nm)n{thenumberofatoms,m{thelengthoftheformulaThecomputertimeusedbyalgorithms*:morethan10100y
5、earsY.LiuLogicinComputerScience5/41Pvs.NPP:theclassofproblemsforwhichthereexistsaprocedurethatrunsinpolynomialtimeO(nb)Example:decideifatruthassignmentsatisesaformulaNP:theclassofproblemswherewearesearchingforaniteminalargespaceofpossibilities,butwherewecantestifacandidateitemisasolutioninpolyn
6、omialtimeExample:decideifapropositionalformulaissatisableP=NP?OneofthesevenMillenniumPrizeProblemsselectedbytheClayMathematicsInstitutetocarryaUS$1,000,000prizefortherstcorrectsolution.ItisgenerallyacceptedthatP6=NPY.LiuLogicinComputerScience6/41NPCompletenessAproblemisNP-completeifitisinNPand
7、anyprobleminNPcanbereducedtoitinpolynomialtimeifanyNP-completeproblemisinP,thenP=NPSATisaclassicalNP-completeproblem,soanyprobleminNPcanbereducedtoSATinpolytimeTherearethousandsofcomputationalproblemsofeconomicsignicancetha
此文档下载收益归作者所有