0

The "recursive partition numbers" code written using GAP 4.10.2 are as follows. For example, could you explain the working steps of the GAP programming for nrparts(15)? How did we get nrparts (15) = 176 step by step in the program?

nrparts:= function(n)
local np;

np := function(n, m)
local i, res;
if n = 0 then
  return 1;
fi;
res:= 0;
for i in [1..Minimum(n,m)] do
  res:= res + np(n-i, i);
od;
return res;
end;

return np(n,n);

end;
3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.