Log log n yog dab tsi?

Cov txheej txheem:

Log log n yog dab tsi?
Log log n yog dab tsi?
Anonim

Raws li tau hais hauv cov lus teb rau cov lus nug txuas, ib txoj hauv kev rau ib qho algorithm kom muaj lub sij hawm nyuaj O(log n) yog rau qhov algorithm rau ua haujlwm los ntawm kev txiav qhov loj me ntawm cov tswv yim. los ntawm qee qhov tseem ceeb ntawm txhua qhov kev rov ua dua.

Lub ntsiab lus ntawm lo lus n yog dab tsi?

O(log N) yeej txhais tau tias sij hawm nce linearly thaum n nce exponentially. Yog li yog tias nws siv sijhawm 1 vib nas this los suav 10 lub ntsiab lus, nws yuav siv sijhawm 2 vib nas this los suav 100 lub ntsiab lus, 3 vib nas this los suav 1000 lub ntsiab lus, thiab lwm yam. Nws yog O (log n) thaum peb faib thiab kov yeej hom algorithms xws li binary search.

O thiab log n yog dab tsi?

Rau qhov kev nkag siab ntawm qhov loj me n, ib qho algorithm ntawm O(n) yuav ua cov kauj ruam perportional rau n, thaum lwm qhov algorithm ntawm O(log(n)) yuav ua cov kauj ruam roughly log(n). Kom meej meej log(n) me dua n li algorithm ntawm complexity O(log(n)) zoo dua.

Yuav ua li cas xam log n?

Lub tswv yim yog tias ib qho algorithm yog O (log n) yog tias tsis txav los ntawm cov qauv 1 los ntawm 1, koj faib cov qauv hauv ib nrab thiab ntau dua thiab ua cov haujlwm tas li rau txhua qhov sib cais. Tshawb nrhiav algorithms qhov twg qhov chaw teb yuav tau sib cais yog O(log n).

Dab tsi yog log n Square?

Log ^2 (

) txhais tau tias nws yog proportional to the log ntawm log rau qhov teeb meem loj

. Log(

)^ 2 txhais tau tias yogproportional to the square ntawm log.

Pom zoo: