WHU Bruisefree分享 http://blog.sciencenet.cn/u/bruisefree Link together

博文

First Order Logic 一阶逻辑

已有 6965 次阅读 2015-11-24 03:00 |个人分类:文本挖掘|系统分类:科研笔记

命题逻辑(Propositionallogicsententiallogic

其形式是a declarative sentence, or part of a sentence,具有事实(facts)判断(真或假)。一些例子如:

·       George W. Bush is the 43rd President of the United States.

·       Paris is the capital of France.

·       Everyone born on Monday has purple hair.

Sometimes,a statement can contain one or more other statements as parts. Consider for example, the following statement:

·       Either Ganymede is a moon of Jupiter or Ganymede is a moon ofSaturn.

While the above compound sentence is itself a statement, because it is true, the twoparts, "Ganymede is a moon of Jupiter" and "Ganymede is a moonof Saturn", are themselves statements, because the first is true and thesecond is false.

命题逻辑的不足:

           Propositional logic not expressiveenough

           Cannot deduce/compose factsautomatically

           Declarative vs. Procedural

 

自然语言的其他形式

           NL不一定全是用于表现,也可以用于communication,例子:“Look!”

 

First-Order Logic一阶逻辑

基本思路

           Don’t treat propositions as “atomic”entities.

基本元素

           对象(Objects):cs4701, fred, ph219, emptylist …

           关系/ Predicates(谓词):is_Man(fred), Located(cs4701, ph219),is_kind_of(apple, fruit)…    Note: Relations typically correspondto verbs

函数Functions: Best_friend(),beginning_of() : Returns object(s)

连接符Connectives: ˄˅˺==><==>.

量化,量纲?Quantifiers:

Universal:"x: ( is_Man(x) ) is_Mortal(x) )

Existential: $y: ( is_Father(y, fred) )

 

谓词Predicates

在传统语法中,谓词是句子两大主要部分之一,另一个是主语(subject),被谓词所修辞。

例子:•"John is yellow" John actsas the subject, and is yellow acts as the predicate.

谓词有些类似于动词词组(verb phrase)。在语言学语义中,谓词是对于true of something的表述。

 

 

formal mathematical logic形式逻辑类型

·        Propositional logic,陈述了真或假,判断新陈述

·        First order logic,需要有predicates, quantifiers and variables

E.g.Philosopher(a) –> Scholar(a) $x, King(x) ˄ Greedy (x) ==> Evil (x),如果kinggeedy,那么他将成为一个恶魔。

·        Secondorder logic,在谓词和变量集基础上的Quantify

·        Temporal logic,真假与关系依赖于时间

·        FuzzylogicUncertainty, contradictions

 

分析方法

           分析句子中的对象Objects,属性property,和关系relation

           例子1Squares neighboring the wumpus are smelly

           Objects: squares, wumpus

           Property: smelly

           Relation: neighboring(对象之间的关系)


例子2Evil king john rules England in 1200

Objects: jonh, England (注意John才是对象)

Property: evil, king(都是修辞对象的)

Relationrules

 

形式化表达

Lucy* is aprofessoris_prof(Lucy)

Allprofessors are people:  "x: (is_prof (x) ) is_person(x) )

John is thedean: is_dean(John)

Deans areprofessors: "x: (is_ dean (x) ) is_ prof (x) )

Everyone is a friend of someone: " x ( $ y (is-friend-of (y, x) ) )

Is John nofriend of Lucy?: ˺ is_friend_of(John, Lucy)

机器如何理解:在知识库Knowledge Base中,将谓词表示为函数。

 

知识工程怎么利用一阶逻辑

           1.识别任务

           2.组合相关知识

           3.确定谓词集,函数和常量

           4.编码领域基本知识(general knowledge

           5.编码具体实例的描述。

           6.提出问题,推理,得到答案

           7.调试知识库

在前面的例子中,All professors are people是领域基本知识,Lucy* is a professor是具体实例描述,Is John no friend of Lucy?即是问题。问题会在基本知识和具体实例基础上做出推理。

后面就交由FOL的求解和推理了,相对而言也更为复杂,暂时不看了。

 

参考文献:

http://www.iep.utm.edu/prop-log/

http://www.cs.cornell.edu/courses/cs4700/2011fa/lectures/16_firstorderlogic.pdf




https://wap.sciencenet.cn/blog-563898-937932.html

上一篇:常见分布的拟合方法
下一篇:贝叶斯网络简介(学习笔记)
收藏 IP: 128.196.105.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2022-8-15 23:16

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部