The challenge we are solving is about a graph derived from random points. The probability of connection between two is equal to 1 minus their distance, implying that each node has a loop. A node is chosen randomly, then a node is chosen of the odes connected to it, including itself. To find the probability that the second node has more connections than the first, We would need to determine the average number of connections to a given node. Since distance is best averaged in polar coordinates, this is a bit tricky. The trick is to divide the square into eight triangles, and use the secant function. The full process of integration is shown below. Now, Consider 2 points in a square. Consider the perpendicular bisector of the line segment connecting them. The square is divided into two parts, and on either side, one of the points is always closer. For the infinite case, the point with greater area will have more connections. Since the point at which it is exactly evenly cut must always pass through the square’s centre, any two points with equal distance from it will split the square evenly. So, for the infinite case, we may simplify to the probability of choosing a point closer to the centre. So for a given point, take the area of this circle, and divide by the total average fraction of all points it connects to. Given that, for lesser n, a point is always connected to itself, this amount needs to be adjusted. Specifically, with n points and a given point connecting to x fraction of an infinite selection, the actual fraction is x*(n-1)/n + 1/n. Instead of integrating over this circle, take the volume of an elongated slanted cone, which is equivalent. Let the point be a distance r from the cenre. The peak is always at the point, with height 1. The lowest point is 1 – 2r. Below is the calculation for the area of the shape. What is its average volume? Integrating again in polar coordinates, we get approximately .877! This is a messy integral and does not need to be fully shown. And lastly, the
\text{Finding the average distance to the corner of a right triangle,} \\ \text{with adjacent side }a\text{ and angle }\theta\text . \\[16pt] \int_0^\theta \int_0^{a \cdot\sec \theta} r^2 \delta r \delta \theta \\[12pt] =\int_0^\theta {{(a \cdot\sec \theta)}^3\over3} \delta \theta \\[12pt] ={a^3\over3} \cdot \frac12 \cdot {\left( \sec\theta\cdot\tan\theta+\log{\left(\cos\frac\theta2+\sin\frac\theta2\right)} – \log{\left(\cos\frac \theta2 – \sin\frac \theta2\right)}\right)} \\[12pt] = \operatorname f{(a, \theta)} \\[12pt] \operatorname g{(x, y)} = \\[8pt] \operatorname f{\left(x, \arctan\frac yx\right)} + \\[4pt] \operatorname f{\left(y, \arctan\frac xy\right)} + \\[4pt] \operatorname f{\left(x, \arctan\frac {\frac1{\sqrt2}-y}x\right)} + \\[4pt] \operatorname f{\left(x, \arctan\frac {\frac1{\sqrt2}-y}x\right)} + \\[4pt] \operatorname f{\left(\frac1{\sqrt2}-x, \arctan\frac y{\frac1{\sqrt2}-x}\right)} + \\[4pt] \operatorname f{\left(\frac1{\sqrt2}-y, \arctan\frac x{\frac1{\sqrt2}-y}\right)} + \\[4pt] \operatorname f{\left(\frac1{\sqrt2}-x, \arctan\frac {\frac1{\sqrt2}-y}{\frac1{\sqrt2}-x}\right)} + \\[4pt] \operatorname f{\left(\frac1{\sqrt2}-y, \arctan\frac {\frac1{\sqrt2}-x}{\frac1{\sqrt2}-y}\right)} + \\[4pt] \\[32pt] \text{Elongated cone, radius r, height 1, and height of cone 2r.} \\[16pt] A = \pi r^2 (1-2r) + \frac13 \pi r^2 (2r) \\[8pt] = \pi r^2 – \frac43 \pi r^3 \\[32pt] \text{This volume, integrated in polar coordinates.} \\[16pt] {\Large8\int_{-\frac\pi8}^\frac\pi8 \int_0^{a \cdot\sec\theta}} {\pi r^2 – \frac43 \pi r^3 \over{n-1\over n}\operatorname g{( \frac1{2\sqrt2}+r\cos\theta, \frac1{2\sqrt2}+r\sin\theta)}+\frac1n} {\Large \delta r \delta \theta = } \left({5\pi\over36}- {\tanh^{-1} {\sqrt2-1}\over 16\sqrt2}\right) \frac n{n+1} – \frac1n \\[12pt] \boxed{\huge\approx.877} \\[12pt] \text{8 because there are 4 triangles, and to get average, divide by area .5.}