fibonacci_search_technique

Fibonacci search technique

Return to Fibonacci number, Fibonacci, List of Algorithms, Algorithms

Snippet from Wikipedia: Fibonacci search technique

In computer science, the Fibonacci search technique is a method of searching a sorted array using a divide and conquer algorithm that narrows down possible locations with the aid of Fibonacci numbers. Compared to binary search where the sorted array is divided into two equal-sized parts, one of which is examined further, Fibonacci search divides the array into two parts that have sizes that are consecutive Fibonacci numbers. On average, this leads to about 4% more comparisons to be executed, but it has the advantage that one only needs addition and subtraction to calculate the indices of the accessed array elements, while classical binary search needs bit-shift (see Bitwise operation), division or multiplication, operations that were less common at the time Fibonacci search was first published. Fibonacci search has an average- and worst-case complexity of O(log n) (see Big O notation).

The Fibonacci sequence has the property that a number is the sum of its two predecessors. Therefore the sequence can be computed by repeated addition. The ratio of two consecutive numbers approaches the Golden ratio, 1.618... Binary search works by dividing the seek area in equal parts (1:1). Fibonacci search can divide it into parts approaching 1:1.618 while using the simpler operations.

If the elements being searched have non-uniform access memory storage (i. e., the time needed to access a storage location varies depending on the location accessed), the Fibonacci search may have the advantage over binary search in slightly reducing the average time needed to access a storage location. If the machine executing the search has a direct mapped CPU cache, binary search may lead to more cache misses because the elements that are accessed often tend to gather in only a few cache lines; this is mitigated by splitting the array in parts that do not tend to be powers of two. If the data is stored on a magnetic tape where seek time depends on the current head position, a tradeoff between longer seek time and more comparisons may lead to a search algorithm that is skewed similarly to Fibonacci search.

Fibonacci search is derived from Golden section search, an algorithm by Jack Kiefer (1953) to search for the maximum or minimum of a unimodal function in an interval.

Algorithms: Big O Notation, Iterative method Chase algorithm, Grokking Algorithms, Edsger Dijkstra, Donald Knuth: The Art of Computer Programming (TAOCP), Analysis of algorithms. Algorithms GitHub. (navbar_algorithms)

navbar_Algorithms

Algorithms: Algorithms Fundamentals, Algorithms Inventor: Algorithms Language Designer: ZZZ on DATE, YEAR; Algorithms DevOps - Algorithms SRE, Cloud Native Algorithms (Algorithms on Kubernetes - Algorithms on AWS - Algorithms on Azure - Algorithms on GCP), Algorithms Microservices, Algorithms Containerization (Algorithms Docker - Algorithms on Docker Hub), Serverless Algorithms, Algorithms Data Science - Algorithms DataOps - Algorithms and Databases (Algorithms ORM), Algorithms ML - Algorithms DL, Functional Algorithms (1. Algorithms Immutability, 2. Algorithms Purity - Algorithms No Side-Effects, 3. Algorithms First-Class Functions - Algorithms Higher-Order Functions, Algorithms Lambdas - Algorithms Anonymous Functions - Algorithms Closures, Algorithms Lazy Evaluation, 4. Algorithms Recursion), Reactive Algorithms), Algorithms Concurrency - Algorithms Parallel Programming - Async Algorithms, Algorithms Networking, Algorithms Security - Algorithms DevSecOps - Algorithms OAuth, Algorithms Memory Allocation (Algorithms Heap - Algorithms Stack - Algorithms Garbage Collection), Algorithms CI/CD - Algorithms Dependency Management - Algorithms DI - Algorithms IoC - Algorithms Build Pipeline, Algorithms Automation - Algorithms Scripting, Algorithms Package Managers, Algorithms Modules - Algorithms Packages, Algorithms Installation (Algorithms Windows - Chocolatey Algorithms, Algorithms macOS - Homebrew Algorithms, Algorithms on Linux), Algorithms Configuration, Algorithms Observability (Algorithms Monitoring, Algorithms Performance - Algorithms Logging), Algorithms Language Spec - Algorithms RFCs - Algorithms Roadmap, Algorithms Keywords, Algorithms Operators, Algorithms Functions, Algorithms Data Structures - Algorithms Algorithms, Algorithms Syntax, Algorithms OOP (1. Algorithms Encapsulation - 2. Algorithms Inheritance - 3. Algorithms Polymorphism - 4. Algorithms Abstraction), Algorithms Design Patterns - Algorithms Best Practices - Algorithms Style Guide - Clean Algorithms - Algorithms BDD, Algorithms Generics, Algorithms I/O, Algorithms Serialization - Algorithms Deserialization, Algorithms APIs, Algorithms REST - Algorithms JSON - Algorithms GraphQL, Algorithms gRPC, Algorithms Virtualization, Algorithms Development Tools: Algorithms SDK, Algorithms Compiler - Algorithms Transpiler, Algorithms Interpreter - Algorithms REPL, Algorithms IDEs (JetBrains Algorithms, Algorithms Visual Studio Code), Algorithms Linter, Algorithms Community - Algorithmsaceans - Algorithms User, Algorithms Standard Library - Algorithms Libraries - Algorithms Frameworks, Algorithms Testing - Algorithms TDD, Algorithms History, Algorithms Research, Algorithms Topics, Algorithms Uses - List of Algorithms Software - Written in Algorithms - Algorithms Popularity, Algorithms Bibliography - Algorithms Courses, Algorithms Glossary - Algorithms Official Glossary, Algorithms GitHub, Awesome Algorithms. (navbar_Algorithms)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


fibonacci_search_technique.txt · Last modified: 2024/04/28 03:44 (external edit)