3 research outputs found

    Szybszy algorytm deterministyczny dla problemu Modularnej Sumy Podzbioru.

    No full text
    Rozwa偶amy problem Modularnej Sumy Podzbioru: maj膮c dany multizbi贸r X liczb modulo m, oraz docelow膮 liczb臋 t, zdecyduj czy istnieje podzbi贸r X o sumie r贸wnej t (mod m). Niedawne prace Cardinala i Iacono (SOSA'21), oraz Axiotisa i in. (SOSA'21) da艂y proste i prawie liniowe algorytmy dla tego problemu. Cardinal i Iacono zaproponowali randomizowany algorytm dzia艂aj膮cy w czasie O(m log m), natomiast Axiotis i in. pokazali deterministyczny algorytm, kt贸ry dzia艂a w czasie O(m polylog m). Obydwa rezultaty zosta艂y uzyskane przez redukcj臋 do problemu tekstowego, kt贸ry jest nast臋pnie rozwi膮zany przy u偶yciu struktury danych dla dynamicznych ci膮g贸w.W tej pracy, proponujemy prost膮 struktur臋 danych, zaprojektowan膮 specjalnie dla problemu tekstowego pojawiaj膮cego si臋 w problemie Modularnej Sumy Podzbioru. Nasza struktura danych jest prostym wariantem drzewa przedzia艂owego. Proponujemy zar贸wno wersj臋 korzystaj膮c膮 z hashowania jak i deterministyczn膮.Nast臋pnie aplikujemy nasz膮 struktur臋 danych do problemu Modularnej Sumy Podzbioru i uzyskujemy dwa algorytmy. Pierwszy algorytm jest randomizowany Monte-Carlo i dzia艂a w czasie O(m log m). Drugi algorytm jest w pe艂ni deterministyczny i dzia艂a w czasie O(m log m 伪(m)), gdzie 伪 to odwrotna funkcja Ackermanna.We consider the Modular Subset Sum problem: given a multiset X of integers modulo m and a target integer t, decide if there exists a subset of X with a sum equal to t (mod m). Recent independent works by Cardinal and Iacono (SOSA'21), and Axiotis et al. (SOSA'21) provided simple and near-linear algorithms for this problem. Cardinal and Iacono gave a randomized algorithm that runs in O(m log m) time, while Axiotis et al. gave a deterministic algorithm that runs in O(m polylog m) time. Both results work by reduction to a text problem, which is solved using a dynamic strings data structure.In this work, we develop a simple data structure, designed specifically to handle the text problem that arises in the algorithms for Modular Subset Sum. Our data structure, which we call the shift-tree, is a simple variant of a segment tree. We provide both a hashing-based and a deterministic variant of the shift-trees.We then apply our data structure to the Modular Subset Sum problem and obtain two algorithms. The first algorithm is Monte-Carlo randomized and matches the O(m log m) runtime of the Las-Vegas algorithm by Cardinal and Iacono. The second algorithm is fully deterministic and runs in O(m log m 伪(m)) time, where 伪 is the inverse Ackermann function

    SPQR-trees and their application for planar graphs representation

    No full text
    SPQR-drzewo to struktura danych opisuj膮ca rozk艂ad dwusp贸jnego grafu na tr贸jsp贸jne sk艂adowe. Struktura ta znajduje szczeg贸lne zastosowanie w przypadku graf贸w planarnych: pozwala w przejrzysty spos贸b opisa膰 wszystkie zanurzenia planarne danego grafu.Celem tej pracy jest opisanie tr贸jsp贸jnych sk艂adowych oraz SPQR-drzew i implementacja liniowego algorytmu ich konstrukcji. Ponadto, rozwa偶any jest problem znalezienia zanurzenia planarnego, kt贸re minimalizuje 艣rednic臋 grafu dualnego. Jest to problem NP-trudny, tak偶e je艣li dany graf jest dwusp贸jny. Wykorzystujemy SPQR-drzewa, aby pokaza膰, 偶e w przypadku graf贸w dwusp贸jnych problem ten nale偶y do klasy FPT.SPQR-tree is a data structure that represents division of a biconnected graph into triconnected components. It is particularly applicable for planar graphs: it allows to describe all planar embeddings of a graph in a clear way.This paper aims to define triconnected components and SPQR-trees, as well as to implement linear-time algorithm of their construction. Moreover, we consider a problem of finding a planar embedding such that the diameter of its dual graph is the smallest possible. This problem is known to be NP-hard, even for biconnected graphs. We employ SPQR-trees in order to show that this problem is fixed-parameter tractable for biconnected graphs
    corecore