Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

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

1 view (last 30 days)
Diego Soler Polo
Diego Soler Polo on 12 Sep 2017
Closed: MATLAB Answer Bot on 20 Aug 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?

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!