Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Probabilistic selection algorithm

Tags:

algorithm

Given is:

  • An array of length N.
  • The array contains integers.
  • The integers are not necessarily sorted.

Find an algorithm that:

  • Returns (a close approximation of)the K-th smallest array element.
  • Has a runtime complexity of O(N log N) and a space complexity of O(log N).
  • The algorithm needn't be deterministic. In case of a probabilistic algorithm also provide a measure for the quality of the approximated result.
like image 238
Algos Avatar asked Feb 19 '11 01:02

Algos


People also ask

What are the different selection methods in genetic algorithm?

In my research I explored the differences between four different types of selection in genetic algorithms. In this research I compared the runtime of the different selection types known as fitness proportionate selection, stochastic selection, tournament selection, and truncation selection.

How does selection algorithm work?

How Does the Selection Sort Algorithm Work? Selection sort works by taking the smallest element in an unsorted array and bringing it to the front. You'll go through each item (from left to right) until you find the smallest one. The first item in the array is now sorted, while the rest of the array is unsorted.

What is probabilistic search?

The technique is based on selective sampling of the search space according to a probability distribution function that is varied dynamically during the search process. Probabilities are increased in regions where good solutions are found and hence these regions are searched with greater intensity.

What is Boltzmann selection in genetic algorithm?

A new selection method, entropy-Boltzmann selection, for genetic algorithms (GAs) is proposed. This selection method is based on entropy and importance sampling methods in Monte Carlo simulation. It naturally leads to adaptive fitness in which the fitness function does not stay fixed but varies with the environment.


1 Answers

Treat the problem as something analogous to Quicksort. Given an element in the array, you can get its rank in O(n) time and O(lg n) space. You can use binary search to find an element with a given rank in O(lg n) iterations of that, for a total of O(lg n) space and O(n lg n) time.

like image 168
Jeremiah Willcock Avatar answered Nov 11 '22 17:11

Jeremiah Willcock