Изменения

Перейти к: навигация, поиск

Деревья Эйлерова обхода

357 байт убрано, 17:59, 3 декабря 2016
Связывание деревьев
[[Файл:Link11.png |center|Пример ]]
 
Given two trees T₁ and T₂, where u ∈ T₁ and v ∈ T₂, executing link(u, v) links the trees together by adding edge {u, v}.<br>
Watch what happens to the Euler tours:
 
[[Файл:Link2.png |center|Пример ]]
Для связывания деревьев <tex>T_1 </tex> и <tex>T_2</tex>, где <tex>u \in T_1\ </tex>, а <tex>v \in T_2\</tex> добавлением ребра <tex>\{u, v\} \</tex> необходимо:
*Добавить <tex>\{u\}</tex> в конец последовательности.
To link T₁ and T₂ by adding {u, v}[[Файл:<br>Let E₁ and E₂ be Euler tours of T₁ and T₂, respectivelyLink2.<br>png |center|Пример ]]Rotate E₁ to root the tour at u.<br>Rotate E₂ to root the tour at v.<br>Concatenate E₁, E₂, {u}.В результате получим:
[[Файл:Link3.png |center|Пример ]]
635
правок

Навигация