Archive for 三月 23rd, 2010

一直以来我对数的排列这类算法问题都感到很头痛,曾经囫囵吞枣看过一些算法,可是浅尝辄止,没有实际操作所以每次都忘记。上周三算法分析与设计课的内容是递归,老师正好提到了排列数这一问题,于是就有机会稍微进行一些研究。 一个排列(permutation)就是对一组对象或者数值按照某种特定的方式进行排列组织(ar-rangement),为了方便起见我们以一个数集{1, 2, 3}为例,它的全排列共有3!=6种,即{1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1},上述列举排列的顺序又称为按字典序列举排列,具体将在下文进行叙述。 一、字典序 在Wikipedia中,字典序的解释是这样的: In mathematics, the lexicographic or lexicographical order, (also known as dictionary order, alphabetic order  or lexicographic(al) product), is a natural order  structure of the Cartesian product of two ordered sets. 如果你拥有一个字典,那么里面所有的字符串都是按照字典序来进行排序的,假设有两个字符串: a1, [...]


About this blog

I'm now a graduate student of Computer Applied Technology in Tongji University. I like Computer Graphics, Web 2.0, Magic, Music and am partially a geek. This blog is about C++, algorithm, cg, comments and other things I may get in touch with in the near future. Hope everyone enjoy this little site. Contact me: 4everlove.xu AT gmail.com

Photostream

日历

2010 年三月
« 一   九 »
 123456
78910111213
14151617181920
21222324252627
28293031  

TwitterWidget

3 分钟 ago
@pipitu @r475 @Hanliinter 为了你将来的GRE,记住glisten这个单词吧=-=
view tweet
4 分钟 ago
@Hanliinter @r475 有一班直达的公交……
view tweet
42 分钟 ago
@r475 @Hanliinter 考虑到日常和妹子的现充时间,可以省下很多成本(ry 其实我那边也不算中山公园了,好像在中介上面已经归到娄山关路或者古北去了……
view tweet
2 小时 ago
@Hanliinter 不过像我这样工作在徐汇,想要住在中山公园的,估计现在大部分公租房的条件就满足不了
view tweet
2 小时 ago
@Hanliinter 国内的公租房规模还太小啊~
view tweet
4 小时 ago
@ispinel 嗯……或者刷一刷等级的时候,现在看来只要保持在中烧以上应该就安全一点了@@
view tweet
5 小时 ago
@ispinel 赞!虽然似乎没有达到它标称的速度,不过比毛细宽带上传管要好太多了~
view tweet
20 小时 ago
husband居然有勤俭持家的意思,想来挺233的
view tweet
22 小时 ago
招行毕业转卡才给了8k的额度,果然有点小气啊……还是看不起咱这低收入人士?
view tweet
22 小时 ago
Lily Kershaw - As It Seems (From Criminal Minds S07 finale)。话说CM这一季后面几集又在平淡上激起了几许涟漪,可惜E姐就走了TAT
view tweet
Follow me!

FeedBurner RSS