Related papers: Efficient Generation of Binary Magic Squares
General methods for the construction of magic squares of any order have been searched for centuries. There have been several standard strategies for this purpose, such as the knight movement, or the construction of bordered magic squares,…
We find by applying MacMahon's partition analysis that all magic squares of order three, up to rotations and reflections, are of two types, each generated by three basis elements. A combinatorial proof of this fact is given.
The problem of writing a totally positive element as a sum of squares has a long history in mathematics, going back to Bachet and Lagrange. While for some specific rings (like integers or polynomials over the rationals), there are known…
Detecting maximal square submatrices of ones in binary matrices is a fundamental problem with applications in computer vision and pattern recognition. While the standard dynamic programming (DP) solution achieves optimal asymptotic…
This paper is about producing a new kind of the pairs which we call it MS-pairs. To produce these pairs, we use an algorithm for dividing a natural number $x$ by two for two arbitrary numbers and consider their related graphs. We present…
We apply numerical optimization and linear algebra algorithms for classical computers to the problem of automatically synthesizing algorithms for quantum computers. Using our framework, we apply several common techniques from these…
Herein we explore a dual tree algorithm for matrix multiplication of $A\in \mathbb{R}^{M\times D}$ and $B\in\mathbb{R}^{D\times N}$, very narrowly effective if the normalized rows of $A$ and columns of $B$, treated as vectors in…
We suggest a new non-recursive algorithm for constructing a binary search tree given an array of numbers. The algorithm has $O(N)$ time and $O(1)$ memory complexity if the given array of $N$ numbers is sorted. The resulting tree is of…
The present paper focuses on the construction of a set of submatrices of a circulant matrix such that it is a smaller set to verify that the circulant matrix is an MDS (maximum distance separable) one, comparing to the complete set of…
We present efficient algorithms to build data structures and the lists needed for fast multipole methods. The algorithms are capable of being efficiently implemented on both serial, data parallel GPU and on distributed architectures. With…
In prior work, Gupta et al. (SPAA 2022) presented a distributed algorithm for multiplying sparse $n \times n$ matrices, using $n$ computers. They assumed that the input matrices are uniformly sparse--there are at most $d$ non-zeros in each…
Algorithms to generate various combinatorial structures find tremendous importance in computer science. In this paper, we begin by reviewing an algorithm proposed by Rohl that generates all unique permutations of a list of elements which…
We propose a general method for automated word puzzle generation. Contrary to previous approaches in this novel field, the presented method does not rely on highly structured datasets obtained with serious human annotation effort: it only…
Graph labeling is a well-known and intensively investigated problem in graph theory. Sparse anti-magic squares are useful in constructing vertex-magic labeling for graphs. For positive integers $n,d$ and $d<n$, an $n\times n$ array $A$…
We show how to prove theorems in additive number theory using a decision procedure based on finite automata. Among other things, we obtain the following analogue of Lagrange's theorem: every natural number > 686 is the sum of at most 4…
The sudoku puzzles have a long history, with variations going back more than a hundred years, but its current and perhaps surprising world-wide prominence goes back to certain initiatives and then puzzle-generating computer programmes from…
The binary expansions of irrational algebraic numbers can serve as high-quality pseudorandom binary sequences. This study presents an efficient method for computing the exact binary expansions of real quadratic algebraic integers using…
We present efficient algorithms to generate a bit string in which each bit is set with arbitrary probability. By adopting a hybrid algorithm, i.e., a finite-bit density approximation with correction techniques, we achieve 3.8 times faster…
In this paper, we introduce an efficient algorithm for generating specific Hadamard rows, addressing the memory demands of pre-computing the entire matrix. Leveraging Sylvester's recursive construction, our method generates the required…
This paper further develops the Method of Matched Sections (MMS), a robust numerical framework for the solution of boundary value problems governed by partial differential equations. It demonstrates its unique applicability to the…