• Keine Ergebnisse gefunden

SS 2012 20.6.2012 In-class Exercises to the Lecture Logics Sheet 5 Jun.-Prof. Dr. Roland Meyer Discussion on 21./22.6.2012

N/A
N/A
Protected

Academic year: 2021

Aktie "SS 2012 20.6.2012 In-class Exercises to the Lecture Logics Sheet 5 Jun.-Prof. Dr. Roland Meyer Discussion on 21./22.6.2012"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

SS 2012 20.6.2012 In-class Exercises to the Lecture Logics

Sheet 5

Jun.-Prof. Dr. Roland Meyer Discussion on 21./22.6.2012

Exercise 5.1 [MSO on words]

Let Σ be an alphabet and Φ be the set of formulae in second order predicate logic in which only the following predicates occur:

p

a

, a unary predicate, for each a P Σ,

•   , a binary predicate, and

• suc, a binary predicate.

To each word w P Σ , we associate the interpretation I

w

p D

w

, I

cw

, I

vw

q , where

D

w

t 1, . . . , | w |u is the set of positions in w,

• for each a I

w

p p

a

q is the set of positions that contain an a,

I

w

p x   y q 1 if and only if I

w

p x q   I

w

p y q ,

I

w

p suc px, yqq 1 if and only if I

w

pyq I

w

pxq 1.

For example, let Σ t a, b u and w ab. Then D

w

t 1, 2 u , I

w

p p

a

q t 1 u and I

w

p p

b

q t 2 u . In this situation, we have

I

w

( D x D y p x   y ^ p

a

p x qq ^ D x D y D z p x   y ^ y   z q . The language defined by A P Φ is

L p A q t w P Σ | I

w

( A u .

The logic defined this way is also known as Monadic Second Order Logic on words.

a) Present a formula A with L p A q t a u t b u , Σ t a, b u . b) Present a formula A with LpAq Σ

tau Σ

tbu , Σ ta, bu .

c) Suppose you have symbols r, a, and i in Σ, where r, a, and i represent a request, an acknowledge, and an internal event, respectively. Present a formula A such that L p A q is the set of words such that: after each request event, at least one acknowledge event follows eventually.

Exercise 5.2 [MSO on graphs]

a) Describe, similar to Exercise 5.1,

• a collection of predicates,

• an interpretation for each graph,

such that you can define sets of graphs using formulae.

(2)

b) Present a formula that defines precisely the set of connected graphs.

Exercise 5.3 [Undecidability]

A context-free grammar is called linear if in each rule, the right-hand side contains at most one occurrence of a nonterminal symbol. Show that the following problem is undecidable: Given linear context-free grammars G

1

and G

2

, is L p G

1

q X L p G

2

q H ? Exercise 5.4 [Formulae in predicate logic]

a) Let A @ x D yp p x, y q and B D y @ xP p x, y q . Which of these formulas is deducible from the other? Are they equivalent?

b) Is the formula @ xp p x q Ñ D xp p x q a tautology?

Referenzen

ÄHNLICHE DOKUMENTE

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.

Mai 2012 In-class Exercises to the Lecture Logics.

[r]

Das Ballspiel nach Smullyan wird von einer Person gespielt und verläuft nach fol- genden Regeln: Es steht ein Behältnis zur Verfügung, das unbegrenzt viele Bälle fassen kann..

Smullyan’s ball game is played by one player according to the following rules: There is a container that has capacity for an unlimited number of balls.. Furthermore, there is

[r]

[r]