漫画里的数学:《欺诈游戏》第70话里的62%

一直都喜欢看甲斐谷忍的《欺诈游戏》,每个游戏及计谋都设计得精采且严谨合理。在最近的第70话里,看到了一个数学概率问题,但作者没展示其算法就说其概率是约62%了。这其中的算法其实不太重要,毕竟故事里的计谋都设计得蛮有深度,而许多角色都是数学高手,这点小算法也真不太值得一提了。但喜欢数学的我忍不住想验证这数字,并想想如何速算这概率。

Fibonacci Spiral
问题是这样的(应该无剧透吧!):以上的12张扑克牌中有三张A。现从其任意抽出三张牌。请问抽中至少一张A牌的概率是多少?故事中的高手如何算得这么快?

你动了脑筋吗? ☺ 我的分析见下。

长梦里的音乐

昨晚作了个很长但故事还算完整的梦。简单地说,我不小心进入`时空漩涡'而回到了古代的中国(后来还回到现代呢!)。其中一个让我印像深刻的是,我听到了一位弹奏古筝的歌女所奏的动听音乐。(至少在梦境里十分动听感人。)这音乐应至少有六个乐句,但我醒来后仅记得两个多的乐句。我赶紧记了下来。我不知道这是我偶然曾听过的音乐在我梦里重现,或是我梦里的拙作。若是现有的音乐,可否告诉我是什么音乐?

这曲的每个乐句都有十三个音。这是该曲的最后两句。我忘了最后一句的前三分二,故用?注明。该曲还有词,只记得最后一个字的发音是Ya,可能是`涯'或`呀'。

也记得之前曾出现过的一句。

就这么多!唉……

[Refresher] Object Model in PHP 5

Official References (From the online PHP Manual):

Basic

Disable the Activation of Access Keys in Konqueror

I turn on my Xubuntu box and fire up konqueror. I press Ctrl+F2 to switch to another workspace, do something there, and then press Ctrl+F1 to switch back to the workspace with konqueror. Behold! The last Ctrl key has summoned several small yellow boxes (with letters in them) waiting to serve me. The status bar of konqueror tells me what happened: "Access Keys activated". I don't want any of them. What can I do?

  • Press Esc key every now and then to send all these boxes away; or
  • Disable it once and for all!
    $ kwriteconfig –file konquerorrc –group "Access Keys" –key Enabled –type bool false
    

Restart konqueror. Behold! Ctrl key summons nothing from konqueror now!

Ubuntu vs Mac OS X in Veronica Mars

I happened to come across an interesting and probably the geekiest conversation in the TV series Veronica Mars [www2.warnerbros.com]. The conversation is from the Episode 18 of Season 1, and is an argument between Pete, a male geek, and Cindy, a female geek:

Pete: Wait, how can you even have an opinion on Ubuntu if you haven't tried it? Two six kernel, Live CD, they even had GNOME 2.0 the day Warty Warthog came out.
Cindy: I'm sorry, I'm perfectly content with OS X. I have all the awk/grep-ance that I want without any need for that pitiful font de-uglification.
Pete: But the fonts are de-uglified, and it's free! You know, fine, you know, living in the dark ages.
Cindy: I know what I like! And I like what I know.

I counted about 9 geek terms here if you want to fully understand the conversation: Ubuntu, Two six kernel (2.6), Live CD, GNOME, Warty Warthog, OS X, awk, grep, font de-uglification. (^_^) How many do you know?

GNU/Linux Installation Notes (Xubuntu 8.04 Hardy Heron)

Here are the things I normally do to prepare my GNU/Linux box. I will update the post for the latest GNU/Linux distro I install on my computers.

Last Updated: 4-Jun-2008

1. Requirements

My requirements for my GNU/Linux box:

  • Do not compromise system performance for fancier graphics
  • A comfortable environment for software development + entertainment!

Over the years I find that the excellent Xfce provides me the best user experience. So I stick to a user-friendly GNU/Linux system with its GUI powered by Xfce:

  • Distro: Xubuntu 8.04 (Hardy Heron)
  • Installation CD: Xubuntu [PC (Intel x86) desktop install CD]

My Eee PC 4G (701)

My lovely Eee PC

I bought an Eee PC [eeepc.asus.com] 4G (701) last month and had been playing and using it. It is quite a lovely machine.

I have also installed Ubuntu 7.10 on it, and make all peripherals (except the modem) to function properly. There are a lot of good resources online, including the excellent EeeUser.com. I will install Xubuntu 8.04 on it when it is officially released next week, and write an installation HOWTO if time permits.

Syndicate content