• Keine Ergebnisse gefunden

Assume we are given a sequence of layouts p0, p1. . . for a dynamic graph G(0), G(1), . . .. The step from pt to pt+1 is called logical update, whereas the actual animation of the transition is referred to as the physical update.

While simple, say,linear interpolation of two layouts is most frequently used in graph editors, more sophisticated techniques for morphing are available (see, e.g., [55,56,44]). General morphing strategies do not take into account the method by which origin and target layout are generated. For dynamic spectral layout, at least two additional strategies are reasonable.

4.4.1 Iteration

From now on just consider the step from t = 0 to 1. If the target layout p1

is a spectral layout, the power iteration for its own computation can and should be initialized with p0, that will usually be close to the target layout.

The power iteration then produces intermediate layouts which can be used for the physical update. A way to enhance the smoothness of morphing is needed because of the observation that the first steps of the iteration yield greater movement of the vertices when compared to later steps. Let Lˇ := g·I−L(G(1)). An iteration step then consists of computing the new layout ˇLx/|Lx|ˇ from a given layout x⊥1. Let g = λ1 ≥ λ2 ≥ . . . ≥ λn, and 1/√

n = u1, u2, . . . , un be the eigenvalues and unit eigenvectors of ˇL, respectively. If λ1 > λ2 > λ3 (otherwise proper eigenvectors and eigenvalues have to be chosen in the following) and x = Pn

`=2α`u`, α2 6= 0 the power iteration converges to u2 and

One way to handle this non-linear decay is to use layouts after appropriately spaced numbers of steps, or to use layouts only if the difference to the last used layout exceeds some given threshold in some metric. Both ways will enhance the smoothness of morphing by avoiding the drawing of many small movements at the end of the iteration process. Finally, the overall number of iterations can always be used to choose between layout quality and mental-map preservation, where a small number of iterations favors the latter case.

4.4.2 Interpolation

If both origin and target layout p0 and p1 are spectral layouts, intermediate layouts can also be obtained by computing eigenvectors of some intermediate matrices from L(G(0)) to L(G(1)). We interpolate linearly by

(1−t)L(G(0)) +tL(G(1)), 0≤t≤1 .

Layouts are computed for a sequence of breakpoints (each corresponds to a frame of the animation) 0 ≤ t1 < t2 < · · · < t` ≤ 1 (tj+1−tj constant, or proportional to sin(πj/`), depending on what kind of morphing seems to be appropriate, the latter one slowing down at the beginning and end). For every breakpoint tj+1 the iteration is initialized with the layout oftj, which allows fast convergence and small movements between two succeeding breakpoints.

Deletion and insertion of vertices have to be handled in a different manner, since the matrix dimension changes. See Sect. 4.5 for details.

Figures 4.6and 4.8 show smooth animations of this method. Theoretical justification for smoothness comes along with a theorem by Rellich [104]

applied to the finite dimensional case. Matrix (1−t)L(G(0)) +tL(G(1)) is a perturbed self-adjoint operator L(t) := L(G(0)) +t(L(G(1))−L(G(0))) with corresponding eigenvalues λj(t) and eigenvectorsuj(t), that are holomorphic with respect to t, i.e.

L(t)uj(t) = λj(t)uj(t) , (4.1) where uj(0) are eigenvectors at time t = 0 and uj(1) can be permuted by a permutation π, such that uπ(j)(1) are corresponding eigenvectors at time t = 1. Note that two eigenvectors may only have to be exchanged if their corresponding eigenvalues intersect during the time from 0 to 1. And even then, the power iteration exchanges these eigenvectors sufficiently smoothly for pleasing animations because the corresponding eigenvalues remain within the same range for some time.

Consider λ2 and u2 of a small world with n vertices, where starting from a circle, each vertex is connected to its 2k nearest neighbors, and p= 0, see

Sect. 4.5 about the small world model. Both λ2(t) and u2(t) can locally be written as power series

λ2(t) = bλ0+tbλ1+t22+· · · ,

u2(t) = bx0+tbx1+t2bx2+. . . . (4.2) We call λ2(t) and u2(t) smooth functions, if |xbj| ≤ 1 and |bλj| ≤ 8/√

n for j > 0 since this is sufficient for what may intuitively be called a smooth animation, say, for t ∈ [0,1/2]. Note that this condition is very strict and not necessary for a smooth animation. In fact, all animations when inserting an edge into a small world with arbitrary parameters n, k and p = 0 can be called smooth, since the inserted edge just narrows the original circle.

Nevertheless, this strict condition can be seen to be preserved also for small p6= 0 in practice, see Figures4.2to4.4, implying that animations with these graphs are also smooth.

Theorem 4.4.1 The eigenvalueλ2(t)and the eigenvectoru2(t)when insert-ing an edge into a small world with √

n ≤ k ≤ n/5 (and p = 0) are smooth functions.

Proof: We write L(t) =L+tP, where P is the insertion of an edge between two non-adjacent vertices (with indices 1 andr), and denote byIthe identity matrix. From Equations (4.1) and (4.2) we get

Lxb0 =bλ0xb0 , (L−λb0I)bxj =

j−1

X

`=0

j−`bx`−Pxbj−1 ,(j >0) , (4.3) where we can recursively choose bxj,(j >0), such thatxbj⊥bx0. Since the right hand sides of (4.3) need to be orthogonal to xb0 for j >0 this yields

j = (Pbxj−1,xb0) ,(j >0). A set of unit eigenvectors is, e.g.,

u1 =1/√ n ,

uj = (n/2)−1/2 cos(bj/2c2π`/n+ (−1)jπ/4)T

`=1,...,n,(j >1) , and the corresponding eigenvalues are

λj = 2k−2

k

X

`=1

cos(bj/2c2π`/n).

0 5 10 15 20 25 30

0 20 40 60 80 100

Figure 4.1: The eigenvalues λj of a small world with n = 100, k = 10, p= 0 Note that in that order these are not monotone, see Fig.4.1. The multiplicity ofλ2is 2, and the right hand sides of (4.3) are also orthogonal tou1, such that 1/(λ4−λ2) is the least upper bound of the inverse mapping ofL−bλ0I applied to the right hand side. Now we can recursively compute upper bounds for

|bλj| and |xbj|.

|bλ1|= ((bx0)1 −(xb0)r)2 ≤8/n≤8/√ n ,

|xb1| ≤

√2|(xb0)1−(xb0)r|

λ4−λ2 ≤ 4/√ n

λ4−λ2 =:q ,

|bλj| ≤Cj−1qj−14/√ n ,

|bxj| ≤Cjqj ,

where Cj stems from the convolution in (4.3) and is defined by C0 := 1 and Cj+1 := Pj

`=0C`Cj−` for j ≥ 0. Since Lemma 4.4.2 states that Cj ≤ 4j, it remains to be shown that q ≤1/4.

λ4−λ2 ≥k−

k

X

`=1

cos(4π`/n)

= (k+ 1)− cos(2kπ/n) sin(2(k+ 1)π/n) sin(2π/n)

≥(k+ 1)1

2(2kπ/n)2− 1

24(2kπ/n)4

≥ k3

2 (2π/n)2 1− 1

12(2π/5)2 . Together with k ≥√

n this yieldsq ≤1/4.

The bounds forkcan be improved when we do not use the least upper bound of the inverse mapping ofL−bλ0I, but we assume that the right hand sides are independent random vectors and consider expected values. The lower bound forkthen becomes proportional to the cubic root ofn. Anyhow, since during the summation in (4.3) many vectors may cancel out, Theorem 4.4.1 is not tight. In fact, as can be seen in Fig. 4.2, λ2(t) is a smooth function also in some range outside these bounds.

Figures4.2 to4.4 also show that the property of smooth functions carries over to small worlds with p 6= 0 to some extent. While it still holds quite well for small worlds up to p= 0.05 it is clearly no more fulfilled forp= 0.4.

Lemma 4.4.2 For the sequence C0 := 0 and Cj+1 := Pj

`=0C`Cj−`, j ≥ 0 holds Cj ≤4j, j ≥0.

Proof: The sequence Cj is well-known as Catalan numbers whose generating function x7−→(1−√

1−4x)/(2x) delivers Cj = 1

j+ 1 2j

j

.

Now C0 = 1≤40, Cj+1/Cj = 4(j+ 1/2)/(j+ 2) <4 proves the lemma.