hmmm... I just tried solving this same problem, I first used monte carlo but that seemed too slow, I then tried a mixed method of monte carlo and then updating the numbers that the pangram has...