필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Diego Soler Polo
Diego Soler Polo 2017년 9월 12일
마감: MATLAB Answer Bot 2021년 8월 20일
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?

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by