7674b879eb
many files updated with trivial fixes. modified: docs/design/TCP.md modified: docs/design/peer_socket.md modified: docs/design/proof_of_share.md modified: docs/estimating_frequencies_from_small_samples.md modified: docs/libraries.md modified: docs/libraries/scripting.md modified: docs/manifesto/May_scale_of_monetary_hardness.md modified: docs/manifesto/bitcoin.md modified: docs/manifesto/consensus.md modified: docs/manifesto/lightning.md modified: docs/manifesto/scalability.md modified: docs/manifesto/social_networking.md modified: docs/manifesto/sox_accounting.md modified: docs/manifesto/triple_entry_accounting.md modified: docs/manifesto/white_paper_YarvinAppendix.md modified: docs/names/multisignature.md modified: docs/names/petnames.md modified: docs/names/zookos_triangle.md modified: docs/notes/big_cirle_notation.md modified: docs/number_encoding.md modified: docs/scale_clients_trust.md modified: docs/setup/contributor_code_of_conduct.md modified: docs/setup/core_lightning_in_debian.md modified: docs/setup/set_up_build_environments.md modified: docs/setup/wireguard.md modified: docs/writing_and_editing_documentation.md
1.3 KiB
1.3 KiB
title: >-
Big Circ notation
# katex
...
The definition of
\bigcirc
used by mathematicians is not convenient for engineers.
So in practice we ignore that definition and use our own.
The mathematical definition is, roughly, that if f(n)=\bigcirc\big(g(n)\big)
then f(n)
grows no faster than g(n)
, that there exists some value K such that for values of n
of interest and larger than of interest $f(n)\le Kg(n)$
Which is kind of stupid for engineers, because by that definition an algorithm that takes time \bigcirc(n)
also takes time \bigcirc(n^2)
, \bigcirc(n!)
, etcetera.
So, Knuth defined \large\Omega
, which means, roughly, that there exists some value K such that for values of n
of interest and larger than of interest $f(n)\ge Kg(n)$
Which is also stupid for the same reason.
So what all engineers do in practice is use \bigcirc
to mean that the mathematical definition of \bigcirc
is true, and Knuths definition of \large\Omega
is also largely true, so when we say that an operation take that much time, we mean that it takes no more than that much time, and frequently takes something like that much time.
So, by the engineer's definition of \bigcirc
, if an algorithm takes \bigcirc(n)
time it does not take \bigcirc(n^2)
time.
Which is why we never need to use Knuth's $\large\Omega$