Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Multilinear polynomial is a multivariate polynomial where the exponent is zero or one. My instructor suggests to test my non-negativity algorithm with "random multilinear functions" which I call at the best red herring unless specifying the meaning of "random". Suppose you need to test your algorithm working with multilinear functions.

On which kind of "random" polynomials should a non-negativity algorithm be tested against?

share|cite|improve this question
up vote 1 down vote accepted

Multilinear polynomials are in a 1-1 correspondence with linear maps into $\mathbb{R}$, specifically

$$\sum_{i_m \in\{0,1\}} a_{i_1 \cdots i_n} x^{i_1} \cdots x^{i_n}$$

is isomorphic to a linear map $\mathbb{R}^{2^n} \to \mathbb{R}$, which can be specified with $2^n$ numbers. So you could generate a random linear map by generating $2^n$ random numbers, and map that to a multilinear polynomial.

Edit Here's an example of how to reproducably generate random numbers in Matlab:

>> seed = 147835;
>> rng(seed);      % Set initial seed
>> x = rand(5, 1); % Generate random numbers
>> rng(seed);      % Reset the seed
>> y = rand(5, 1); % Generate new random numbers
>> disp([x, y])
    0.1171    0.1171
    0.6895    0.6895
    0.8330    0.8330
    0.4596    0.4596
    0.8468    0.8468

Note that the same random numbers are generated each time.

share|cite|improve this answer
Are you familiar with random number generation from a fixed seed? – Chris Taylor Dec 11 '13 at 13:39
Not mathematically but in practise yes. – hhh Dec 11 '13 at 13:57
Then you use a standard random number generator (e.g. MT19937) with an initial seed. Include your code and the seed in the paper - then any reader can reproduce your results. – Chris Taylor Dec 11 '13 at 14:00
I found out that the random data does not work realistically so now trying to find correlated binary numbers, moved the question here because apparently more programming related or? There is a paper "A simple method for generating correlated binary variates", reading... – hhh Dec 13 '13 at 0:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.