摘要
为了处理超出计算机字长范围的整数,需要构造合适的数据结构,用以存储超大数据。本文研究水仙花数的特征,结合排列组合和函数单调性等相关理论,借助"栈"后进先出的特点,利用动态数组存储超大整数。这种方法突破了传统设计思路仅考虑有限长度范围内的整型数据处理的约束,使得寻找正整数范围内的水仙花数的计算工作量呈几何级减少,达到了在较短时间内快速寻找正整数集合内所有水仙花数的目的,对超大整数的处理具有较好的参考作用。
In order to process those integers beyond the scope of computer word-length, we need to construct suitable data struc-tures for storing big data. This paper studies the characteristics of Narcissus numbers; combines the theory of permutation and combination with functional monotonicity;uses stack which has LIFO character;stores large integer by dynamic array. This meth-od breaks through the traditional design which only considers processing finite length integers, makes the calculation work of find-ing Narcissus numbers reduce exponentially in the range of positive integers, achieves the purpose of finding all Narcissus num-bers quickly in a short period of time within the set of positive integers. This method is a good reference for the processing of large integer.
出处
《计算机与现代化》
2015年第6期78-81,109,共5页
Computer and Modernization
基金
国家自然科学基金资助项目(61152003)
四川省教育厅项目(152B0326)
四川文理学院智能物流创新团队资助项目
关键词
水仙花数
栈
存储
动态数组
字长
Narcissus number
stack
memory
dynamic array
word-length