• Keine Ergebnisse gefunden

Exercise 4: Inference Rules and Calculi (4 Points)

N/A
N/A
Protected

Academic year: 2022

Aktie "Exercise 4: Inference Rules and Calculi (4 Points)"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

University of Freiburg Dept. of Computer Science Prof. Dr. F. Kuhn

S. Faour, P. Schneider

Theoretical Computer Science - Bridging Course Exercise Sheet 10

Due:Wednesday, 7th of July 2021, 12:00 pm

Exercise 1: Is it a Tautology? (4 Points)

Let Σ :={p, q, r}be a set of atoms. An interpretationI : Σ→ {T, F}maps every atom to either true or false. Inductively, an interpretationI can be extended to composite formulaeϕover Σ (cf. lecture).

We writeI |=ϕifϕ evaluates toT (true) under I. In caseI |=ϕ,I is called a model forϕ.

For each of the following formulae, give all interpretations which are models. Make a truth table and/or use logical equivalencies to find all models (document your steps). Which of these formulae are tautologies?

(a) ϕ1= (p∧ ¬q)∨(¬p∨q)

(b) ϕ2= (¬p∧(¬p∨q))↔(p∨ ¬q) (c) ϕ3= (p∧ ¬q)→ ¬(p∧q)

Remark: a→b:≡ ¬a∨b, a↔b:≡(a→b)∧(b→a), a6→b:≡ ¬(a→b).

Exercise 2: Logical: Equivalency and Entailment (8 Points)

• Two logical formulae ϕ, ψ over a set of atoms Σ are logically equivalent (ϕ ≡ ψ) iff for all interpretations I of Σ the following holds

I |=ϕ⇐⇒I |=ψ.

With the above definition, show or disprove the following equivalencies (e.g. by making truth tables).

(a) ¬(p→q)≡p→ ¬q (b) ¬(p∧q)≡¬p∨ ¬q

• Aknowledge base KB is a set of formulae over a given set of atoms Σ. An interpretation I of Σ is called a model ofKB, if it is a model for all formulae in KB. A knowledge base KB entails a formula ϕ(we writeKB |=ϕ), ifall models of KB are also models of ϕ.

Let KB := {p∨(q ∧ ¬r),¬r ∧p}. Show or disprove that KB logically entails the following formulae.

(a) ϕ1:= (p∧q)∨ ¬(¬r∨p) (b) ϕ2:= (q ↔r)→p

(2)

Exercise 3: CNF, DNF (4 Points)

(a) Convert

ϕ1 := (¬p→q)→(q → ¬r) into Conjunctive Normal Form (CNF).

(b) Convert

ϕ2:=¬(p→q)∨((r∨s)→(q∨t))∨(¬p→ ¬v) into Disjunctive Normal Form (DNF).

Remark: Use the known logical equivalencies given in the lecture slides to do the necessary transfor- mations. State which equivalency you are using in each step.

Exercise 4: Inference Rules and Calculi (4 Points)

Letϕ1, . . . , ϕn, ψ be propositional formulae. Aninference rule ϕ1, . . . , ϕn

ψ

means that ifϕ1, . . . , ϕnare ’considered true’, then ψis ’considered true’ as well (n= 0 is the special case of an axiom). A (propositional) calculus Cis described by aset of inference rules.

Given a formulaψand knowledge baseKB :={ϕ1, . . . , ϕn}(whereϕ1, . . . , ϕn are formulae) we write KB `C ψ if ψ can be derived from KB by starting from a subset of KB and repeatedly applying inference rules from the calculus Cto ’generate’ new formulae untilψ is obtained.

Consider the following two calculi, defined by their inference rules (ϕ, ψ, χ are arbitrary formulae).

C1: ϕ→ψ, ψ →χ

ϕ→χ ,¬ϕ→ψ

¬ψ→ϕ, ϕ↔ψ ϕ→ψ, ψ→ϕ C2: ϕ, ϕ→ψ

ψ ,ϕ∧ψ

ϕ, ψ , (ϕ∧ψ)→χ ϕ→(ψ→χ)

Using the respective calculus, show the following derivations (document your steps).

(a) {p↔ ¬r,¬q→r} `C1 p→q (b) {p∧q, p→r,(q∧r)→s} `C2 s

Remark: Inferences of a given calculus are purely syntactical, i.e. rules only apply in their specific form (much like a grammar) and no other logical transformations not given in the calculus are allowed.

Referenzen

ÄHNLICHE DOKUMENTE

Handin Please submit this homework until Thursday, October 25, either via email to Philipp Schus- ter (philipp.schuster@uni-tuebingen.de) before 12:00, or on paper at the beginning

c) At the moment, programs of the source language are just expressions. We now want to extend the lan- guage with assignments. As seen in the tutorial, the semantics of expressions

c) Specify the property that the elevator only opens the door if the current floor was actually requested.. Prove

Recognizing the need to provide global standards with regard to the distinct considerations that should apply to women prisoners and offenders and taking into account a number of

As a result, (1) higher investment levels increase return rates for a given rule, however (2) rules reduce the ability of investors to elicit higher returns through higher

As is the case with enemy scouting systems, depleting his long-range strike forces can enable friendly naval forces to operate relatively freely in no man’s land and to operate

9 As we refer to it, a social optimum in a charity market is achieved when the total amount of charitable contributions received by all charities that operate within the market

:H QRZ WXUQ WR RXU HPSLULFDO UHVXOWV 7DEOHV SUHVHQW UHVXOWV IRU RQHTXDUWHUDKHDG IRUHFDVW FRPSDULVRQV XVLQJ &: VWDWLVWLFV 7DEOH SUHVHQWV WKH FHQWUDO UHVXOWV RI WKH SDSHU :LWK