Task
You will be given a positive integer and you must output a "self-complementary graph" with that many nodes. If you don't know what a self-complementary graph is the wikipedia article wont help you much so below are two explanations, a technical and a non-technical one.
Non-Technical
A graph is a set of nodes that are connected by lines. Each pair of points can be connected by one line or none. The "complement" of a graph is the result of taking a graph and connecting all the nodes that are not connected and disconnecting all the nodes that are.
A self-complementary graph is a graph whose complement can be rearranged into the shape of the original. Below is an example of a self-complementary graph and a demonstration of how.
Here is a graph with 5 nodes:
We will highlight the all the places where connections could go with red dotted lines:
Now we will find the complement of the graph by swapping the red and black edges:
This does not look like the original graph but if we move the nodes around like so (each step swaps two nodes):
We get the original graph! The graph and its complement are the same graph
Technical
A self-complementary graph is a graph that is isomorphic to its complement.
Specifications
You will receive an positive integer via whatever method suits you best. And you will output a graph in whatever method you deem appropriate, this includes but is not limited to Adjacency Matrix Form, Adjacency List Form, and of course pictures! The outputted graph must be its own complement and have as many nodes as the integer input. If no such graph exists you must output a falsy value.
This is code-golf and you should aim to minimize your byte count.
Test Cases
Below are pictures of possible outputs for several n
GraphData@{"SelfComplementary",{#,1}}&
, I believe that simply loads some examples for lown
from Wolfram's database, so this won't work for arbitrarily large inputs. \$\endgroup\$