# Algorithm Design: Solutions Manual # Algorithm Design: Solutions Manual

## Jon Kleinberg, Éva Tardos

Language: English

Pages: 207

ISBN: 2:00171447

Format: PDF / Kindle (mobi) / ePub

Algorithm Design introduces algorithms by looking at the real-world problems that motivate them. The book teaches students a range of design and analysis techniques for problems that arise in computing applications. The text encourages an understanding of the algorithm design process and an appreciation of the role of algorithms in the broader field of computer science.

Suppose m ≤ n, and let L denote the maximum length of any string in A ∪ B. Suppose there is a string that is a concatenation over both A and B, and let u be one of minimum length. We claim that the length of u is at most n2 L2 . For suppose not. First, we say that position p in u is of type (ai , k) if in the concatenation over A, it is represented by

position k of string ai . We define type (bi , k) analogously. Now, if the length of u is greater than n2 L2 , then by the pigeonhole principle, there exist positions p and p in u, p < p , so that both are of type (ai , k) and (bj , k) for some indices i, j, k. But in this case, the string u obtained by deleting positions p, p + 1, . . . , p − 1 would also be a concatenation over both A and B. As u is shorter than u, this is a contradiction. 1 ex690.144.299 1

position k of string ai . We define type (bi , k) analogously. Now, if the length of u is greater than n2 L2 , then by the pigeonhole principle, there exist positions p and p in u, p < p , so that both are of type (ai , k) and (bj , k) for some indices i, j, k. But in this case, the string u obtained by deleting positions p, p + 1, . . . , p − 1 would also be a concatenation over both A and B. As u is shorter than u, this is a contradiction. 1 ex690.144.299 1

position k of string ai . We define type (bi , k) analogously. Now, if the length of u is greater than n2 L2 , then by the pigeonhole principle, there exist positions p and p in u, p < p , so that both are of type (ai , k) and (bj , k) for some indices i, j, k. But in this case, the string u obtained by deleting positions p, p + 1, . . . , p − 1 would also be a concatenation over both A and B. As u is shorter than u, this is a contradiction. 1 ex690.144.299 1

position k of string ai . We define type (bi , k) analogously. Now, if the length of u is greater than n2 L2 , then by the pigeonhole principle, there exist positions p and p in u, p < p , so that both are of type (ai , k) and (bj , k) for some indices i, j, k. But in this case, the string u obtained by deleting positions p, p + 1, . . . , p − 1 would also be a concatenation over both A and B. As u is shorter than u, this is a contradiction. 1 ex690.144.299 1