Skip to content

Interval based Minimization

Oscar Veliz edited this page Jul 22, 2020 · 9 revisions

Ternary Search video Dichotomous Search video Fibonacci Search video Golden-section Search video

The video for Ternary Search can be found here, Dichotomous Search here, and Fibonacci Search here. The code is written in Free Pascal and can be run online via CodingGround. To install locally using the command sudo apt install fp-compiler or sudo apt install fp-compiler-3.0.0. To compile the program navigate to the directory where TernDichFibGold.pas is saved then use the command fpc TernDichFibGold.pas, then type ./TernDichFibGold to run.

The function being solved is found inside the function f. The search interval is given in the input parameters to each search method function. For example, ternary(1,2) searches between 1 and 2. To change the function being minimized simply change f and to change the search space simply alter the input parameters.

Reference links: