Dab tsi yog kev siv topological sorting?
Dab tsi yog kev siv topological sorting?

Video: Dab tsi yog kev siv topological sorting?

Video: Dab tsi yog kev siv topological sorting?
Video: Tooj Nchai rov mus noj quav nploos 8/14/2017 2024, Kaum ib hlis
Anonim

A topological yam siv acyclic graphand ua ib qho kev txiav txim ntawm tag nrho nws cov vertices xws li yog tias daim duab G muaj ntug (v, w) ces lub vertex v los ua ntej thevertex w hauv kev txiav txim. Qhia acyclic graphs yog siv hauv ntau daim ntawv thov los qhia qhov ua ntej ntawm cov xwm txheej.

Yog li ntawd, lub hom phiaj ntawm topological sorting yog dab tsi?

Topological sorting . Hauv computer science, a topological yam los yog topological kev txiav txim ntawm adirected graph yog linear xaj ntawm nws cov vertices xws li rau txhua qhov taw qhia ntug uv los ntawm vertex u rau vertex v, koj tuaj ua ntej v hauv xaj.

Ib yam li ntawd, koj ua li cas los txiav txim lub voj voog hauv topological yam? Rau kuaj lub voj voog , peb ua tau kuaj rau a lub voj voog nyob rau hauv tus kheej ntoo los ntawm kev tshuaj xyuas qab ntug. Rau ntes sab nraub qaum, peb tuaj yeem taug qab cov kab ntsug tam sim no hauv cov txheej txheem rov ua haujlwm rau DFS traversal. Yog tias peb mus txog avertex uas twb nyob hauv pawg recursion, ces muaj ib qho lub voj voog hauv tsob ntoo.

Ib yam li ntawd, nws yog nug, dab tsi yog txhais los ntawm topological sorting?

Topological sorting rau Directed Acyclic Graph (DAG) yog linear xaj ntawm vertices xws li rau txhua qhov taw qhia ntug uv, vertex u los ua ntej v hauv xaj . Yuav muaj ntau tshaj ib topological sorting rau agraph.

Prims algorithm ua haujlwm li cas?

Hauv computer science, Prim cov (tseem hu ua Jarník's) algorithm yog tus siab hlob algorithm uas pom qhov tsawg kawg nkaus spanning ntoo rau ib tug hnyav undirected graph. Qhov no txhais tau hais tias nws pom ib qho me me ntawm cov npoo uas tsim ib tsob ntoo uas suav nrog txhua qhov vertex, qhov twg tag nrho qhov hnyav ntawm tag nrho cov npoo hauv tsob ntoo raug txo qis.

Pom zoo: