Ternary Search

What Does Ternary Search Mean?

In computer science and advanced mathematics, a ternary search is a search algorithm that uses a “divide and conquer” strategy to isolate a particular value. It is similar to a binary search, but it divides the search data structure into three parts instead of two.


Techopedia Explains Ternary Search

Divide-and-conquer algorithms work recursively. Through repetitive operations, the algorithm narrows the search field (i.e., the search data structure) in order to isolate the search value. In a ternary search, the algorithm divides the search field into thirds and isolates the minimum or maximum value from two of those thirds. Working recursively, the algorithm can isolate the search value if it exists. For example, out of 30 available end nodes, a first-order ternary search would narrow the field from 30 to 10, and a second-level search would narrow it further from 10 to 3 or 4.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…