Kuyini ukusesha nge-binary?
Context:Kwisayensi yamakhompyutha, ukucinga kanambambili, okwaziwa nangokuthi ukucinga kwesigamu, ukucinga kwe-logarithmic, noma ukuchofoza kanambambili, kuyi-algorithm yokucinga ethola isikhundla senani elihlosiwe ngaphakathi kwe-array ehleliwe. Ukucinga kanambambili kuqhathanisa inani elihlosiwe nento ephakathi yohlu. Uma zingalingani, uhhafu lapho inhloso ingekho khona uyaqedwa futhi ukucinga kuyaqhubeka engxenyeni esele, kuphinde kuthathwe into ephakathi ukuqhathanisa nenani elihlosiwe, futhi kuphindwe lokhu kuze kutholakale inani elihlosiwe. Uma usesho luphela isigamu esisele singenalutho, umgomo awukho kuloluhlu.  Ukucinga kanambambili kugijima ngesikhathi se-logarithmic esimweni esibi kakhulu, okwenza  O ((log n) ukuqhathanisa, lapho  n yinani lezakhi ezikule array. [a] Ukusesha kanambambili kuyashesha kunokusesha komugqa ngaphandle kwemigqa emincane. Nokho, i-array kufanele ihlelwe kuqala ukuze kusetshenziswe ukusesha kanambambili. Kukhona izakhiwo zedatha ezikhethekile ezenzelwe ukusesha okusheshayo, njengamatafula e-hash, angacwaningwa ngokuphumelelayo kunokusesha kanambambili. Kodwa-ke, ukusesha kanambambili kungaxazulula izinkinga eziningi, njengokuthola into elandelayo encane noma enkulu kunazo zonke ku-array maqondana ne-target noma ngabe ingekho ku-array.  Kunezinhlobonhlobo eziningi zokusesha nge-binary. Ikakhulukazi, ukuhlelwa kwezingcezu kuyasheshisa ukusesha kanambambili kwenani elifanayo kuma-array amaningi. Ukwehliswa kwezingxenyana kuxazulula ngokuphumelelayo izinkinga eziningana zokucwaninga ku-geometry ye-computational nakwezinye izindawo eziningi. Ukusesha nge-exponential kunweba ukusesha nge-binary kube uhlu olungenamkhawulo. Umuthi wokusesha kanambambili kanye nezakhiwo zedatha yomuthi we-B zisekelwe ekusesheni kanambambili.
Ukucinga kanambambili kuyinqubo yokusesha ethola isikhundla senani elihlosiwe ku-array ehleliwe. Ilahla ingxenye lapho inani elihlosiwe lingeke libe khona. Ifuna inani engxenyeni yesibili. Lokhu kuyaqhubeka ngokuphindaphinda into ephakathi ukuqhathanisa nenani elihlosiwe kuze kutholakale inani elihlosiwe. Ukusesha nge-binary kuyashesha kunokusesha nge-linear ngaphandle kwemigqa emincane.