• Keine Ergebnisse gefunden

The algorithm

N/A
N/A
Protected

Academic year: 2021

Aktie "The algorithm"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

The algorithm

Let s and s0 be sorts (i.e. ”heads” of the rules), θ a new sort name. θ is a shorthand writing forrsgV(V, s, s0). Letϕbe an injective mapping.

1. If rsgV(V, s, s0) has been called before,θ is already defined.

2. If sis of the form s=s1|...|sn,

defineθ=rsgV(V, s1, s0)|...|rsgV(V, sn, s0).

3. If sis of the form s0=s01|...|s0n,

defineθ=rsgV(V, s, s01)|...|rsgV(V, s, s0n).

4. If sis of the form s=f(s1, ..., sn) ands0=f(s01, ..., s0n), defineθ=f(rsgV(V, s1, s01), ..., rsgV(V, s1, s0n)).

5. If s=f(s1, ..., sn) andf0(s01, ..., s0m), defineθ=

(t,t0)∈ϕ−1(V)∩(L(s)×L(s0))ϕ(t, t0).

Hints

• For your algorithm, use the following regular tree grammars (which are the tree grammars for 0 and 1, where some laws about addition and mul- tiplication are known, do not worry about the background knowledge, it is of no importance here):

s0= 0|s0+s0|s0∗st|st∗s0

s1=succ(s0)|s0+s1|s1+s0|s1∗s1

st= 0|succ(st)|st+st|st∗st

• Constants (which is only 0 in our case) are treated in cases 4 and 5, as they are viewed as nullary functions, ifs = 0 and s0 = 0, use rule 4, if only one of them is 0, use rule 5.

• ϕis supposed to be a function assigning values to an input-pair of numbers.

You can use the notationsv00, v01, v10, v11, where vij is shorthand for a mapping (i, j)→ϕ(i, j) that evaluates toiins0 and toj in s1.

• If I did confuse you completely with the last two points, use the following rule in your algorithm:

If you run acrosss= 0, s0 =succ(0), use θ=v01, fors=succ(0), s0 = 0, use θ = v10 etc. This is not entirely correct but should work in our example.

• If the whole story keeps on confusing you all the time, we will try to clear up some things on tuesday.

1

Referenzen

ÄHNLICHE DOKUMENTE

Im Stammhaus an der Sihlstrasse begeistern wir seit über 120 Jah- ren mit gesundem Genuss: Bedientes Restaurant, Bistro, Take Away, Hiltl Buffet, Akademie und die erste Vegimetzg

A system in which objects in the physical world can be connected to the Internet by sensors and actuators (coined 1999 by Kevin Ashton)1.

A system in which objects in the physical world can be connected to the Internet by sensors and actuators (coined 1999 by Kevin Ashton)1.

A system in which objects in the physical world can be connected to the Internet by sensors and actuators (coined 1999 by Kevin Ashton)1.

Dank der wiederverwendbaren Hiltl Bento Bowl und unseren Bring Your Own-Waagen schützen wir den Planeten.. Take-Away-Gäste mit eigenem Mehrwegbehälter oder -becher profitieren

In front of the main terminal building at Bremen Airport, take tram line 6 (direction “Universität”) and leave the tram at “Bremen Hauptbahnhof” (Bremen Main Station).. Leave

To achieve improvements in health care (and help determine the content of family doctor service contracts), quality management systems that are tailored to take into account the

Einfaches Beispiel für den Reggae-Rhythmus: zwischen den Zählzeiten werden hier Achtelnoten gespielt, als rhythmische Hilfe kann beim Zählen das Wort „und“ dienen:. In diesem