Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Construct collection of sequences of 1's and 0's

1 vue (au cours des 30 derniers jours)
Diego Soler Polo
Diego Soler Polo le 12 Sep 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi,
I have the vectors v1=[1 1 0 0], v2=[1 0 0 1], v3=[0 1 1 0], v4=[0 0 1 1]. For given N, I want to consider the set of all sequences v{i_1}v{i_2}...v{i_N}, where v{i}v{j} means just concatenation and each i_k goes from 1 to 4. Let's call each of these sequences S{i_1,i_2,...,i_N} (that is, S{i_1,i_2,...,i_N}=v{i_1}v{i_2}...v{i_N}).
I am trying to do several things:
First, enumerate all the sequences S{i_1,i_2,...,i_N} so that each one of them has associated a single integer n between 1 and 4^N.
Second, an efficient way of, given a integer, construct the correspondet sequence S{i_1(n),i_2(n),...,i_N(n)} (This map should be, of course, the inverse of the enumeration mentioned above)
I want to do this without having to store huge arrays in memory and then looking them up, and that's why this seems difficult to me. Any idea about how to proceed?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by