Roulette Math

July 29, 2008

This problem and subsequent math came up after a discussion I had with a friend about roulette. Couldn’t you, he wondered, just always bet on red and keep doubling your bet until you win? Aren’t you guaranteed to make money that way?

Short answer: yes. You will earn exactly the amount of money you placed for your initial bet. I though through the math of this, and arrived at this conclusion after a couple hours of pondering and scribbling. Why exactly does this method work?

It’s true because the following is true:

2^k = 1 + \displaystyle\sum_{i=0}^{k-1} 2^i

I will return to roulette in a moment, but first let me offer a proof for the above statement:

Proof: This is a proof by induction. We begin by checking to see if the equation holds for k = 1 and we see that it does:

2^1 = 1 + \displaystyle\sum_{i=0}^0 2^i

2 = 1 + 1 = 2

We continue by assuming the equation holds for any arbitrary k. We then must show that k \Rightarrow k+1:

2^{k+1} = 1 + \displaystyle\sum_{i=0}^{k} 2^i

We do this by adding 2^k to both sides.

2^k + 2^k = 2^{k+1} = 1 + \displaystyle\sum_{i=0}^{k-1} 2^i + 2^k

2^{k+1} = 1 + 2^0 + 2^1 + ... + 2^{k-1} + 2^k

2^{k+1} = 1 + \displaystyle\sum_{i=0}^{k} 2^i

QED

Application To Roulette

I’m dying, btw, to have an actual mathematician check my math and tell me if the above proof is valid. But on to the money! The above theorem essentially says, in english, that any power of two is the sum of the previous powers, plus one. We apply that to gambling thusly:

Imagine you play roulette, betting only on red (or black/even/odd), and begin with a principal amount of cash, p. After k rounds of doubling your bet, betting, and losing, you have lost

p + 2p + p(2^2) + ... + p(2^k) or:

p\displaystyle\sum_{i=0}^k 2^i

If you win on the next round, round k+1, you will win of course p(2^{k+1}). From the theorem, it follows that you have won

p(2^{k+1}) = p + p\displaystyle\sum_{i=0}^k 2^i

If we subtract what we’ve won from what we’ve spent, we find how much we’ve gained:

p + p\displaystyle\sum_{i=0}^k 2^i - p\displaystyle\sum_{i=0}^k 2^i = p

We find that we are left having gained exactly p. Incidentally, I’ve discovered that the theorem I proved above can (probably) be extended to all bases:

n^k = 1 + (n-1)\displaystyle\sum_{i=0}^{k-1} n^i

But I haven’t really found a way of proving it. I’m quite certain that it can be proved using similar logic as before. That is, you add (n-1)-many n^k’s to each side. I just have no way of formalizing it. Any help?


Best 5 Shootouts in Cinema

July 29, 2008

What defines a good shooting scene? Can I point to some objective, quantifiable attribute of a shooting scene and perform a calculation to determine the best? No. So take this list with a grain of salt; the following text represents my opinion. Feel free to assault me verbally with your own, correct opinions.

Without further ado (and numerous apologies for poor cropping):

5. Black Hawk Down

I didn’t actually choose a particular scene from Black Hawk Down, for the simple reason that the entire movie is basically one big shootout. It’s raw, violent urban warfare in the middle east, directed by the wonderful Ridley Scott.

4. Smokin’ Aces

Smokin’ Aces isn’t a particularly good action movie. Actually, it’s not really a very good movie at all. But damn, the scene (pictured) where cops are being blasted away by a .50 cal rifle is just sweet.

3. The Matrix

What self-respecting shootout list could possibly exclude the lobby scene from The Matrix? The lobby scene has it all: shooting, blood, hand-to-hand combat, and an environment that takes a heavier beating than any of the people involved.

2. Saving Private Ryan

There’s something that’s simultaneously glorious and horrifying about the Omaha scene in Saving Private Ryan. Perhaps it’s the gratuitous (or just realistic?) shots of body parts flying through the air; perhaps it’s the blood that occasionally splatters onto the camera lens; perhaps it’s the sobbing American soldiers who hide behind the flimsiest barricades in the hopes of avoiding machine gun fire from the German nests on higher ground. Whatever it is, it makes this scene completely enthralling.

1. Heat

The post-bank robbery scene in Heat is, as far as I’m concerned, the closest Hollywood has ever gotten to filming the perfect shootout. The first thing I recall when I think of this scene is the sound. Michael Mann (the director) didn’t bother with any crazy techno music and half-assed gun sounds. No, the guns in this scene are loud, just like real guns.

Add to that the fact that this is basically a heist gone wrong in Los Angeles. It doesn’t take place in some foreign country or a number of decades ago. It occurs somewhere very similar to where you probably live, and it looks and sounds real. It’s like having Black Hawk Down happen in your back yard.


WordPress

July 28, 2008

I’m relatively new to this phenomenon known as “blogging,” and as such have little to no knowledge of what constitutes a good “CMS.” In fact, only yesterday did I even learn that the acronym CMS is short for “content management system” and not, as I’d previously thought, “criminally malicious squirrels.”

Seriously, though. I began my journey through the blogosphere from Google’s Blogger. I personally am a Google fanatic and take any criticism directed at them much more personally than they probably do. So Blogger seemed like a natural place to start, and for a time, all was well in the verdant pastures of my brain as I typed out obfuscated reviews of products so old or obscure that no one would bother to read them.

But then, as it happened, a friend of mine is who quite accomplished in the Art Of Blogging, dropped the term CMS in an AIM-chat. I read about content management systems on Wikipedia and understood for the first time that perhaps there is something in this blogosphere that equals — nay, surpasses — Blogger in quality.

With the naiive intent of broadening my horizons, I dove head-first into the lands of the proprietary CMS’s. Though I quickly fled from this region of the sphere due to none-too-subtle signs that I would have to be spending a lot of money, I did have time to watch a few screencasts of people doing things with their blogs that I’d never even dreamed of hoping to dream of doing with mine.

Thus it was decided. I would move my entire blog to another blogging site that provided a more professional, but still free, CMS. And so I am here on WordPress, fresh off the sphere-boat, as it were, from Blogger, and just beginning to explore what I hope will prove to be a treasure-trove of new blogging goodies.

First Impressions

I discovered, while in the confused and easily impressionable state (caused not only by the fact that I was turning my understanding of the blogging world upside-down, but also because I was doing it at 3 am), that WordPress genuinely wants you to have an easy time getting your blog written. Of course that’s a common goal of all these sorts of sites, but between the short and to-the-point signup page and the “import blog” button that required all of ten seconds for me to import my entire blog from blogger, I realized that things here at WordPress are uncommonly efficient.

As I’ve said, I have yet to explore all of the features WordPress has to offer, so I’m hoping that this outer efficiency isn’t a veil for some hidden shortcomings. I don’t think it is, though. I’ve already sifted through dozens of different themes that are far more creative than anything Blogger has to offer.

“Themes?” You might ask, “Aren’t themes kind of… superficial?” Yes, they are. But recall that blogging essentially amounts to writing text and publishing it to the web. Besides this text, the only thing that distinguishes one blog from another is how the blog looks. And since we live in such a superficial society anyway, having a pretty blog is a big step towards having a good blog.

Beyond the themes, I haven’t really noticed a drastic difference in features yet. I’m just hoping that someting shiny and sparkly will jump out at me and make me love WordPress. Time will tell…


The Dark Knight, Metaphysics, And You

July 26, 2008

(Moderate Spoiler Warning) With so much praise, so many rave-reviews and so much hype for The Dark Knight, I thought it would be interesting to explore some of the deeper-than surface themes that make The Dark Knight Not Your Average Comic Book Action Flick.

Let’s begin with Batman himself. We see a return, in The Dark Knight, of the old, old, old Batman comic character. That is, Batman isn’t shown as a glamorous knight in shining armor. Indeed, the title “The Dark Knight” may be a reference to the fact that Batman is quite the reverse.

Batman is a brooding, conflicted character who beats people up. It just so happens that they’re bad guys, and we get the distinct impression that they don’t have to be; Batman is thus constantly playing the edge between good and evil, hero and villain. As such, it is impossible to view him in the same light as Superman or Spiderman.

Despite his dark side, Batman does represent one thing akin to good: order. While order, outside of the thermodynamic sense, may be subjective, let’s proceed under the assumption that you and I have similar concepts of what order means.

Batman’s connection with order is undeniable. Though some of his actions may be construed as wrong (viz. beating up a SWAT team, lying about his identity, etc.) he invariably strives to preserve order in Gotham City.

This is evidenced by the fact that he does beat up bad guys. He expends nearly all of his energy and resources so he can run around the city chasing criminals so that the majority of the population can enjoy comfortable and safe lifestyles, and he acts to preserve those lifestyles when the need arises.

The Joker behaves in a way that is diametrically opposite to the way Batman does. The Joker is the one who interrupts the status quo, who throws people into confusion and panic, and who revels in the resulting disorder. The Joker represents the chaos to Batman’s order.

Think of the part of the film when the Joker threatens to blow up a hospital if a certain man is not killed within 60 minutes. The Joker makes one simple phone call, and throws the entire city into a near-riot. Citizens are uncertain, scared, and disoriented. Their understanding of how the world ought to be has been turned on its head. It is this understanding, this normalcy that Batman protects and the Joker tears down.

The Joker (played exceptionally well by Heath Ledger, of course) laughs maniacally when confronted with his deeds. “Isn’t this more exciting?” he asks. What indeed, could be more exciting for someone who thrives on chaos than seeing an entire city in a panic?

The third and final major character I’d like to look at is Two-Face. Initially in the movie, he is the knight in shining armor. He’s the man Batman can never be (as said by Batman and some point or another). He fearlessly shows his face to the world as he relentlessly clears the streets of criminals. He is the Superman of Gotham City. Of course this doesn’t last.

His other role, in the latter stages of the movie, is related to neither order nor chaos; rather, he represents the idea of chance. He doesn’t care if people are panicked or content. He doesn’t care if they live or die. He lets a coin decide for him.

Of course, he really is a bad guy, and falls more toward the chaos end of the spectrum, which means Batman has to take him down. But I like the concept of an unpredictable force, that both preserves order (eliminating the traitors in the police department) and causes chaos (kidnapping that nice man’s family).

Such themes aren’t really fully developed within the film, but they are certainly present. This, I think, is what makes The Dark Knight appealing to both action junkies and philosophical-types alike. I won’t speak much to the quality of the movie itself because I know that there are countless reviews out there that do that already. But I will say this: I enjoyed it.


Xbox 360 Controller

July 14, 2008

I don’t actually own an Xbox, but I do own a wired Xbox 360 controller that I use with my PC. So I can’t speak to the wireless capacities of the standard Xbox controller, but I thought it’d be interesting to take a close look at what hundreds of thousands of people around the world are holding when they play Halo or Assassin’s Creed.

First, it should be mentioned that the 360 controller is a vast improvement over the old Xbox controller. I had the misfortune to hold an old Xbox controller once, and I couldn’t reach all the buttons because my hands were too small. The 360 controllers are much sleeker, and sport a nifty ergonomic design that makes me think of a hybrid between a Playstation controller and a Gamecube one.

The four colored buttons on the right, ABXY, are of course reminiscent of the X O Δ an square (which I can’t find and ASCII code for). There are four additional buttons: left and right triggers, and a button above each trigger.

The control stick/D-pad placement is what makes me think of the Gamecube. The main control stick is on the left side and is almost exactly where your thumb naturally rests. The second control stick is on the right and is just below where your thumb naturally rests (IE on the ABXY buttons). Both control sticks are clickable. The D-pad is placed below the left control stick in the same way the right control stick is placed under the ABXY buttons.

The first thing I noticed when I hefted my 360 controller for the first time was that it really is more comfortable than a Playstation or Nintendo controller. Its curves were clearly designed to maximize comfort and ability to reach buttons. Gone are the days when people without gigantic hands couldn’t play on a normal Xbox controller.

Besides having the increasingly popular pressure-sensitive buttons, the 360’s right and left triggers are very pressure sensitive. They seem to have springs inside of them which provide tactile feedback so you know exactly how hard you’re pressing them.

But despite how much I like the new controller, it does have a couple flaws. My chief concern is that it’s almost anatomically impossible to be pressing an ABXY button and be simultaneously using the right control stick. Likewise, you can’t use the left control stick and use the D-pad at the same time. This wouldn’t be a large concern if game designers were cognizant of this fact, but in all the games I’ve played with a 360 controller, there is some point where this is a legitimate problem.

Minor flaws aside, though, the 360 is an extremely well designed controller, and is, in my opinion, much more functional than any other controller. The inability to press certain buttons simultaneously is only worse on most console (viz. the N64. Ever try pressing L, Z and A at the same time?). So if you’re in the market for a comfortable, adaptable and well-supported controller, the $30 Xbox 360 controller is a good choice.


Devil May Cry 4

July 13, 2008

Good PC ports of console games are few and far between. So as a console-less PC owner, I always look forward to big titles that make the jump from 360/PS3 to Windows. Thus I was excited when Devil May Cry 4 — a pretty big title — came out. I haven’t really played a lot of console ports; I’ve just played Assassin’s Creed and some Dynasty Warrior-esque games. The big question for me with DMC 4, then, was if it would be better than Assassin’s Creed.

And to be quite honest, I think it is. Don’t get me wrong, I actually really liked Assassin’s Creed. In fact, from what I can tell, I liked it more than most people. But I’m really really enjoying DMC 4.

Until DMC 4, I’d never played a Devil May Cry title. I was immediately struck by the complete linearity of the game: you almost never have a choice about which direction to go. There’s no open-ended sandbox world that’s becoming more and more common in games. There are never two ways of completing an objective. Your only freedom is in how you kill enemies. But what a freedom that is!

The fun I derived from DMC 4 was all in beating up bad guys. You get to train new moves and combos so that you can zip around destroying scarecrows with swords for legs, giant ice demons, fiery dogs and more. The more elegant and fluid the combo you use, the higher your score at the end of a mission will be.

Besides a plethora of different enemies to battle with, you adventure through numerous lush environments. I’m running XP and thus the DX9 version of the game, but the graphics were still stunningly beautiful. I imagine they are only more so in the 360/DX10 version of the game. Character models too are crisp, detailed and gorgeous.

I played on the most basic difficulty, and it took about 9 hours of gameplay to beat the game. 9 hours is, of course, pretty short, but the game offers plenty of replay value. If you restart the game on a higher difficulty, you keep the same character with the same upgrades, and you go around battling more numerous and more powerful opponents. And besides, the fun of the game is annihilating monsters; the plot doesn’t really matter.

The only real drawback to DMC 4 for the PC besides the linearity is that it’s almost impossible to play if you don’t have an Xbox controller. The game wasn’t really redesigned like Assassin’s Creed was for the keyboard and mouse. But if you do have an Xbox controller (which you should), DMC 4 is an excellent game.


Viacom Suing Google

July 6, 2008

I can’t help but wonder if people are trying to take advantage of Google’s sudden success, or if billion-dollar lawsuits are just common things in the corporate world. If you’ve been reading the news, you’ll probably know that Viacom is suing Google for copyright infringement. Viacom claims ownership of over 150,000 video clips that were posted with authorization on YouTube.

But I think Viacom deserves a big thumbs down for this. YouTube hosts over 80 million videos. How can they expect Google to have a person check each and every clip to see if it violates any copyrights? It’s not physically possible.

Besides, it’s not like Google encourages copyright infringement. I think they set a precedent with the whole “Lazy Sunday” business — a precedent that both viewers and copyright holders can agree upon. That is, if a copyright holder objects to their material being displayed on YouTube, they can notify Google and Google will take down the relevant clips if they are, in fact, in violation of the copyright.

Google even said on their YouTube blog

“We know how popular that video is but YouTube respects the rights of copyright holders. You can still watch SNL’s Lazy Sunday video for free on NBC’s website.”

What more does Viacom want? How can they sue Google for copyright infringement if a) Google can’t possibly know about every clip on YouTube and b) Viacom hasn’t even asked Google to take the clips down?

I suppose I don’t really understand big business or the corporate world, but it seems to me that Viacom is trying to make money off of Google for something that isn’t really Google’s fault at all.


Brian

July 4, 2008

I’m certainly familiar with the concept of “suspension of disbelief.” Almost all works of fiction, to varying extents, require it. So when I say that I find the character Brian from Family Guy to be unrealistic, don’t tear my throat out or anything.

I believe that suspension of disbelief ought to be an unconscious phenomenon. When we watch Q unveil some new invention to James Bond we don’t pause the movie and say, “Well, something like that device surely won’t be created for several decades. However, I’m willing to suspend my disbelief and accept it as possible for the sake of watching the movie.” No, the fact that it’s unrealistic doesn’t even register with our conscious mind. If we took the time to think about it we would all be able to dismiss it as improbable, but we don’t.

Thus my beef with Brian. Every time I see him on screen I can’t help but notice some bizarre things about him. Interestingly, it doesn’t bother me that he’s a talking dog. What does bother me is that he’s a normal talking dog. He acts like a normal 30-ish human man might and that’s how he’s treated.

Why’s that weird? It’s weird because it makes no sense for the Griffin family to have a 30 year-old, completely unrelated human man living with them. The only way you know he’s even a dog is because he looks like one. So I have to ask: where does he come from? Why is he living with the Griffins? It certainly can’t be because they wanted a pet, because Brian would have to then exhibit some sort of pet-like behavior.

For me, though, Brian’s role in the show is fascinating. By “role in the show” I don’t mean his role within the context of the plot of the show — I’ve already discussed my confusion regarding that. Rather, I’m interested in his role within the context of Family Guy being a comedy show. Ignoring the fact that he’s a dog, Brian is the most normal character in the show.

“Normal” characters are extremely important to any successful comedy; for comedy serials they are even more important. Take an example: Michael Bluth in Arrested Development. His entire family is insane, but he is relatively normal. By constantly having a rational character on-screen with whom the rest of the characters can be contrasted, all of their idiosyncrasies become amplified. This is the role Brian plays in Family Guy. Brian is the “normal character” with whom we (presumably subconsciously) contrast all the other characters.

I won’t try to review the show Family Guy itself; this would be too tedious a task, especially because I don’t really like the show. But I would like to know some background on Brian’s character. I find it too hard to accept his character on faith.


Ratatouille

July 3, 2008

TLDR Version

  • Tastiness 3/5
  • Ease Of Eating 4.5/5
  • Ease Of Preparation 3.5/5
  • Health Value 3.5/5

Overall 3.6/5

Now just to be clear, I will stress that a given preparation of ratatouille niçoise is of course not guaranteed to be the same as the ones I’ve had. But generally speaking, ratatouille is a rather bland dish. All ratatouille has going for it is that there is essentially nothing harmful in it. Its ingredients are all healthy fruits and vegetables. Unfortunately, they are the most uninteresting fruits and vegetables (in terms of flavor): tomatoes, eggplant, zucchini, bell peppers…

There is a faint twinkle of promise in ratatouille. Namely, garlic and onion. Garlic and onion can add that extra bit of je ne sais quois to a dish that elevates it from something common and flavorless to something wonderfull and delicious. But ratatouille fails even here because it is cooked to death. Any hint of flavor that the onion and garlic could have brought to the dish is mercilessly boiled, broiled or sautéed into oblivion.

Despite its flaws, ratatouille can serve as a good accompanyment to a more complex meal. It should not be the main dish, but goes well with lightly seasoned poultry and potatoes. Mmm… potatoes…


Vantage Point

July 2, 2008

TLDR Version

  • Cinematography 4.5/5
  • Scripting 3/5
  • Performance Within Genre (Action/Thriller): 3/5
  • Acting: 3/5
  • Story 2.5/5

Overall 3.2/5

“Vantage Point” begins full of promise. The premise is an interesting new take on something Tarantino’s been doing for a while. In a Tarantino movie, the audience often has to piece together the events of the story even though they’re shown out of sequence and in some bizarre order. But rather than play with time, Vantage Point plays with space. You are shown the same events multiple times but from different perspectives.

Good in theory, mediocre in execution. The first couple of times you’re shown the events, the movie is interesting and engaging. But by the third and fourth repetitions it starts to get tedious. Even though new information is presented with each repetition, it’s just not enough to make the movie exciting. The director (Pete Travis) seems to have noticed this, so after enough repetitions the whole multiple-perspectives idea is scrapped and the movie degenerates into an unimaginative and predictable action-thriller.

I really wanted Vantage Point to be the intelligent Action/Drama that Pulp Fiction is. Unfortunately, Vantage Point is held back by its flaws and doesn’t quite cut it. Nevertheless, if you’re looking for some action-packed entertainment for an evening, you could do worse than Vantage Point.