-
Multiplication of 0-1 matrices via clustering
Authors:
Jesper Jansson,
Miroslaw Kowaluk,
Andrzej Lingas,
Mia Persson
Abstract:
We study applications of clustering (in particular the $k$-center
clustering problem) in the design of efficient and practical
deterministic algorithms for computing an approximate and the exact
arithmetic matrix product of two 0-1 rectangular matrices $A$ and
$B$ with clustered rows or columns, respectively. Let $λ_A$
and $λ_B$ denote the minimum maximum radius of a cluster in an…
▽ More
We study applications of clustering (in particular the $k$-center
clustering problem) in the design of efficient and practical
deterministic algorithms for computing an approximate and the exact
arithmetic matrix product of two 0-1 rectangular matrices $A$ and
$B$ with clustered rows or columns, respectively. Let $λ_A$
and $λ_B$ denote the minimum maximum radius of a cluster in an
$\ell$-center clustering of the rows of $A$ and in a $k$-center
clustering of the columns of $B,$ respectively. In particular,
assuming that the matrices have size $n\times n$, we obtain the
following results.
A simple deterministic algorithm that approximates each entry of
the arithmetic matrix product of $A$ and $B$ within the additive
error of at most $2λ_A$ in $O(n^2\ell)$ time or at most
$2λ_B$ in $O(n^2k)$ time.
A simple deterministic preprocessing of the matrices $A$ and $B$
in $O(n^2\ell)$ time or $O(n^2k)$ time such that a query asking
for the exact value of an arbitrary entry of the arithmetic matrix
product of $A$ and $B$ can be answered in $O(λ_A)$ time or
$O(λ_B)$ time, respectively.
A simple deterministic algorithm for the exact arithmetic matrix
product of $A$ and $B$ running in time $O(n^2(\ell+k+\min\{λ_A,λ_B\}))$.
△ Less
Submitted 23 April, 2025; v1 submitted 25 March, 2025;
originally announced March 2025.
-
The Voronoi Diagram of Weakly Smooth Planar Point Sets in $O(\log n)$ Deterministic Rounds on the Congested Clique
Authors:
Jesper Jansson,
Christos Levcopoulos,
Andrzej Lingas
Abstract:
We study the problem of computing the Voronoi diagram of a set of $n^2$ points with $O(\log n)$-bit coordinates in the Euclidean plane in a substantially sublinear in $n$ number of rounds in the congested clique model with $n$ nodes. Recently, Jansson et al. have shown that if the points are uniformly at random distributed in a unit square then their Voronoi diagram within the square can be comput…
▽ More
We study the problem of computing the Voronoi diagram of a set of $n^2$ points with $O(\log n)$-bit coordinates in the Euclidean plane in a substantially sublinear in $n$ number of rounds in the congested clique model with $n$ nodes. Recently, Jansson et al. have shown that if the points are uniformly at random distributed in a unit square then their Voronoi diagram within the square can be computed in $O(1)$ rounds with high probability (w.h.p.). We show that if a very weak smoothness condition is satisfied by an input set of $n^2$ points with $O(\log n)$-bit coordinates in the unit square then the Voronoi diagram of the point set within the unit square can be computed in $O(\log n)$ rounds in this model.
△ Less
Submitted 9 April, 2024;
originally announced April 2024.
-
Convex Hulls, Triangulations, and Voronoi Diagrams of Planar Point Sets on the Congested Clique
Authors:
Jesper Jansson,
Christos Levcopoulos,
Andrzej Lingas,
Valentin Polishchuk
Abstract:
We consider geometric problems on planar $n^2$-point sets in the congested clique model. Initially, each node in the $n$-clique network holds a batch of $n$ distinct points in the Euclidean plane given by $O(\log n)$-bit coordinates. In each round, each node can send a distinct $O(\log n)$-bit message to each other node in the clique and perform unlimited local computations. We show that the conve…
▽ More
We consider geometric problems on planar $n^2$-point sets in the congested clique model. Initially, each node in the $n$-clique network holds a batch of $n$ distinct points in the Euclidean plane given by $O(\log n)$-bit coordinates. In each round, each node can send a distinct $O(\log n)$-bit message to each other node in the clique and perform unlimited local computations. We show that the convex hull of the input $n^2$-point set can be constructed in $O(\min\{ h,\log n\})$ rounds, where $h$ is the size of the hull, on the congested clique. We also show that a triangulation of the input $n^2$-point set can be constructed in $O(\log^2n)$ rounds on the congested clique. Finally, we demonstrate that the Voronoi diagram of $n^2$ points with $O(\log n)$-bit coordinates drawn uniformly at random from a unit square can be computed within the square with high probability in $O(1)$ rounds on the congested clique.
△ Less
Submitted 25 November, 2023; v1 submitted 17 May, 2023;
originally announced May 2023.
-
Level-p-complexity of Boolean Functions using Thinning, Memoization, and Polynomials
Authors:
Julia Jansson,
Patrik Jansson
Abstract:
This paper describes a purely functional library for computing level-$p$-complexity of Boolean functions, and applies it to two-level iterated majority. Boolean functions are simply functions from $n$ bits to one bit, and they can describe digital circuits, voting systems, etc. An example of a Boolean function is majority, which returns the value that has majority among the $n$ input bits for odd…
▽ More
This paper describes a purely functional library for computing level-$p$-complexity of Boolean functions, and applies it to two-level iterated majority. Boolean functions are simply functions from $n$ bits to one bit, and they can describe digital circuits, voting systems, etc. An example of a Boolean function is majority, which returns the value that has majority among the $n$ input bits for odd $n$. The complexity of a Boolean function $f$ measures the cost of evaluating it: how many bits of the input are needed to be certain about the result of $f$. There are many competing complexity measures but we focus on level-$p$-complexity -- a function of the probability $p$ that a bit is 1. The level-$p$-complexity $D_p(f)$ is the minimum expected cost when the input bits are independent and identically distributed with Bernoulli($p$) distribution. We specify the problem as choosing the minimum expected cost of all possible decision trees -- which directly translates to a clearly correct, but very inefficient implementation. The library uses thinning and memoization for efficiency and type classes for separation of concerns. The complexity is represented using (sets of) polynomials, and the order relation used for thinning is implemented using polynomial factorisation and root-counting. Finally we compute the complexity for two-level iterated majority and improve on an earlier result by J.~Jansson.
△ Less
Submitted 2 November, 2023; v1 submitted 5 February, 2023;
originally announced February 2023.
-
Efficient Assignment of Identities in Anonymous Populations
Authors:
Leszek Gasieniec,
Jesper Jansson,
Christos Levcopoulos,
Andrzej Lingas
Abstract:
We consider the fundamental problem of assigning distinct labels to agents in the probabilistic model of population protocols. Our protocols operate under the assumption that the size $n$ of the population is embedded in the transition function. Our labeling protocols are silent w.h.p., i.e., eventually each agent reaches its final state and remains in it forever w.h.p., as well as safe, i.e., nev…
▽ More
We consider the fundamental problem of assigning distinct labels to agents in the probabilistic model of population protocols. Our protocols operate under the assumption that the size $n$ of the population is embedded in the transition function. Our labeling protocols are silent w.h.p., i.e., eventually each agent reaches its final state and remains in it forever w.h.p., as well as safe, i.e., never update the label assigned to any single agent. We first present a fast, silent w.h.p.and safe labeling protocol for which the required number of interactions is asymptotically optimal, i.e., $O(n \log n/ε)$ w.h.p. It uses $(2+ε)n+O(n^c)$ states, for any $c<1,$ and the label range $1,\dots,(1+ε)n.$ Furthermore, we consider the so-called pool labeling protocols that include our fast protocol. We show that the expected number of interactions required by any pool protocol is $\ge \frac{n^2}{r+1}$, when the labels range is $1,\dots, n+r<2n.$ Next, we provide a protocol which is silent and safe once a unique leader is provided, and uses only $n+5\sqrt n +O(n^c)$ states, for any $c<1,$ and draws labels from the range $1,\dots,n.$ The expected number of interactions required by the protocol is $O(n^3).$ On the other hand, we show that (even if a unique leader is given in advance) any silent protocol that produces a valid labeling and is safe with probability $>1-\frac 1n$, uses $\ge n+\sqrt {n-1} -1$ states. Hence, our protocol is almost state-optimal. We also present a generalization of the protocol to include a trade-off between the number of states and the expected number of interactions. Furthermore, we show that for any silent and safe labeling protocol utilizing $n+t<2n$ states the expected number of interactions required to achieve a valid labeling is $\ge \frac{n^2}{t+1}$.
△ Less
Submitted 19 December, 2021; v1 submitted 25 May, 2021;
originally announced May 2021.
-
Technical Report -- Comparison of Direct Finite Element Simulation with Actuator Line Models and Vortex Models for Simulation of Turbulent Flow Past a Vertical Axis wind Turbine
Authors:
Van-Dang Nguyen,
Johan Jansson,
Anders Goude,
Johan Hoffman
Abstract:
We compare three different methodologies for simulation of turbulent flow past a vertical axis wind turbine: (i) full resolution of the turbine blades in a Direct Finite Element Simulation (DFS), (ii) implicit representation of the turbine blades in a 3D Actuator Line Method (ALM), and (iii) implicit representation of the turbine blades as sources in a Vortex Model (VM). The integrated normal forc…
▽ More
We compare three different methodologies for simulation of turbulent flow past a vertical axis wind turbine: (i) full resolution of the turbine blades in a Direct Finite Element Simulation (DFS), (ii) implicit representation of the turbine blades in a 3D Actuator Line Method (ALM), and (iii) implicit representation of the turbine blades as sources in a Vortex Model (VM). The integrated normal force on one blade is computed for a range of azimuthal angles, and is compared to experimental data for the different tip speed ratios, 2.55, 3.44 and 4.09.
△ Less
Submitted 30 August, 2019;
originally announced September 2019.
-
Portable simulation framework for diffusion MRI
Authors:
Van-Dang Nguyen,
Massimiliano Leoni,
Tamara Dancheva,
Johan Jansson,
Johan Hoffman,
Demian Wassermann,
Jing-Rebecca Li
Abstract:
The numerical simulation of the diffusion MRI signal arising from complex tissue micro-structures is helpful for understanding and interpreting imaging data as well as for designing and optimizing MRI sequences. The discretization of the Bloch-Torrey equation by finite elements is a more recently developed approach for this purpose, in contrast to random walk simulations, which has a longer histor…
▽ More
The numerical simulation of the diffusion MRI signal arising from complex tissue micro-structures is helpful for understanding and interpreting imaging data as well as for designing and optimizing MRI sequences. The discretization of the Bloch-Torrey equation by finite elements is a more recently developed approach for this purpose, in contrast to random walk simulations, which has a longer history. While finite elements discretization is more difficult to implement than random walk simulations, the approach benefits from a long history of theoretical and numerical developments by the mathematical and engineering communities. In particular, software packages for the automated solutions of partial differential equations using finite elements discretization, such as FEniCS, are undergoing active support and development. However, because diffusion MRI simulation is a relatively new application area, there is still a gap between the simulation needs of the MRI community and the available tools provided by finite elements software packages. In this paper, we address two potential difficulties in using FEniCS for diffusion MRI simulation. First, we simplified software installation by the use of FEniCS containers that are completely portable across multiple platforms. Second, we provide a portable simulation framework based on Python and whose code is open source. This simulation framework can be seamlessly integrated with cloud computing resources such as Google Colaboratory notebooks working on a web browser or with Google Cloud Platform with MPI parallelization. We show examples illustrating the accuracy, the computational times, and parallel computing capabilities. The framework contributes to reproducible science and open-source software in computational diffusion MRI with the hope that it will help to speed up method developments and stimulate research collaborations.
△ Less
Submitted 5 August, 2019;
originally announced August 2019.
-
New and Improved Algorithms for Unordered Tree Inclusion
Authors:
Tatsuya Akutsu,
Jesper Jansson,
Ruiming Li,
Atsuhiro Takasu,
Takeyuki Tamura
Abstract:
The tree inclusion problem is, given two node-labeled trees $P$ and $T$ (the ``pattern tree'' and the ``target tree''), to locate every minimal subtree in $T$ (if any) that can be obtained by applying a sequence of node insertion operations to $P$. Although the ordered tree inclusion problem is solvable in polynomial time, the unordered tree inclusion problem is NP-hard. The currently fastest algo…
▽ More
The tree inclusion problem is, given two node-labeled trees $P$ and $T$ (the ``pattern tree'' and the ``target tree''), to locate every minimal subtree in $T$ (if any) that can be obtained by applying a sequence of node insertion operations to $P$. Although the ordered tree inclusion problem is solvable in polynomial time, the unordered tree inclusion problem is NP-hard. The currently fastest algorithm for the latter is a classic algorithm by Kilpeläinen and Mannila from 1995 that runs in $O(2^{2d} mn)$ time, where $m$ and $n$ are the sizes of the pattern and target trees, respectively, and $d$ is the degree of the pattern tree. Here, we develop a new algorithm that runs in $O(2^{d} mn^2)$ time, improving the exponential factor from $2^{2d}$ to $2^d$ by considering a particular type of ancestor-descendant relationships that is suitable for dynamic programming. We also study restricted variants of the unordered tree inclusion problem.
△ Less
Submitted 14 June, 2021; v1 submitted 14 December, 2017;
originally announced December 2017.
-
Algorithms for the Majority Rule (+) Consensus Tree and the Frequency Difference Consensus Tree
Authors:
Jesper Jansson,
Chuanqi Shen,
Wing-Kin Sung
Abstract:
This paper presents two new deterministic algorithms for constructing consensus trees. Given an input of k phylogenetic trees with identical leaf label sets and n leaves each, the first algorithm constructs the majority rule (+) consensus tree in O(kn) time, which is optimal since the input size is Omega(kn), and the second one constructs the frequency difference consensus tree in min(O(kn^2), O(k…
▽ More
This paper presents two new deterministic algorithms for constructing consensus trees. Given an input of k phylogenetic trees with identical leaf label sets and n leaves each, the first algorithm constructs the majority rule (+) consensus tree in O(kn) time, which is optimal since the input size is Omega(kn), and the second one constructs the frequency difference consensus tree in min(O(kn^2), O(kn (k+log^2 n))) time.
△ Less
Submitted 6 August, 2013; v1 submitted 30 July, 2013;
originally announced July 2013.
-
CRAM: Compressed Random Access Memory
Authors:
Jesper Jansson,
Kunihiko Sadakane,
Wing-Kin Sung
Abstract:
We present a new data structure called the \emph{Compressed Random Access Memory} (CRAM) that can store a dynamic string $T$ of characters, e.g., representing the memory of a computer, in compressed form while achieving asymptotically almost-optimal bounds (in terms of empirical entropy) on the compression ratio. It allows short substrings of $T$ to be decompressed and retrieved efficiently and, s…
▽ More
We present a new data structure called the \emph{Compressed Random Access Memory} (CRAM) that can store a dynamic string $T$ of characters, e.g., representing the memory of a computer, in compressed form while achieving asymptotically almost-optimal bounds (in terms of empirical entropy) on the compression ratio. It allows short substrings of $T$ to be decompressed and retrieved efficiently and, significantly, characters at arbitrary positions of $T$ to be modified quickly during execution \emph{without decompressing the entire string}. This can be regarded as a new type of data compression that can update a compressed file directly. Moreover, at the cost of slightly increasing the time spent per operation, the CRAM can be extended to also support insertions and deletions. Our key observation that the empirical entropy of a string does not change much after a small change to the string, as well as our simple yet efficient method for maintaining an array of variable-length blocks under length modifications, may be useful for many other applications as well.
△ Less
Submitted 18 February, 2012; v1 submitted 7 November, 2010;
originally announced November 2010.
-
More efficient periodic traversal in anonymous undirected graphs
Authors:
J. Czyzowicz,
S. Dobrev,
L. Gasieniec,
D. Ilcinkas,
J. Jansson,
R. Klasing,
I. Lignos,
R. Martin,
K. Sadakane,
W. -K. Sung
Abstract:
We consider the problem of periodic graph exploration in which a mobile entity with constant memory, an agent, has to visit all n nodes of an arbitrary undirected graph G in a periodic manner. Graphs are supposed to be anonymous, that is, nodes are unlabeled. However, while visiting a node, the robot has to distinguish between edges incident to it. For each node v the endpoints of the edges inci…
▽ More
We consider the problem of periodic graph exploration in which a mobile entity with constant memory, an agent, has to visit all n nodes of an arbitrary undirected graph G in a periodic manner. Graphs are supposed to be anonymous, that is, nodes are unlabeled. However, while visiting a node, the robot has to distinguish between edges incident to it. For each node v the endpoints of the edges incident to v are uniquely identified by different integer labels called port numbers. We are interested in minimisation of the length of the exploration period.
This problem is unsolvable if the local port numbers are set arbitrarily. However, surprisingly small periods can be achieved when assigning carefully the local port numbers. Dobrev et al. described an algorithm for assigning port numbers, and an oblivious agent (i.e. agent with no memory) using it, such that the agent explores all graphs of size n within period 10n. Providing the agent with a constant number of memory bits, the optimal length of the period was previously proved to be no more than 3.75n (using a different assignment of the port numbers). In this paper, we improve both these bounds. More precisely, we show a period of length at most 4 1/3 n for oblivious agents, and a period of length at most 3.5n for agents with constant memory. Moreover, we give the first non-trivial lower bound, 2.8n, on the period length for the oblivious case.
△ Less
Submitted 11 May, 2009;
originally announced May 2009.