I am searching an algorithm for testing all possibilities in an 2D-array 
Author Message
 I am searching an algorithm for testing all possibilities in an 2D-array

Hi,

the first thing: Sorry for my bad english!

And the problem:
I have an 2D-array and have to set a fixed number of "flags" in all
possible variations on it.... So it is a "binary" problem that should
simulate all possible situation for X bits on it...

But the more I think about it the more I get confused....

Does anybody have something like that, or an idea to help me??

Thanx!



Sun, 26 Sep 2004 02:17:08 GMT  
 I am searching an algorithm for testing all possibilities in an 2D-array


Quote:
> I have an 2D-array and have to set a fixed number of "flags" in all
> possible variations on it.... So it is a "binary" problem that should
> simulate all possible situation for X bits on it...

> But the more I think about it the more I get confused....

> Does anybody have something like that, or an idea to help me??

Try one of the newsgroups with 'algs' in them.


Sun, 26 Sep 2004 02:19:16 GMT  
 I am searching an algorithm for testing all possibilities in an 2D-array

Quote:
> I have an 2D-array and have to set a fixed number of "flags" in all
> possible variations on it.... So it is a "binary" problem that should
> simulate all possible situation for X bits on it...

> But the more I think about it the more I get confused....

> Does anybody have something like that, or an idea to help me??

Dimensions are a figment of your imagination. Have a look at this:

    #define R 42         /* the number of rows */
    #define C 13         /* the number of columns */
    #define N (R*C)      /* the population */
    #define K ...        /* the sample<= N */

    tydedef unsigned char flag_t;

    typedef union {
        flag_t your_problem[R][C];
        flag_t simple_stuff[N];
    } data_t;

    data_t my_data;

Now, rip some C(n, k) implementing algorithm from the net and
pass it my_data.simple_stuff to chew on. After that, have a look
at my_data.your_problem.

kind regards,


ps. comp.programming would've been a more appropriate group for this
    type of questions ...



Sun, 26 Sep 2004 03:59:37 GMT  
 I am searching an algorithm for testing all possibilities in an 2D-array

Quote:



> > I have an 2D-array and have to set a fixed number of "flags" in all
> > possible variations on it.... So it is a "binary" problem that should
> > simulate all possible situation for X bits on it...

> > But the more I think about it the more I get confused....

> > Does anybody have something like that, or an idea to help me??

> Dimensions are a figment of your imagination. Have a look at this:

>     #define R 42         /* the number of rows */
>     #define C 13         /* the number of columns */
>     #define N (R*C)      /* the population */
>     #define K ...        /* the sample<= N */

>     tydedef unsigned char flag_t;

>     typedef union {
>         flag_t your_problem[R][C];
>         flag_t simple_stuff[N];
>     } data_t;

>     data_t my_data;

> Now, rip some C(n, k) implementing algorithm from the net and
> pass it my_data.simple_stuff to chew on. After that, have a look
> at my_data.your_problem.

> kind regards,


> ps. comp.programming would've been a more appropriate group for this
>     type of questions ...

Great Jos.
Dimensions are figments of imagination?
What is C(n,k)?
What color is the grass in Holland now? :-)
--

"Everything should be made as simple as possible, but not simpler."
                    --- Albert Einstein ---


Sun, 26 Sep 2004 07:57:00 GMT  
 I am searching an algorithm for testing all possibilities in an 2D-array


Wed, 18 Jun 1902 08:00:00 GMT  
 I am searching an algorithm for testing all possibilities in an 2D-array

Quote:

> > Dimensions are a figment of your imagination. Have a look at this:
> > ps. comp.programming would've been a more appropriate group for this
> >     type of questions ...
> Great Jos.
> Dimensions are figments of imagination?
> What is C(n,k)?
> What color is the grass in Holland now? :-)

You mean the stuff I'm smoking right now or the stuff being
regurgitated by those four legged steak-generators? Erm, pink?
And C(n,k) isn't that a network television channel?

Nah, I plea temporary insanity your honour ... ;-)




Sun, 26 Sep 2004 14:02:18 GMT  
 I am searching an algorithm for testing all possibilities in an 2D-array
Quote:




> > > Dimensions are a figment of your imagination. Have a look at this:

> > > ps. comp.programming would've been a more appropriate group for this
> > >     type of questions ...

> > Great Jos.
> > Dimensions are figments of imagination?
> > What is C(n,k)?
> > What color is the grass in Holland now? :-)

> You mean the stuff I'm smoking right now or the stuff being
> regurgitated by those four legged steak-generators? Erm, pink?
> And C(n,k) isn't that a network television channel?

> Nah, I plea temporary insanity your honour ... ;-)

The court accepts your plea and suspends your sentence. You are free to
go. :-)
--

"Everything should be made as simple as possible, but not simpler."
                    --- Albert Einstein ---


Mon, 27 Sep 2004 08:32:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Which 2D array of 2D array addressing method?

2. 2D array of pointers to 2D arrays

3. search in a 2d array again

4. search a 2D array recursively

5. 2D Array Comparison Algorithm : Needed

6. Help Please-need algorithm for getting 9 point average in 2d array

7. WANTED : Searching algorithm for searching in a dictionary

8. use 1d array + macro or 2d array?

9. Multiply and Add matrices with 2d array WITHOUT ARRAY INDEXING

10. How To pass 2D String array to VB from VC++ Using Safe array

11. Fast array transfer with 2D arrays...?

12. Free sample for 2d computer graphics algorithms

 

 
Powered by phpBB® Forum Software