Category: R

Le Monde puzzle [#1127]

A permutation challenge as Le weekly Monde current mathematical puzzle: When considering all games between 20 teams, of which 3 games have not yet been played, wins bring 3 points,...continue reading.

an elegant sampler

Following an X validated question on how to simulate a multinomial with fixed average, W. Huber produced a highly elegant and efficient resolution with the compact R code tabulate(sample.int((k-1)*n, s-n)...continue reading.

Le Monde puzzle [#1120]

A board game as Le weekly Monde current mathematical puzzle: 11 players in a circle and 365 tokens first owned by a single player. Players with at least two tokens...continue reading.

Sudoku game with R

Sudoku is a classical logical game based on combinatorial number replacement puzzle. Objective is to to fill 9×9 matrix with digits so that each column, each row, and each box...continue reading.

A Year in Flow

Revisiting the river flow profile plot from an earlier post, the video below loops each day’s flow profile for the Delaware River in 2019.  Data is from USGS gages processed...continue reading.

Metropolis in 95 characters

Here is an R function that produces a Metropolis-Hastings sample for the univariate log-target f when the later is defined outside as another function. And when using a Gaussian random...continue reading.