Logic for Computer Science

© All Rights Reserved

1 views

Logic for Computer Science

© All Rights Reserved

- i-search assignment sheet1
- Hegel's Philosophy of History
- Logic Complete Assignment
- Philosophical Terminology
- Jean Baudrillard - The Dark Continent of Childhood
- 2008 Setting Goals and Objectives Training
- Joseph Dietzgen Excursions on Epitstemology
- 1179 JudgeForm_Eval
- Case Presentation Handouts.2007
- Notes on Hos
- Chapter13 (1)
- Of Studies
- Relationship Between the Regime and the Cliquish Sector.20130108.004354
- Walter and Lao Russel Home Study Course Unit 4
- Presupposition and Entailment21
- week 12 wednesday practical reasoning
- 雅思写作-背
- j.1466-769x.2007.00299.x
- lesson
- generic case analysis guidelines (1).docx

You are on page 1of 3

entails a formula iff 1.G is a consequence of {F , F

1 , ...,

2

k

{1,2,...}) are formulas - If KB is true in a world (under a F }

k iff (( F

i=1 i) G ) is a tautology.

2. For every formula F , F is also assignment A ) then must also 1.A) If G is a consequence of {F ,

1

a formula 2 k

. tautology.

3. For all formulas F and G, (F v G) A

1.B) If ((ki=1F i) G) is a tautology,

is also a formula. - A (KB) A ()

then G is a consequence of {F , F

1 2,

Model : KB

..., F }.

k

A: {A , A , . A n} {true, Logical inference : entailment can

1 2

Proof 1.A :

false} be used to derive conclusions by

carrying out logical inference KB|i - if G is consequence of

A is a model of F: |=AF

- can be derived from KB by {F 1, F 2, ..., F }. then every

k

A is not a model of F: |= F

A

procedure i

model of F i also a model of G.

is

Satisfiable : iff it has at least one k

John Orders Pizza : John orders - A ( ( i=1F i )=true

model. A(F) = true. pizza whenever it is late or he - then A (G) = true

Validity (tautology): iff every is tired, and he has worked all day in - therefore A ((ki=1F i) G) is also

possible truth assignment is a the lab. He is always tired when he

true by definition of semantics.

model for it. gets up early or he has worked all

Proof 1.B :

day in the lab. He has actually

m

A formula is valid: |=F k

- A (( i=1F i) G) is a tautology

er as

A set is satisfiable : {F1, F2,...,Fn} worked all day in the lab.

a=John orders pizza - If A (ki=1F i) = true

co

iff all the formulae in the set are

b=It is late

eH w

- then A (G) = true

true.

c=John is tired - If A is a model of {F , F , ..., F }

Circuit : 1 2 k

o.

d=John has worked all day in the then A is also a model of G.

rs e lab

- So, G is a consequence of F .

i

ou urc

e=John gets up early

2. G is a consequence of {F 1 2 ...,

, F ,

Prolog Translation : k

F } iff (( F ) G) is unsatisfiable.

a :- (b ; c) , d. k i=1 i

o

KB| = iff (KB ) is valid.

aC s

?- a

Satisfiability : connected to

vi y re

Prove a by Resolution

o ((p q) (p q)) (pxorq) CNF forms: inference. KB| = iff (KB ) is

(A B D) (A C D) unsatisfiable.

a (r o)

b (p q) (E C) (D C)

Equivalence Rules

ed d

D

s ((o r) (o r)) Contraposition:

Step Formula

ar stu

c (a b) (F G) (G F)

1 (A v ~B v ~D) Given Implication elimination:

(F G) (F G)

2 (A v ~C v ~D) Given

Double Implication Elimination:

sh is

Evaluation :

Given : -> Find

: 4 (~D v C) Given Idempotency:

Th

(F F ) (F F ) F

A (p)=true A

(pvq)=true 5 D Given Commutativity:

A (q)=false A

(q)=true

6 ~A Neg. (F G) (G F )

Satisfaction : (F G) (G F )

Given : -> Find

: 7 (A v ~C) 2, 5

Associativity:

A (pvq)=true A

(p)=true 8 C 4, 5 ((A B) C) (A (B C))

A (q)=true A

(q)=false 9 A 7,8 Absorption:

A formula is a consequence of a (A (A B)) A

10 6, 9

Knowledge Base(KB), where KB = Double Negation

{F 1, F 2, ..., F k} iff F F

-for every truth assignment A Therefore ((ki=1F i) G) is Tautology:

If A is a model for KB then Ais unsatisfiable and G is a consequence (1 G) 1, (1 G) G

of F. Unsatisfiable:

also a model for i

A (KB) A () (0 G) G, (0 G) 0

KB

https://www.coursehero.com/file/11401132/COT3541-Midterm-Review/

Substitution Theorem : Deductive Inference Rules

:

prove: ((A (B C)) (C A))

((B A) C). by ST

Conjuctive Normal Form(CNF) :

((A B C) (B D) A (B C))

Given KB, prove conclusion S.

((A B) (C D)) KB |= S.

1.Eliminate implications

((A B) (C D))

2.deMorgans law. Step Formula Derivation

((A B) (C D)) 1 R1 : P Q given

3.Distribute or over and

((A (C D)) (B (C D))) 2 R2 : P R given

4.We get final CNF. 3 R3 : (Q R) S given

If every disjunction in F contains at 5 R 4,2 Mod-Po

most one positive literal.

F ((A B) (C A D) (A B) 6 Q 1 and-eli

m

D E) 7 QR 5,6 and-int

er as

can be rewritten as

8 S (conclusion) 7,3Mod-Po

co

F ((B A) ((C A) D) ((A B) 0)

eH w

(1 D) (E 0)).

Recursion example :

o.

Use binary predicate d_taller

and

Validity

Soundness : rs e translate the following:

ou urc

Nick is taller than Mike

if something is provable from KB it is

Mike is taller than Sam

entailed by KB.

Sam is taller than Eve

Completeness : if KB |= then

trace:

o

KB |-

?- taller(nick, Who)

if something is entailed by KB, it is

aC s

provable.

vi y re

Mike and Sam and Eve.

Entailment :A Knowledge Base(KB)

entails

a formula iff

Facts:

- If KB is true in a world

1.

d_taller (nick, mike).

ed d

d_taller (mike,sam).

ar stu

d_taller (sam,eve).

that assignment .

A Rules:

- A (KB) A () 4.taller(X, Y) :- d_taller(X, Y).

- KB 5.taller(X, Z) :- d_taller(X, Y),

sh is

taller(Y,Z).

Th

inference algorithm that derives only

Logical inference and

entailed sentences is sound.

Entailment : entailment can be used

- i is sound if

to derive conclusions by carrying out

- whenever KB|i (i derives

logical inference KB|i

from KB) is true.

- can be derived from KB by

- then KB| = (KB entails ) is

procedurei

also true!

an algorithm that can derive any

sentence that is entailed.

- i is complete if

- whenever KB| =

- KB|i also true

https://www.coursehero.com/file/11401132/COT3541-Midterm-Review/

?-taller(nick, who).

4

5 Y = Who 1

who = Mike ;

Y = Who

m

co

Y = Mike taller(mike, who).

o.

4

er

X=Mike

H

d_taller(mike, who)

Y = Who

se

2

ur

5

who = Sam ;

Co

X=Mike

a

d_taller(mike, Y), taller(Y, who)

Y = Who

vi

d

re Y = Sam taller(sam, who).

ha

4

s

X=Sam

as

d_taller(sam, who)

Y = Who

3

w

ce

who = Eve ;

ur

so

Y = Who

re

dy

tu

https://www.coursehero.com/file/11401132/COT3541-Midterm-Review/

ss

- i-search assignment sheet1Uploaded byapi-235048758
- Hegel's Philosophy of HistoryUploaded byMark Alznauer
- Logic Complete AssignmentUploaded byihsan278
- Philosophical TerminologyUploaded byCatherina14
- Jean Baudrillard - The Dark Continent of ChildhoodUploaded byakrobata1
- 2008 Setting Goals and Objectives TrainingUploaded byRuchika Verma
- Joseph Dietzgen Excursions on EpitstemologyUploaded byJacques Rie
- 1179 JudgeForm_EvalUploaded byPaul Silva
- Case Presentation Handouts.2007Uploaded byarif420_999
- Notes on HosUploaded byxbaby_bananax
- Chapter13 (1)Uploaded byBayerischeMotorenWer
- Of StudiesUploaded byLavisha Dhingra
- Relationship Between the Regime and the Cliquish Sector.20130108.004354Uploaded byanon_141571545
- Walter and Lao Russel Home Study Course Unit 4Uploaded bylindalein
- Presupposition and Entailment21Uploaded bymeshoo123
- week 12 wednesday practical reasoningUploaded byapi-239512266
- 雅思写作-背Uploaded byCharles Syabr
- j.1466-769x.2007.00299.xUploaded byBerni Benitez Reimers
- lessonUploaded byapi-273914342
- generic case analysis guidelines (1).docxUploaded byKelvin Shang
- passion project-article workUploaded byapi-299650961
- Personality 9Uploaded byajay
- DebatesUploaded bypaulvlc
- Eric Alliez PDFUploaded byBrenda
- BroekUploaded byAndrew Barron
- 1915 Fabre Dolivet Hermeneutic InterpretationUploaded byRaphael Bahamonde
- agreeing-and-disagreeing-language-review.pdfUploaded bySlawka Grabowska
- Principles of Correct ThinkingUploaded byArfaQureshi
- symbolic_logic8.pdfUploaded byジー デイ
- Topic 3 - Informal Logic and Fallacies.pdfUploaded byLeizl A. Villapando

- Pseudo PhilosophyUploaded byDimitris Kakarot
- Henrich, Dieter, The Proof-structure of Kant's Transcendental DeductionUploaded byVicente Montenegro
- Argument Forms and ArgumentsUploaded byElizen Joy Ruiz
- logica o razon.pdfUploaded byelias
- On Discussive Set Theory - LafayetteUploaded byLuccaMantini
- Am I an Atheist or an AgnosticUploaded byapi-26368264
- Joseph Navickas Conscience and Reality Hegel_s Philosophy of SubjectivityUploaded byAndrea Yeats
- Some Aspects of Moral Theory in Kant and HabermasUploaded byreturncc
- Donatella Della Porta and Michael KeatingUploaded byMartin Tanaka
- 03_ECE MATH 311_Validity of Arguments and Logical EquivalenceUploaded byGennie Brul
- Shame and Moral Truth in Plato s Gorgias the RefUploaded byMartín Forciniti
- David HumeUploaded byRichell Ann Batuhan Casimero
- Bob Hale - Abstract Objects ReviewUploaded bySocra Socra
- Articulating Our Ignorance: Hopeful Skepticism and the Meno Paradox by Larry BriskmanUploaded byMike McD
- Idealism PlatoUploaded byJuvvilyynGraceMahomat
- Meaning of Dialectics - SummaryUploaded byAlfred James Ellar
- Defending Your Faith - An Introduction to ApologeticsUploaded bycrl_ca
- Tichy Pavel-1976--CounterExample to the Stalnaker-Lewis Analysis of CounterfactualsUploaded byBankingLinguisticCheckmates
- Prop LogicUploaded bymike
- HistoryUploaded byNayor Lief Paalan Bohol
- HANDOUT - Texts - Emotivism (Hume, Ayer)Uploaded byabbenay
- Understanding ArgumentsUploaded bysamm123456
- fqfqUploaded bya4558305
- Descartes v. Hume Part TwoUploaded byCtorres910
- Imre Lakatos _Falsification and the Methodology of Scientific Research Programs,_ 1970Uploaded bySovietPrime
- Popper's FalsificationismUploaded byRegen Mind
- Frege's Theorem: An IntroductionUploaded byRichard Heck
- Basic Principles of Deductive Logic 1Uploaded byShamell Hurd
- Williams - Hegel and Transcendental PhilosophyUploaded bynachin111
- Measuring Deductive ReasoningUploaded byIam Eeryah

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.