Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Powerset(S)=my(b=apply(r->Vec(r),S));for(x=2,#S,b=setbinop((x,y)->if(x!=Vec(y),concat(x,y),concat(x,[])),b,S));b=concat([[]],select(r->r==vecsort(r,,8),b))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement