필터 지우기
필터 지우기

what is the function that the same as perms however can used n more than 10?

조회 수: 7 (최근 30일)
when i build a coding i used n less than 10, i used perms function.. then when get the correct coding the i test the coding in various size of n, which is n more than 10, however the length for perm is less than 10. what is the same function as perm, but can used for n more than 10?

채택된 답변

OCDER
OCDER 2018년 7월 3일
I think you need to make your own function of perms, but one that only returns 1 of many permutations at a time. When you past n = 10, you'll run out of memory fast.
3.5 GB n = 11
46.0 GB n = 12
647.6 GB n = 13
9764.0 GB n = 14
One suggestion is to make a classdef object that track the ith permutation and will continuously return the the next permutation. But read this link as your attempt to compute permutations for n >> 11 gets fairly impossible...
  댓글 수: 12
Walter Roberson
Walter Roberson 2018년 7월 3일
https://www.mathworks.com/matlabcentral/fileexchange/53110-quadratic-assignment-problem--qap--using-ga--pso-and-fa
https://github.com/cshen/quadratic-assignment-problem
sharifah shuthairah syed abdullah
i know this is an NP hard problem i have been doing this amlost 4 years now..i used randperm but it didnt satisfied my need....i also will also consider making MEX/C++ files after this...this stage is about finding optimal solution using branch n bound..i know need a lot of time for that...later i will use GA.. thank you everyone for answering my question..thank you so much

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Stephen23
Stephen23 2018년 7월 3일
One option would be to use a permutation generator, which does not store all permutations in memory:
etc.
I leave it up to the reader to decide if running through all permutations is tractable or not.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by