コンテンツにスキップ

償却解析

出典: フリー百科事典『ウィキペディア(Wikipedia)』

 : amortized analysis[1] ()[2]

歴史[編集]


aggregate analysis()Robert Tarjan 1985  Amortized Computational Complexity 使 union ( SQL  union )使[2]

手法[編集]


"" 3使[3]

Aggregate analysis -   n T(n)   T(n) / n[3]

en:Accounting_method - (short-running operations)""(long-running operations)[3]

en:Potential_method - accounting method 

[]

[]


Java  ArrayList 44 push 5 push 2 (8) 3 push 2  n n + 1  push 112 O(n)  n + 1  push  [3]

[]


Ruby  (FIFO)
class Queue
  def initialize
    @input = []
    @output = []
  end

  def enqueue(element)
    @input << element
  end

  def dequeue
    if @output.empty?
      while @input.any?
        @output << @input.pop
      end
    end

    @output.pop
  end
end

enqueue  push  dequeue dequeue  O(n)  n n n dequeue  O(n)  n dequeue  dequeue  O(1) [4]  enqueue  enqueue 2dequeue  O(1) 

一般的な使用[編集]

  • 一般的な使用法として、"償却アルゴリズム" は償却解析がよりよく行われることを示したものである。
  • オンラインアルゴリズム は共通して償却解析を使用している。

出典[編集]



(一)^ "Lecture 7: Amortized Analysis" (PDF). www.cs.cmu.edu. 2015314

(二)^ abFiebrink, Rebecca (2007), Amortized Analysis Explained, http://www.cs.princeton.edu/~fiebrink/423/AmortizedAnalysisExplained_Fiebrink.pdf 201153 

(三)^ abcdLecture 20: Amortized Analysis. http://www.cs.cornell.edu/.  Cornell University. 2015314

(四)^ CSE332: Data Abstractions. cs.washington.edu. 2015314

参考文献[編集]