I want define new graph in sage. Let $V$ be vector space over finite field $GF(q)$. The graph's vertices are 1-dimensional subspace from $V$ and $n-1$ -dimensional subspace from $V$ and two vertices are adjacent if and only if direct sum of two subspace is $V$.
I have trouble with define this graph in sage. Any suggestion?
Here is a simple algorithm to create the graph you want.
I'm not sure what you want to label them, so the edges are actually the current vectorspaces, which is rather inefficient. You should probably come up with a simple naming scheme using a python dictionary, for instance. There are also likely faster ways to compute this that cut out a good deal of the tests.