What is the difference between an on-line and off-line algorithm?

后端 未结 7 594
-上瘾入骨i
-上瘾入骨i 2021-01-31 08:08

These terms were used in my data structures textbook, but the explanation was very terse and unclear. I think it has something to do with how much knowledge the algorithm has a

7条回答
  •  Happy的楠姐
    2021-01-31 08:45

    An on-line algorithm is one that receives a sequence of requests and performs an immediate action in response to each request.

    In contrast,an off-line algorithm performs action after all the requests are taken.

    This paper by Richard Karp gives more insight on on-line,off-line algorithms.

提交回复
热议问题