To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

One-pass algorithm

From Wikipedia, the free encyclopedia

In computing, a one-pass algorithm or single-pass algorithm is a streaming algorithm which reads its input exactly once.[1] It does so by processing items in order, without unbounded buffering; it reads a block into an input buffer, processes it, and moves the result into an output buffer for each step in the process.[2] A one-pass algorithm generally requires O(n) (see 'big O' notation) time and less than O(n) storage (typically O(1)), where n is the size of the input.[3] An example of a one-pass algorithm is the Sondik partially observable Markov decision process.[4]

YouTube Encyclopedic

  • 1/3
    Views:
    540 809
    520 683
    28 758
  • Algorithms Lesson 1: Bubblesort
  • Shortest Path using Dijkstra's Algorithm
  • Strongly Connected Components Kosaraju's Algorithm Graph Algorithm

Transcription

Example problems solvable by one-pass algorithms

Given any list as an input:

  • Count the number of elements.

Given a list of numbers:

Given a list of symbols from an alphabet of k symbols, given in advance.

  • Count the number of times each symbol appears in the input.
  • Find the most or least frequent elements.
  • Sort the list according to some order on the symbols (possible since the and after number of symbols is limited).
  • Find the maximum gap between two appearances of a given symbol.

Example problems not solvable by one-pass algorithms

Given any list as an input:

  • Find the nth element from the end (or report that the list has fewer than n elements).
  • Find the middle element of the list. However, this is solvable with two passes: Pass 1 counts the elements and pass 2 picks out the middle one.

Given a list of numbers:

  • Find the median.
  • Find the modes (This is not the same as finding the most frequent symbol from a limited alphabet).
  • Sort the list.
  • Count the number of items greater than or less than the mean. However, this can be done in constant memory with two passes: Pass 1 finds the average and pass 2 does the counting.

The two-pass algorithms above are still streaming algorithms but not one-pass algorithms.

References

  1. ^ Schweikardt, Nicole. "One-Pass Algorithm" (PDF). Retrieved 2021-07-01.
  2. ^ Pollett, Chris (2005-03-14). "One and Two Pass Algorithms" (PDF). Retrieved 2021-07-01.
  3. ^ Schweikardt, Nicole (2009), "One-Pass Algorithm", in LIU, LING; ÖZSU, M. TAMER (eds.), Encyclopedia of Database Systems, Boston, MA: Springer US, pp. 1948–1949, doi:10.1007/978-0-387-39940-9_253, ISBN 978-0-387-39940-9, retrieved 2021-04-13
  4. ^ "Sondik's One-Pass Algorithm". www.pomdp.org.
This page was last edited on 12 December 2023, at 14:59
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.