I may not understand this method correctly, but there seems to me to be an obvious way to generalize this method to work where the parties involved are not sending the same number of bitcoins. In their method, each person i with accounts A[i] to send bitcoins to the accounts B[i]. By using the sorted order of the public keys, the transaction from A[i] to B[i] is unique, guaranteeing that each person gets back the same number of bitcoins they sent. They also make use of a bitcoin transaction script to only let the transaction become valid if everyone involved signs the transactions they were supposed to. But why not just send any number of bitcoins, and distribute the bitcoins across the accounts in the appropriately sorted order? All that would be required is that each person announces not just their public keys, but also how many bitcoins they intend to send. Again, the bitcoins are sent using the sorted order of the public keys, except any time you are sending too many bitcoins to one address, you let the overflow go into the next address. Everyone would get back the same number of bitcoins, and it wouldn't be necessary for everyone to be sending the same number.
This doesn't work. If you know how many coins an output address is waiting to receive, all you need to do is look at which input address is submitting that many coins, and you have a matching.
I've realized there's a flaw in my method which is that it's not anonymous. If someone inputs X bitcoins, and no one else outputs X bitcoins, then whoever receives X bitcoins is the same as the person who submitted X bitcoins. It's necessary that all people send the same number of bitcoins so that the mixing creates anonymity.
There is a simple solution to this, though - You could submit one "donor" address giving X bitcoins, and submit X "recipient" addresses each receiving one bitcoin. Variations abound. As long as the recipient addresses you use are not used in a way that can be statistically linked with each other you're safe.
Of course, people might contribute too many recipient addresses trying to get free money, but this can never work - the transaction would be quickly aborted.