魏少涵
摘要: 折半查找是一種常見的靜態(tài)查找方法,在特定的、有序的查找區(qū)間內(nèi),通過折半方式不斷地縮小查找區(qū)間,將區(qū)間中間位置的元素與給定元素加以比較,最終確定查找結(jié)果。在此傳統(tǒng)折半查找基礎(chǔ)上,總結(jié)了一種抽象化的改進(jìn)方法,并將此改進(jìn)后的折半查找算法應(yīng)用于最優(yōu)化問題的求解。
關(guān)鍵詞: 折半查找; 最優(yōu)化; 遞歸; 抽象化
中圖分類號:TP312文獻(xiàn)標(biāo)志碼:A 文章編號:1006-8228(2012)09-31-02
Application of binary search algorithm in optimization problems
Wei Shaohan1,2
(1. Fuzhou Strait Vocational & Technical College, Computer and Communication Engineering Department, Fuzhou, Fujian 350014, China;
2. Fujian University of Technology, Guomai Information College, Computer and Information Science Department)
Abstract: Binary search is a common static search method. It minimizes the search interval by reducing the sorted interval by half and compares the value of the middle position with the given value to reach a conclusion. Based on this traditional binary search algorithm, an abstract improvement is presented so that it can be used to solve optimization problems.
Key words: binary search; optimization; recursion; abstraction