subset
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:Efficiently Enumerating the Subsets of a Set
Efficiently Enumerating the Subsets of a Set
============================================

The [paper](https://github.com/jloughry/subset/blob/master/loughry2000.pdf) is
PDF only until I find the LaTeX source code. This is the
[letter](https://github.com/jloughry/subset/blob/master/letter_to_prof_knuth.pdf)
I gave to Don Knuth in Oxford.

Update 20121203.2048:
---------------------

I found the solution to the Grey-code like banker's sequence for *n* = 4.
In decimal it is 0, 1, 3, 2, 6, 4, 12, 8, 10, 11, 9, 13, 5, 7, 15, 14.
In binary, the sequence is 0000, 0001, 0011, 0010, 0110, 0100, 1100, 1000, 1010,
1011, 1001, 1101, 0101, 0111, 1111, 1110.

optimal banker's sequence for n=4optimal banker's sequence for n=4

BinaryDec (Hex)Bits SetIndex
00000 (0) 0
00011 (1)*1
00113 (3)**2
00102 (2)*3
01106 (6)**4
01004 (4)*5
110012 (C)**6
10008 (8)*7
101010 (A)**8
101111 (B)***9
10019 (9)**A
110113 (D)***B
01015 (5)**C
01117 (7)***D
111115 (F)****E
111014 (E)***F
The solution was found by using `dot` to draw a directed graph of all possible one-bit transitions from the starting state 0000 and backtracking from impossible situations until a solution was found. The optimal path is highlighted in red. It is not known whether this solution is unique or whether any solutions exist for *n* > 4. An automated method for constructing `dot` or `neato` source code should be developed. Update 20140115.1225: --------------------- Added Eric Burnett as co-author on the paper. I have to finish my thesis before I can finish this paper. Update 20140604.1658: --------------------- `minimised_snowflake_order_4.dot` can be compiled to [PDF](https://github.com/jloughry/subset/blob/master/minimised_snowflake_order_4.pdf?raw=true) with the command line: ```` $ neato -Goverlap=scale -T pdf minimised_snowflake_order_4.dot -o minimised_snowflake_order_4.pdf ```` It is not known whether the path shown for order-4 is unique, but it is optimal. "Optimal" in this context means that all state transitions involve setting or resetting a single bit ("flipping a bit") and all *n*-bit states are enumerated before any (*n*+2)-bit states are enumerated. "Strictly optimal" would have all *n*-bit states enumerated before any (*n*+1)-bit states are enumerated, but that can't be done by flipping a bit for *n* > 1.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。