** Unimodal Function :**

A function f(x) is said to be unimodal function if for some value m it is monotonically increasing for x≤m and monotonically decreasing for x≥m. For function f(x), maximum value is f(m) and there is no other local maximum.

See figure (A) and (B):

In figure (A), graph has only one maximum point and rest of the graph goes down from there and in figure (B) graph has only one minimum point and rest of the graph goes up from there. Thus, we can say that if a function has global maximum or global minimum is considered as Unimodal function.

Consider a function f(x) in the interval [a, b] and we have to determine value of x for which the function is maximised. The function strictly increase in the interval [a, x] and strictly decrease in the interval [x, b]. For this purpose we can use modified binary search to determine the maximum or value of that function. Click here for the program.

** Bimodal Function :**

A function is said to be bimodal function if it has two local minima or maxima. Generally bimodal function indicates two different groups. For example, In a class there are lot of students getting grade A and a lot getting grade D. This tell us that in a class there are two different group of student, one group is under-prepared and other group is over-prepared. See this figure for better understanding:

**Note – **

- With bimodal function and above, we don’t know if an extreme is local or global unless we know the entire graph.
- With unimodal function any extreme we find is guaranteed to be the global extreme.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

## Recommended Posts:

- Mathematics | Classes (Injective, surjective, Bijective) of Functions
- Mathematics | Total number of possible functions
- Mathematics | Generating Functions - Set 2
- Inverse functions and composition of functions
- Mathematics | Predicates and Quantifiers | Set 1
- Mathematics | Mean, Variance and Standard Deviation
- Mathematics | Sum of squares of even and odd natural numbers
- Mathematics | Eigen Values and Eigen Vectors
- Mathematics | Introduction and types of Relations
- Mathematics | Representations of Matrices and Graphs in Relations
- Mathematics | Covariance and Correlation
- Mathematics | Predicates and Quantifiers | Set 2
- Mathematics | Closure of Relations and Equivalence Relations
- Mathematics | Partial Orders and Lattices
- Mathematics | Graph Isomorphisms and Connectivity
- Mathematics | Planar Graphs and Graph Coloring
- Mathematics | Euler and Hamiltonian Paths
- Mathematics | PnC and Binomial Coefficients
- Mathematics | Limits, Continuity and Differentiability
- Mathematics | Walks, Trails, Paths, Cycles and Circuits in Graph

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.