Dab tsi yog exponential runtime?
Dab tsi yog exponential runtime?

Video: Dab tsi yog exponential runtime?

Video: Dab tsi yog exponential runtime?
Video: Yog hmoov dab tsi - Gao Nou Kue ft. Mang Vang (Official Music Video) New song 2020 2024, Kaum ib hlis
Anonim

Exponential Running Sijhawm . Cov teeb meem uas yuav daws tau los ntawm ib qho exponential lub sij hawm algorithms, tab sis rau uas tsis muaj lub sij hawm polynomial algorithms paub. Ib qho algorithm tau hais tias yog exponential lub sij hawm, yog tias T(n) sab sauv ciam teb los ntawm 2poly( ), qhov twg poly(n) yog ib co polynomial hauv n.

Nyob rau hauv txoj kev no, dab tsi yog polynomial thiab exponential khiav lub sij hawm?

Exponential complexity yuav siv sij hawm ntau dua sij hawm thiab qhov chaw tshaj qhov polynomial complexity rau tib tus naj npawb ntawm cov variables. Aysmptomtically exponential complexity ntau dua polynomial nyuaj. Exponential complexity yuav siv sij hawm ntau dua sij hawm thiab qhov chaw tshaj qhov polynomial complexity rau tib tus naj npawb ntawm cov variables.

Qhov thib ob, lub sijhawm ua haujlwm ntawm lub algorithm yog dab tsi? Cov khiav lub sij hawm ntawm ib tug algorithm rau ib qho kev tawm tswv yim tshwj xeeb nyob ntawm tus naj npawb ntawm cov haujlwm ua haujlwm. Qhov ntau dua qhov kev ua haujlwm, qhov ntev dua khiav lub sij hawm ntawm ib tug algorithm . Peb feem ntau xav paub ntau npaum li cas kev khiav hauj lwm ib algorithm yuav ua rau kev faib ua feem rau qhov loj ntawm nws cov tswv yim, uas peb yuav hu.

Yog li ntawd, dab tsi yog exponential complexity?

Qhov no yog ib qho piv txwv ntawm Quadratic Time nyuaj . O(2^N) - Exponential Sijhawm. Exponential Sijhawm nyuaj qhia txog ib qho algorithm uas nws txoj kev loj hlob ob npaug nrog txhua additon rau cov ntaub ntawv tawm tswv yim. Yog koj paub txog lwm tus exponential cov qauv kev loj hlob, qhov no ua haujlwm zoo ib yam.

Yuav ua li cas yog lub sij hawm polynomial?

A polynomial - lub sijhawm algorithm yog ib algorithm nws txoj kev txiav txim sij hawm yog muab los ntawm a polynomial ntawm qhov loj ntawm cov tswv yim, los yog tuaj yeem ua bounded los ntawm xws li a polynomial . Cov teeb meem uas yuav daws tau los ntawm a polynomial - lub sijhawm algorithm hu ua teeb meem tractable. Kev txheeb xyuas algorithms feem ntau xav tau O (n log n) lossis O (n2) sij hawm.

Pom zoo: