[GAP Forum] Running through subspaces over finite field

Arturo Magidin magidin at member.ams.org
Mon Jun 11 20:27:58 BST 2007


Dear Forum,

I'm doing some experiments in which I am looking at subspaces over a 
finite field of p elements. I am sure I will have more questions 
later, but I wanted to start with a (hopefully) simple one.

For the past several days I've been running the tests 
over the subspaces of dimension 8 of the space of dimension 10 over 
GF(3) (there are about 74 million such subspaces).

After defining

gap> V:=GF(3)^10;
gap> subspaces:=Subspaces(V,8);

I defined an iterator,

gap> iter:=Iterator(subspaces);


I am producing a list of subspaces that have the property I want, by 
having a counter that I increase whenever I apply NextIterator to 
iter, and then printing the number.

My question is whether there is an easy way to acces the nth subspace 
produced by the iterator other than to iterate it a step at a time.

For example, when p=3, the first subspace I find with the property I 
want is the 6591-st one. I want to look more closely at this subspace 
(e.g., its basis, etc).  In this case, since it is a pretty small 
number, I can do a loop to advance the iterator to the position and 
thus obtain a pointer that points to the desired subspaces. So I can 
do:

gap>  for i in [1..6590] do
    >    xx:=NextIterator(iter);
    >  od;

and so I end up with xx being the subspace I want to look at.

Is there some better way? Is there some way to move the iterator 
directly a certain number of positions?

After several days, for example, I know that the 5,428,815-st subspace 
checked has the property.  Advancing the iterator that much with a 
loop as above would take a non-negligible amount of time.

Or, I am running a similar experiment with p=5; here, I know 
none of the first 100,000 subspaces have the property, but even just 
running the iterator forward 100,000 times takes a non-negligible 
amount of time. So I would like to be able to simply move the iterator 
or a pointer to "the 100,001-st subspace" and start from there. Or 
check some small ranges for other primes (say, from the 1,000,000-th 
subspace to the 1,100,000-th). Or maybe even random subspaces.

So, the question in summary is: is there some way to access the n-th 
subspace in

    Subspaces(V,k)

without using an iterator, or some way of advancing the iterator a 
given number of steps directly?

Thanks in advance,

Arturo Magidin
magidin at member.ams.org






More information about the Forum mailing list