Tpyflti HCII PAH, tom 26, bbiil 6, 2014 r..
Parallel calculations by automata on direct and back spanning trees of a graph
Igor Burdonov <[email protected]> Alexander Kossatchev <[email protected]> Victor Kuliamin <[email protected]> Institute for System Programming Russian Academy of Sciences, 109004, A. Solzhenitsina, 25, Moscow, Russia
Abstract. The paper presents a parallel computation algorithm of an arbitrary function value on a multiset of values distributed on directed graph vertices. The computation is performed by message passing executed by automata distributed on the graph vertices. The key idea of the algorithm is to use a structural information on the graph that can be extracted by its parallel exploration and encoded into structures of direct and back spanning trees of the graph, which require only finite number of bits in each graph vertex, and to represent the function calculated as a composition of so called aggregate function and another one. Aggregate functions are characterized by possibility to calculate their value on a union of multisets by aggregating their values on separate multisets, that makes them easy for parallel computation.
Keywords: parallel computation; directed graphs; group of automata; graph spanning tree
1. Introduction
A task of graph exploration with a goal to uncover a structure of unknown graph by moving along its arcs can be met in many domains. In this paper we regard as possible applications exploration of networks and exploration of Web-application structure. In many cases such an exploration can be considered as being performed by agents working in graph vertices and sending each other messages along graph arcs.
Sometimes graph exploration is performed to make possible calculation of some function of values stored in graph vertices. Since different vertices can store equal values, such a function is a function of a multiset of values. We consider situation where calculation is initiated by an external stimulus processes by the automaton located in some root vertex of the graph, and the value calculated is sent by this root automaton to the requester.
Graph processing algorithms and their efficiency highly depend on the known information on the graph, in the worst case in the initial state the graph can be completely unknown and an algorithm should gather information on its structure
itself by walking through arcs. Here we suppose that vertex automata are in such states, that contains the following information on the graph structure. Graph has specified direct spanning tree, having the tree root coinciding with the root vertex of the graph and directed from the root, and back spanning tree directed to the root. Arcs not belonging to the direct spanning tree are called chords. Arcs of the direct spanning tree are called direct arcs, of the back one — back arcs. A back arc can be a direct one or a chord. Each vertex automaton stores arc kind (direct, chord, back + direct, back + chord) for each arc outgoing from its vertex. Also vertex automaton stores the number of back arcs incoming to its vertex. Such data can be gathered during previous exploration of the graph described in our paper "Building direct and back spanning trees by automata on a graph".
Function calculation by vertex automata is performed with pulse algorithm. Its idea is first to send request message from the root vertex to all other vertices, then to send response message from each vertex to the root one. It allow to calculate in parallel any function of multiset of values stored in vertex automata (we also sometimes say that they are stored in graph vertices). The worst case working time of the algorithm is 0(D), where I) is the graph diameter, the maximum length of non-self intersecting path. The details of the algorithm and proofs of all statements can be found in [[1]].
2. Aggregate Functions and Aggregate Extension
Pulse algorithm computes so-called aggregate functions, for which function value on a union of multisets can be computed using function values on each of multisets in the union. Here we give definition of an aggregate function and aggregate extension of any given function fix;, which helps to represent it as h(g(x)), where g is aggregate. For each/there exists single (up to isomorphism) minimal aggregate extension, which provide a minimum information sufficient to compute f. Aggregate functions theory presented here is a modification of inductive functions theory given in [[2]].
Below we consider functions on finite multisets, which elements belong to some base setX. The set of all finite multisets of elements ofXwe denote as A'. Note that union of multisets gives a multiset having all the elements of united ones with multiplicity of any element being a sum of its multiplicities in united multisets.
An aggregate function g:JT—>A - is such a function on multisets that
3e:AxA—>A Va,b eXT g(aub) = e(g(a),g(b)).
An aggregate extension of function f:X~—>A is an aggregate function g:JT—>B, such that 3h : B-)A Va eT f(a) = h(g(a)).
An aggregate extension g of/is such an aggregate function, that using its values one can compute f. Of course, some extensions are not useful, e.g., taking an identity 64
Труды ИСП РАН, том 26, вып. 6, 2014 г..
function g on Л'. and taking/itself as h, one doesn't simplify calculations. To avoid such useless solutions, we use a minimal aggregate extension — intuitively, an aggregate function, which give a minimum information sufficient to calculate f. An aggregate extension g: JT->B of f: JT-*A is called minimal, if gQC) = В and
Vg : X —Я'. aggregate extension off, 3i: C->B g = ig\
Aggregate extension off: X exists and is unique up to one-to-one mapping.
3. Pulse Algorithm
Pulse algorithm is intended to calculate a value of / on a multiset xeXT of values stored in the graph vertices. We suppose that some value is stored in any vertex with multiplicity 1. Pulse algorithm uses the graph structure information stored in vertex automata as it is described in the Introduction.
Pulse algorithm uses two message kinds: Request and Response. At first the root vertex automaton gets Request from some external source, this message provides three functions: h, e, andg. This message is then transmitted along direct arcs to all other vertices, and all vertex automata store e and g. Each vertex automaton then calculates the value of g on values stored in the vertices of subtree with the root coinciding with this vertex of back spanning tree, and sends the value obtained as a parameter of Response message along back arcs. The root vertex automaton calculates g(x), and then sends Response to the request initiator with the value f(a)=h(g(x)).
Pulse algorithm worst case working time is O(D). References
[1]. I. B. Burdonov, A. S. Kossatchev, V. V. Kuliamin. Parallel computations on graphs. Programming and computer Software, 41(1): 1-13, 2015.
[2]. Kushnirenko A. G., Lebedev G. V. Programming for mathematicians. Nauka, Moscow, 1988. (in Russian).
Параллельные вычисления автоматами на прямом и обратном остовах графа
Игорь Бурдонов <[email protected]> Александр Косачее <ко[email protected]> Виктор Кулямин <[email protected]> Институт Системного Программирования РАН, 109004, Россия, г. Москва, ул. А. Солженицына, д. 25.
Аннотация. В статье представлен алгоритм параллельного вычисления произвольной функции от мультимножества значений, находящихся в вершинах графа. Вычисления выполняются автоматами, размещенными в вершинах графа и обменивающихся сообщениями по дугам графа. В основе алгоритма лежит использование информации о структуре графа, извлеченной в результате параллельного исследования графа и представляющей собой прямой и обратный остовы графа. Для хранения этой информации требуется конечное число бит в каждой вершине графа. Вычисление значения той или иной функции основано на алгоритме пульсации: сначала от автомата начальной вершины по всему графу распространяются сообщения-вопросы, которые должны достигнуть каждой вершины, а затем от каждой вершины «в обратную сторону» к начальной вершине двигаются сообщения-ответы. Алгоритм пульсации, по сути, вычисляет агрегатные функции, для которых значение функции от объединения мультимножеств вычисляется по значениям функции от этих мультимножеств. Показано, что любая функция f(x) имеет агрегатное расширение, то есть может быть вычислена как h(f (х)), где f агрегатная функция.
Keywords: параллельные вычисления; ориентированный граф; коллектив автоматов; остов
Список литературы
[1]. .Б. Бурдонов, A.C. Косачев, В.В. Кулямин. "Параллельные вычисления на графе"// Программирование, 2015 г., № 1, с. 3-20.
[2]. Кушнеренко А.Г., Лебедев Г.В. "Программирование для математиков", Наука, Главная редакция физико-математической литературы, Москва, 1988.