Info

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

could anyone tell me what value of seeds needs to be used for getting all possible combinations of 6.

조회 수: 3 (최근 30일)
code:
N_UE=[6];
N_rng=[1 4 6 11 31 153]
for t=1:length(N_UE)
for s=1:length(N_rng)
this_seed = N_rng(s);
fprintf('Below results are for rng = %d\n', this_seed)
rng(this_seed);
unused_rows=1:N_UE(t);
while ~isempty(unused_rows)
N_UE_rows=ceil(sqrt(randi([numel(unused_rows)])));
rows=unused_rows(randsample(length(unused_rows),N_UE_rows))
[~,idx]=find(ismember(unused_rows,rows));
unused_rows(idx)=[];
end
end
end
when i run the above code
i am getting the following result
N_rng =1 4 6 11 31 153
Below results are for rng = 1
rows = 2 5
rows = 1 4
rows = 6
rows = 3
Below results are for rng = 4
rows = 5 1 4
rows = 2
rows = 3
rows = 6
Below results are for rng = 6
rows =3 4 1
rows =2 6
rows =5
Below results are for rng = 11
rows =6 1
rows =5 4
rows =3 2
Below results are for rng = 31
rows = 5 4
rows = 1
rows = 2
rows = 3
rows = 6
Below results are for rng = 153
rows =4
rows =3
rows =2
rows =5
rows =6
rows =1
But i want to get the following left out combinations as well
--------------
rows =6 4 1
rows =5 2 3
-----------
rows =1 2 3 4 5
rows =6
------------------
rows =1 2 3 4
rows =5 6
----------------
rows =1 2 3 4
rows =5
rows =6
---------------
could anyone help me what values of rng seed need
to be used in the above code to get the above left out combinations.
  댓글 수: 1
Jan
Jan 2018년 5월 2일
It has been asked already, if you and jaah navi are the same person or working together. In the first case, delete one of the two accounts, because mixing the same questions between different accounts is rather confusing. If you work together, please think of letting one person post the questions only.
The comments there are important already. A random approach to find all combinations is a very bad idea. It is unlikely, that a "solution" is useful, because it might run for a very long time, perhaps some millions of years.

답변 (0개)

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by