stepwise sort combvec result by its sum over one dimension

1 view (last 30 days)
Take this code, which works for small lists:
% generate a small list (only works for small randi)
list = cell(1,7);
for idx = 1:7
list{idx} = randi(100,1,randi(10,1));
end
%generate all possible combinations and sort them based on their sum
all_combinations = combvec(list{:});
[~, sorted_idx] = sort(sum(all_combinations, 1),'descend');
all_combinations_sorted = all_combinations(:,sorted_idx);
%do some work with the generated list
for idx = 1:size(all_combinations_sorted, 2)
combination = all_combinations_sorted(:,idx);
% do more stuff
if some_criteria
break;
end
end
So first I am generating all possible combinations of elements from the 7 lists. Then I calculate the sum of each generated element, e.g. the combination a = [1; 1; 1; 1; 1; 1; 1] has sum(a) == 7. Based on this sum I sort all combinations. Afterwards I iterate over this sorted list and do my work until a stopping criteria is met.
The problem is that, contrary to my example the lists I am dealing with are in the range 100 < size(list{idx}) < 5000 . Thus there are to many combinations to generate all of them, let alone sorting the result. I usually don't need to go through the entire list, but rather the first 1000 or so entries. My question is:
How can I generate this sorted list sequentially, so that I start with the biggest element and then gradually step down to the smallest?

Answers (1)

Balavignesh
Balavignesh on 2 Jul 2024
Hi FirefoxMetzger,
It is computationally infeasible to generate and sort all possible combinations of elements from large lists due to the combinatorial explosion. I suggest you use a priority queue (max-heap) to generate the combinations sequentially, starting with the largest sum and gradually stepping down. In this case, you could avoid generating all combinations at once and stop when your criteria are met.
The following MATLAB code might help you better understand this:
function largest_combinations = generate_largest_combinations(list, num_combinations, sum_threshold)
% Initialize priority queue (max-heap)
pq = {};
% Initial combination (largest elements of each list)
initial_combination = cellfun(@(x) max(x), list);
pq{end+1} = initial_combination;
% Set to keep track of visited combinations
visited = containers.Map('KeyType', 'char', 'ValueType', 'logical');
visited(mat2str(initial_combination)) = true;
largest_combinations = zeros(length(list), num_combinations);
for k = 1:num_combinations
if isempty(pq)
break;
end
% Extract maximum sum combination
[~, max_idx] = max(cellfun(@(x) sum(x), pq));
combination = pq{max_idx};
pq(max_idx) = []; % Remove the max element
largest_combinations(:, k) = combination;
% Check stopping criteria
if sum(combination) <= sum_threshold
break;
end
% Generate neighboring combinations
for i = 1:length(list)
if combination(i) > min(list{i})
new_combination = combination;
new_combination(i) = max(list{i}(list{i} < combination(i)));
key = mat2str(new_combination);
if ~isKey(visited, key)
pq{end+1} = new_combination;
visited(key) = true;
end
end
end
% Maintain the priority queue order
pq = sort_priority_queue(pq);
end
end
function pq = sort_priority_queue(pq)
% Sort the priority queue based on the sum of combinations in descending order
[~, sorted_idx] = sort(cellfun(@(x) sum(x), pq), 'descend');
pq = pq(sorted_idx);
end
% Example usage
list = cell(1, 7);
for idx = 1:7
list{idx} = randi([100, 5000], 1, randi([100, 5000], 1));
end
num_combinations = 1000;
sum_threshold = 20000; % Example threshold for stopping criteria
largest_combinations = generate_largest_combinations(list, num_combinations, sum_threshold);
% Process the largest combinations
for idx = 1:size(largest_combinations, 2)
combination = largest_combinations(:, idx);
% Replace with your actual processing code
disp(combination);
% Example stopping criteria: sum of combination less than or equal to threshold
if sum(combination) <= sum_threshold
break;
end
end
5000 4999 5000 4997 4999 4998 4977 5000 4998 5000 4997 4999 4998 4977 5000 4999 4999 4997 4999 4998 4977 5000 4999 5000 4996 4999 4998 4977 5000 4999 5000 4997 4999 4997 4977 5000 4999 5000 4997 4997 4998 4977 5000 4998 4999 4997 4999 4998 4977 5000 4998 5000 4996 4999 4998 4977 5000 4998 5000 4997 4999 4997 4977 5000 4999 4999 4996 4999 4998 4977 5000 4999 4999 4997 4999 4997 4977 5000 4999 5000 4995 4999 4998 4977 5000 4999 5000 4996 4999 4997 4977 4997 4999 5000 4997 4999 4998 4977 5000 4998 5000 4997 4997 4998 4977 5000 4999 4999 4997 4997 4998 4977 5000 4999 5000 4996 4997 4998 4977 5000 4999 5000 4997 4997 4997 4977 5000 4999 5000 4997 4999 4995 4977 5000 4999 5000 4997 4996 4998 4977 5000 4998 4999 4996 4999 4998 4977 5000 4998 4999 4997 4999 4997 4977 5000 4998 5000 4995 4999 4998 4977 5000 4998 5000 4996 4999 4997 4977 5000 4999 4999 4995 4999 4998 4977 5000 4999 4999 4996 4999 4997 4977 5000 4999 5000 4995 4999 4997 4977 4997 4998 5000 4997 4999 4998 4977 5000 4995 5000 4997 4999 4998 4977 4997 4999 4999 4997 4999 4998 4977 4997 4999 5000 4996 4999 4998 4977 4997 4999 5000 4997 4999 4997 4977 5000 4998 4999 4997 4997 4998 4977 5000 4998 5000 4996 4997 4998 4977 5000 4998 5000 4997 4997 4997 4977 5000 4998 5000 4997 4999 4995 4977 5000 4999 4999 4996 4997 4998 4977 5000 4999 4999 4997 4997 4997 4977 5000 4999 4999 4997 4999 4995 4977 5000 4999 5000 4995 4997 4998 4977 5000 4999 5000 4996 4997 4997 4977 5000 4999 5000 4996 4999 4995 4977 5000 4998 5000 4997 4996 4998 4977 5000 4999 4999 4997 4996 4998 4977 5000 4999 5000 4996 4996 4998 4977 5000 4999 5000 4997 4996 4997 4977 5000 4998 4999 4995 4999 4998 4977 5000 4998 4999 4996 4999 4997 4977 5000 4998 5000 4995 4999 4997 4977 5000 4999 4999 4995 4999 4997 4977 5000 4999 4995 4997 4999 4998 4977 4997 4999 5000 4997 4997 4998 4977 4997 4998 4999 4997 4999 4998 4977 5000 4995 4999 4997 4999 4998 4977 4997 4998 5000 4996 4999 4998 4977 5000 4995 5000 4996 4999 4998 4977 4997 4998 5000 4997 4999 4997 4977 5000 4995 5000 4997 4999 4997 4977 4997 4999 4999 4996 4999 4998 4977 4997 4999 4999 4997 4999 4997 4977 4997 4999 5000 4995 4999 4998 4977 4997 4999 5000 4996 4999 4997 4977 5000 4999 5000 4997 4997 4995 4977 5000 4998 4999 4996 4997 4998 4977 5000 4998 4999 4997 4997 4997 4977 5000 4998 4999 4997 4999 4995 4977 5000 4998 5000 4995 4997 4998 4977 5000 4998 5000 4996 4997 4997 4977 5000 4998 5000 4996 4999 4995 4977 5000 4999 4999 4995 4997 4998 4977 5000 4999 4999 4996 4997 4997 4977 5000 4999 4999 4996 4999 4995 4977 5000 4999 5000 4995 4997 4997 4977 5000 4999 5000 4995 4999 4995 4977 5000 4998 4999 4997 4996 4998 4977 5000 4998 5000 4996 4996 4998 4977 5000 4998 5000 4997 4996 4997 4977 5000 4999 4999 4996 4996 4998 4977 5000 4999 4999 4997 4996 4997 4977 5000 4999 5000 4995 4996 4998 4977 5000 4999 5000 4996 4996 4997 4977 5000 4998 4999 4995 4999 4997 4977 5000 4998 4995 4997 4999 4998 4977 5000 4999 4995 4996 4999 4998 4977 5000 4999 4995 4997 4999 4997 4977 4997 4998 5000 4997 4997 4998 4977 5000 4995 5000 4997 4997 4998 4977 4997 4999 4999 4997 4997 4998 4977 4997 4999 5000 4996 4997 4998 4977 4997 4999 5000 4997 4997 4997 4977 4997 4999 5000 4997 4999 4995 4977 4997 4999 5000 4997 4996 4998 4977 5000 4999 5000 4997 4993 4998 4977 4997 4998 4999 4996 4999 4998 4977 5000 4995 4999 4996 4999 4998 4977 4997 4998 4999 4997 4999 4997 4977 5000 4995 4999 4997 4999 4997 4977 4997 4998 5000 4995 4999 4998 4977 5000 4995 5000 4995 4999 4998 4977 4997 4998 5000 4996 4999 4997 4977 5000 4995 5000 4996 4999 4997 4977 4997 4999 4999 4995 4999 4998 4977 4997 4999 4999 4996 4999 4997 4977 4997 4999 5000 4995 4999 4997 4977 5000 4998 5000 4997 4997 4995 4977 5000 4999 4999 4997 4997 4995 4977 5000 4999 5000 4996 4997 4995 4977 5000 4999 5000 4997 4996 4995 4977 5000 4998 4999 4995 4997 4998 4977 5000 4998 4999 4996 4997 4997 4977 5000 4998 4999 4996 4999 4995 4977 5000 4998 5000 4995 4997 4997 4977 5000 4998 5000 4995 4999 4995 4977 5000 4999 4999 4995 4997 4997 4977 5000 4999 4999 4995 4999 4995 4977 5000 4998 4999 4996 4996 4998 4977 5000 4998 4999 4997 4996 4997 4977 5000 4998 5000 4995 4996 4998 4977 5000 4998 5000 4996 4996 4997 4977 5000 4999 4999 4995 4996 4998 4977 5000 4999 4999 4996 4996 4997 4977 5000 4999 5000 4995 4996 4997 4977 5000 4999 5000 4997 4999 4998 4970 5000 4999 5000 4990 4999 4998 4977 4993 4999 5000 4997 4999 4998 4977 5000 4999 4995 4997 4997 4998 4977 5000 4998 4995 4996 4999 4998 4977 5000 4998 4995 4997 4999 4997 4977 5000 4999 4995 4995 4999 4998 4977 5000 4999 4995 4996 4999 4997 4977 4997 4995 5000 4997 4999 4998 4977 4997 4998 4999 4997 4997 4998 4977 5000 4995 4999 4997 4997 4998 4977 4997 4998 5000 4996 4997 4998 4977 5000 4995 5000 4996 4997 4998 4977 4997 4998 5000 4997 4997 4997 4977 5000 4995 5000 4997 4997 4997 4977 4997 4998 5000 4997 4999 4995 4977 5000 4995 5000 4997 4999 4995 4977 4997 4999 4999 4996 4997 4998 4977 4997 4999 4999 4997 4997 4997 4977 4997 4999 4999 4997 4999 4995 4977 4997 4999 5000 4995 4997 4998 4977 4997 4999 5000 4996 4997 4997 4977 4997 4999 5000 4996 4999 4995 4977 4997 4998 5000 4997 4996 4998 4977 5000 4995 5000 4997 4996 4998 4977 5000 4998 5000 4997 4993 4998 4977 4997 4999 4999 4997 4996 4998 4977 5000 4999 4999 4997 4993 4998 4977 4997 4999 5000 4996 4996 4998 4977 5000 4999 5000 4996 4993 4998 4977 4997 4999 5000 4997 4996 4997 4977 5000 4999 5000 4997 4993 4997 4977 4997 4998 4999 4995 4999 4998 4977 5000 4995 4999 4995 4999 4998 4977 4997 4998 4999 4996 4999 4997 4977 5000 4995 4999 4996 4999 4997 4977 4997 4998 5000 4995 4999 4997 4977 5000 4995 5000 4995 4999 4997 4977 4997 4999 4999 4995 4999 4997 4977 5000 4998 4999 4997 4997 4995 4977 5000 4998 5000 4996 4997 4995 4977 5000 4999 4999 4996 4997 4995 4977 5000 4999 5000 4995 4997 4995 4977 5000 4998 5000 4997 4996 4995 4977 5000 4999 4999 4997 4996 4995 4977 5000 4999 5000 4996 4996 4995 4977 5000 4998 4999 4995 4997 4997 4977 5000 4998 4999 4995 4999 4995 4977 5000 4998 4999 4995 4996 4998 4977 5000 4998 4999 4996 4996 4997 4977 5000 4998 5000 4995 4996 4997 4977 5000 4999 4999 4995 4996 4997 4977 5000 4998 5000 4997 4999 4998 4970 5000 4999 4999 4997 4999 4998 4970 5000 4999 5000 4996 4999 4998 4970 5000 4999 5000 4997 4999 4997 4970 5000 4998 5000 4990 4999 4998 4977 5000 4999 4999 4990 4999 4998 4977 5000 4999 5000 4990 4999 4997 4977 4993 4998 5000 4997 4999 4998 4977 4993 4999 4999 4997 4999 4998 4977 4997 4999 4995 4997 4999 4998 4977 4993 4999 5000 4996 4999 4998 4977 4993 4999 5000 4997 4999 4997 4977 5000 4998 4995 4997 4997 4998 4977 5000 4999 4995 4996 4997 4998 4977 5000 4999 4995 4997 4997 4997 4977 5000 4999 4995 4997 4999 4995 4977 5000 4999 4995 4997 4996 4998 4977 5000 4998 4995 4995 4999 4998 4977 5000 4998 4995 4996 4999 4997 4977 5000 4999 4995 4995 4999 4997 4977 4997 4995 4999 4997 4999 4998 4977 4997 4995 5000 4996 4999 4998 4977 4997 4995 5000 4997 4999 4997 4977 4997 4999 5000 4997 4997 4995 4977 4997 4998 4999 4996 4997 4998 4977 5000 4995 4999 4996 4997 4998 4977 4997 4998 4999 4997 4997 4997 4977 5000 4995 4999 4997 4997 4997 4977 4997 4998 4999 4997 4999 4995 4977 5000 4995 4999 4997 4999 4995 4977 4997 4998 5000 4995 4997 4998 4977 5000 4995 5000 4995 4997 4998 4977 4997 4998 5000 4996 4997 4997 4977 5000 4995 5000 4996 4997 4997 4977 4997 4998 5000 4996 4999 4995 4977 5000 4995 5000 4996 4999 4995 4977 4997 4999 4999 4995 4997 4998 4977 4997 4999 4999 4996 4997 4997 4977 4997 4999 4999 4996 4999 4995 4977 4997 4999 5000 4995 4997 4997 4977 4997 4999 5000 4995 4999 4995 4977 4997 4998 4999 4997 4996 4998 4977 5000 4995 4999 4997 4996 4998 4977 5000 4998 4999 4997 4993 4998 4977 4997 4998 5000 4996 4996 4998 4977 5000 4995 5000 4996 4996 4998 4977 5000 4998 5000 4996 4993 4998 4977 4997 4998 5000 4997 4996 4997 4977 5000 4995 5000 4997 4996 4997 4977 5000 4998 5000 4997 4993 4997 4977 4997 4999 4999 4996 4996 4998 4977 5000 4999 4999 4996 4993 4998 4977 4997 4999 4999 4997 4996 4997 4977 5000 4999 4999 4997 4993 4997 4977 4997 4999 5000 4995 4996 4998 4977 5000 4999 5000 4995 4993 4998 4977 4997 4999 5000 4996 4996 4997 4977 5000 4999 5000 4996 4993 4997 4977 4997 4998 4999 4995 4999 4997 4977 5000 4995 4999 4995 4999 4997 4977 5000 4998 4999 4996 4997 4995 4977 5000 4998 5000 4995 4997 4995 4977 5000 4999 4999 4995 4997 4995 4977 5000 4998 4999 4997 4996 4995 4977 5000 4998 5000 4996 4996 4995 4977 5000 4999 4999 4996 4996 4995 4977 5000 4999 5000 4995 4996 4995 4977 4992 4999 5000 4997 4999 4998 4977 5000 4998 4999 4995 4996 4997 4977 5000 4999 5000 4997 4997 4998 4970 5000 4998 4999 4997 4999 4998 4970 5000 4998 5000 4996 4999 4998 4970 5000 4998 5000 4997 4999 4997 4970 5000 4999 4999 4996 4999 4998 4970 5000 4999 4999 4997 4999 4997 4970 5000 4999 5000 4995 4999 4998 4970 5000 4999 5000 4996 4999 4997 4970 5000 4999 5000 4997 4999 4989 4977 5000 4999 5000 4990 4997 4998 4977 5000 4998 4999 4990 4999 4998 4977 5000 4998 5000 4990 4999 4997 4977 5000 4999 4999 4990 4999 4997 4977 4993 4999 5000 4997 4997 4998 4977 4993 4998 4999 4997 4999 4998 4977 4997 4998 4995 4997 4999 4998 4977 5000 4995 4995 4997 4999 4998 4977 4993 4998 5000 4996 4999 4998 4977 4993 4998 5000 4997 4999 4997 4977 4993 4999 4999 4996 4999 4998 4977 4997 4999 4995 4996 4999 4998 4977 4993 4999 4999 4997 4999 4997 4977 4997 4999 4995 4997 4999 4997 4977 4993 4999 5000 4995 4999 4998 4977 4993 4999 5000 4996 4999 4997 4977 5000 4998 4995 4996 4997 4998 4977 5000 4998 4995 4997 4997 4997 4977 5000 4998 4995 4997 4999 4995 4977 5000 4999 4995 4995 4997 4998 4977 5000 4999 4995 4996 4997 4997 4977 5000 4999 4995 4996 4999 4995 4977 5000 4998 4995 4997 4996 4998 4977 5000 4999 4995 4996 4996 4998 4977 5000 4999 4995 4997 4996 4997 4977 5000 4998 4995 4995 4999 4997 4977 4997 4995 5000 4997 4997 4998 4977 4997 4999 5000 4997 4993 4998 4977 5000 4999 5000 4997 4990 4998 4977 4997 4995 4999 4996 4999 4998 4977 4997 4995 4999 4997 4999 4997 4977 4997 4995 5000 4995 4999 4998 4977 4997 4995 5000 4996 4999 4997 4977 4997 4998 5000 4997 4997 4995 4977 5000 4995 5000 4997 4997 4995 4977 4997 4999 4999 4997 4997 4995 4977 4997 4999 5000 4996 4997 4995 4977 4997 4999 5000 4997 4996 4995 4977 5000 4999 5000 4997 4993 4995 4977 4997 4998 4999 4995 4997 4998 4977 5000 4995 4999 4995 4997 4998 4977 4997 4998 4999 4996 4997 4997 4977 5000 4995 4999 4996 4997 4997 4977 4997 4998 4999 4996 4999 4995 4977 5000 4995 4999 4996 4999 4995 4977 4997 4998 5000 4995 4997 4997 4977 5000 4995 5000 4995 4997 4997 4977 4997 4998 5000 4995 4999 4995 4977 5000 4995 5000 4995 4999 4995 4977 4997 4999 4999 4995 4997 4997 4977 4997 4999 4999 4995 4999 4995 4977 4997 4998 4999 4996 4996 4998 4977 5000 4995 4999 4996 4996 4998 4977 5000 4998 4999 4996 4993 4998 4977 4997 4998 4999 4997 4996 4997 4977 5000 4995 4999 4997 4996 4997 4977 5000 4998 4999 4997 4993 4997 4977 4997 4998 5000 4995 4996 4998 4977 5000 4995 5000 4995 4996 4998 4977 5000 4998 5000 4995 4993 4998 4977 4997 4998 5000 4996 4996 4997 4977 5000 4995 5000 4996 4996 4997 4977 5000 4998 5000 4996 4993 4997 4977 4997 4999 4999 4995 4996 4998 4977 5000 4999 4999 4995 4993 4998 4977 4997 4999 4999 4996 4996 4997 4977 5000 4999 4999 4996 4993 4997 4977 4997 4999 5000 4995 4996 4997 4977 5000 4999 5000 4995 4993 4997 4977 5000 4999 5000 4988 4999 4998 4977 5000 4998 4999 4995 4997 4995 4977 5000 4998 4999 4996 4996 4995 4977 5000 4998 5000 4995 4996 4995 4977 5000 4999 4999 4995 4996 4995 4977 4992 4998 5000 4997 4999 4998 4977 4992 4999 4999 4997 4999 4998 4977 4992 4999 5000 4996 4999 4998 4977 4992 4999 5000 4997 4999 4997 4977 4991 4999 5000 4997 4999 4998 4977 4997 4999 5000 4997 4999 4998 4970 5000 4998 5000 4997 4997 4998 4970 5000 4999 4999 4997 4997 4998 4970 5000 4999 5000 4996 4997 4998 4970 5000 4999 5000 4997 4997 4997 4970 5000 4999 5000 4997 4999 4995 4970 5000 4999 5000 4997 4996 4998 4970 5000 4998 4999 4996 4999 4998 4970 5000 4998 4999 4997 4999 4997 4970 5000 4998 5000 4995 4999 4998 4970 5000 4998 5000 4996 4999 4997 4970 5000 4999 4999 4995 4999 4998 4970 5000 4999 4999 4996 4999 4997 4970 5000 4999 5000 4995 4999 4997 4970 5000 4989 5000 4997 4999 4998 4977 5000 4998 5000 4997 4999 4989 4977 5000 4999 4999 4997 4999 4989 4977 5000 4999 5000 4996 4999 4989 4977 4997 4999 5000 4990 4999 4998 4977 5000 4998 5000 4990 4997 4998 4977 5000 4999 4999 4990 4997 4998 4977 5000 4999 5000 4990 4997 4997 4977 5000 4999 5000 4990 4999 4995 4977 5000 4999 5000 4990 4996 4998 4977 5000 4998 4999 4990 4999 4997 4977 4993 4998 5000 4997 4997 4998 4977 4993 4999 4999 4997 4997 4998 4977 4997 4999 4995 4997 4997 4998 4977 4993 4999 5000 4996 4997 4998 4977 4993 4999 5000 4997 4997 4997 4977 4993 4999 5000 4997 4999 4995 4977 4993 4999 5000 4997 4996 4998 4977 4993 4998 4999 4996 4999 4998 4977 4997 4998 4995 4996 4999 4998 4977 5000 4995 4995 4996 4999 4998 4977 4993 4998 4999 4997 4999 4997 4977 4997 4998 4995 4997 4999 4997 4977 5000 4995 4995 4997 4999 4997 4977 4993 4998 5000 4995 4999 4998 4977 4993 4998 5000 4996 4999 4997 4977 4993 4999 4999 4995 4999 4998 4977 4997 4999 4995 4995 4999 4998 4977 4993 4999 4999 4996 4999 4997 4977 4997 4999 4995 4996 4999 4997 4977 4993 4999 5000 4995 4999 4997 4977 5000 4999 4995 4997 4997 4995 4977 5000 4998 4995 4995 4997 4998 4977 5000 4998 4995 4996 4997 4997 4977 5000 4998 4995 4996 4999 4995 4977 5000 4999 4995 4995 4997 4997 4977 5000 4999 4995 4995 4999 4995 4977 5000 4998 4995 4996 4996 4998 4977 5000 4998 4995 4997 4996 4997 4977 5000 4999 4995 4995 4996 4998 4977 5000 4999 4995 4996 4996 4997 4977 4997 4995 4999 4997 4997 4998 4977 4997 4995 5000 4996 4997 4998 4977 4997 4995 5000 4997 4997 4997 4977 4997 4995 5000 4997 4999 4995 4977 4997 4995 5000 4997 4996 4998 4977 4997 4998 5000 4997 4993 4998 4977 5000 4995 5000 4997 4993 4998 4977 5000 4998 5000 4997 4990 4998 4977 4997 4999 4999 4997 4993 4998 4977 5000 4999 4999 4997 4990 4998 4977 4997 4999 5000 4996 4993 4998 4977 5000 4999 5000 4996 4990 4998 4977 4997 4999 5000 4997 4993 4997 4977 5000 4999 5000 4997 4990 4997 4977 4997 4995 4999 4995 4999 4998 4977 4997 4995 4999 4996 4999 4997 4977 4997 4995 5000 4995 4999 4997 4977 4997 4998 4999 4997 4997 4995 4977 5000 4995 4999 4997 4997 4995 4977 4997 4998 5000 4996 4997 4995 4977 5000 4995 5000 4996 4997 4995 4977 4997 4999 4999 4996 4997 4995 4977 4997 4999 5000 4995 4997 4995 4977 4997 4998 5000 4997 4996 4995 4977 5000 4995 5000 4997 4996 4995 4977 5000 4998 5000 4997 4993 4995 4977 4997 4999 4999 4997 4996 4995 4977 5000 4999 4999 4997 4993 4995 4977 4997 4999 5000 4996 4996 4995 4977 5000 4999 5000 4996 4993 4995 4977 4997 4998 4999 4995 4997 4997 4977 5000 4995 4999 4995 4997 4997 4977 4997 4998 4999 4995 4999 4995 4977 5000 4995 4999 4995 4999 4995 4977 4997 4998 4999 4995 4996 4998 4977 5000 4995 4999 4995 4996 4998 4977 5000 4998 4999 4995 4993 4998 4977 4997 4998 4999 4996 4996 4997 4977 5000 4995 4999 4996 4996 4997 4977 5000 4998 4999 4996 4993 4997 4977 4997 4998 5000 4995 4996 4997 4977 5000 4995 5000 4995 4996 4997 4977 5000 4998 5000 4995 4993 4997 4977 4997 4999 4999 4995 4996 4997 4977 5000 4999 4999 4995 4993 4997 4977 5000 4998 5000 4988 4999 4998 4977 5000 4999 4999 4988 4999 4998 4977 5000 4999 5000 4988 4999 4997 4977 4992 4999 5000 4997 4997 4998 4977 5000 4998 4999 4995 4996 4995 4977 5000 4999 5000 4997 4999 4988 4977 4992 4998 4999 4997 4999 4998 4977 4992 4998 5000 4996 4999 4998 4977 4992 4998 5000 4997 4999 4997 4977 4992 4999 4999 4996 4999 4998 4977 4992 4999 4999 4997 4999 4997 4977 4992 4999 5000 4995 4999 4998 4977 4992 4999 5000 4996 4999 4997 4977 5000 4999 5000 4997 4989 4998 4977 5000 4999 5000 4987 4999 4998 4977 4991 4998 5000 4997 4999 4998 4977 4991 4999 4999 4997 4999 4998 4977 4991 4999 5000 4996 4999 4998 4977 4991 4999 5000 4997 4999 4997 4977 4990 4999 5000 4997 4999 4998 4977 4997 4998 5000 4997 4999 4998 4970 5000 4995 5000 4997 4999 4998 4970 4997 4999 4999 4997 4999 4998 4970 4997 4999 5000 4996 4999 4998 4970 4997 4999 5000 4997 4999 4997 4970 5000 4998 4999 4997 4997 4998 4970 5000 4998 5000 4996 4997 4998 4970 5000 4998 5000 4997 4997 4997 4970 5000 4998 5000 4997 4999 4995 4970 5000 4999 4999 4996 4997 4998 4970 5000 4999 4999 4997 4997 4997 4970 5000 4999 4999 4997 4999 4995 4970 5000 4999 5000 4995 4997 4998 4970 5000 4999 5000 4996 4997 4997 4970 5000 4999 5000 4996 4999 4995 4970 5000 4998 5000 4997 4996 4998 4970 5000 4999 4999 4997 4996 4998 4970 5000 4999 5000 4996 4996 4998 4970 5000 4999 5000 4997 4996 4997 4970 5000 4998 4999 4995 4999 4998 4970 5000 4998 4999 4996 4999 4997 4970 5000 4998 5000 4995 4999 4997 4970 5000 4999 4999 4995 4999 4997 4970 5000 4989 4999 4997 4999 4998 4977 5000 4989 5000 4996 4999 4998 4977 5000 4989 5000 4997 4999 4997 4977 5000 4999 5000 4997 4997 4989 4977 5000 4998 4999 4997 4999 4989 4977 5000 4998 5000 4996 4999 4989 4977 5000 4999 4999 4996 4999 4989 4977 5000 4999 5000 4995 4999 4989 4977 4997 4998 5000 4990 4999 4998 4977 5000 4995 5000 4990 4999 4998 4977 4997 4999 4999 4990 4999 4998 4977 4997 4999 5000 4990 4999 4997 4977 5000 4998 4999 4990 4997 4998 4977 5000 4998 5000 4990 4997 4997 4977 5000 4998 5000 4990 4999 4995 4977 5000 4999 4999 4990 4997 4997 4977 5000 4999 4999 4990 4999 4995 4977 5000 4998 5000 4990 4996 4998 4977 5000 4999 4999 4990 4996 4998 4977 5000 4999 5000 4990 4996 4997 4977 4993 4995 5000 4997 4999 4998 4977 4993 4998 4999 4997 4997 4998 4977 4997 4998 4995 4997 4997 4998 4977 5000 4995 4995 4997 4997 4998 4977 4993 4998 5000 4996 4997 4998 4977 4993 4998 5000 4997 4997 4997 4977 4993 4998 5000 4997 4999 4995 4977 4993 4999 4999 4996 4997 4998 4977 4997 4999 4995 4996 4997 4998 4977 4993 4999 4999 4997 4997 4997 4977 4997 4999 4995 4997 4997 4997 4977 4993 4999 4999 4997 4999 4995 4977 4997 4999 4995 4997 4999 4995 4977 4993 4999 5000 4995 4997 4998 4977 4993 4999 5000 4996 4997 4997 4977 4993 4999 5000 4996 4999 4995 4977 4993 4998 5000 4997 4996 4998 4977 4993 4999 4999 4997 4996 4998 4977 4997 4999 4995 4997 4996 4998 4977 5000 4999 4995 4997 4993 4998 4977 4993 4999 5000 4996 4996 4998 4977 4993 4999 5000 4997 4996 4997 4977 4993 4998 4999 4995 4999 4998 4977 4997 4998 4995 4995 4999 4998 4977 5000 4995 4995 4995 4999 4998 4977 4993 4998 4999 4996 4999 4997 4977 4997 4998 4995 4996 4999 4997 4977 5000 4995 4995 4996 4999 4997 4977 4993 4998 5000 4995 4999 4997 4977 4993 4999 4999 4995 4999 4997 4977 4997 4999 4995 4995 4999 4997 4977 5000 4998 4995 4997 4997 4995 4977 5000 4999 4995 4996 4997 4995 4977 5000 4999 4995 4997 4996 4995 4977 5000 4998 4995 4995 4997 4997 4977 5000 4998 4995 4995 4999 4995 4977 5000 4998 4995 4995 4996 4998 4977 5000 4998 4995 4996 4996 4997 4977 5000 4999 4995 4995 4996 4997 4977 4997 4995 4999 4996 4997 4998 4977 4997 4995 4999 4997 4997 4997 4977 4997 4995 4999 4997 4999 4995 4977 4997 4995 5000 4995 4997 4998 4977 4997 4995 5000 4996 4997 4997 4977 4997 4995 5000 4996 4999 4995 4977 4997 4995 4999 4997 4996 4998 4977 4997 4998 4999 4997 4993 4998 4977 5000 4995 4999 4997 4993 4998 4977 5000 4998 4999 4997 4990 4998 4977 4997 4995 5000 4996 4996 4998 4977 4997 4998 5000 4996 4993 4998 4977 5000 4995 5000 4996 4993 4998 4977 5000 4998 5000 4996 4990 4998 4977 4997 4995 5000 4997 4996 4997 4977 4997 4998 5000 4997 4993 4997 4977 5000 4995 5000 4997 4993 4997 4977 5000 4998 5000 4997 4990 4997 4977 4997 4999 4999 4996 4993 4998 4977 5000 4999 4999 4996 4990 4998 4977 4997 4999 4999 4997 4993 4997 4977 5000 4999 4999 4997 4990 4997 4977 4997 4999 5000 4995 4993 4998 4977 5000 4999 5000 4995 4990 4998 4977 4997 4999 5000 4996 4993 4997 4977 5000 4999 5000 4996 4990 4997 4977 4997 4995 4999 4995 4999 4997 4977 4997 4998 4999 4996 4997 4995 4977 5000 4995 4999 4996 4997 4995 4977 4997 4998 5000 4995 4997 4995 4977 5000 4995 5000 4995 4997 4995 4977 4997 4999 4999 4995 4997 4995 4977 4997 4998 4999 4997 4996 4995 4977 5000 4995 4999 4997 4996 4995 4977 5000 4998 4999 4997 4993 4995 4977 4997 4998 5000 4996 4996 4995 4977 5000 4995 5000 4996 4996 4995 4977 5000 4998 5000 4996 4993 4995 4977 4997 4999 4999 4996 4996 4995 4977 5000 4999 4999 4996 4993 4995 4977 4997 4999 5000 4995 4996 4995 4977 5000 4999 5000 4995 4993 4995 4977 4997 4998 4999 4995 4996 4997 4977 5000 4995 4999 4995 4996 4997 4977 5000 4998 4999 4995 4993 4997 4977 5000 4999 5000 4988 4997 4998 4977 5000 4998 4999 4988 4999 4998 4977 5000 4998 5000 4988 4999 4997 4977 5000 4999 4999 4988 4999 4997 4977 4992 4998 5000 4997 4997 4998 4977 4992 4999 4999 4997 4997 4998 4977 4992 4999 5000 4996 4997 4998 4977 4992 4999 5000 4997 4997 4997 4977 4992 4999 5000 4997 4999 4995 4977 4991 4999 5000 4997 4997 4998 4977 5000 4988 5000 4997 4999 4998 4977 5000 4998 5000 4997 4999 4988 4977 5000 4999 4999 4997 4999 4988 4977 5000 4999 5000 4996 4999 4988 4977 4992 4999 5000 4997 4996 4998 4977 4992 4998 4999 4996 4999 4998 4977 4992 4998 4999 4997 4999 4997 4977 4992 4998 5000 4995 4999 4998 4977 4992 4998 5000 4996 4999 4997 4977 4992 4999 4999 4995 4999 4998 4977 4992 4999 4999 4996 4999 4997 4977 4992 4999 5000 4995 4999 4997 4977 5000 4998 5000 4997 4989 4998 4977 5000 4999 4999 4997 4989 4998 4977 5000 4999 5000 4996 4989 4998 4977 5000 4999 5000 4997 4989 4997 4977 5000 4998 5000 4987 4999 4998 4977 5000 4999 4999 4987 4999 4998 4977 5000 4999 5000 4987 4999 4997 4977 4991 4998 4999 4997 4999 4998 4977 4991 4998 5000 4996 4999 4998 4977 4991 4998 5000 4997 4999 4997 4977 4991 4999 4999 4996 4999 4998 4977 4991 4999 4999 4997 4999 4997 4977 4991 4999 5000 4995 4999 4998 4977 4991 4999 5000 4996 4999 4997 4977 5000 4999 5000 4997 4988 4998 4977 4990 4998 5000 4997 4999 4998 4977 4990 4999 4999 4997 4999 4998 4977 4990 4999 5000 4996 4999 4998 4977 4990 4999 5000 4997 4999 4997 4977 5000 4999 4988 4997 4999 4998 4977 5000 4999 4995 4997 4999 4998 4970 4997 4999 5000 4997 4997 4998 4970 4997 4998 4999 4997 4999 4998 4970 5000 4995 4999 4997 4999 4998 4970 4997 4998 5000 4996 4999 4998 4970 5000 4995 5000 4996 4999 4998 4970 4997 4998 5000 4997 4999 4997 4970 5000 4995 5000 4997 4999 4997 4970 4997 4999 4999 4996 4999 4998 4970 4997 4999 4999 4997 4999 4997 4970 4997 4999 5000 4995 4999 4998 4970 4997 4999 5000 4996 4999 4997 4970 5000 4999 5000 4997 4997 4995 4970 5000 4998 4999 4996 4997 4998 4970 5000 4998 4999 4997 4997 4997 4970 5000 4998 4999 4997 4999 4995 4970 5000 4998 5000 4995 4997 4998 4970 5000 4998 5000 4996 4997 4997 4970 5000 4998 5000 4996 4999 4995 4970 5000 4999 4999 4995 4997 4998 4970 5000 4999 4999 4996 4997 4997 4970 5000 4999 4999 4996 4999 4995 4970 5000 4999 5000 4995 4997 4997 4970 5000 4999 5000 4995 4999 4995 4970 5000 4998 4999 4997 4996 4998 4970 5000 4998 5000 4996 4996 4998 4970 5000 4998 5000 4997 4996 4997 4970 5000 4999 4999 4996 4996 4998 4970 5000 4999 4999 4997 4996 4997 4970 5000 4999 5000 4995 4996 4998 4970 5000 4999 5000 4996 4996 4997 4970 5000 4998 4999 4995 4999 4997 4970 5000 4989 5000 4997 4997 4998 4977 4997 4999 5000 4997 4999 4989 4977 5000 4989 4999 4996 4999 4998 4977 5000 4989 4999 4997 4999 4997 4977 5000 4989 5000 4995 4999 4998 4977 5000 4989 5000 4996 4999 4997 4977 5000 4998 5000 4997 4997 4989 4977 5000 4999 4999 4997 4997 4989 4977 5000 4999 5000 4996 4997 4989 4977 5000 4999 5000 4997 4996 4989 4977 5000 4998 4999 4996 4999 4989 4977 5000 4998 5000 4995 4999 4989 4977 5000 4999 4999 4995 4999 4989 4977 5000 4999 5000 4997 4999 4998 4965 5000 4999 4995 4990 4999 4998 4977 4997 4999 5000 4990 4997 4998 4977 4997 4998 4999 4990 4999 4998 4977 5000 4995 4999 4990 4999 4998 4977 4997 4998 5000 4990 4999 4997 4977 5000 4995 5000 4990 4999 4997 4977 4997 4999 4999 4990 4999 4997 4977 5000 4999 5000 4990 4997 4995 4977 5000 4998 4999 4990 4997 4997 4977 5000 4998 4999 4990 4999 4995 4977 5000 4998 4999 4990 4996 4998 4977 5000 4998 5000 4990 4996 4997 4977 5000 4999 4999 4990 4996 4997 4977 4993 4999 4995 4997 4999 4998 4977 4993 4995 4999 4997 4999 4998 4977 4997 4995 4995 4997 4999 4998 4977 4993 4995 5000 4996 4999 4998 4977 4993 4995 5000 4997 4999 4997 4977 4993 4999 5000 4997 4997 4995 4977 4993 4998 4999 4996 4997 4998 4977 4997 4998 4995 4996 4997 4998 4977 5000 4995 4995 4996 4997 4998 4977 4993 4998 4999 4997 4997 4997 4977 4997 4998 4995 4997 4997 4997 4977 5000 4995 4995 4997 4997 4997 4977 4993 4998 4999 4997 4999 4995 4977 4997 4998 4995 4997 4999 4995 4977 5000 4995 4995 4997 4999 4995 4977 4993 4998 5000 4995 4997 4998 4977 4993 4998 5000 4996 4997 4997 4977 4993 4998 5000 4996 4999 4995 4977 4993 4999 4999 4995 4997 4998 4977 4997 4999 4995 4995 4997 4998 4977 4993 4999 4999 4996 4997 4997 4977 4997 4999 4995 4996 4997 4997 4977 4993 4999 4999 4996 4999 4995 4977 4997 4999 4995 4996 4999 4995 4977 4993 4999 5000 4995 4997 4997 4977 4993 4999 5000 4995 4999 4995 4977 4993 4998 4999 4997 4996 4998 4977 4997 4998 4995 4997 4996 4998 4977 5000 4995 4995 4997 4996 4998 4977 5000 4998 4995 4997 4993 4998 4977 4993 4998 5000 4996 4996 4998 4977 4993 4998 5000 4997 4996 4997 4977 4993 4999 4999 4996 4996 4998 4977 4997 4999 4995 4996 4996 4998 4977 5000 4999 4995 4996 4993 4998 4977 4993 4999 4999 4997 4996 4997 4977 4997 4999 4995 4997 4996 4997 4977 5000 4999 4995 4997 4993 4997 4977 4993 4999 5000 4995 4996 4998 4977 4993 4999 5000 4996 4996 4997 4977 4993 4998 4999 4995 4999 4997 4977 4997 4998 4995 4995 4999 4997 4977 5000 4995 4995 4995 4999 4997 4977 5000 4998 4995 4996 4997 4995 4977 5000 4999 4995 4995 4997 4995 4977 5000 4998 4995 4997 4996 4995 4977 5000 4999 4995 4996 4996 4995 4977 5000 4998 4995 4995 4996 4997 4977 4997 4999 5000 4997 4990 4998 4977 4997 4995 5000 4997 4997 4995 4977 4997 4999 5000 4997 4993 4995 4977 5000 4999 5000 4997 4990 4995 4977 4997 4995 4999 4995 4997 4998 4977 4997 4995 4999 4996 4997 4997 4977 4997 4995 4999 4996 4999 4995 4977 4997 4995 5000 4995 4997 4997 4977 4997 4995 5000 4995 4999 4995 4977 4997 4995 4999 4996 4996 4998 4977 4997 4998 4999 4996 4993 4998 4977 5000 4995 4999 4996 4993 4998 4977 5000 4998 4999 4996 4990 4998 4977 4997 4995 4999 4997 4996 4997 4977 4997 4998 4999 4997 4993 4997 4977 5000 4995 4999 4997 4993 4997 4977 5000 4998 4999 4997 4990 4997 4977 4997 4995 5000 4995 4996 4998 4977 4997 4998 5000 4995 4993 4998 4977 5000 4995 5000 4995 4993 4998 4977 5000 4998 5000 4995 4990 4998 4977 4997 4995 5000 4996 4996 4997 4977 4997 4998 5000 4996 4993 4997 4977 5000 4995 5000 4996 4993 4997 4977 5000 4998 5000 4996 4990 4997 4977 4997 4999 4999 4995 4993 4998 4977 5000 4999 4999 4995 4990 4998 4977 4997 4999 4999 4996 4993 4997 4977 5000 4999 4999 4996 4990 4997 4977 4997 4999 5000 4995 4993 4997 4977 5000 4999 5000 4995 4990 4997 4977 4997 4999 5000 4988 4999 4998 4977 4997 4998 4999 4995 4997 4995 4977 5000 4995 4999 4995 4997 4995 4977 4997 4998 4999 4996 4996 4995 4977 5000 4995 4999 4996 4996 4995 4977 5000 4998 4999 4996 4993 4995 4977 4997 4998 5000 4995 4996 4995 4977 5000 4995 5000 4995 4996 4995 4977 5000 4998 5000 4995 4993 4995 4977 4997 4999 4999 4995 4996 4995 4977 5000 4999 4999 4995 4993 4995 4977 4992 4995 5000 4997 4999 4998 4977 5000 4998 5000 4988 4997 4998 4977 5000 4999 4999 4988 4997 4998 4977 5000 4999 5000 4988 4997 4997 4977 5000 4999 5000 4988 4999 4995 4977 5000 4999 5000 4988 4996 4998 4977 5000 4998 4999 4988 4999 4997 4977 5000 4999 5000 4997 4997 4988 4977 4992 4998 4999 4997 4997 4998 4977 4992 4998 5000 4996 4997 4998 4977 4992 4998 5000 4997 4997 4997 4977 4992 4998 5000 4997 4999 4995 4977 4992 4999 4999 4996 4997 4998 4977 4992 4999 4999 4997 4997 4997 4977 4992 4999 4999 4997 4999 4995 4977 4992 4999 5000 4995 4997 4998 4977 4992 4999 5000 4996 4997 4997 4977 4992 4999 5000 4996 4999 4995 4977 5000 4999 5000 4987 4997 4998 4977 4991 4998 5000 4997 4997 4998 4977 4991 4999 4999 4997 4997 4998 4977 4991 4999 5000 4996 4997 4998 4977 4991 4999 5000 4997 4997 4997 4977 4991 4999 5000 4997 4999 4995 4977 4988 4999 5000 4997 4999 4998 4977 4990 4999 5000 4997 4997 4998 4977 5000 4988 4999 4997 4999 4998 4977 5000 4988 5000 4996 4999 4998 4977 5000 4988 5000 4997 4999 4997 4977 5000 4998 4999 4997 4999 4988 4977 5000 4998 5000 4996 4999 4988 4977 5000 4999 4999 4996 4999 4988 4977 5000 4999 5000 4995 4999 4988 4977 4992 4998 5000 4997 4996 4998 4977 4992 4999 4999 4997 4996 4998 4977 4992 4999 5000 4996 4996 4998 4977 4992 4999 5000 4997 4996 4997 4977 4992 4998 4999 4995 4999 4998 4977 4992 4998 4999 4996 4999 4997 4977 4992 4998 5000 4995 4999 4997 4977 4992 4999 4999 4995 4999 4997 4977 5000 4998 4999 4997 4989 4998 4977 5000 4998 5000 4996 4989 4998 4977 5000 4998 5000 4997 4989 4997 4977 5000 4999 4999 4996 4989 4998 4977 5000 4999 4999 4997 4989 4997 4977 5000 4999 5000 4995 4989 4998 4977 5000 4999 5000 4996 4989 4997 4977 5000 4998 4999 4987 4999 4998 4977 5000 4998 5000 4987 4999 4997 4977 5000 4999 4999 4987 4999 4997 4977 4991 4999 5000 4997 4996 4998 4977 4991 4998 4999 4996 4999 4998 4977 4991 4998 4999 4997 4999 4997 4977 4991 4998 5000 4995 4999 4998 4977 4991 4998 5000 4996 4999 4997 4977 4991 4999 4999 4995 4999 4998 4977 4991 4999 4999 4996 4999 4997 4977 4991 4999 5000 4995 4999 4997 4977 5000 4998 5000 4997 4988 4998 4977 5000 4999 4999 4997 4988 4998 4977 5000 4999 5000 4996 4988 4998 4977 5000 4999 5000 4997 4988 4997 4977 4990 4998 4999 4997 4999 4998 4977 4990 4998 5000 4996 4999 4998 4977 4990 4998 5000 4997 4999 4997 4977 4990 4999 4999 4996 4999 4998 4977 4990 4999 4999 4997 4999 4997 4977 4990 4999 5000 4995 4999 4998 4977 4990 4999 5000 4996 4999 4997 4977 5000 4999 5000 4997 4987 4998 4977 5000 4998 4988 4997 4999 4998 4977 5000 4998 4995 4997 4999 4998 4970 5000 4999 4988 4996 4999 4998 4977 5000 4999 4995 4996 4999 4998 4970 5000 4999 4988 4997 4999 4997 4977 5000 4999 4995 4997 4999 4997 4970 4997 4998 5000 4997 4997 4998 4970 5000 4995 5000 4997 4997 4998 4970 4997 4999 4999 4997 4997 4998 4970 4997 4999 5000 4996 4997 4998 4970 4997 4999 5000 4997 4997 4997 4970 4997 4999 5000 4997 4999 4995 4970 4997 4999 5000 4997 4996 4998 4970 5000 4999 5000 4997 4993 4998 4970 4997 4998 4999 4996 4999 4998 4970 5000 4995 4999 4996 4999 4998 4970 4997 4998 4999 4997 4999 4997 4970 5000 4995 4999 4997 4999 4997 4970 4997 4998 5000 4995 4999 4998 4970 5000 4995 5000 4995 4999 4998 4970 4997 4998 5000 4996 4999 4997 4970 5000 4995 5000 4996 4999 4997 4970 4997 4999 4999 4995 4999 4998 4970 4997 4999 4999 4996 4999 4997 4970 4997 4999 5000 4995 4999 4997 4970 5000 4998 5000 4997 4997 4995 4970 5000 4999 4999 4997 4997 4995 4970 5000 4999 5000 4996 4997 4995 4970 5000 4999 5000 4997 4996 4995 4970 5000 4998 4999 4995 4997 4998 4970 5000 4998 4999 4996 4997 4997 4970 5000 4998 4999 4996 4999 4995 4970 5000 4998 5000 4995 4997 4997 4970 5000 4998 5000 4995 4999 4995 4970 5000 4999 4999 4995 4997 4997 4970 5000 4999 4999 4995 4999 4995 4970 5000 4998 4999 4996 4996 4998 4970 5000 4998 4999 4997 4996 4997 4970 5000 4998 5000 4995 4996 4998 4970 5000 4998 5000 4996 4996 4997 4970 5000 4999 4999 4995 4996 4998 4970 5000 4999 4999 4996 4996 4997 4970 5000 4999 5000 4995 4996 4997 4970 4997 4989 5000 4997 4999 4998 4977 5000 4989 4999 4997 4997 4998 4977 5000 4989 5000 4996 4997 4998 4977 5000 4989 5000 4997 4997 4997 4977 4997 4998 5000 4997 4999 4989 4977 5000 4989 5000 4997 4999 4995 4977 5000 4995 5000 4997 4999 4989 4977 4997 4999 4999 4997 4999 4989 4977 4997 4999 5000 4996 4999 4989 4977 5000 4989 5000 4997 4996 4998 4977 5000 4989 4999 4995 4999 4998 4977 5000 4989 4999 4996 4999 4997 4977 5000 4989 5000 4995 4999 4997 4977 5000 4998 4999 4997 4997 4989 4977 5000 4998 5000 4996 4997 4989 4977 5000 4999 4999 4996 4997 4989 4977 5000 4999 5000 4995 4997 4989 4977 5000 4998 5000 4997 4996 4989 4977 5000 4999 4999 4997 4996 4989 4977 5000 4999 5000 4996 4996 4989 4977 5000 4998 4999 4995 4999 4989 4977 5000 4998 5000 4997 4999 4998 4965 5000 4999 4999 4997 4999 4998 4965 5000 4999 5000 4996 4999 4998 4965 5000 4999 5000 4997 4999 4997 4965 5000 4998 4995 4990 4999 4998 4977 5000 4999 4995 4990 4999 4997 4977 4997 4998 5000 4990 4997 4998 4977 5000 4995 5000 4990 4997 4998 4977 4997 4999 4999 4990 4997 4998 4977 4997 4999 5000 4990 4997 4997 4977 4997 4999 5000 4990 4999 4995 4977 4997 4999 5000 4990 4996 4998 4977 5000 4999 5000 4990 4993 4998 4977 4997 4998 4999 4990 4999 4997 4977 5000 4995 4999 4990 4999 4997 4977 5000 4998 5000 4990 4997 4995 4977 5000 4999 4999 4990 4997 4995 4977 5000 4999 5000 4990 4996 4995 4977 5000 4998 4999 4990 4996 4997 4977 4993 4998 4995 4997 4999 4998 4977 4993 4999 4995 4996 4999 4998 4977 4993 4999 4995 4997 4999 4997 4977 4993 4995 5000 4997 4997 4998 4977 4993 4999 5000 4997 4993 4998 4977 4993 4995 4999 4996 4999 4998 4977 4997 4995 4995 4996 4999 4998 4977 4993 4995 4999 4997 4999 4997 4977 4997 4995 4995 4997 4999 4997 4977 4993 4995 5000 4995 4999 4998 4977 4993 4995 5000 4996 4999 4997 4977 4993 4998 5000 4997 4997 4995 4977 4993 4999 4999 4997 4997 4995 4977 4997 4999 4995 4997 4997 4995 4977 4993 4999 5000 4996 4997 4995 4977 4993 4999 5000 4997 4996 4995 4977 4993 4998 4999 4995 4997 4998 4977 4997 4998 4995 4995 4997 4998 4977 5000 4995 4995 4995 4997 4998 4977 4993 4998 4999 4996 4997 4997 4977 4997 4998 4995 4996 4997 4997 4977 5000 4995 4995 4996 4997 4997 4977 4993 4998 4999 4996 4999 4995 4977 4997 4998 4995 4996 4999 4995 4977 5000 4995 4995 4996 4999 4995 4977 4993 4998 5000 4995 4997 4997 4977 4993 4998 5000 4995 4999 4995 4977 4993 4999 4999 4995 4997 4997 4977 4997 4999 4995 4995 4997 4997 4977 4993 4999 4999 4995 4999 4995 4977 4997 4999 4995 4995 4999 4995 4977 4993 4998 4999 4996 4996 4998 4977 4997 4998 4995 4996 4996 4998 4977 5000 4995 4995 4996 4996 4998 4977 5000 4998 4995 4996 4993 4998 4977 4993 4998 4999 4997 4996 4997 4977 4997 4998 4995 4997 4996 4997 4977 5000 4995 4995 4997 4996 4997 4977 5000 4998 4995 4997 4993 4997 4977 4993 4998 5000 4995 4996 4998 4977 4993 4998 5000 4996 4996 4997 4977 4993 4999 4999 4995 4996 4998 4977 4997 4999 4995 4995 4996 4998 4977 5000 4999 4995 4995 4993 4998 4977 4993 4999 4999 4996 4996 4997 4977 4997 4999 4995 4996 4996 4997 4977 5000 4999 4995 4996 4993 4997 4977 4993 4999 5000 4995 4996 4997 4977 5000 4998 4995 4995 4997 4995 4977 5000 4998 4995 4996 4996 4995 4977 5000 4999 4995 4995 4996 4995 4977 4992 4999 4995 4997 4999 4998 4977 4997 4995 5000 4997 4993 4998 4977 4997 4998 5000 4997 4990 4998 4977 5000 4995 5000 4997 4990 4998 4977 4997 4999 4999 4997 4990 4998 4977 4997 4999 5000 4996 4990 4998 4977 4997 4999 5000 4997 4990 4997 4977 4997 4995 4999 4997 4997 4995 4977 4997 4995 5000 4996 4997 4995 4977 4997 4995 5000 4997 4996 4995 4977 4997 4998 5000 4997 4993 4995 4977 5000 4995 5000 4997 4993 4995 4977 5000 4998 5000 4997 4990 4995 4977 4997 4999 4999 4997 4993 4995 4977 5000 4999 4999 4997 4990 4995 4977 4997 4999 5000 4996 4993 4995 4977 5000 4999 5000 4996 4990 4995 4977 4997 4995 4999 4995 4997 4997 4977 4997 4995 4999 4995 4999 4995 4977 4997 4995 4999 4995 4996 4998 4977 4997 4998 4999 4995 4993 4998 4977 5000 4995 4999 4995 4993 4998 4977 5000 4998 4999 4995 4990 4998 4977 4997 4995 4999 4996 4996 4997 4977 4997 4998 4999 4996 4993 4997 4977 5000 4995 4999 4996 4993 4997 4977
The sum_threshold parameter is introduced to demonstrate a stopping condition. The loop will break if the sum of the current combination is less than or equal to this threshold. Replace the sum_threshold and the processing logic with your actual criteria and code as needed. This example demonstrates how to incorporate a stopping condition into the process.
Kindly have a look at the following documentation links to have more information on:
Hope that helps!
Balavignesh

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!