Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Sandbox

Comments on Create a finite projective plane of order $n$

Post

Create a finite projective plane of order $n$

+2
−0

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:

  1. Every pair of distinct points has exactly one line through them.
  2. Every pair of distinct lines coincides at exactly one point.
  3. 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?
History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

2 comment threads

Bounded input (2 comments)
Impossible task? (2 comments)
Impossible task?
celtschk‭ wrote about 3 years ago

If I read the Wikipedia article correctly, there does not exist a finite projective plane for each $n$ up to $11$. In particular, $n=6$ and $n=10$ are cases that are known not to work.

user‭ wrote almost 3 years ago

Yup, those won't be given as inputs.