Solution with explanation of information theory.
Using the information theory, we needn't to know which pig needs to drink which bucket, the only thing we need to do is get enough information to make sure the 
Using the information theory, **we needn't to know which pig needs to drink which bucket**, the only thing we need to do is **get enough information to make sure the bucket is the poison bucket**.\n\nFirst, according to the information theory, if we want to know which bucket is poison,  we should have information at least:  \n**poisonInfo = Math.log(buckets, 2)** \n\nFor one pig, the attempts of it is:  \n**t = minutesToTest // minutesToDie**\n\nThat's mean, we can do t attempts to a pig. \n**But, we can only have t+1 results of the t attempts, because that the pig can only die one time.**\nThe pig didn't die, died at the first attempt, died at the second attempt.....\nSo, the ammound of information we can get the from this pig is:\n**pigInfo = math.log(t + 1, 2)**\n\nSo, we need n pigs to get the information which needs to be bigger than the poisonInfo, the result is:\n**n = int(math.ceil(posionInfo / pigInfo))**\n\nSo the code is:\n\n```python\n    def poorPigs(self, buckets, minutesToDie, minutesToTest):\n        #the information of the posion bucket\n        posionInfo = math.log(buckets, 2)\n        #the information that we can get from a pig\n        pigInfo = math.log(minutesToTest // minutesToDie + 1, 2)\n        #so,the result..\n        return int(math.ceil(posionInfo / pigInfo))\n```
[]