2010-12-17

[ZT+FY]欧拉工程265


欧拉工程265
转自这里
2^N binary digits can be placed in a circle so that all the N-digit clockwise subsequences are distinct.
2^N位二进制数字能够组成这样一个环,任意N位顺时针旋转会组成不同的序列。
For N=3, two such circular arrangements are possible, ignoring rotations:
例如,N=3,如下两个圆环,忽略旋转:

For the first arrangement, the 3-digit subsequences, in clockwise order, are:
第一个环,按照3bit组合,得到如下序列:
000, 001, 010, 101, 011, 111, 110 and 100.

Each circular arrangement can be encoded as a number by concatenating the binary digits starting with the subsequence of all zeros as the most significant bits and proceeding clockwise. The two arrangements for N=3 are thus represented as 23 and 29:
每个循环都可以利用链接比特位来编码成开始元素位均为0的码序列。对于N = 32329两种排法:

00010111 = 23
00011101 = 29

Calling S(N) the sum of the unique numeric representations, we can see that S(3) = 23 + 29 = 52.
设定S(N)为这些排法十进制的和,我们能够得出S(3) = 23+29 = 52

Find S(5).
试着求一下S(5)吧。
1
欢迎访问www.114er.com共同交流

本文地址:http://114er.blogspot.com/2010/12/ztfy265.html
原创文章如转载,请注明链接: 转自Welcome Funny Guys