Abstract
Some computations are based on structures of random partition. They take an n-size problem as input, then break this problem into sub-problems of randomized size, execute calculations on each sub-problems and combine results from these calculations at last. We propose a combinatorial method for analyzing such computations and prove that the averaged time complexity is in terms of Stirling numbers of the second kind. The result shows that the average time complexity is decreased about one order of magnitude compared to that of the original solution. We also show two application cases where random partition structures are applied to improve performance.
Similar content being viewed by others
References
Chakraborty M, Mehera R, Pal RK (2022) Divide-and-conquer based all spanning tree generation algorithm of a simple connected graph. Theor Comput Sci 900:35–52
Rubing H, Weifeng S, Haibo C, Chenhui C, Ning Y (2022) A nearest-neighbor divide-and-conquer approach for adaptive random testing. Sci Comput Program 215:102743
Feng Y, Kai S, Liang G, Wei X (2022) DCLF: a divide-and-conquer learning framework for the predictions of steel hardness using multiple alloy datasets. Mater Today Commun 30:103195
Shubham, Prakash S, Ganapathi P (2022) An algorithm for the sequence alignment with gap penalty problem using multiway divide-and-conquer and matrix transposition. Inf Process Lett 173:106166
Ying Z, Chenze H, Qingbiao Z (2023) HaSGP: an effective graph partition method for heterogeneous-aware. Computing 105:455–481
Wilf HS (1983) Three problems in combinatorial asymptotics. J Combin Theory Ser A 35:199–207
Corteel S, Pittel B, Savage CD, Wilf HS (1999) On the multiplicity of parts in a random partition. Random Struct Algorithms 35(2):185–197
Goh WMY, Hitczenko P (2008) Random partitions with restricted part sizes. Random Struct Algorithms 32(4):440–462
Fatkullin I, Xue J (2021) Limit shapes for Gibbs partitions of sets. J Stat Phys 183:22
Czédli G, Oluoch L (2020) Four-element generating sets of partition lattices and their direct products. Acta Sci Math 86:405–448
Dalal AJ, Lohss A, Parry D (2021) Statistical structure of concave compositions. Ann Comb 25:729–756
Comtet L (1974) Advanced combinatorics: the art of finite and infinite expansions. Springer, Dordrecht, pp 15–16
Branson D (2006) Stirling number representations. Discrete Math 306:478–494
El-Mikkawy MEA (2004) A note on the Stirling matrix of the second kind. Appl Math Comput 151:147–151
Cheon G-S, Kim J-S (2001) Stirling matrix via pascal matrix. Linear Algebra Appl 329:49–59
Manob AH, Islam TM, Parvez MT, Kaykobad M (2004) Search trees and Stirling numbers. Comput Math Appl 48:747–754
Adell JA (2022) Probabilistic Stirling numbers of the second kind and applications. J Theor Probab 35:636–652
Belbachir H, Boutiche MA, Medjerredine A (2018) Enumerating some stable partitions involving Stirling and r-Stirling numbers of the second kind. Mediterr J Math 15:87
Godland T, Kabluchko Z (2021) Angle sums of schläfli orthoschemes. Discrete Comput Geom 68:125–164
Kargın L, Çay E (2022) Semiorthogonality of geometric polynomials. Mediterr J Math 19:129
ESRI Shapefile Technical Description (1998) Environmental Systems Research Institute, Inc. https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf
Liao MX, Fan ZH, Xin HX (2008) Quick algorithm for reconstructing line object adjacency. Comput Appl 28(1):245–247 (in Chinese)
He J, Liao MX, Hu XH, He XX (2010) Multi-level spatial hashing approach for conflict detection in air traffic management. In: The proceeding of the 2010 IRAST international congress on computer applications and computational science, pp 794–798
Acknowledgements
We thank Prof. Dong Shen from Renmin University of China for his review on the derivation part of this paper.
Funding
This work is partly supported by National Key R &D Program of China: 2022ZD0116406.
Author information
Authors and Affiliations
Contributions
ML is responsible for the following aspects: Conceptualization, methodology, software, writing original draft preparation, visualization, investigation, supervision, software, validation, writing—reviewing and editing. PL is responsible for the following aspects: Funding acquisition, Reviewing through the revision
Corresponding author
Ethics declarations
Conflict of interest
All authors declare that they have no conflict of interest.
Ethics approval
Not applicable.
Consent to participate
Not applicable.
Consent for publication
Not applicable.
Availability of data and materials
Not applicable.
Code availability
Not applicable.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendices
Appendix 1: Proof of Theorem 2
Proof
Among all solutions \([x_1,x_2, \ldots ,x_b ]\), for all i, there are the same occurrences for \( x_i = k\). In other words, if there are X solutions where \(x_i = k\) then there are also X solutions where \(x_j = k,j \ne i\) because the chances for a value to occur anywhere are the same.
Suppose the value of \(x_i\) is k, then all \(x_j (j \ne i)\) constitutes an answer for\(\sum \nolimits _{i = 1}^{b - 1} {x_i } = n - k\). With Proposition 1, the occurrences for \(x_i = k\) are \( \left( \begin{array}{l} n - k + b - 1 - 1 \\ b - 1 - 1 \\ \end{array} \right) = \left( \begin{array}{l} n - k + b - 2 \\ b - 2 \\ \end{array} \right) \), then Theorem 2 follows. \(\square \)
Appendix 2: Proof of Theorem 3
Proof
Let \( \lambda _m (x) = \sum \nolimits _{k = 0}^\infty {\frac{{k^m }}{{(1 + r)^{k + 1} }}x^{k - 1} } \), computing the integral we have:
So \(\lambda _1 = \sum \nolimits _{k = 0}^\infty {\frac{k}{{(1 + r)^{k + 1} }}x^{k - 1} } \), computing the integral we get \(\int _0^x {\lambda _1 dx} = \sum \nolimits _{k = 0}^\infty {\frac{1}{{(1 + r)^{k + 1} }}x^k } = \frac{1}{{1 + r - x}} \).
Based on the above analysis we have \(\left\{ \begin{array}{l} \lambda _1 = \frac{1}{{(1 + r - x)^2 }} \\ \lambda _m = (x\lambda _{m - 1} )' \\ \end{array} \right. \).
With mathematical induction method, we now show
Obviously, Eq. (19) holds for \(m=1\), that is \(\lambda _1 =\sum \nolimits _{k = 1}^1 {S(m = 1,k)x^{k - 1} \lambda _1 ^{(k - 1)}}\).
Suppose (19) holds for m, then:
Thus (19) follows.
Let \(x=1\), from (19) we have
We now can show that
and thus
Using the mathematical induction method as above, we know (21) holds for \(m=0\), that is \(\lambda _1 ^{(m = 0)} =\frac{{(0 + 1)!}}{{(1 + r - x)^{0 + 2} }} \).
Suppose \(\lambda _1 ^{(m)} = \frac{{(m + 1)!}}{{(1 + r - x)^{m + 2} }}\), then \(\lambda _1 ^{(m + 1)} = (\lambda _1 ^{(m)} )' = \frac{{(m + 1 + 1)!}}{{(1 + r - x)^{m + 1 + 2} }} \). Equation (21) follows and (22) also holds if we let \(x=1\) in (21).
Therefore, based on (22), there is an induction:
Theorem 3 follows. The proof is completed. \(\square \)
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Liao, M., Lv, P. On the average time complexity of computation with random partition. Computing 106, 741–758 (2024). https://doi.org/10.1007/s00607-023-01242-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00607-023-01242-1