zoukankan      html  css  js  c++  java
  • A Intro Snippet for Logic & Propositional Logic

    Written with StackEdit.

    Materials: AIMA, Ch. 7

    Basics for Logic

    Syntax vs. Semantic

    Syntax : well formed representation

    Semantic : sentences' specific meaning in a "possible world"

    possible world: "model", such as "a world where x=1 and y=2".

    Satisfaction vs. Entailment

    Satisfaction : if sentence (alpha) is true in model (m) , we say :

    • (m) satisfies (alpha),
    • (m) is a model of (alpha),
    • (M(alpha)={m|m ext{ is a model of }alpha}).

    e.g. "(x=2, y=2)" is a model of "(x+y=4)".

    Entailment : A sentence follows logically from another sentence.

    • (alphavDasheta Leftrightarrow M(alpha)subseteq M(eta)), which means (alpha) entails (beta) .

    e.g. (x=0) entails (xy=0) .

    Inference vs. Entailment

    We use INFERENCE to find ENTAILMENT .

    If we can use inference algorithm (i) to derive (alpha) from (KB) , we say:

    • (KBvdash_ialpha), as (i) derives (alpha) from (KB) .

    Soundness vs. Completeness

    Soundness : An inference algorithm that derives only entailed sentences is called sound .

    Model-checking ( To prove (KBvdash_{mc}alpha), check every model to prove (M(alpha)subseteq M(KB)) ) is a sound algorithm when possible.

    e.g.: only find exist needles in a haystack.

    Completeness : An inference algorithm that can derive any sentence that is entailed is called complete .

    e.g.: find every exists needle in a haystack.

    Representation vs. Real World

    Corresponding relation between "x entails x" in logical representation and xx follows xx in real world .

    Grounding issues. "Sensors" guarantees (KB) is true in Real World.

    Propositional Logic

    Syntax

    • Atomic sentences: capitalized letters
      • True/False
    • Logical connectives: connect atomic sentences to make complex sentences
      • ( eg) neg , negation
      • (land) land , conjuction
      • (lor) lor , disjunction
      • (Rightarrow) Rightarrow , imply
      • (Leftrightarrow) Leftrightarrow IFF , biconditional
        • also (equiv) equiv

    Semantic

    Rules for Atomic sentences are easy:
    True is true in every model and False is false in every model.
    • The truth value of every other proposition symbol must be specified directly in the model.

    For complex sentences, we have five rules, which hold for any subsentences (P) and (Q) in any model m (here “iff” means “if and only if”):
    ( eg P) is true iff (P) is false in (m).
    (P land Q) is true iff both (P) and (Q) are true in (m).
    (P lor Q) is true iff either (P) or (Q) is true in (m).
    • * (P Rightarrow Q) is true unless (P) is true and (Q) is false in (m).
    (P Leftrightarrow Q) is true iff (P) and (Q) are both true or both false in (m).

    A tricky point: (PRightarrow Q) is true in model (M) EXCEPT (P) is true but (Q) is false.

    You can refer to this: ((PRightarrow Q) Leftrightarrow ( eg P lor Q))

    btw, Truth Table solves all.

  • 相关阅读:
    027、获取后台正在运行的程序
    026、TelephonyManager的应用
    025、WiFi服务
    024、Wallpaper桌面墙纸
    023、在手机上实现打开文件功能
    Git使用ssh协议配置Github远程仓库避免踩坑指南(Windows环境)
    Linxu网络常用命令(CentOS 7)
    插入耳机后,内置麦克风(话筒)输入音量变很轻的解决办法(Windows 10 + Conexant声卡)
    PowerShell Write-Output 支持参数数组传入
    工商银行网银助手无法安装:系统无法打开指定的设备或文件
  • 原文地址:https://www.cnblogs.com/ria2020/p/13819599.html
Copyright © 2011-2022 走看看