AD Teaching Wiki:

Exercise Sheet 8

The rules for uploading are the same as always. If you forgot them, you can read them again here.

Your solutions (files can only be read by the uploader and by us)

No.

Name

Solution (PDF)

1

Björn Buchhold

PDF

2

Zhongjie Cai

PDF

3

Manuela Ortlieb

PDF

4

Florian Bäurle

PDF

5

Mirko Brodesser

PDF

6

Jonas Krisch

PDF

7

Matthias Sauer

PDF

8

Matthias Frorath

PDF

9

Eric Lacher

PDF

10

Paresh Paradkar

PDF

11

Markus Gruetzner

PDF

12

Johannes Stork

PDF

13

Claudius Korzen

PDF

14

Marius Greitschus

PDF

15

Alexander Nutz

PDF

16

Richard Zahoransky

PDF

17

Jens Silva Santisteban

PDF

18

Alexander Schneider

PDF

19

Achille Nana

PDF

20

Waleed Butt

PDF

21

Alexander Gutjahr

PDF

22

Dragos Sorescu

PDF

23

Daniel Schauenberg

PDF

These were the questions and comments on Exercise Sheet 8

Here is Hint 2: It is not evident in the first case in Hint 1 below that S' ' ' is a monotone sequence. It looks monotone, since by induction hypothesis, S' ' is monotone and then we obtain S' ' ' by adding another transformation at the end. But note that the definition of monotone asks for *strict* monotonicity as far as insert and replace operations are concerned. This can me remedied by proving a slightly stronger statement, namely that for given x and y, there does not only exist a monotone sequence with length ED(x, y), but a monotone sequence with the additional property that all insert / replace operations occur at positions <= m, and all delete operations occur at positions << m+1. Hannah 14Dec09 22:46

Ok, here are two hints for Exercise 3. Hint 1: Let S be a sequence of transformation that transforms x into y. We have to show that there is a *monotone* sequence that transforms x into y and that is of the same length as S. For the induction step, differentiate between three cases, as in the proof of Lemma 2 in the lecture. Let's take as the first case that the last character of y is obtained by an insert or a replace operation of S. Remove that transformation from S, and, if it was an insert and not the last operation from S, decrease the positions of the subsequent transformation in S by one. Call the resulting sequence of transformations S'. Obviously S' is one shorter than S. Verify that S' transforms x into y', where y' is y without its last character. By the induction hypothesis, there now exists a *monotone* sequence S' ' which transforms x into y'. Append the insert / replace operation which we removed from S to S' ' (so that it indeed inserts / replaces the last character of y). Then S' ' ' transforms x into y and has the same length as S. The other two cases are that the last character of x is removed by a delete operation at some point, and that both the last character of x and the last character of y are untouched by any of the transformations in S. [Hint 2 will be added soon] Hannah 14Dec09 22:10

Hi all, I am on the train right now, I just finished writing a quite elaborate hint (using Thunderbird), but now it seems, Thunderbird has swallowed that mail draft. I'll try to find it again, and if not, have to write it again. I hate Thunderbird, I am having so many troubles with it. Hannah 14Dec09 22:03

To Johannes + All: Here is a hint from my side: Using the induction as the professor pointed out, one should proof that for any sequence of transformations of string x to string y, there exist a corresponding monotone sequence of transformations with the same length. Marjan 14Dec 20:00

Most humbly I ask for further hints for exercise 3. Johannes 14Dec09 19:53

Supplemental to Manuela + all: According to an (old) study, most of the words do not contain duplicate k-grams. Marjan 14Dec09 19:35

Hi Manuela + all: thanks for pointing out this problem. No, you don't have to consider this. You may either assume that the k-grams of each word are distinct, or consider A and B as multi-sets, that is, in case a k-gram occurs x > 1 times in a word it is counted x times in the set of k-grams for that word as well. In either case, the size of the set of k-grams of a word x is exactly |x| - k + 1. If that does not fully answer your question, please ask again. Hannah 14Dec09 19:20

I've got a problem with my formula for exercise 2. If I have the words x = bord and y = booo and I want to get the two-grams A = {bo,or,rd} and B = {bo,oo}, then in B there will be a two-gram "oo" lost, because of the set. My formula doesn't realize that and I don't know if I could fix it. Must we consider this problem? Manuela 14Dec09 18:58

To all again: if you want to get notification when someone added a comment to this page, just click on the Info / Subscribe link towards the top right. Then this Wiki page effectively becomes a mailing list for you. If you make only a trivial change to the page (like correcting a typo), then tick the box "Trivial change" before saving, then people will not be sent a notification for (almost) nothing. Hannah 14Dec09 14:49

To all: Exercise 3 is certainly the hardest on this sheet. Although again nobody has asked for a hint so far, here is one: You have to prove that ED(x, y) = EDm(x, y), where ED is the normal edit distance, and EDm is the edit distance where the sequence of transformations must be monotone, as defined in the lecture and on the sheet. ED(x, y) <= EDm(x, y) is trivial since every monotone transformation sequence is also a normal transformation sequence. To prove EDm(x, y) <= ED(x, y), the natural way is again to use induction over |x| + |y|, as done in the lecture for my proof of Lemma 2 (which didn't quite work out, but for other reasons). If you need more hints, ask. Hannah 14Dec09 14:46

Hi Björn, I don't understand why/how you would need that a transformation "knows" its position. I also don't see that there is any big formalism involved in what a transformation is. A transformation is one of insert / delete / replace, and it occurs at a particular position of the current string. That is a transformation, no more no less. Hannah 14Dec09 14:42

One question on exercise 3: Do we have to assume that each transformation is of a certain form (i.e. insert at i'th character of current word, where it matters how many deletes/inserts have been done previously)? Or can we assume that a transformation somehow "knows" its position? If we have to deal with it in an abstract way, should we create our own way of describing a transformation or is there a formalism we all should use. Björn 13:31

Here is another bonus point system: http://www.informatik.uni-freiburg.de:8081/swt/teaching/winter-term-2009/informatik-iii-theoretische-informatik. Additionally I would like to add that most of these bonus point systems have exercises which are far less work. Björn

In some other lectures the points from the sheets are used to increase the grade from the exam. If one got 50% then she/he got 0.3 grade better, 80% for 0.6 better, but min. 4.0 in exam. I.e. 83% of the exercise points and 2.3 in exam = 1.7 final grade. Data Mining & Machine Learning used a more complex scheme, there was theoretical sheets and practical sheets using Weka (the slides should be on electures server). Markus 14Dec09 9:23

Many exercise sheets contained two tasks and for each task we could get 1 point. That means that we could got 2 or even 3 points per sheet. The exercises were optional, but because of the bonus points most students did the exercises. There was another reason to do the exercises. In this lecture the exam was very similar to the exercise sheet tasks, so we had two considerable advantages. In two other lectures we had to achieve 30 and 50% of the exercise points to participate at the exam. Manuela 14Dec09 00:57

Now that I think about it, there were points for solving exercises in exercise-class. Also, there were more than 15 points achievable over the semester, but max. 15 were credited in the exam. alex 13Dec09 23:57

In that lecture we could reach max. 15 bonus points for the exercises. Each exercise sheet scored one point + one extra point for specially good/clever solutions. I don't think there was a constraint on admission to the exam. There might have been points for solving exercises in the exercise-class, but I'm not sure about that. (--> already one year ago) alex 13Dec09 23:48

Thanks for the link, Alex, can you please explain the thing with the "bonus point of the exercise"? Is it that there were 15 bonus points to reach in the exercises? How many tasks in the exercises got bonus points and how many didn't? And the non-bonus tasks than only counted for admission to the exam? Hannah 13Dec09 23:36

I quite liked this scheme, although it does not put that much weight on the exercises: http://cone.informatik.uni-freiburg.de/teaching/vorlesung/algorithmentheorie-w08/exam.html alex 13Dec09 23:17

Can someone please post the details of one of the existing bonus systems here? (Something like: for xyz % of the exercises, you can improve your exam mark by abc.) Or the links to a course site where these details are given. Thanks! Hannah 13Dec09 23:09

To Mirko + all: Yes, it's d, I don't know how I've missed this one. Marjan 12Dec09 13:16

About Exercise 1: in the second part, is it really delta? shouldn't it be d? Mirko 12Dec09, 12:43

AD Teaching Wiki: SearchEnginesWS0910/ExerciseSheet8 (last edited 2009-12-15 22:19:54 by Hannah Bast)