StudentsEducators

Ternary Search

Ternary Search is an efficient algorithm used for finding the maximum or minimum of a unimodal function, which is a function that increases and then decreases (or vice versa). Unlike binary search, which divides the search space into two halves, ternary search divides it into three parts. Given a unimodal function f(x)f(x)f(x), the algorithm consists of evaluating the function at two points, m1m_1m1​ and m2m_2m2​, which are calculated as follows:

m1=l+(r−l)3m_1 = l + \frac{(r - l)}{3}m1​=l+3(r−l)​ m2=r−(r−l)3m_2 = r - \frac{(r - l)}{3}m2​=r−3(r−l)​

where lll and rrr are the current bounds of the search space. Depending on the values of f(m1)f(m_1)f(m1​) and f(m2)f(m_2)f(m2​), the algorithm discards one of the three segments, thereby narrowing down the search space. This process is repeated until the search space is sufficiently small, allowing for an efficient convergence to the optimum point. The time complexity of ternary search is generally O(log⁡3n)O(\log_3 n)O(log3​n), making it a useful alternative to binary search in specific scenarios involving unimodal functions.

Other related terms

contact us

Let's get started

Start your personalized study experience with acemate today. Sign up for free and find summaries and mock exams for your university.

logoTurn your courses into an interactive learning experience.
Antong Yin

Antong Yin

Co-Founder & CEO

Jan Tiegges

Jan Tiegges

Co-Founder & CTO

Paul Herman

Paul Herman

Co-Founder & CPO

© 2025 acemate UG (haftungsbeschränkt)  |   Terms and Conditions  |   Privacy Policy  |   Imprint  |   Careers   |  
iconlogo
Log in

Huygens Principle

Huygens' Principle, formulated by the Dutch physicist Christiaan Huygens in the 17th century, states that every point on a wavefront can be considered as a source of secondary wavelets. These wavelets spread out in all directions at the same speed as the original wave. The new wavefront at a later time can be constructed by taking the envelope of these wavelets. This principle effectively explains the propagation of waves, including light and sound, and is fundamental in understanding phenomena such as diffraction and interference.

In mathematical terms, if we denote the wavefront at time t=0t = 0t=0 as W0W_0W0​, then the position of the new wavefront WtW_tWt​ at a later time ttt can be expressed as the collective influence of all the secondary wavelets originating from points on W0W_0W0​. Thus, Huygens' Principle provides a powerful method for analyzing wave behavior in various contexts.

Shape Memory Alloy

A Shape Memory Alloy (SMA) is a special type of metal that has the ability to return to a predetermined shape when heated above a specific temperature, known as the transformation temperature. These alloys exhibit unique properties due to their ability to undergo a phase transformation between two distinct crystalline structures: the austenite phase at higher temperatures and the martensite phase at lower temperatures. When an SMA is deformed in its martensite state, it retains the new shape until it is heated, causing it to revert back to its original austenitic form.

This remarkable behavior can be described mathematically using the transformation temperatures, where:

Tm<TaT_m < T_aTm​<Ta​

Here, TmT_mTm​ is the martensitic transformation temperature and TaT_aTa​ is the austenitic transformation temperature. SMAs are widely used in applications such as actuators, robotics, and medical devices due to their ability to convert thermal energy into mechanical work, making them an essential material in modern engineering and technology.

Quantum Cryptography

Quantum Cryptography is a revolutionary field that leverages the principles of quantum mechanics to secure communication. The most notable application is Quantum Key Distribution (QKD), which allows two parties to generate a shared, secret random key that is provably secure from eavesdropping. This is achieved through the use of quantum bits or qubits, which can exist in multiple states simultaneously due to superposition. If an eavesdropper attempts to intercept the qubits, the act of measurement will disturb their state, thus alerting the communicating parties to the presence of the eavesdropper.

One of the most famous protocols for QKD is the BB84 protocol, which utilizes polarized photons to transmit information. The security of quantum cryptography is fundamentally based on the laws of quantum mechanics, making it theoretically secure against any computational attacks, including those from future quantum computers.

Switched Capacitor Filter Design

Switched Capacitor Filters (SCFs) are a type of analog filter that use capacitors and switches (typically implemented with MOSFETs) to create discrete-time filtering operations. These filters operate by periodically charging and discharging capacitors, effectively sampling the input signal at a specific frequency, which is determined by the switching frequency of the circuit. The main advantage of SCFs is their ability to achieve high precision and stability without the need for inductors, making them ideal for integration in CMOS technology.

The design process involves selecting the appropriate switching frequency fsf_sfs​ and capacitor values to achieve the desired filter response, often expressed in terms of the transfer function H(z)H(z)H(z). Additionally, the performance of SCFs can be analyzed using concepts such as gain, phase shift, and bandwidth, which are crucial for ensuring the filter meets the application requirements. Overall, SCFs are widely used in applications such as signal processing, data conversion, and communication systems due to their compact size and efficiency.

Marshallian Demand

Marshallian Demand refers to the quantity of goods a consumer will purchase at varying prices and income levels, maximizing their utility under a budget constraint. It is derived from the consumer's preferences and the prices of the goods, forming a crucial part of consumer theory in economics. The demand function can be expressed mathematically as x∗(p,I)x^*(p, I)x∗(p,I), where ppp represents the price vector of goods and III denotes the consumer's income.

The key characteristic of Marshallian Demand is that it reflects how changes in prices or income alter consumption choices. For instance, if the price of a good decreases, the Marshallian Demand typically increases, assuming other factors remain constant. This relationship illustrates the law of demand, highlighting the inverse relationship between price and quantity demanded. Furthermore, the demand can also be affected by the substitution effect and income effect, which together shape consumer behavior in response to price changes.

Z-Algorithm

The Z-Algorithm is an efficient string matching algorithm that preprocesses a given string to create a Z-array, which indicates the lengths of the longest substrings starting from each position that match the prefix of the string. Given a string SSS of length nnn, the Z-array ZZZ is constructed such that Z[i]Z[i]Z[i] represents the length of the longest substring starting from S[i]S[i]S[i] that is also a prefix of SSS. This algorithm operates in linear time O(n)O(n)O(n), making it suitable for applications like pattern matching, where we want to find all occurrences of a pattern PPP in a text TTT.

To implement the Z-Algorithm, follow these steps:

  1. Concatenate the pattern PPP and the text TTT with a unique delimiter.
  2. Compute the Z-array for the concatenated string.
  3. Use the Z-array to find occurrences of PPP in TTT by checking where Z[i]Z[i]Z[i] equals the length of PPP.

The Z-Algorithm is particularly useful in various fields like bioinformatics, data compression, and search algorithms due to its efficiency and simplicity.