MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1.

- There are many solutions, compute just one set.
- Don't repeat numbers.
- Be Greedy ;-)
- To check against trivial solutions, E.g. [x-k, k] etc; but I'll provide you with one to start.
- Show me how you write the whole solution.

Bonus points if you solve the general problem of producing all unique partitions of [n].

27 correct solutions
21 incorrect solutions

Last solution submitted on Dec 05, 2014