arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 0811.3449cs.DS
收藏

二进制混洗算法:逐位混洗

Binar Shuffle Algorithm: Shuffling Bit by Bit

William F. Gilreath

摘要:

通常,需要随机组织的数据来避免其他算法和计算过程的异常操作。一个类比是,一副牌是在包内排序,但在扑克或纸牌游戏之前,这副牌被洗牌,以创建一个随机排列。混洗用于确保序列S的数据元素的集合是随机排列的,但避免了有序或部分有序的排列。混洗是将数据元素排列成随机排列的过程。序列S作为N个数据元素的聚合,存在N个!可能的排列。对于大量可能的排列,其中两种可能的排列用于数据元素的排序或有序放置--升序排列和降序排列。洗牌必须避免无意中产生一个上升或下降的排列。混洗经常与另一种算法功能--伪随机数生成相结合。混洗的效率和质量直接取决于所使用的随机数生成算法。一种更有效和高效的混洗方法是使用参数化来配置混洗,并通过利用数据元素的编码来混洗成子阵列。二进制混洗算法使用数据元素的编码和参数化来避免与随机数生成算法的任何直接耦合,但仍然保持线性O(N)混洗算法。

英文摘要:

Frequently, randomly organized data is needed to avoid an anomalous operation of other algorithms and computational processes. An analogy is that a deck of cards is ordered within the pack, but before a game of poker or solitaire the deck is shuffled to create a random permutation. Shuffling is used to assure that an aggregate of data elements for a sequence S is randomly arranged, but avoids an ordered or partially ordered permutation. Shuffling is the process of arranging data elements into a random permutation. The sequence S as an aggregation of N data elements, there are N! possible permutations. For the large number of possible permutations, two of the possible permutations are for a sorted or ordered placement of data elements--both an ascending and descending sorted permutation. Shuffling must avoid inadvertently creating either an ascending or descending permutation. Shuffling is frequently coupled to another algorithmic function -- pseudo-random number generation. The efficiency and quality of the shuffle is directly dependent upon the random number generation algorithm utilized. A more effective and efficient method of shuffling is to use parameterization to configure the shuffle, and to shuffle into sub-arrays by utilizing the encoding of the data elements. The binar shuffle algorithm uses the encoding of the data elements and parameterization to avoid any direct coupling to a random number generation algorithm, but still remain a linear O(N) shuffle algorithm.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑