• Title/Summary/Keyword: Divisibility test

Search Result 2, Processing Time 0.014 seconds

Generalized Divisibility Rule of Natural Number m (자연수 m의 일반화된 배수 판정법)

  • Lee, Sang-Un
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.14 no.5
    • /
    • pp.87-93
    • /
    • 2014
  • For n/m=qm+r, there is no simple divisibility rule for simple m=7 such that is the n multiply by m? This problem can be more complex for two or more digits of m. The Dunkels method has been known for generalized divisibility test method, but this method can not compute very large digits number that can not processed by computer. This paper suggests simple and exact divisibility method for m completely irrelevant n and m of digits. The proposed method sets $r_1=n_1n_2{\cdots}n_l(mod m)$ for $n=n_1n_2n_3{\cdots}n_k$, $m=m_1m_2{\cdots}m_l$. Then this method computes $r_i=r_{i-1}{\times}10+n_i(mod m)$, $i=2,3,{\cdots}k-l+1$ and reduces the digits of n one-by-one. The proposed method can be get the quotient and remainder with easy, fast and correct for various n,m experimental data.

A Prime Number Labeling Based on Tree Decomposition for Dynamic XML Data Management (동적 XML 데이터 관리를 위한 트리 분해 기반의 소수 레이블링 기법)

  • Byun, Chang-Woo
    • Journal of the Korea Society of Computer and Information
    • /
    • v.16 no.4
    • /
    • pp.169-177
    • /
    • 2011
  • As demand for efficiency in handling dynamic XML data grows, new dynamic XML labeling schemes have been researched. The key idea of the dynamic XML labeling scheme is to find ancestor-descendent-sibling relationships and to minimize memory space to store total label, response time and range of relabeling incurred by update operations. The prime number labeling scheme is a representative scheme which supports dynamic XML documents. It determines the ancestor-descendant relationships between two elements by a simple divisibility test of labels. When a new element is inserted into the XML data using this scheme, it does not change the label values of existing nodes. However, since each prime number must be used exclusively, labels can become significantly large. Therefore, in this paper, we introduce a novel technique to effectively reduce the problem of label overflow. The suggested idea is based on tree decomposition. When label overflow occurs, the full tree is divided into several sub-trees, and nodes in each sub-tree are separately labeled. Through experiments, we show the effectiveness of our scheme.