Austin Salonen
Austin Salonen

Reputation: 50225

Covering Numeric Combinations

I know this is a dupe but can't quite describe it correctly for the search.

What's it called when you can cover all combinations of a set by sequentially entering numbers?

For example, consider the set {1,2,3,4,5} and I want to cover all the 3-digit combinations with a minimal number moves.

1,2,3,4,5,1,3,2 ... would cover {1,2,3}, {2,3,4}, {3,4,5}, {4,5,1}, {5,1,3}, {1,3,2}, etc.

Upvotes: 4

Views: 201

Answers (3)

I would call it a (5,3) gray code.

Upvotes: 0

porges
porges

Reputation: 30580

It's called a De Bruijn sequence.

Upvotes: 7

globalheap
globalheap

Reputation: 107

Permutations without repetitions

http://en.wikipedia.org/wiki/Permutation

Upvotes: 0

Related Questions