Numerical Analysiz find are of a circle with use midpoint - methods

[the question i couldnt find the solution (https://i.stack.imgur.com/vr6IN.png)
I don't know how to solve the question by finding the middle point

Related

How do you find circle points in Fortune's algorithm?

I know that when your sweepline encounters three centers of your array, you have to check if there is something called "circle points".
I understand that circle points are the poles of the circle that goes through the other 3 points, but my questions is, which is the efficient way to do this, because what you really want is the center of the circle which is the vertex of three Voronoi poligons, so what came to my head is to find the three mediatrices and the intersection of the three will be the center, but it seems to me that if I do that the algorithm will be mor closely to a brute force algorithm, I hope you could help me with this, thanks in advance
EDIT: I think it's worth saying that I'm working on Julia, and that I've already done two brute force algorithms, one aproximate and one exact
There is a rather good and detailed description of this algorithm in this course book:
https://www.springer.com/gp/book/9783540779735
They explain how efficiency is obtained by adding pointers between the status tree and the parts of the diagram being constructed.
Maybe it can help. I have not implemented the algorithm myself.

How to obtain a point that is nearest to other points?

Here is the question that I meet.
Intuitively speaking, I want to obtain a point z that is nearest to all other points f_j, but, when the distance between f_j and z is less than m_j, the loss can be omitted.
I cannot solve this problem with a closed form solution, but I can get the optimal solution by enumerating all possible cases through fixing whether the point z is in the circle of f_j or not.
I want to know that if there are any methods that I can use to tackle this problem?

What is the shortest path that touches every tile in a square grid? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Suppose a ant is placed on the position (0,0) of a chess-board. That ant wants to walk through every single tile of the board, while walking the least it can to do so. What path it must follow? Is there a formula F(i) that returns the position of the ith tile on that path?
Edit: as requested, I've tried the following:
I tried googling for keywords such as "shortest path", "shortest path in square grid", but couldn't find anything relevant.
I then downloaded, configured and used a Traveling Salesman Problem solver in a square grid. Obviously, the solution wasn't satisfactory, but I could gain an insight on the problem. There is an illustration of my results:
I then, intuitively, speculated wether the answer could be something like the Hilbert Curve: . I googled about it and asked on a IRC programming channel, but I couldn't find any actual evidence this is better than spirals and similars, nor a proof this is the best possible solution.
EDIT 2: Further clarifications:
The ant can move diagonally. The distance refers to the euclidean length of the line defined by the path.
Walk in straight line, with the edge of the board on your left, until you either hit the edge of the chess board or a tile you have visited before. If you do, then take a right.
Or a thousand other obvious patterns.
Any path that takes 63 steps is the minimum and just as good as any other path.
This is going to depend on if you're taking the width of each square into consideration or is this just a double array question?
If we're talking a double-array question f(x,y), then the answer is that there is no least path because the ant will need to travel to each square f(x,y) = x*y, so f(8,8) = 64.
If we start taking the width of the tiles themselves into consideration, then the answer is somewhat different because we can use some strategies to get the least amount of distance traveled (such as starting in the center, staying by the grid separators and walking in a roughly spiral pattern r=xy^(theta)).

trying to solve ACM 295 (fatman). Looking for an algorithm

I am trying to solve ACM problem 295. The problem basically says that there is a set of point obstacles in a corridor which is W units wide and L units long. I need to find the widest
object that can go from left to right avoiding those point obstacles. My initial thinking was to somehow do a depth first search to find all possible paths through the set of obstacles. But cannot formulate the algorithm.
Can anyone give a hint on which direction I should think about?
You can check this UVa 295. You will get the idea.
It seems like a Maximum Flow problem for me.

Empty circle query algorithm

I'm trying to come up with an algorithm that will do the following:
If a set of points is given, find for a query point the largest circle (with the query point as its center) that does not contain any points from the set.
So far I've thought of using a Voronoi diagram to find the areas (cells) that contain the points closest to a site point of the set, and then use the edge list from Voronoi to construct a trapezodial decomposition. From the decomposition I will be able to find which cell the query point lies in, and then the radius of the circle will be the distance from the query point to the point (site) of that cell. I think that the storage needed to create something like this is linear, since the Voronoi needs O(n) storage, and creating the trapezodial decomposition from the Voronoi can also be done with O(n) storage.
*Edit: Query time must be O(logn), which means I can't iterate through all of the points of the set one at a time.
Does this sound right, or am I missing something here?
Also, if anyone has some references that I could look at regarding this algorithm please let me know. Thanks :)
This question seems to be asking for the distance from the query point to the closest point to it in the set, so one way to answer it would be to find that closest point. One reasonably standard way of doing this would be with a http://en.wikipedia.org/wiki/K-d_tree, and this question in general is covered in http://en.wikipedia.org/wiki/Nearest_neighbour_search
That sounds overly complex. I don't even know what a Voroni diagram is, but assuming your points are all in a 2D plane (which seems to be the case since you mention a circle not a sphere) this is quite trivial:
Iterate through all the points and find the point which is closest to the query point. This distance is just Pythagorean's theorem sqrt((point_x - query_x)^2 + (point_y - query_y)^2). The smallest distance is the radius of the circle.

Resources