Warning: needs renaming, the term Sierpinski number is used for different type of numbers already, absolutely unrelated to the Sierpinsky triangle, but named after the same guy. (Actually, "numbering" and "numbers" mean different things, so may keep it this way.) Possible variant: MÅotkovsky numbers. Jan 2009 : rebranded as Mnumbers Considering MerkleHashes, Video On Demand and P2P streaming, the BitTorrent approach with splitting a file into pieces and passing around bit fields might not be convenient enough. Herewith described a byte range numbering system for infinite streams that might allow efficient representation of possessed/desired pieces in a peertopeer swarm. (BTW, there is a HaveAll/HaveNone proposed BitTorrent extension optimizing the trivial cases.) Consider an infinite Serpinsky triangle over some infinite byte stream so smallest (base) triangles correspond to bytes, next layer corresponds to 2byte length 2byte aligned ranges, next 4byte, 8byte etc. The sequential numbering system for triangles/ranges is as follows: 0 is empty set, 1 is first byte, 2 is the second byte, 3 is the first 2byte range, 4 is the 3rd byte, etc. So,
So using binary numbers, every leftmost triangle (i.e. ranges of 2^{i} length starting at the first byte) are numbered 1 (length 1), 11 (length 2), 111 (length 4), 1111 (length 8) etc. Overhead of using Sierpinsky numbering compared to the simple sequential byte numbering is 1 bit! (as for a 2^{n} byte range there are 2^{n+1} triangles/ranges) Conclusion
Note: using MerkleHashes instead of infohashes is not compatible with infinite streams: the hash of the whole stream obviously constantly changes Attachments
