计算机与现代化
計算機與現代化
계산궤여현대화
COMPUTER AND MODERNIZATION
2015年
6期
78-81,109
,共5页
水仙花数%栈%存储%动态数组%字长
水仙花數%棧%存儲%動態數組%字長
수선화수%잔%존저%동태수조%자장
Narcissus number%stack%memory%dynamic array%word-length
为了处理超出计算机字长范围的整数,需要构造合适的数据结构,用以存储超大数据。本文研究水仙花数的特征,结合排列组合和函数单调性等相关理论,借助“栈”后进先出的特点,利用动态数组存储超大整数。这种方法突破了传统设计思路仅考虑有限长度范围内的整型数据处理的约束,使得寻找正整数范围内的水仙花数的计算工作量呈几何级减少,达到了在较短时间内快速寻找正整数集合内所有水仙花数的目的,对超大整数的处理具有较好的参考作用。
為瞭處理超齣計算機字長範圍的整數,需要構造閤適的數據結構,用以存儲超大數據。本文研究水仙花數的特徵,結閤排列組閤和函數單調性等相關理論,藉助“棧”後進先齣的特點,利用動態數組存儲超大整數。這種方法突破瞭傳統設計思路僅攷慮有限長度範圍內的整型數據處理的約束,使得尋找正整數範圍內的水仙花數的計算工作量呈幾何級減少,達到瞭在較短時間內快速尋找正整數集閤內所有水仙花數的目的,對超大整數的處理具有較好的參攷作用。
위료처리초출계산궤자장범위적정수,수요구조합괄적수거결구,용이존저초대수거。본문연구수선화수적특정,결합배렬조합화함수단조성등상관이론,차조“잔”후진선출적특점,이용동태수조존저초대정수。저충방법돌파료전통설계사로부고필유한장도범위내적정형수거처리적약속,사득심조정정수범위내적수선화수적계산공작량정궤하급감소,체도료재교단시간내쾌속심조정정수집합내소유수선화수적목적,대초대정수적처리구유교호적삼고작용。
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.