On Friday, November 7, 2014 1:13:27 PM UTC-8, Gregory Ewing wrote:
> Robert Voigtländer wrote:
>
> > I need to generate all variants of a 2D array with variable dimension sizes
> > which fit a specific rule. (up to 200*1000)
>
> Um... you realise there are 200**1000 solutions for the
> 200x1000 c
Robert Voigtländer wrote:
I need to generate all variants of a 2D array with variable dimension sizes
which fit a specific rule. (up to 200*1000)
Um... you realise there are 200**1000 solutions for the
200x1000 case? Are you sure that's really what you want?
--
Greg
--
https://mail.python.org
"ast" a écrit dans le message de
news:545cf9f0$0$2913$426a3...@news.free.fr...
On base C, a number may be represented with
N(L-1)N(L-2) ... N(1)N(0) where N(i) goes from 0 to C-1
--
https://mail.python.org/mailman/listinfo/python-list
"Robert Voigtländer" a écrit dans le message de
news:0e6787f9-88d6-423a-8410-7578fa83d...@googlegroups.com...
Let be L the number of lines and C the numbers of column
You solve your problem just with counting on base C
On base C, a number may be represented with
N(L-1)N(L-2) ... N(0)N(0) w
"Robert Voigtländer" a écrit dans le message de
news:e5c93b46-a32b-4eca-a00d-f7dd2b4bb...@googlegroups.com...
1011
What I mean is do you throw away the carry or does each row have only one zero?
Not sure what you mean. Each row must have one 1. The rest must be 0.
No combinations not fitting
Robert Voigtländer wrote:
> Hi,
>
> I need to generate all variants of a 2D array with variable dimension
> sizes which fit a specific rule. (up to 200*1000)
>
> The rules are:
> - Values are only 0 or 1
> - the sum of each line bust be 1
> - only valid results must be generated (generating all
> 1011
> What I mean is do you throw away the carry or does each row have only one
> zero?
Not sure what you mean. Each row must have one 1. The rest must be 0.
No combinations not fitting this rule must be generated.
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Nov 7, 2014 at 10:39 AM, Robert Voigtländer
wrote:
> Hi,
>
> I need to generate all variants of a 2D array with variable dimension sizes
> which fit a specific rule. (up to 200*1000)
>
> The rules are:
> - Values are only 0 or 1
> - the sum of each line bust be 1
> - only valid results mu
Hi,
I need to generate all variants of a 2D array with variable dimension sizes
which fit a specific rule. (up to 200*1000)
The rules are:
- Values are only 0 or 1
- the sum of each line bust be 1
- only valid results must be generated (generating all and only returning the
valid results takes