Brute Force Computations and Reference Solutions
Abstract
:1. Introduction and Notation
1.1. Preliminaries
1.2. General Notations
- —set of integers;
- —set of integers , where ;
- —set of integers ;
- —set of real (complex) numbers;
- —imaginary unit, where ;
- —sum of the scalar quantities ;
- —definite integral of the function on the interval ;
- ≺—lexicographical order on the set of pairs defined as if , or and ; we write if , or ;
- —set of matrices A with elements , where is one of the sets , or ;
- ;
- —pth row of ;
- —qth column of ;
- —spectral norm in ;
- —matrix with unit elements;
- —rank of the matrix ;
- —trace of the matrix ;
- —determinant of the matrix ;
- —identity matrix with and for ;
- —matrix with unique nonzero element, equal to 1, in position ;
- —nilpotent matrix with and for ;
- —eigenvalues of the matrix , where ; we usually assume that ;
- —singular values of the matrix , where , ; the singular values are ordered as ;
- —spectral norm of the matrix ;
- —condition number of the non-singular matrix .
1.3. Machine Arithmetic Notations
- —set of finite positive (negative) machine numbers;
- —set of finite machine numbers;
- —rounded value of ; is computed as by the command sym(x,’f’), where , and m is odd if ;
- —set of positive (negative) machine numbers; we have ;
- ()—machine number right (left) nearest to ; is obtained as X + eps(X);
- —machine epsilon; we have , ; is obtained as eps(1), or simply as eps;
- —rounding unit;
- —maximal integer such that positive integers are machine numbers; we have , ;
- —maximal machine integer degree of 2; we have ;
- —maximal machine number; it is also denoted as realmax and we have eps(realmax) = 2^971;
- —minimal positive normal machine number; it is also denoted as realmin;
- —minimal positive subnormal machine number; it is found as eps(0);
- —rounded value of ;
- —normal range; numbers are rounded with relative error less than ;
- Inf (-Inf)—positive (negative) machine infinity;
- NaN—result of mathematically undefined operation, representing Not a Number;
- —extended machine set.
1.4. Software and Hardware
1.5. Problems with Reference Solution
2. Machine Arithmetic
2.1. Preliminaries
2.2. Violation of Arithmetic Laws
2.3. Numerical Convergence of Series
- 1.
- Numerically convergent if there is a positive and such that for ; the number S is called the numerical sum of the series ;
- 2.
- Numerically divergent if there is such that for ; in such cases, for ;
- 3.
- Numerically undefined if there is such that for and .
2.4. Average Rounding Errors
3. Numerically Stable Computations
3.1. Lipschitz Continuous Problems
- 1.
- The function is Lipschitz continuous if and is not Lipschitz continuous if .
- 2.
- The function is Lipschitz continuous if and is not Lipschitz continuous if .
- 3.
- The function , , is Lipschitz continuous if and is not Lipschitz continuous if .
- 4.
- The function for and , is differentiable on but is not Lipschitz continuous.
- 1.
- The sensitivity of the computational problem to perturbations in the data d measured by the Lipschitz constant L of the function f.
- 2.
- The stability of the computational algorithm expressed by the constants .
- 3.
- The FPA characterized by the rounding unit ρ and the requirement that the intermediate computed results belong to the normal range .
- 1.
- Well conditioned if ; in this case, we may expect about true decimal digits in the computed solution;
- 2.
- Poorly conditioned if ; in this case, there may be no true digits in the computed solution.
3.2. Hölder Continuous Problems
- The code roots is fast and works on middle power computer platforms with equations of degree n up to several thousands but gives large errors in case of multiple roots. This code solves only algebraic equations.
- The code vpasolve works with VPA corresponding to 32 true decimal digits with equations of degree n up to several hundreds but may be slow in some cases. This code works with general equations as well finding one root at a time.
- The code fzero is fast but finds one root at a time. It may not work properly in case of multiple roots of even multiplicity. This code works with general finite equations as well.
3.3. Golden Rule of Computations
4. Extremal Elements of Arrays
4.1. Vectors
4.2. Matrices
4.3. Application to Voting Theory
5. Problems with Reference Solutions
5.1. Evaluation of Functions
5.2. Linear Algebraic Equations
- Standard solution X_1 = A\b obtained by Gaussian elimination with partial pivoting based on LR decomposition of A, where L is a lower triangular matrix with unit diagonal elements, R is an upper triangular matrix with nonzero diagonal elements, and P is a permutation matrix.
- Solution X_2 = R\(Q’∗b) obtained by QR decomposition [Q,R] = qr(A) of A, where , the matrix Q is orthogonal and the matrix R is upper triangular.
- Solution X_3 = inv(A)∗b based on finding the inverse of A.
5.3. Eigenvalues of 2 by 2 Integer Matrices
- For , we have , and , where the quantity 1.0000 has at least 5 true decimal digits and is a small imaginary tail which may be neglected. This result seems acceptable.
- For , we have , and , . With certain optimism, these results may also be declared as acceptable.
- For , a computational catastrophe occurs with (true), (completely wrong) and , (also completely wrong). Here, surprisingly, is computed as , which differs from 1 (which is to be expected) but differs also from . It is not clear what and why had happened. Using the computed coefficients , the roots of the characteristic equation now are , instead of the computed and . This is a strange wrong result.
- We give also the results for which are full trash and are served without any warning to the user. We have , and . We also obtain for completeness.
6. Zeros of Functions
- Find a single particular solution in the interval T.
- Find the general solution in the interval T.
- Find all roots of a given n degree polynomial .
7. Minimization of Functions
7.1. Functions of Scalar Argument
7.2. Functions of Vector Argument
- The computational problem;
- The computational algorithm;
- The FPA;
- The computer platform;
- The starting point .
8. Canonical Forms of Matrices
8.1. Preliminaries
8.2. Jordan and Generalized Jordan Forms
- 1.
- 2.
- implies
- 3.
- implies
- 1.
- If , then is the group .
- 2.
- If , , then is the set of matrices and , where .
- 3.
- If , then is the set of matrices , .
- 1.
- implies ;
- 2.
- implies .
- 1.
- Because for ;
- 2.
- Because for (if );
- 3.
- Because the nonzero elements (if any) are equal to 1.
8.3. Condensed Schur Forms
9. Least Squares Revisited
9.1. Preliminaries
9.2. Nonlinear Problems
9.3. Linear Problems
- 1.
- The function is smooth and decreasing.
- 2.
- The function is smooth and non-monotone in each interval , where .
- 3.
- The function (whenever defined) is smooth and non-monotonic in each arbitrarily small subinterval of the interval where .
10. Integrals and Derivatives
10.1. Integrals
10.2. Derivatives
11. VPA Versus FPA
12. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
AI | artificial intelligence |
ARRE | average rounding relative error |
BFCT | brute force computational technique |
CPRS | computational problem with reference solution |
CPU | central processing unit |
FPA | double precision binary floating-point arithmetic |
LLSP | linear least squares problem |
LSM | least squares method |
LSP | least squares problem |
MAI | mathematical artificial intelligence |
MRRE | maximal rounding relative error |
NLF | Newton–Leibniz formula |
NFP | numerical fixed point |
RRE | rounding relative error |
RTA | real-time application |
VPA | variable precision arithmetic |
References
- Stoer, J.; Bulirsch, R. Introduction to Numerical Analysis; Springer: New York, NY, USA, 2002; ISBN 978-0387954523. [Google Scholar] [CrossRef]
- Faires, D.; Burden, A. Numerical Analysis; Cengage Learning: Boston, MA, USA, 2016; ISBN 978-1305253667. [Google Scholar]
- Chaptra, S. Applied Numerical Methods with MATLAB for Engineers and Scientists, 5th ed.; McGraw Hill: New York, NY, USA, 2017; ISBN 978-12644162604. [Google Scholar]
- Novak, K. Numerical Methods for Scientific Computing; Equal Share Press: Arlington, VA, USA, 2022; ISBN 978-8985421804. [Google Scholar]
- Driscoll, T.; Braun, R. Fundamentals of Numerical Computations; SIAM: Philadelphia, PA, USA, 2022. [Google Scholar] [CrossRef]
- TheMathWorks, Inc. MATLAB Version 9.9.0.1538559 (R2020b); The MathWorks, Inc.: Natick, MA, USA, 2020; Available online: www.mathworks.com (accessed on 1 December 2024).
- Higham, D.; Higham, N. MATLAB Guide, 3rd ed.; SIAM: Philadelphia, PA, USA, 2017; ISBN 978-1611974652. [Google Scholar]
- Eaton, J.; Bateman, D.; Hauberg, S.; Wehbring, R. GNU Octave Version 5.2.0 Manual: A High-Level Interactive Language for Numerical Computations. 2019. Available online: www.gnu.org/software/octave/doc/v5.2.0/ (accessed on 5 February 2025).
- Maplesoft. Maple 2017.3, Ontario. 2017. Available online: www.maplesoft.com (accessed on 1 December 2024).
- Mathematica. Available online: www.wolfram.com/mathematica/ (accessed on 1 December 2024).
- WolframAlpha. Available online: www.wolframalpha.com/ (accessed on 1 December 2024).
- Grama, A.; Gupta, A.; Karypis, G.; Kumar, V. Introduction to Parallel Computing, 2nd ed.; Addison-Wesley: Boston, MA, USA, 2003; ISBN 0201648652. [Google Scholar]
- Kirk, D.; Hwu, W. Programming Massively Parallel Processors: A Hands-on Approach, 3rd ed.; Morgan Kaufmann: San Francisco, CA, USA, 2016; ISBN 978-0128119860. [Google Scholar]
- Kavis, M. Architecting the Cloud: Design Decisions for Cloud Computing Service Models (SaaS, PaaS, and IaaS); Wiley: Hoboken, NJ, USA, 2014; ISBN 978-1118617618. [Google Scholar]
- Borbu, A.; Zhu, S. Monte Carlo Methods; Springer: Singapore, 2020; ISBN 978-9811329708. [Google Scholar] [CrossRef]
- Davies, A.; Veličković, P.; Buesing, L.; Blackwell, S.; Zheng, D.; Tomašev, N.; Tanburn, R.; Battaglia, P.; Blundell, C.; Juhász, A.; et al. Advancing mathematics by guiding human intuition with AI. Nature 2021, 600, 70–74. [Google Scholar] [CrossRef]
- Fink, T. Why mathematics is set to be revolutionized by AI. Nature 2024, 629, 505. [Google Scholar] [CrossRef]
- 754-2019; IEEE Standard for Floating-Point Arithmetic. IEEE Computer Society: Piscataway, NJ, USA, 2019. [CrossRef]
- Higham, N. Accuracy and Stability of Numerical Algorithms; SIAM: Philadelphia, PA, USA, 2002; ISBN 0-898715210. [Google Scholar]
- Higham, N.; Konstantinov, M.; Mehrmann, V.; Petkov, P. The sensitivity of computational control problems. IEEE Control. Syst. Mag. 2004, 24, 28–43. [Google Scholar] [CrossRef]
- Goldberg, D. What every computer scientist should know about floating-point arithmetic. Acm Comput. Surv. 1991, 23, 5–48. [Google Scholar] [CrossRef]
- Pugh, C. Real Mathematical Analysis; Springer Nature: Cham, Switzerland, 2015; ISBN 978-3319177700. [Google Scholar] [CrossRef]
- Konstantinov, M.; Petkov, P. Computational errors. Int. J. Appl. Math. 2022, 35, 181–203. [Google Scholar] [CrossRef]
- Balinski, M.; Young, H. Fair Representation: Meeting the Ideal One Man One Vote, 2nd ed.; Brookings Institutional Press: New Haven, CT, USA; London, UK, 2001; ISBN 978-0815701118. [Google Scholar] [CrossRef]
- Lagarias, J.; Reeds, J.; Wright, M.; Wright, P. Convergence properties of the Nelder-Mead simplex method in low dimensions. Siam J. Optim. 1998, 9, 112–147. [Google Scholar] [CrossRef]
- Nelder, J.; Mead, R. A simplex method for function minimization. Comput. J. 1965, 7, 308–313. [Google Scholar] [CrossRef]
- Glazman, M.; Ljubich, J. Finite-Dimensional Linear Analysis: A Systematic Presentation in Problem Form; Dover Books in Mathematics; Dover Publications: New York, NY, USA, 2006; ISBN 978-04866453323. [Google Scholar]
- Jackobson, N. Basic Algebra I; W. Freeman & Co Ltd.: London, UK, 1986; ISBN 978-07167114804. [Google Scholar]
- Andrews, G. The Theory of Partitions; Revisited Edition; Cambridge University Press: Cambridge, UK, 2008; ISBN 978-0521637664. [Google Scholar]
- Konstantinov, M.; Petkov, P. On Schur forms for matrices with simple eigenvalues. Axioms 2024, 13, 839. [Google Scholar] [CrossRef]
- Booth, A. Numerical Methods, 3rd ed.; Butterworths Scientific Publications: London, UK, 1966; LCCN 57004892. [Google Scholar]
- Konstantinov, M.; Petkov, P. Remainders vs. errors. AIP Conf. Proc. 2016, 1789, 060007. [Google Scholar] [CrossRef]
- Ossendrijver, M. Ancient Babylonian astronomers calculated Jupiter’s position from the area under a time-velocity graph. Science 2016, 351, 482–484. [Google Scholar] [CrossRef] [PubMed]
- Rahman, Q.; Schmeisser, G. Characterization of the speed of convergence of the trapezoidal rule. Numer. Math. 1990, 57, 123–138. [Google Scholar] [CrossRef]
- Atkinson, K. An Introduction to Numerical Analysis, 2nd ed.; John Wiley & Sons: New York, NY, USA, 1989; ISBN 978-0471500230. [Google Scholar]
m | |||
---|---|---|---|
10 | |||
100 | |||
1000 |
m | err | est | err/est |
---|---|---|---|
2 | 0.0349 | ||
3 | 0.0187 | ||
4 | 9.1475 | 0.0272 | |
5 | 1.0002 | 4.6283 | 0.2161 |
n | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
1.73 | 1.78 | 1.53 | 1.95 | 1.62 | 1.60 | 1.84 | 1.72 | 2.03 | |
n | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
1.76 | 2.04 | 1.94 | 2.10 | 1.92 | 2.06 | 2.01 | 1.97 | 1.91 |
n | ||
---|---|---|
5 | ||
10 | ||
100 | ||
1000 | ||
10,000 | ||
100,000 | ||
1,000,000 | ||
1,500,000 | ||
2,000,000 | ||
5,000,000 | ||
10,000,000 | ||
50,000,000 | ||
100,000,000 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Konstantinov, M.M.; Petkov, P.H.; Madamlieva, E.B. Brute Force Computations and Reference Solutions. Foundations 2025, 5, 7. https://doi.org/10.3390/foundations5010007
Konstantinov MM, Petkov PH, Madamlieva EB. Brute Force Computations and Reference Solutions. Foundations. 2025; 5(1):7. https://doi.org/10.3390/foundations5010007
Chicago/Turabian StyleKonstantinov, Mihail Mihaylov, Petko Hristov Petkov, and Ekaterina Borisova Madamlieva. 2025. "Brute Force Computations and Reference Solutions" Foundations 5, no. 1: 7. https://doi.org/10.3390/foundations5010007
APA StyleKonstantinov, M. M., Petkov, P. H., & Madamlieva, E. B. (2025). Brute Force Computations and Reference Solutions. Foundations, 5(1), 7. https://doi.org/10.3390/foundations5010007