Skip to content

Combinations avoiding patterns #6

@alandefreitas

Description

@alandefreitas

Thank you for the great library.

Given your experiment, is there (or is it possible to implement) any algorithm or container interface that enumerates all combinations in a pseudo-random order (or at least avoiding patterns) without resampling?

Of course, apart from the impracticable alternative of keeping all possible combinations in memory and shuffling them.

This can be very useful for hypothesis testing and generate-and-test algorithms.

For instance, if we had these combinations:

$c_1$ $c_2$ $c_3$
0 0 0
0 0 1
0 0 2
0 1 0
0 1 1
0 1 2
0 2 0
0 2 1
0 2 2
1 0 0
1 0 1
1 0 2
1 1 0
1 1 1
1 1 2
1 2 0
1 2 1
1 2 2
2 0 0
2 0 1
2 0 2
2 1 0
2 1 1
2 1 2
2 2 0
2 2 1
2 2 2

I'm wondering if there would be a container interface that would return these combinations in random order (or at least an order that avoids patterns) but still being a container interface (without keeping all combinations in memory and shuffling a list of indexes).

In statistics, we could use that for randomized experiment control. In generate-and-test heuristics, this would be a systematic way of enumerating the search space without getting stuck in a region of the objective function.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions