4 ms·
question to OP: how faster can the code in those SO answers be? https://stackoverflow.com/questions/73473074/speed-up-set-partition-generation-by-skipping-one
by jokoon 4y ago
question to OP:
how faster can the code in those SO answers be?
https://stackoverflow.com/questions/73473074/speed-up-set-partition-generation-by-skipping-ones-with-subsets-smaller-or-large/73549333#73549333 https://stackoverflow.com/questions/73473074/speed-up-set-pa...
This code is recursive and generate set partitions for large N values (N larger than 12), it essentially works by skipping small partitions and small subsets to target desirable set partitions. Solutions that don't skip those suffer from "combinatory explosion".
I did not write this code, I want to test it later with taichi, but I'm curious if taichi can run this faster.