5
A
回答
7
Chaitin算法的關鍵洞察力叫做< R規則,如下所示。
給定包含小於R的節點N的圖G,如果圖G'(其中G'是G且節點N被移除)是R可着色的,則G是可着色的。證明在一個方向上是明顯的:如果圖G可以用R顏色着色,則可以在不改變着色的情況下創建圖G'。在另一個方向上,假設我們有G'的R-着色。由於N具有小於R的程度,所以至少有一種顏色不適用於與N相鄰的節點。我們可以用這種顏色對N進行着色。
的算法如下:
While G cannot be R-colored
While graph G has a node N with degree less than R
Remove N and its associated edges from G and push N on a stack S
End While
If the entire graph has been removed then the graph is R-colorable
While stack S contains a node N
Add N to graph G and assign it a color from the R colors
End While
Else graph G cannot be colored with R colors
Simplify the graph G by choosing an object to spill and remove its node N from G
(spill nodes are chosen based on object’s number of definitions and references)
End While
的所述蔡廷布裏格斯算法的複雜度是因爲溢出的問題的O(N 2)。如果圖G在一些點上只有節點R或更大的節點,那麼圖G只能是R可着色的。當一個圖很容易R可着色時,單次迭代的代價爲O(n),因爲我們在圖中進行兩次訪問,每次刪除或添加一個節點。但是溢出會帶來額外的複雜性,因爲在G變成R可着色之前,我們可能需要溢出任意數量的節點。因爲我們灑每一個節點,我們讓通過這個Register allocation algorithm
相關問題
- 1. CLAHE算法解釋
- 2. Kruskal算法解釋
- 3. FASTA算法解釋
- 4. 解釋蠻力算法
- 5. AIML解釋器算法
- 6. Leader聚類算法解釋
- 7. A *(星號)算法解釋
- 8. 解釋0擴展算法
- 9. Pri的算法的解釋
- 10. 解釋這一算法
- 11. Python'in'運算符無法解釋失敗
- 12. Belman卡拉巴算法解釋
- 13. 最小循環移位算法解釋
- 14. 平分k-means聚類算法解釋
- 15. 解釋計數草圖算法
- 16. 誰能解釋hq2x算法的原理?
- 17. ukkonen算法編輯距離的解釋
- 18. OpenCV - cv :: undistortPoints() - 迭代算法解釋
- 19. 快速選擇算法 - 簡單解釋
- 20. 需要厄雷算法一些解釋
- 21. 解釋這一算法(比較SURF算法分)
- 22. 移位算術解釋(C)
- 23. 與*運算符的解釋
- 24. 解釋RDD重新計算
- 25. 元解釋Prolog的,算
- 26. 語法解釋
- 27. 語法解釋
- 28. 需要解釋算法的時間複雜性解決方案
- 29. Java語法解釋
- 30. 語法解釋請
ü希望算法的定義通過線性算法
你也可以去另一行? –
@Sibi是的,我想找到算法的詳細說明。 – DaZzz