Optimal distribution of N points in non euclidean volume, where each point is furthest away from the others

Given N points, I want to find the optimal configuration for which all the points are as far away from each other as possible.

The metric I’m considering is an approximation to the perceived distance between two colors:






The colors are constrained between 0 and 255. And there are N colors of maximum pair distance I want to find, in addition to these N colors, there’s a point in the origin (black) and in the topmost right-front corner (white) which are fixed in place.

This reminds me of sphere packing, but I don’t know the optimal size of the sphere so that they’d fill the whole volume… And since this metric is not translation invariant, I’m not sure how to calculate the sphere positions even if I knew the sphere size.

I’ve tried minimizing some cost functions, such as


or the columb force inspired


But it’s not very efficient, and is very dependent on initial guess (and it seems my euclidean grid-based guess isn’t optimal).

Is there a generalized form of the sphere packing algorithm which would give me the global minima, without the need to minimize these complex cost functions and fall into the many local minima, or get stuck in zero gradient areas?

Hash function orders ships from closest to furthest from the origin

Suppose we have a circular radar that scans for ships in an area enclosed by $ x^2+y^2 \leq z^2$ (a circle).

We wish to design a hash function $ h$ such that, we can order the $ n$ ships from closest to furtest away from the origin.

We want to have an expected time complexity of this ordering algorithm to be done in $ \theta(n)$ time.

Each ship has a coordinate $ (x,y)$ , and so I want my hash function to be something like $ \text{h((x,y)) = small index if close to origin, big index if farther}$ .

What would be a hash function and algorithm that can run in expected $ \theta(n)$ time?

I think my hash function should be something like the following, taking into account the distance:

$ h((x,y)) = \sqrt{(x-0)^2 + (y-0)^2} = \sqrt{x^2+y^2}$

What is the furthest north one can get without flying or taking special cruises?

While researching this answer, I learned that there about 5 times per year between late July and September, there are passenger boats from Yakutsk all the way north to Tiksi at 71°39′ north. For comparison, the Norwegian North Cape is at 71°10′ north and Prudhoe Bay, Alaska is quite far south at 70°20’N, so this passenger boat goes further north than one can drive in either Europe or North America. In fact, to get to Tiksi the boat has to pass along the mouth of the Lena River at 72°25’N before calling at Быковский / Bykovskiye (72°00’N) just north of Tiksi.

lenaturflot route
Lenaturflot route Yakutsk–Tiksi. Source: Lenaturflot.

What is the furthest north one can get, using only public (winter) roads or regular land-based public transportation? By regular public transportation, I mean public transportation that primarily exists to service communities along the way, as opposed to cruises that exist primarily/exclusively for entertainment purposes. Is Tiksi the northernmost?