Comments on Create a finite projective plane of order $n$
Post
Create a finite projective plane of order $n$
Introduction
Finite projective planes are an interesting geometric structure. A finite geometry is a system with a finite number of points, and a projective plane is a plane where every pair of lines meets at exactly one point. Finite projective planes do both of these. Here are their properties:
- Every pair of distinct points has exactly one line through them.
- Every pair of distinct lines coincides at exactly one point.
- There exists a set of 4 distinct points such that no three of them coincide with the same line.
The third is interchangeable with "There exists a set of 4 distinct lines such that no three of them coincide at the same point."
(One cool thing about finite projective planes is that it doesn't really matter which set you call the points and which one you call the lines.)
Task
Your task here is to create a finite projective plane of order $n$, where $n \geq 2$. A finite projective plane of order $n$ has $n^2+n+1$ points, $n^2+n+1$ lines, $n+1$ points on each line, and $n+1$ lines through each point. Although you can't create a finite projective plane for any order, you're guaranteed that one exists for the given $n$.
One way to create finite projective planes is using mutually orthogonal Latin squares.
The output format can be a set of lines, where each line is a set of the points that lie on it (keep in mind that "line" and "point" can kinda be swapped here).
Testcases
coming soon
Questions for Sandbox
-
Should I remove the bound $n \leq 11$ and instead say that the code should theoretically work for any valid $n$?Done - Is this interesting?
- Do I need a better explanation? Is there too much explanation?
2 comment threads