[GAP Forum] Error, hash table in infinite loop called from LookupDictionary( ht, x )

Alexander Hulpke hulpke at me.com
Sat Jan 23 20:44:37 GMT 2010


Dear Attila Egri-Nagy, Dear forum,


> I have some trouble with using dictionaries. I'm doing breadth-first
> search in a transformation semigroup and for keeping track of the
> processed elements,  I create this dictionary:
> 
> processed := NewDictionary(T[1],false, TransformationFamily);
First remark: I don't think that the dictionary code accepts families, you would need an object like the monoid of all transformations. In any case, this only helps if there is specific code for it (which your code might provide). It will not o harm, but also does not necessarily help.

> The search is running without any problem, then suddenly I get this:
> 
> Error, hash table in infinite loop called from
Basically this means that a large number (the hardcoded HASH_RANGE) of hash conflicts happen. One could increase HASH_RANGE (the default value was chosen to have this warning not arise in a broad set of tests -- personally I have not seen the warning for years), but it rather seems that the hash keys chosen are not selected ``randomly'' enough. 
I'm not aware of hash key code in the library (at least I did not write any when I implemented dictionaries, as my interests were with groups), so this might even be your own code.

If you want, send me (privately) a  self-contained file (requiring just the GAP library) which reproduces the problem and I will have a look at why so many conflicts arise.

Best,

   Alexander Hulpke


-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hulpke at math.colostate.edu, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke





More information about the Forum mailing list