Matematisk Lingvistik VT96:15
Class: 15
Date: 960222
Topic: Exercise class 5
Exercise class 5
These exercises are supposed to be handed in on Monday February 26.
In these exercises we will use the following basic structures and
definitions:
T is the tree:
a
/ \
b c
/ \
d e
G is the grammar <VT,VN,S,R> with
VT = {a,b} ,
VN = {A,B,S} ,
S = S and
R = {
<S,ASB> ,
<S,e> ,
<A,aaa> ,
<B,b>
}
ab-cd means the concatenation of the strings ab and cd
(ab)R means the reversal of the string ab
- Compute (ab-(cd)R)R
- An infix is a substring which is neither a prefix nor a suffix.
Give a prefix, a suffix and an infix for the string abcdfg.
- Will the grammar G generate the string e? And what about ab?
And aab? And aaab?
- The grammar G can derive the string aaaaaabb. Give a derivation
for this string.
- Is it possible to make a tree for the derivation of the string
aaaaaabb by G? If your answer is yes, give the tree. Otherwise
give a reason for this not being possible.
- Compute the dominance relation for tree T.
- Compute the precedence relation for tree T.
- Give an example of a non-well-formed tree which has a different
structure than the examples in the figures 16-2 and 16-3 of the
book.
Give a reason for this tree not being well-formed.
- Give a description of the strings that are present in the
language generated by grammar G.
- Make a grammar which generates the language:
{e,ab,abab,ababab,abababab,...}
Each exercise is worth 1 point.
Last update: March 4, 1996.
erikt@stp.ling.uu.se