Singleton’s Sorting Algorithm 1979 and 2018 by James Pate Williams, Jr., BS, BS, MSwE, PhD

I first implemented Singleton’s sorting algorithm in the Summer of 1979. The programming language was Data General’s version of Dayton BASIC (Beginner’s All-purpose Symbolic Instruction Code). This variant of BASIC was interpretive like C#, Java, and Pascal. Below is my BASIC version and run-times for double precision numbers in an inverted sequence.

Zoom forward to my current computer and C# programming language in 2018.

Baseball Ballistics by James Pate Williams, Jr., BS, BS, MSwE, PhD

There are analytic equations that are applicable to the trajectory of a batted or thrown baseball:

Click to access 04-LAJPE-782_Chudinov.pdf

I created a C# application to test the preceding equations against numerical methods of calculating the trajectory of a baseball. The baseball has an initial velocity of 90 miles per hour and an angle of inclination of 20 degrees. The classical model certainly overestimates the trajectory.

Powers of Two – Excel by James Pate Williams, Jr. BA, BS, MSwE, PhD

First Function in Excel (Assumes that You Have Access to an Office 365 Subscription)

Please attempt the following procedure:

  1. Type Excel in the Windows 10 Search Box
  2. Select the Excel App
  3. Select Blank workbook
  4. Maximize the Excel Window
  5. Type x in Cell A1
  6. Tab to Cell B1
  7. Type y in Cell B1
  8. Type 0 in Cell A2
  9. Type 1 in Cell B2
  10. Type 1 in Cell A3
  11. Type 2 in Cell B3
  12. Type 2 in Cell A4
  13. Type 4 in Cell B4
  14. Type 3 in Cell A5
  15. Type 8 in Cell B5
  16. Type 4 in Cell A6
  17. Type 16 in Cell B6
  18. Type 5 in Cell A7
  19. Type 32 in Cell A8
  20. Highlight Cells A1 and B1
  21. From the Toolbar Select Alignment and Right Alignment
  22. Select File Save As
  23. Select “Documents” and “Powers of Two” as the filename
  24. Highlight Cells A1 to B7
  25. Select Insert from Toolbar
  26. Select Charts Scatter
  27. Select the Chart
  28. Select the Big + Sign on the Right
  29. Label the y-axis “y = 2 ^ n”
  30. Label the x-axis “n”
  31. Relabel the Title of the Chart as “Powers of Two”

Note that x is in the finite set { 0, 1, 2, 3, 4, 5 }

Note that y is the function y = 2 ^ x where ^ is the exponentiation operator

Powers of Two TablePowers of Two Chart

A Simple and Utilitarian C# Matrix Class by James Pate Williams, BA, BS, MSwE, PhD

We designed and implemented a simple and utilitarian C# matrix class for double precision numbers. The class has the binary matrix operators +, -, *, / which are addition, subtraction, multiplication, and division of two matrices. We also include an operator for multiplication of matrix by a scalar and an operator for dividing a matrix by a scalar. We have included functions to compute the p-norm, p, q-norm, and max norm of a matrix. We also can calculate using truncated infinite series the exponential, cosine, and sine function of a matrix. The exponential and trigonometric functions use a powering function that raises a matrix to a non-negative integral power.

Below is a screenshot of the test Windows Forms application. We execute the four binary matrix operators in the order +, -, *, / e.g. A+B, A-B, A*B, A/B. In order to divide by B, the matrix B must be square and non-singular, that is square and invertible.

Matrix Example Application Screenshot

The B matrix has the form of the matrix in the online discussion:

http://www.purplemath.com/modules/mtrxinvr2.htm

We create a project named MatrixExample. In this project we add a Matrix class whose code is given below:

Matrix

I leave it as an exercise for the reader to test the various norms and other functions.