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.

  • 相关阅读:
    一个表缺失索引发的CPU资源瓶颈案例
    SQLServer 版本之八大方法搞清 "我是谁"
    DBA成长路线
    SQL Server2016升级前几点自检
    SQL Server 2016白皮书
    <译>通过PowerShell工具跨多台服务器执行SQL脚本
    /lib64/libc.so.6: version `GLIBC_2.17' not found
    /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
    HGT高程数据文件格式解析
    DEM高程数据下载资源
  • 原文地址:https://www.cnblogs.com/ria2020/p/13819599.html
Copyright © 2011-2022 走看看