To find a local minimum in a field

In summary, the conversation discusses finding a local minimum in a field of N integers. The suggested algorithm involves using a while loop and a variable I to find the minimum in N-1 steps. However, the participants consider this method to be inefficient and suggest using a binary search to reduce the number of steps. They also discuss the possibility of estimating the location of the minimum and using slope calculations to jump to it.
  • #1
alejandrito
7
0
Let A be a field of N integers and A[0] = A[N+1] = infinity. Element A is called a local minimum if A[I-1] >= A <= A[I+1]. Find an alogrithm that will find some local minimum in a time asymptotically better then O(n). Hint: Consider that in each field deffined as before there must exist at least one local minimum.
The best algorithm (or programme in Pascal) I´ve found is the following:
...
while (A[I+1] > A[I+2] and I<N-1) do I:=I+1;
LOCMIN:=A[I+1];
...
which needs maximally N-1 steps to find a local minimum, but this is not enough if we want the asymptotical difficulty better then O(n). Could anybody help me with improving the algorithm? Thanks.
 
Physics news on Phys.org
  • #2
Do we know the field is monotonic approaching the minimum from both directions, with only one minimum? If so, then use a binary search to bounce back and forth across the minimum and home in on it. Maybe even estimate how far away the minimum is by the slop of a couple of samples, and jump to the expecte location and do the same slope calculation and jump again...
 
  • #3
The field shouldn´t be monotonic necessarilly, but it seems that any using of binary search could reduce sufficiently the number of steps. I will have a look on your hints, thanks.
 

1. What is a local minimum in a field?

A local minimum in a field refers to the lowest point in a specific region or area within the field. It is the point where the function or values around it are higher than the point itself.

2. Why is it important to find a local minimum in a field?

Finding a local minimum in a field is important because it can help identify the most optimal solution or point in the field. This is especially useful in fields such as optimization, where finding the lowest point can lead to the best results or solutions.

3. How do you determine if a point is a local minimum in a field?

A point is considered a local minimum in a field if the value at that point is lower than the values of all the surrounding points within a specific radius or range. This means that there is no other nearby point with a lower value.

4. What methods are commonly used to find a local minimum in a field?

There are several methods commonly used to find a local minimum in a field, including gradient descent, Newton's method, and simulated annealing. These methods use iterative processes to search for the lowest point in the field.

5. Can a local minimum in a field also be a global minimum?

Yes, a local minimum in a field can also be a global minimum if there are no lower points in the entire field. However, it is possible for a local minimum to be higher than the global minimum in certain cases.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
9
Views
1K
  • Programming and Computer Science
Replies
19
Views
2K
  • Programming and Computer Science
Replies
7
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Replies
16
Views
1K
  • Programming and Computer Science
Replies
22
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
2K
  • Programming and Computer Science
Replies
2
Views
5K
Back
Top