For faster navigation, this Iframe is preloading the Wikiwand page for Cota superior asimptòtica.

Cota superior asimptòtica

Aquest article o secció necessita millorar una traducció deficient.Podeu col·laborar-hi si coneixeu prou la llengua d'origen. També podeu iniciar un fil de discussió per consultar com es pot millorar. Elimineu aquest avís si creieu que està solucionat raonablement.

En anàlisi d'algorismes una cota superior asimptòtica és una funció que serveix de cota superior d'una altra funció quan l'argument tendeix a infinit. Usualment s'utilitza la notació de Landau: O(g(x)), per referir-se a les funcions acotades superiorment per la funció g(x). Més formalment es defineix:

Una funció f(x) pertany a O(g(x)) quan hi ha una constant positiva c tal que a partir d'un valor , no supera cg(x). Vol dir que la funció f és inferior a g a partir d'un valor donat excepte per un factor constant.

La cota superior asimptòtica té utilitat en Teoria de la complexitat computacional quan es defininen les classes de complexitat.

Tot i que O(g(x)) està definit com un conjunt, s'acostuma a escriure f(x)= O(g(x)) en lloc de f(x)∈ O(g(x)). Moltes vegades també es parla d'una funció nomenant únicament la seva expressió, com en en lloc de h(x)=x², sempre que estigui clar quin és el paràmetre de la funció dins de l'expressió. En la gràfica es dona un exemple esquemàtic de com es comporta pel que fa a f(x) quan x tendeix a infinit. Cal notar a més que aquest conjunt és no buit doncs g(x)=O(g(x)).

La cota ajustada asimptòtica (notació Θ) té relació amb les cotes asimptòtiques superior (notació O) i inferior:

Propietats

[modifica]

Sigui , siguin , , , funcions i un real. És compleixen els següents enunciats:

i) Si y , llavors
ii) Si y , llavors
iii) (igualtat entre conjunts)
iv) Si y , llavors
v) Si llavors (igualtat entre conjunts)
vi) Si , llavors .

Exemples

[modifica]
  • La funció f(x) = x + 10 pot ser fitada superiorment per la funció g(x) = x². Per demostrar-ho és prou notar que per a tot valor de x≥3.7016 es compleix x+10 ≤ x². Per tant x+10 = O(x²). Però x² no serveix com a cota inferior per x+10, és a dir .
  • La funció 200x està fitada superiorment per . Vol dir que quan x tendeix a infinit el valor de 200x es pot menysprear comparat amb el de .

Ordres usuals per a funcions

[modifica]

Els ordres més utilitzats en anàlisi d'algorismes, en ordre creixent, són els següents (on c representa una constant i n la mida de l'entrada):

notació nom
O(1) ordre constant
O(log log n) ordre sublogarítmic
O(log n) ordre logarítmic
O() ordre sublineal
O(n) ordre lineal o de primer ordre
O(n · log n) ordre lineal logarítmic
O() ordre quadràtic

o de segon ordre

O(n3), ... ordre cúbic o de tercer ordre, ...
O(nc) ordre potencial fix
O(cn), n > 1 ordre exponencial
O(n!) ordre factorial
O(nn) ordre potencial exponencial

Vegeu també

[modifica]

Bibliografia

[modifica]
  • Introduction to Algorithms, Second Edition by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein
{{bottomLinkPreText}} {{bottomLinkText}}
Cota superior asimptòtica
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?