# Constraints on sum of rows and columns of matrix

Suppose $r_i$, $1 \le i \le n$, and $c_j$, $1 \le j \le m$, are nonnegative integers. When does there exist an $n \times m$ matrix in $\text{Mat}_{n \times m} (\mathbb{Z}^+)$, i.e. nonnegative entries, such that $r_i$ is the sum of the entries in its $i$th row and $c_j$ is the sum of the entries in its $j$th columns?

-

@user314: Why the algebra-precalculus tag? – Mike Spivey Nov 16 '10 at 5:50

## 1 Answer

Non-negative integer solutions exist whenever the (also necessary) "balance condition" is met:

$$\sum_i r_i = \sum_j c_j$$

which simply sums the total matrix entries in two ways.

There is a survey paper by Alexander Barvinok on this: http://www.math.lsa.umich.edu/~barvinok/linalg.pdf

-

Yes, it's a very active area. One of my fellow graduate students is working on this for his thesis. – Timothy Wagner Nov 16 '10 at 5:33
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 10, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8975929617881775, "perplexity_flag": "middle"}