Combination of binary variables
- From: "Nightfall" <chesbobba@xxxxxxxxx>
- Date: 29 Mar 2007 14:17:01 -0700
Dear friends,
this is my problem: let's take an array of n binary variables. I need
an algorithm to write every possible combination of those variables.
If, say, n = 3, the algorithm should output:
000
001
010
100
011
110
101
111
I have to implement this algorithm in Mosel language (the language
used in Xpress-Optimizer), but this does't matter: can you help me
with just some "pseudo-code", please?
Thank you!
.
- Follow-Ups:
- Re: Combination of binary variables
- From: Nightfalll
- Re: Combination of binary variables
- From: Gene
- Re: Combination of binary variables
- From: Jim Langston
- Re: Combination of binary variables
- From: CBFalconer
- Re: Combination of binary variables
- From: Ben Pfaff
- Re: Combination of binary variables
- Prev by Date: Re: implementation note for scapegoat tree
- Next by Date: Re: Combination of binary variables
- Previous by thread: computing the moment of inertia
- Next by thread: Re: Combination of binary variables
- Index(es):
Relevant Pages
|