English
Related papers

Related papers: Counting magic squares in quasi-polynomial time

200 papers

On the math-fun mailing list (7 May 2013), Neil Sloane asked to calculate the number of $n \times n$ matrices with entries in $\{0,1\}$ which are squares of other such matrices. In this paper we analyze the case that the arithmetic is in…

Group Theory · Mathematics 2016-07-01 Victor S. Miller

A \emph{magic square} is an $n \times n$ array of distinct positive integers whose sum along any row, column, or main diagonal is the same number. We compute the number of such squares for $n=4$, as a function of either the magic sum or an…

Combinatorics · Mathematics 2011-03-08 Matthias Beck , Andrew Van Herick

Given a multiset $S$ of $n$ positive integers and a target integer $t$, the Subset Sum problem asks to determine whether there exists a subset of $S$ that sums up to $t$. The current best deterministic algorithm, by Koiliaris and Xu…

Data Structures and Algorithms · Computer Science 2020-01-03 Ce Jin , Hongxun Wu

We count mxn non-negative integer matrices (contingency tables) with prescribed row and column sums (margins). For a wide class of smooth margins we establish a computationally efficient asymptotic formula approximating the number of…

Combinatorics · Mathematics 2010-04-06 Alexander Barvinok , J. A. Hartigan

Let s,t,m,n be positive integers such that sm=tn. Let M(m,s;n,t) be the number of m x n matrices over {0,1,2,...} with each row summing to s and each column summing to t. Equivalently, M(m,s;n,t) counts 2-way contingency tables of order m x…

Combinatorics · Mathematics 2009-06-12 E. Rodney Canfield , Brendan D. McKay

We investigate the approximation for computing the sum $a_1+...+a_n$ with an input of a list of nonnegative elements $a_1,..., a_n$. If all elements are in the range $[0,1]$, there is a randomized algorithm that can compute an…

Data Structures and Algorithms · Computer Science 2012-03-01 Bin Fu , Wenfeng Li , Zhiyong Peng

In recreational mathematics, a normal magic square is an $n \times n$ square matrix whose entries are distinctly the integers $1 \ldots n^2$, such that each row, column, and major and minor traces sum to one constant $\mu$. It has been…

History and Overview · Mathematics 2016-02-04 Jared Weed

A magic square of order n is an nxn square (matrix) whose entries are distinct nonnegative integers such that the sum of the numbers of any row and column is the same number, the magic constant. In this paper we introduce the concept of…

General Mathematics · Mathematics 2016-10-05 Giuliano G. La Guardia , Ana Lucia Pereira Baccon

We present a randomized approximation algorithm for counting contingency tables, mxn non-negative integer matrices with given row sums R=(r_1, ..., r_m) and column sums C=(c_1, ..., c_n). We define smooth margins (R,C) in terms of the…

Combinatorics · Mathematics 2010-11-29 Alexander Barvinok , Zur Luria , Alex Samorodnitsky , Alexander Yong

Magic squares are a fascinating mathematical challenge that has intrigued mathematicians for centuries. Given a positive (and possibly large) integer \( n \), one of the main challenges that still remains is to find, within a computational…

Optimization and Control · Mathematics 2026-01-06 João Vitor Pamplona , Maria Eduarda Pinheiro , Luiz-Rafael Santos

Based on the work of Green, Tao and Ziegler, we give asymptotics when $N \to \infty$ for the number of $n \times n$ magic squares with their entries being prime numbers in $[0,N]$. For every $n \ge 3$ we give appropriate systems of linear…

Number Theory · Mathematics 2012-07-18 Carlos Vinuesa

We represent the number of mxn non-negative integer matrices (contingency tables) with prescribed row sums and column sums as the expected value of the permanent of a non-negative random matrix with exponentially distributed entries. We…

Combinatorics · Mathematics 2007-05-23 Alexander Barvinok

A magic labelling of a set system is a labelling of its points by distinct positive integers so that every set of the system has the same sum, the magic sum. Examples are magic squares (the sets are the rows, columns, and diagonals) and…

Combinatorics · Mathematics 2007-05-25 Matthias Beck , Thomas Zaslavsky

In the present paper we provide a probabilistic polynomial time algorithm that reduces the complete factorization of any squarefree integer $n$ to counting points on elliptic curves modulo $n$, succeeding with probability $1-\varepsilon$,…

Number Theory · Mathematics 2022-10-17 Jorge Jimenez Urroz , Jacek Pomykala

We present a polynomial time algorithm, which solves a nonstandard Variation of the well-known PARTITION-problem: Given positive integers $n, k$ and $t$ such that $t \geq n$ and $k \cdot t = {n+1 \choose 2}$, the algorithm partitions the…

Combinatorics · Mathematics 2023-06-22 Alexander Büchel , Ulrich Gilleßen , Kurt-Ulrich Witt

The Sylvester's denumerant \( d(t; \boldsymbol{a}) \) is a quantity that counts the number of nonnegative integer solutions to the equation \( \sum_{i=1}^{N} a_i x_i = t \), where \( \boldsymbol{a} = (a_1, \dots, a_N) \) is a sequence of…

Combinatorics · Mathematics 2024-06-28 Guoce Xin , Chen Zhang

In this paper, an exact algorithm in polynomial time is developed to solve unrestricted binary quadratic programs. The computational complexity is $O\left( n^{\frac{15}{2}}\right) $, although very conservative, it is sufficient to prove…

Data Structures and Algorithms · Computer Science 2021-02-02 Juan Ignacio Mulero-Martínez

In the Nonnegative Matrix Factorization (NMF) problem we are given an $n \times m$ nonnegative matrix $M$ and an integer $r > 0$. Our goal is to express $M$ as $A W$ where $A$ and $W$ are nonnegative matrices of size $n \times r$ and $r…

Data Structures and Algorithms · Computer Science 2011-11-04 Sanjeev Arora , Rong Ge , Ravi Kannan , Ankur Moitra

The number of non-negative integer matrices with given row and column sums appears in a variety of problems in mathematics and statistics but no closed-form expression for it is known, so we rely on approximations of various kinds. Here we…

Computation · Statistics 2024-01-25 Maximilian Jerdee , Alec Kirkley , M. E. J. Newman

A Latin square of order $n$ is an $n\times n$ matrix in which each row and column contains each of $n$ symbols exactly once. For $\epsilon>0$, we show that with high probability a uniformly random Latin square of order $n$ has no proper…

Combinatorics · Mathematics 2024-05-08 Michael J. Gill , Adam Mammoliti , Ian M. Wanless
‹ Prev 1 2 3 10 Next ›