Flip graphs search for algorithms that multiply with few multiplications, and they hold several records for matrix multiplication, but only for products of two inputs. To our knowledge, we are the first to take flip graphs to products of several inputs computed in one step, such as abc, that is, to tensors of any order. We formulate the flip graph as a graphsearch problem: a state is a correct algorithm, its cost is the number of multiplications, and a move rewrites two multiplications without changing the result. We give the exact condition for every move at any order and prove that the moves connect all algorithms for every concise tensor. Walks run by a GPU engine for tensors of order up to 8 give the best known one-step algorithms over GF(2) for 43 products. Six of our schemes use fewer multiplications, in a single round, than the best algorithms that multiply two inputs at a time, for example 14 instead of 16 for abc mod x4. Four schemes are proven optimal, and fourteen hold over Z.
翻译:暂无翻译