Knowledge (XXG)

Online algorithm

Source 📝

67:: selection sort repeatedly selects the minimum element from the unsorted remainder and places it at the front, which requires access to the entire input; it is thus an offline algorithm. On the other hand, insertion sort considers one input element per iteration and produces a partial solution without considering future elements. Thus insertion sort is an online algorithm. 107:
of an online problem is the best competitive ratio achieved by an online algorithm. Intuitively, the competitive ratio of an algorithm gives a measure on the quality of solutions produced by this algorithm, while the competitive ratio of a problem shows the importance of knowing the future for this problem.
106:
formalizes this idea by comparing the relative performance of an online and offline algorithm for the same problem instance. Specifically, the competitive ratio of an algorithm, is defined as the worst-case ratio of its cost divided by the optimal cost, over all possible inputs. The competitive ratio
70:
Note that the final result of an insertion sort is optimum, i.e., a correctly sorted list. For many problems, online algorithms cannot match the performance of offline algorithms. If the ratio between the performance of an online algorithm and an optimal offline algorithm is bounded, the online
221:. An alternative analysis of the problem can be made with the help of competitive analysis. For this method of analysis, the offline algorithm knows in advance which edges will fail and the goal is to minimize the ratio between the online and offline algorithms' performance. This problem is 101:
Because it does not know the whole input, an online algorithm is forced to make decisions that may later turn out not to be optimal, and the study of online algorithms has focused on the quality of decision-making that is possible in this setting.
209:. The goal of this problem is to minimize the cost of reaching a target in a weighted graph where some of the edges are unreliable and may have been removed from the graph. However, that an edge has been removed ( 448: 217:
when she/he reaches one of the edge's endpoints. The worst case for this problem is simply that all of the unreliable edges fail and the problem reduces to the usual
441: 434: 103: 72: 189: 405: 45:
is given the whole problem data from the beginning and is required to output an answer which solves the problem at hand. In
626: 596: 581: 169: 34:
is one that can process its input piece-by-piece in a serial fashion, i.e., in the order that the input is fed to the
695: 651: 525: 515: 495: 206: 184: 530: 669: 631: 314: 475: 194: 535: 505: 274: 218: 174: 90: 646: 621: 566: 309: 656: 641: 586: 304: 299: 249: 244: 123: 50: 46: 674: 576: 571: 485: 294: 269: 159: 57: 20: 636: 480: 401: 342: 289: 259: 129: 601: 318: 236: 164: 27: 591: 222: 132:: focusing on the time complexity of maintaining solutions to problems with online inputs. 343:"On-line algorithms versus off-line algorithms: How much is it worth to know the future?" 457: 254: 179: 149: 64: 60: 689: 606: 561: 391: 556: 520: 490: 264: 426: 376: 510: 395: 421: 500: 154: 126:: focusing on the amount of memory needed to accurately represent past inputs; 461: 35: 611: 540: 205:
A problem exemplifying the concepts of online algorithms is the
430: 49:, the area in which online algorithms are developed is called 38:, without having the entire input available from the start. 228:
There are many formal problems that offer more than one
378:
Online Algorithms for the Portfolio Selection Problem
549: 468: 16:
Algorithm that begins on possibly incomplete inputs
442: 8: 422:Bibliography of papers on online algorithms 397:Online Computation and Competitive Analysis 89:In grammar theory they are associated with 449: 435: 427: 336: 334: 330: 7: 190:Algorithms for calculating variance 14: 400:. Cambridge University Press. 1: 115:For other points of view on 56:As an example, consider the 279:Portfolio selection problem 245:Job shop scheduling problem 117:online inputs to algorithms 714: 207:Canadian Traveller Problem 185:Page replacement algorithm 18: 665: 341:Karp, Richard M. (1992). 19:Not to be confused with 670:List of data structures 394:; El-Yaniv, R. (1998). 375:Dochow, Robert (2016). 315:Online machine learning 213:) is only revealed to 91:Straight-line grammars 275:Linear search problem 219:Shortest Path Problem 175:Metrical task systems 111:Other interpretations 567:Breadth-first search 310:Sequential algorithm 104:Competitive analysis 71:algorithm is called 657:Topological sorting 587:Dynamic programming 305:Streaming algorithm 300:Real-time computing 250:List update problem 195:Ukkonen's algorithm 124:streaming algorithm 51:online optimization 47:operations research 675:List of algorithms 582:Divide and conquer 577:Depth-first search 572:Brute-force search 486:Binary search tree 381:. Springer Gabler. 295:Prophet inequality 270:Ski rental problem 160:Reservoir sampling 58:sorting algorithms 21:online and offline 696:Online algorithms 683: 682: 481:Associative array 350:IFIP Congress (1) 290:Dynamic algorithm 260:Secretary problem 143:online algorithms 130:dynamic algorithm 82:has an efficient 80:offline algorithm 43:offline algorithm 703: 652:String-searching 451: 444: 437: 428: 411: 383: 382: 372: 366: 365: 363: 361: 347: 338: 319:Offline learning 230:online algorithm 165:Greedy algorithm 41:In contrast, an 32:online algorithm 28:computer science 713: 712: 706: 705: 704: 702: 701: 700: 686: 685: 684: 679: 661: 592:Graph traversal 545: 469:Data structures 464: 458:Data structures 455: 418: 408: 390: 387: 386: 374: 373: 369: 359: 357: 345: 340: 339: 332: 327: 286: 240:-server problem 223:PSPACE-complete 203: 201:Online problems 170:Adversary model 139: 113: 99: 24: 17: 12: 11: 5: 711: 710: 707: 699: 698: 688: 687: 681: 680: 678: 677: 672: 666: 663: 662: 660: 659: 654: 649: 644: 639: 634: 629: 624: 619: 614: 609: 604: 599: 594: 589: 584: 579: 574: 569: 564: 559: 553: 551: 547: 546: 544: 543: 538: 533: 528: 523: 518: 513: 508: 503: 498: 493: 488: 483: 478: 472: 470: 466: 465: 456: 454: 453: 446: 439: 431: 425: 424: 417: 416:External links 414: 413: 412: 406: 385: 384: 367: 329: 328: 326: 323: 322: 321: 312: 307: 302: 297: 292: 285: 282: 281: 280: 277: 272: 267: 262: 257: 255:Bandit problem 252: 247: 242: 202: 199: 198: 197: 192: 187: 182: 180:Odds algorithm 177: 172: 167: 162: 157: 152: 150:Insertion sort 138: 135: 134: 133: 127: 112: 109: 98: 95: 65:insertion sort 61:selection sort 15: 13: 10: 9: 6: 4: 3: 2: 709: 708: 697: 694: 693: 691: 676: 673: 671: 668: 667: 664: 658: 655: 653: 650: 648: 645: 643: 640: 638: 635: 633: 630: 628: 625: 623: 620: 618: 615: 613: 610: 608: 607:Hash function 605: 603: 600: 598: 595: 593: 590: 588: 585: 583: 580: 578: 575: 573: 570: 568: 565: 563: 562:Binary search 560: 558: 555: 554: 552: 548: 542: 539: 537: 534: 532: 529: 527: 524: 522: 519: 517: 514: 512: 509: 507: 504: 502: 499: 497: 494: 492: 489: 487: 484: 482: 479: 477: 474: 473: 471: 467: 463: 459: 452: 447: 445: 440: 438: 433: 432: 429: 423: 420: 419: 415: 409: 407:0-521-56392-5 403: 399: 398: 393: 389: 388: 380: 379: 371: 368: 355: 351: 344: 337: 335: 331: 324: 320: 316: 313: 311: 308: 306: 303: 301: 298: 296: 293: 291: 288: 287: 283: 278: 276: 273: 271: 268: 266: 263: 261: 258: 256: 253: 251: 248: 246: 243: 241: 239: 235: 234: 233: 232:as solution: 231: 226: 224: 220: 216: 215:the traveller 212: 208: 200: 196: 193: 191: 188: 186: 183: 181: 178: 176: 173: 171: 168: 166: 163: 161: 158: 156: 153: 151: 148: 147: 146: 144: 136: 131: 128: 125: 122: 121: 120: 118: 110: 108: 105: 96: 94: 92: 87: 86:counterpart. 85: 81: 76: 74: 68: 66: 62: 59: 54: 52: 48: 44: 39: 37: 33: 29: 22: 632:Root-finding 616: 557:Backtracking 521:Segment tree 491:Fenwick tree 396: 377: 370: 358:. Retrieved 353: 349: 265:Search games 237: 229: 227: 214: 210: 204: 142: 140: 116: 114: 100: 88: 83: 79: 77: 69: 55: 42: 40: 31: 25: 511:Linked list 392:Borodin, A. 73:competitive 647:Sweep line 622:Randomized 550:Algorithms 501:Hash table 462:algorithms 325:References 155:Perceptron 97:Definition 78:Not every 642:Streaming 627:Recursion 360:17 August 356:: 416–429 36:algorithm 690:Category 284:See also 137:Examples 637:Sorting 612:Minimax 119:, see 617:Online 602:Greedy 531:String 404:  211:failed 84:online 526:Stack 516:Queue 496:Graph 476:Array 346:(PDF) 141:Some 30:, an 597:Fold 541:Trie 536:Tree 506:Heap 460:and 402:ISBN 362:2015 63:and 26:In 692:: 354:12 352:. 348:. 333:^ 225:. 145:: 93:. 75:. 53:. 450:e 443:t 436:v 410:. 364:. 317:/ 238:k 23:.

Index

online and offline
computer science
algorithm
operations research
online optimization
sorting algorithms
selection sort
insertion sort
competitive
Straight-line grammars
Competitive analysis
streaming algorithm
dynamic algorithm
Insertion sort
Perceptron
Reservoir sampling
Greedy algorithm
Adversary model
Metrical task systems
Odds algorithm
Page replacement algorithm
Algorithms for calculating variance
Ukkonen's algorithm
Canadian Traveller Problem
Shortest Path Problem
PSPACE-complete
k-server problem
Job shop scheduling problem
List update problem
Bandit problem

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.