Its not so much that its mathematically impossible, its just any solutions would require you breaking the origina rules on the SKU (representing data in the sku itself in off ways). If you do that then you can cheat in easier ways.
There is probably a way to reword the problem a bit to be a bit more valid i just havent considering the problem to that extent.