Ternary Search

Why Trust Techopedia

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.

Advertisements

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.

Advertisements

Related Terms

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.