Albert


Albert is an extremely useful and efficient C program for computations in relatively free nonassociative algebras. It was written around 1990 by David Pokrass Jacobs with help of few others.

Albert version 3.0 was released at 1994 and since then, according to my understanding, there was no active Albert development. Albert version 4.0 was released at September 2008 with the sole change to be able to compile it with the modern gcc.

Albert computes over a prime field of characteristic up to 251 and is an interactive program. I have slightly modified it in the following ways:
  • to allow compute over prime fields of large characteristics (up to 263 - 1);
  • to expose it through a C++ library to facilitate non-interactive batch processing;
  • fixed few minor glitches here and there.
All the core Albert algorithms and data structures were not modified.

The library interface is rather limited and does not provide all Albert functionality, as my primary concern was to perform computations of dimensions of certain operads described in the paper The alternative operad is not Koszul. The following code snippet was used in computations of dimension of the alternative operad in degree 6 modulo different primes (supplied on the standard input) and may serve as an example of the Albert C++ library usage:

#include <stdlib.h>
#include <iostream>
#include "albert.h"

int main()
{
  if (albert_init (3000, "/home/pasha/prj/albert/.albert", 0) != 1)
	{
	  std::cerr << "albert_init() failed" << std::endl;
	  exit (-1);
	}
  // left alternative
  if (albert_add_identity ("(xx)y-x(xy)") == 0)
	{
	  std::cerr << "albert_add_identity() failed" << std::endl;
	  exit (-1);
	}
  // right alternative
  if (albert_add_identity ("(xy)y-x(yy)") == 0)
	{
	  std::cerr << "albert_add_identity() failed" << std::endl;
	  exit (-1);
	}
  albert_set_generators (6);
  albert_set_sparse (0);

  long long p;
  while (! std::cin.eof())
	{
	  std::cin >> p >> std::ws;
	  if (albert_set_field (p, 1) != 1)
		{
		  std::cerr << "albert_set_field() failed" << std::endl;
		  exit (-1);
		}
	  if (albert_build (0) != 1)
		{
		  std::cerr << "albert_build() failed" << std::endl;
		}
	}

  albert_free();
  exit (0);
}

The following files are taken from the above-mentioned site and provided for archival and reference purposes:
  • 3.0: Albert 3.0, minimally modified by me to compile with the modern gcc (before Albert 4.0 was released)
  • 4.0
The following is the modified Albert version, dubbed version 4.0M:
  • 4.0M, released March 10, 2009.
  • 4.0M1, released March 22, 2010: fixed bug in displaying degrees of generators; do not set upper limit for multiplication table.
To build albert binary, type make. To build albert static library, type make libalbert.a. This should work on any unix system with gcc. Here are MacOSX binaries, compiled on Darwin 9.8.0 with gcc 4.0.1:
Should you have comments or questions about this modified version of Albert, do not hesitate to contact me.


created Mar 10 2009
last updated Fri Jun 25 10:20:14 GMT 2010