• Keine Ergebnisse gefunden

Exercise 2 (Kruskal’s theorem): (2 points)

N/A
N/A
Protected

Academic year: 2021

Aktie "Exercise 2 (Kruskal’s theorem): (2 points)"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Term Rewriting Systems SS 11 Exercise Sheet 6 (due June 3rd, 2011) aa

Prof. Dr. Jürgen Giesl Marc Brockschmidt, Carsten Fuhs, Thomas Ströder

Notes:

• Please solve these exercises ingroups of two!

• The solutions must be handed in directly before (very latest: at the beginning of)the exercise course onFriday, June 3rd, 2011, in lecture hallAH 2. Alternatively you can drop your solutions into a box which is located right next to Prof. Giesl’s office (until the exercise course starts).

• Please write thenamesandimmatriculation numbersof all (two) students on your solution. Please staple the individual sheets!

Exercise 1 (Reduction and Simplification Orders): (2 + 8 = 10 points)

a) The following TRSRis terminating. Please show that there is no simplification order by which termination ofRcan be proved, i.e., for every simplification orderwe have→R*.

minus(x ,O) → x minus(s(x),s(O)) → x

minus(s(s(x)),s(s(y))) → minus(s(p(s(x))),s(p(s(y)))) p(s(x)) → x

b) Please prove or disprove the following propositions. Here,Bdenotes the subterm relation.

i For every well-founded relationwe have that ∪Bis well-founded.

ii For every reduction orderwe have that ∪Bis well-founded.

iii For every reduction orderwe have that ∪Bis a reduction order.

iv For every reduction orderwe have that ∪ emb is well-founded.

v Let be a stable and irreflexive relation withB⊆ . Then for every two termss andt with st we haveV(t)⊆ V(s).

Hints:

• You may use the previous exercise part.

Exercise 2 (Kruskal’s theorem): (2 points)

Consider the real numberπ= 3.14159. . ., describing the ratio of a circle’s circumference to its diameter. We use πn to denote the n-th digit ofπ, i.e.π=π12π3. . ., whereπ1= 3,π2= 1 andπ3= 4. For two sequences of digitss =s1, . . . , sn and t=t1, . . . , tm withsi, ti ∈ {0, . . . ,9}, we calls a subsequence oft if for all 1≤i ≤n there is aki∈ {1, . . . , m}such thatsi=tki andki< kj for alli < j. For example,45is a subsequence of14159.

Use Kruskal’s theorem to show that for eachk≥1, there aren, mwithk ≤n < msuch thatπnπn+1. . . π2nis a subsequence ofπmπm+1. . . π2m.

1

(2)

Term Rewriting Systems SS 11 Exercise Sheet 6 (due June 3rd, 2011)

Exercise 3 (Termination Proofs with Simplification Orders): (1 + 2 + 3 = 6 points)

Please prove termination of the following TRSs using the embedding order. If this is not possible, use the LPO instead and explicitly state the precedence you are using. In this exercise, x, y, and z denote variables while all other identifiers denote function symbols.

To prove that for two terms t1 and t2 we have t1 emb t2 or t1 lpo t2, use a proof tree notation to indi- cate which case of the definition ofemb orlpo you are using. This is illustrated by the following example where we havet1=f(s(x),O), t2=f(x ,s(O)), andt1lpo t2:

Choose fAsAO. Then we have

xlpo x = s(x)lpo x 1

O lpo O = f(s(x),O)lpo O 1 f(s(x),O)lpos(O) 2 f(s(x),O)lpof(x ,s(O)) 3 a)

element(Cons(x , y)) → x

element(Cons(x , y)) → element(y)

b)

rev(rev(x)) → x rev(x) → r(x ,Nil) r(Nil, y) → y

r(Cons(x , z), y) → r(z ,Cons(x , y)))

c)

Dx(var(x)) → s(O) Dx(const(x)) → O

Dx(plus(x , y)) → plus(Dx(x),Dx(y))

Dx(times(x , y)) → plus(times(y ,Dx(x)),times(x ,Dx(y)))

2

Referenzen

ÄHNLICHE DOKUMENTE

Either numerically or analytically, construct a pulse whose time–bandwidth product in terms of FWHM duration and bandwidth is very small.. Comment on the trends in

represents the x-component of the electric filed in the image plane, p x is a dipole source in the object plane, is the axial coordinate, is the numerical aperture

Term Rewriting Systems SS 11 Solution - Exercise Sheet 6

In this exercise we want to show that the model construction for FO 2 -formulae from the lecture is optimal in the following sense: in general it does not suffice to take only

Prof. every node has the same number of neighbours), (ii) the class of Hamiltonian graphs, and. (iii) the class of graphs that admit a

c(t.m1) uses the elements of t.m1 (colum- nwise) to generate a simple vector, and vectors are used liberally to make the required operations possible. The elements are recycled

Numerical Algorithms for Visual Computing III: Optimisation.. Michael Breuß and Kai Uwe Hagenburg

The energy levels ǫ J,n of our molecule are enumerated by the angular momentum and the radial quantum number n.. To understand the structure of the low-lying energy levels we