Below are six tests of my February 3, 2015 SHA-3 implementation in C#. The tests use 0 bits, 5 bits, 30 bits, 1600 bits, 1605 bits, and 1630 bits.
https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values






Below are six tests of my February 3, 2015 SHA-3 implementation in C#. The tests use 0 bits, 5 bits, 30 bits, 1600 bits, 1605 bits, and 1630 bits.
https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values






Back in February 2015 I implemented the SHA-3 Secure Hashing Function which is a National Institutes of Standards and Technology Standard. This is much less verbose than my 2018 blog post about SHA-3.
https://csrc.nist.gov/projects/cryptographic-standards-and-guidelines/example-values
Below are the testing outputs for inputs of 0, 5, and 30 bits.



A Sudoku is a puzzle consisting of a three-by-three or four-by-four of spaces or numbers. The solution of a three-by-three Sudoku is to fill in the blanks with numbers 1…9 such that each three-by-three unit has only one of the numbers 1…9. Below is a worked example of a Sudoku:
4 1 7 3 6 9 8 2 5
6 3 2 1 5 8 9 4 7
9 5 8 7 2 4 3 1 6
8 2 5 4 3 7 1 6 9
7 9 1 5 8 6 4 3 2
3 4 6 9 1 2 7 5 8
2 8 9 6 4 3 5 7 1
5 7 3 2 9 1 6 8 4
1 6 4 8 7 5 2 9 3
I translated a Python program by Peter Norvig into C#. I used Norvig’s 95 “hard” to solve sudokus. It takes between thirty and fifty seconds on my home desktop to solve the 95 sudokus. Here is the tail of the run to solve the 95 sudokus. You can also solve one of the 95 sudokus by hand.



Way back in the mid-1960s there was an influential psychology book named “Games People Play” by Eric Berne, a psychiatrist, and it was based on the relatively new psychological paradigm entitled Transactional Analysis or TA for short. Transactional analysis was a replacement for Freudian analysis and human beings were represented by Parent (Super-ego), Adult (Ego), and Child (Id). The terms in parentheses are the Freudian terminology. Transactional analysis introduced the transaction which can be between Parent-Parent, Parent-Adult, Parent-Child, Adult-Child, Child-Child, Adult-Adult, and Parent-Parent. Crossed transactions such as Parent-Child, Parent-Adult, Adult-Child should probably be avoided.
http://www.ericberne.com/games-people-play/
http://www.ericberne.com/dr-berne-plays-the-celebrity-game/
Some of more popular games are “if it weren’t for you (IIWFY)” and “let you and him fight (LYAHF)”. IIWFY is a blame game. LYAHY is an ego building game for the person instigating the fight and is very popular at bars among drunks (people of diminished capacity).
Expansion as truncated infinite power series and term-by-term integration of the integrals is illustrated in the following pictures.









I created this project five years ago.
Technologies
C#, Visual Studio 2008, Windows Forms, Visual C#
Topics
C#, Puzzles, 14 Peg Puzzle
Platforms
Desktop
Requirements
Primary language
en-US
Updated
10/16/2015
License
Introduction
The fourteen peg puzzle is a form of amusement which I have seen at my local Cracker Barrel. The puzzle involves fourteen pegs in fifteen holes in a triangular configuration. The top hole is empty. The object of the puzzle is to jump pegs over one another until only one peg is left. Jumped pegs are removed from the board.
Building the Sample
This project should build as is using Visual Studio 2008.
Description
This application was translated from a Turbo Pascal program found in Data Structure Using Turbo Pascal by Thomas M. Boger. Depth-first search with backtracking is utilized to find the solution in the allowed thirteen moves. Two stacks are used to store the moves a move stack and a reverse move stack. The translation process had to take into account a relatively strange Turbo Pascal table and an array whose base index was -1. Boger creates an array for the representation of the fourteen peg puzzle that is a right triangle for internal application operations.


C#
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace FourteenPegPuzzle
{
class PegPuzzle
{
private const int OverRow = 0;
private const int OverCol = 1;
private const int ToRow = 2;
private const int ToCol = 3;
private const int Addend = 0;
private int[,] moveTable =
{{1, 0, 2, 0}, {-1, 0, -2, 0},
{0, 1, 0, 2}, {0, -1, 0, -2},
{1, 1, 2, 2}, {-1, -1, -2, -2}};
private char[,] board;
public struct StatusRec
{
public int pegRow, pegCol, moveNumber;
}
private Stack<StatusRec> moveStack;
private Stack<StatusRec> reverseStack;
private bool blocked;
private int moveCount, totalMovePush;
private StatusRec currentMove, newMove;
private TextBox tb;
public PegPuzzle(TextBox tb)
{
this.tb = tb;
totalMovePush = 0;
board = new char[9, 9];
}
private void AdvancePeg()
{
currentMove.pegCol++;
if (currentMove.pegCol > currentMove.pegRow)
{
currentMove.pegCol = 2;
currentMove.pegRow++;
}
}
private void AdvanceMove()
{
currentMove.moveNumber++;
if (currentMove.moveNumber > 5)
{
currentMove.moveNumber = 0;
AdvancePeg();
}
}
private void InitializeBoard()
{
for (int row = 0; row < 9; row++)
for (int col = 0; col < 9; col++)
board[row, col] = ‘ ‘;
for (int row = 3; row <= 6; row++)
for (int col = 2; col <= row; col++)
board[row, col] = ‘X’;
board[2, 2] = ‘O’;
}
private bool LegalMove()
{
int overRow = moveTable[currentMove.moveNumber, OverRow] + Addend;
int overCol = moveTable[currentMove.moveNumber, OverCol] + Addend;
int toRow = moveTable[currentMove.moveNumber, ToRow] + Addend;
int toCol = moveTable[currentMove.moveNumber, ToCol] + Addend;
return board[currentMove.pegRow + overRow, currentMove.pegCol + overCol] == ‘X’ &&
board[currentMove.pegRow + toRow, currentMove.pegCol + toCol] == ‘O’;
}
private void PrintBoard()
{
for (int row = 2; row <= 6; row++)
{
for (int i = 1; i <= 6 – row; i++)
tb.Text += ‘ ‘;
for (int col = 2; col <= row; col++)
tb.Text += board[row, col] + ” “;
tb.Text += “\r\n”;
}
tb.Text += “\r\n”;
}
public void Solve()
{
moveStack = new Stack<StatusRec>();
InitializeBoard();
blocked = false;
moveCount = 0;
currentMove.pegRow = 2;
currentMove.pegCol = 2;
currentMove.moveNumber = 0;
while (moveCount < 13 && !blocked)
{
if (board[currentMove.pegRow, currentMove.pegCol] != ‘X’)
AdvancePeg();
else if (!LegalMove())
AdvanceMove();
else
{
newMove = new StatusRec();
newMove.moveNumber = currentMove.moveNumber;
newMove.pegCol = currentMove.pegCol;
newMove.pegRow = currentMove.pegRow;
moveStack.Push(newMove);
moveCount++;
totalMovePush++;
board[currentMove.pegRow, currentMove.pegCol] = ‘O’;
int overRow = moveTable[currentMove.moveNumber, OverRow] + Addend;
int overCol = moveTable[currentMove.moveNumber, OverCol] + Addend;
int toRow = moveTable[currentMove.moveNumber, ToRow] + Addend;
int toCol = moveTable[currentMove.moveNumber, ToCol] + Addend;
board[currentMove.pegRow + overRow, currentMove.pegCol + overCol] = ‘O’;
board[currentMove.pegRow + toRow, currentMove.pegCol + toCol] = ‘X’;
currentMove.pegRow = 2;
currentMove.pegCol = 2;
currentMove.moveNumber = 0;
}
while (currentMove.pegRow > 6 && !blocked)
{
if (moveStack.Count == 0)
blocked = true;
else
{
currentMove = moveStack.Pop();
board[currentMove.pegRow, currentMove.pegCol] = ‘X’;
int overRow = moveTable[currentMove.moveNumber, OverRow] + Addend;
int overCol = moveTable[currentMove.moveNumber, OverCol] + Addend;
int toRow = moveTable[currentMove.moveNumber, ToRow] + Addend;
int toCol = moveTable[currentMove.moveNumber, ToCol] + Addend;
board[currentMove.pegRow + overRow, currentMove.pegCol + overCol] = ‘X’;
board[currentMove.pegRow + toRow, currentMove.pegCol + toCol] = ‘O’;
moveCount–;
AdvanceMove();
}
}
}
if (!blocked)
{
InitializeBoard();
reverseStack = new Stack<StatusRec>();
while (moveStack.Count != 0)
{
currentMove = moveStack.Pop();
newMove = new StatusRec();
newMove.moveNumber = currentMove.moveNumber;
newMove.pegCol = currentMove.pegCol;
newMove.pegRow = currentMove.pegRow;
reverseStack.Push(newMove);
}
PrintBoard();
while (reverseStack.Count != 0)
{
currentMove = reverseStack.Pop();
board[currentMove.pegRow, currentMove.pegCol] = ‘O’;
int overRow = moveTable[currentMove.moveNumber, OverRow] + Addend;
int overCol = moveTable[currentMove.moveNumber, OverCol] + Addend;
int toRow = moveTable[currentMove.moveNumber, ToRow] + Addend;
int toCol = moveTable[currentMove.moveNumber, ToCol] + Addend;
board[currentMove.pegRow + overRow, currentMove.pegCol + overCol] = ‘O’;
board[currentMove.pegRow + toRow, currentMove.pegCol + toCol] = ‘X’;
PrintBoard();
}
}
}
}
}
These incomplete elliptic integrals are one dimensional and can be readily calculated using the Gauss-Legendre one dimensional integration technique. I use a 128 points in each integral computation. The integrals have two parameters x and k. We evaluate the F(x, k), the incomplete elliptic integral of the first kind, and E(x, k), the incomplete integral of the second kind.





Back in the 1980s a former professor of mine in mathematics at LaGrange College posed a problem to me. He handed me a deflated football and asked me to compute the volume and surface area when it was inflated. Unfortunately, I just got around to solving the problem today, Sunday, October 11, 2020. I had some help from the Casio Corporation which has a lot of free calculators on the Internet:
I used one of their calculators to independently verify my own calculator.

A Mersenne number is of the form M_n = 2 ^ n – 1. For M_n to be prime, n must be prime.
M_2 = 4 – 1 = 3 prime
M_3 = 8 – 1 = 7 prime
M_4 = 16 – 1 = 15 = 3 * 5
M_5 = 32 – 1 = 31 prime
M_6 = 64 – 1 = 63 = 7 * 9
M_7 = 128 – 1 = 127 prime
M_8 = 256 – 1 = 255 = 5 * 51 = 3 * 5 * 17 = M_4 * 17
M_9 = 512 – 1 = 511 = 7 * 73
M_10 = 1024 – 1 = 1023 = 3 * 341 = 3 * 11 * 31
M_11 = 2048 – 1 = 2047 = 23 * 89

I wrote a program to determine if a number M_p = 2 ^ p – 1 with p prime is also a Mersenne prime. I used the Lucas-Lehmer test.



An anagram is also known as a word jumble. You take a word and apply a permutation to the word to get an alphabetic jumble of the word. A permutation of three distinct characters is based on three index permutation table:
123 132 213 231 312 321.
So, the scrambling of the word “THE” is as follows:
THE TEH HTE HET ETH EHT.
As you can see there are n-factorial permutations of n objects.
0! = 1
1! = 1
2! = 2 * 1 = 2
3! = 3 * 2 * 1 = 6
4! = 4 * 3 * 2 * 1 = 4 * 3! = 24
Etc. Several years ago I created a program to solve single word anagrams of length less than or equal about a dozen.
12! = 479,001,600
This is about the limit of finding all the permutations of up to length twelve on a desktop computer. The algorithm is extremely easy to understand and implement. First find a suitable list of English words and if the list is unsorted then sort the list alphabetically in ascending order. Hash the dictionary words using a hash table of length 128 * 128 + 128 = 16,512 elements. The dictionary I used has 152,512 words so there are hash table collisions. The hash value is computed using the first three characters of the word in ASCII (7-bit) encoding. Then for each permutation of the anagram a hash value is computed and if the current permutation is found in the hash table the word associated with the hash table entry is returned and the algorithm is finished.











