• Keine Ergebnisse gefunden

SS 2013 17. April 2013 Exercises to the lecture Logics Sheet 1 Jun.-Prof. Dr. Roland Meyer Due 26. April 2013 12:00 Uhr

N/A
N/A
Protected

Academic year: 2021

Aktie "SS 2013 17. April 2013 Exercises to the lecture Logics Sheet 1 Jun.-Prof. Dr. Roland Meyer Due 26. April 2013 12:00 Uhr"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

SS 2013 17. April 2013 Exercises to the lecture Logics

Sheet 1

Jun.-Prof. Dr. Roland Meyer Due 26. April 2013 12:00 Uhr Exercise 1.1 [Structural Induction]

The depth t p A q of a formula A is defined as follows.

• If A is atomic, then t p A q 0.

• If A p B C q for a binary connective , then

t p A q max t t p B q , t p C qu 1.

• If A p B q , then t p A q t p B q 1.

Furthermore, let | A | be the length of the formula A, i.e., the number of symbols in A (including parentheses and connectives).

Prove by structural induction that in every correctly bracketed formula a) the number of opening and the number of closing parentheses coincide.

b) | A | ¤ 5k 1, where k is the number of occurrences of connectives in A.

c) | A | ¤ 4 2

tpAq

3.

Exercise 1.2 [Semantics of formulae]

a) Let ϕ be a valuation with ϕ p p q 1 and ϕ p q q ϕ p r q 0. Calculate ϕ p p p ^ q q Ñ r q

step-by-step using the definition of the evaluation of valuations.

b) Prove or disprove that q Ñ p r Ñ p p _ q qq is a tautology.

c) Prove or disprove q Ñ p ( p Ñ q.

d) Prove or disprove p _ q () p p ^ q q . Exercise 1.3 [Deduction theorem]

a) Let A

1

, . . . , A

n

, B be formulae in propositional logic. Show that A

1

^ ^ A

n

( B if and only if ( p A

1

Ñ p A

2

Ñ p p A

n1

Ñ p A

n

Ñ B qq qqq .

b) Let Σ be a set of formulae and B a formula in propositional logic. Show that

Σ ( B if and only if Σ Y t B u is unsatisfiable.

(2)

Exercise 1.4 [Paths in rooted trees]

A rooted tree is a tree in which one node is chosen as the root and the edges are directed such that their source is closer to the root than their target. A rooted path is a path that starts in the root (but does not necessarily end in a leaf). For each rooted path P , we write ˆ P for the set of nodes it meets. A subset of nodes is called rooted path set if it is of the form ˆ P for some rooted path P .

Let V t a

1

, . . . , a

n

u be the nodes of a rooted tree and let p

1

, . . . , p

n

be atomic formulae.

The subsets of V and the valuations on p

1

, . . . , p

n

are in one-to-one correspondence, where the set S „ V corresponds to the valuation ϕ for which

ϕ p p

i

q 1 if and only if a

i

P S for each i P t 1, . . . , n u .

a) For the rooted tree on the right, present a formula A for which ϕ p A q 1 if and only if ϕ corresponds to a rooted path set.

b) Devise a general method that, given a rooted tree T , constructs a formula A such that ϕ p A q 1 if and only if ϕ corresponds to a rooted path set in T .

a

1

a

2

a

3

a

4

a

5

a

6

Delivery: until 26. April 2013 12:00 Uhr into the box next to room 34/401.4

Referenzen

ÄHNLICHE DOKUMENTE

[r]

Suppose A 1 is formula in predicate logic that is obtained from a formula A in proposi- tional logic by replacing each variable with an atomic formula in predicate logic. Here,

A context-free grammar is called linear if in each rule, the right-hand side contains at most one occurrence of a nonterminal symbol.. Exercise

Note: Hence, you have shown that completeness means that the theory cannot be extended consistently in two ways that contradict

b) In Exercise 1.3 you saw that it is possible to construct an equivalent formula in DNF for any given formula. Explain why the following is not an efficient algorithm for

A set M is called recursively enumerable, if there is an algorithm that outputs a (possibly infinite) sequence in which each element occurs if and only if it is contained in M.

[r]

[r]