thethingthatlurks said:
Cool, that makes a bit more sense. I studied applied math as an undergrad, and went on to theoretical work in science in grad school. I'm quite curious what sort of algorithm takes over 100 trillion iterations before reaching convergence? It's really the iterations that get me, not some astronomical number of operations. I plan to work in quantum chemistry, and while billions (or trillions) of operations are perfectly normal in high accuracy methods for large systems, I think only a few (tens-hundreds) thousand iterations are typically required.
Consider a standard Texas Hold'em based casino game like "Texas Hold'em Bonus".
To figure out the house advantage, you need to iterate through every possible hand that can be played. So, you basically wind up iterating through the entire game space, which is:
* You get two hole cards (52 * 51 / (2 * 1) = 1,326)
* Three cards come on the flop (50 * 49 * 48 / (3 * 2 * 1) = 19,600)
* A fourth card comes on the turn (47)
* A fifth card comes on the river (46)
* You then see what the dealer's hole cards are (45 * 44 / (2 * 1) = 990)
The total gamespace is 1,326 * 19,600 * 47 * 46 * 990 = 55,627,620,048,000
The problem is, because there's four strategy decisions during the course of the hand, you really can't do such calculations by random sampling. You'd basically have to play a "slice" of about 10^9 iterations at random and optimize for strategy just to get the expectation of one starting hand accurate to about 0.01%, which is generally the tolerance wanted. You would have to go a long time, a lot longer than 10^6 rounds, to get a similar accuracy.
Of course, there are reflections (i.e. if you start with the ace-king of spades, your chances of winning are the same as if you start with the ace-king of clubs) and the number of iterations winds up being about 7-8% of that.
Aside from that, why is it necessary to store intermediate steps? My lectures sadly never really covered that problem (my prof assigned "think about how you could do it WITHOUT storing stuff" as part of a hw once).
Almost always good advice. However, consider a very specific problem: How do you convert an array of seven integers into an integer value that represents the best five card poker hand that could be made from those seven cards.
Well, the first thing you might think is sort it, then count the number of cards of each rank, then check for five of a suit, bla bla bla. For something you're going to repeat 10^12 times or so, that's way too slow. Basically, I have to make a giant lookup table, storing one 32-bit integer (I have to encode the overall hand rank [straight, flush etc.] as well as an ordinal within that rank) for each possible hand. I do all this in advance, then load it from a file at the start of the run into a giant lookup table. Then, when I have the array of seven cards, for only the cost of seven nested array lookups, I can get the answer. One thread can look up about 11 million poker hands a second doing it this way.
Now, for a seven card poker hand, you're only looking at (52! / (45! * 7!)) = 133,784,560 entries or so, times 4 bytes per entry, that's only about 535 MB. Granted, there's some trimming done before hand, but it's on the order of that size
But, in a game like Chinese Poker or bridge, where the player gets 13 cards in his hand, you're looking at (52! / (39! * 13!)) = 635,013,559,600 ( * 4 bytes = ~2.4 TB) for that intermediate table before doing some trimming. I can get it to about 600 GB though, but again, reading four bites from a random access file on an SSD blows away any heuristic algorithm.
Still seems like you got suckered though. If raw power is all you required, couldn't you simply have set up a server?
Here's the first thing that google spit up: http://www-03.ibm.com/systems/power/hardware/775/index.html#soai
They sadly don't publish the price (presumably to not scare away potential customers), but that would still have been something I would consider before getting a $9000 mac.
Yes, but I also wanted a Mac
That has to be worth something, right?
Now those last points:
A check up is not a medical procedure. Literally anybody can do as well a job as a real MD. Well, anybody who knows what those blood pressure numbers mean anyway. Bad example. How about an architect building a home over a construction crew?
How about getting a prostate exam from a gynecologist?
I've got a 23" (or possibly 23.5", don't remember) LED I picked up for 150euros. No, those things are not expensive, and I really can't complain about picture quality.
Does it have camera and microphone built in?