Abstract
This paper addresses the problem of uniform random generation of vectors of values with a fixed sum, subject to upper and lower constraints on the individual component values. Solutions to this problem are used extensively in the generation of tasksets, specifically task utilization values, in support of the performance assessment of schedulability tests for real-time systems. This paper introduces a general-purpose solution in the form of an Inverse Volume Ratio Sampling method that is applicable provided that it is possible to determine the ratio of the volume below a given hyperplane to the total volume of the valid region in n-dimensional space, as demarcated by the constraints and the fixed sum. An efficient approach is derived for volume calculation using numerical convolution, thus instantiating the ConvolutionalFixedSum algorithm, which provides a user-specified level of precision, while scaling at O(n3, log(n)). A stringent uniformity test is developed, called the slices test, which is able to fully explore the extent of the valid region in each of the n dimensions. The slices test reveals that while the outputs of UUniFast and ConvolutionalFixedSum form uniform distributions, in some cases the outputs of prior state-of-the-art algorithms do not.
Original language | English |
---|---|
Publication status | Published - 9 May 2025 |
Bibliographical note
Source code for the ConvolutionalFixedSum algorithm is available at: https://github.com/dgdguk/convolutionalfixedsum. Can be installed in Python via pip install convolutionalfixedsum.Keywords
- Real time system
- random number generator