CapÃtulo 3 Complejidad de algoritmos recursivos ⩠⨠⧠= > â = 0 1 0 ...
CapÃtulo 3 Complejidad de algoritmos recursivos ⩠⨠⧠= > â = 0 1 0 ...
CapÃtulo 3 Complejidad de algoritmos recursivos ⩠⨠⧠= > â = 0 1 0 ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Instituto Tecnológico <strong>de</strong> Ciudad Ma<strong>de</strong>ro<br />
Unidad I COMPLEJIDAD DE ALGORITMOS<br />
Dra. Laura Cruz Reyes<br />
Capítulo 3 <strong>Complejidad</strong> <strong>de</strong> <strong>algoritmos</strong> <strong>recursivos</strong><br />
De la fórmula general <strong>de</strong> divi<strong>de</strong>-y-venceras:<br />
T(n) = b T( n/c ) + f(n),<br />
b=3, c=4, f(n) =nlgn.<br />
Para <strong>de</strong>terminar que la recurrencia correspon<strong>de</strong> al caso 3 <strong>de</strong>l Teorema Maestro, sea<br />
f( n) = nlgn<br />
c<br />
gn ( ) = n b = n<br />
log + ε log4<br />
3+<br />
ε<br />
Se <strong>de</strong>muestra que f(n) = Ω(g(n))<br />
⎛ f( n) ⎞ ⎛ nlgn<br />
⎞<br />
lim ⎜ ⎟=<br />
lim ⎜<br />
x<br />
log4<br />
3<br />
( ) x<br />
+ ε ⎟<br />
→∞ gn →∞<br />
⎝ ⎠ ⎝n<br />
⎠<br />
⎛ nlg<br />
n ⎞<br />
lim ⎜ lim lg n si ε 0.207<br />
x→∞<br />
0.793 ε ⎟ = =∞ =<br />
n n x→∞<br />
⎝ ⎠<br />
⎛ nlg<br />
n ⎞<br />
lim ⎜<br />
si 0< ε 0.207<br />
x→∞<br />
0.793 ε ⎟ =∞ ≤<br />
⎝n<br />
n ⎠<br />
logc<br />
b+<br />
ε<br />
( )<br />
∴ f( n) =Ω n para ε > 0<br />
A<strong>de</strong>más, se <strong>de</strong>muestra que bf(n/c)≤c´f(n) para alguna constante c´