Articles by xi'an

(x=scan())%in%(2*4^(n=0:x)-2^n-1)

March 27, 2019 | xi'an

One challenge on code golf is to find the shortest possible code to identify whether or not an integer belongs to the binary cyclops numbers which binary expansion is 0, 101, 11011, 1110111, 111101111, &tc. The n-th such number being this leads to the above solution in R (26 bits). The same length as the […]
[Read more...]

Le Monde puzzle [#1087]

February 24, 2019 | xi'an

A board-like Le Monde mathematical puzzle in the digit category: Given a (k,m) binary matrix, what is the maximum number S of entries with only one neighbour equal to one? Solve for k=m=2,…,13, and k=6,m=8. For instance, for k=m=2, the matrix is producing the maximal number 4. ...
[Read more...]

call for sessions and labs at Bay2sC0mp²⁰

February 22, 2019 | xi'an

A call to all potential participants to the incoming BayesComp 2020 conference at the University of Florida in Gainesville, Florida, 7-10 January 2020, to submit proposals [to me] for contributed sessions on everything computational or training labs [to David Rossell] on a specific language or software. The deadline is April 1 and the ...
[Read more...]

simulation fodder for future exams

February 19, 2019 | xi'an

Here are two nice exercises for a future simulation exam, seen and solved on X validated.The first one is about simulating a Gibbs sampler associated with the joint target exp{-|x|-|y|-a(y-x|} defined over IR² for a≥0 (or possibly a__-1). The conditionals are identical ...
[Read more...]

Le Monde puzzle [#1085]

February 17, 2019 | xi'an

A new Le Monde mathematical puzzle in the digit category: Given 13 arbitrary relative integers chosen by Bo, Abigail can select any subset of them to be drifted by plus or minus one by Bo, repeatedly until Abigail reaches the largest possible number N of multiples of 5. What is the minimal ...
[Read more...]

Le Monde puzzle [#1083]

February 6, 2019 | xi'an

A Le Monde mathematical puzzle that seems hard to solve without the backup of a computer (and just simple enough to code on a flight to Montpellier): Given the number N=2,019, find a decomposition of N as a sum of non-trivial powers of integers such that (a) the number of ...
[Read more...]

missing digit in a 114 digit number [a Riddler’s riddle]

January 30, 2019 | xi'an

A puzzling riddle from The Riddler (as Le Monde had a painful geometry riddle this week): this number with 114 digits 530,131,801,762,787,739,802,889,792,754,109,70?,139,358,547,710,066,257,652,050,346,294,484,433,323,974,747,960,297,803,292,989,236,183,040,000,000,000 is missing one digit and is a product of some of the integers between 2 and 99. By comparison, 76! and 77! have 112 and 114 digits, respectively. While 99! has 156 digits. […]
[Read more...]

more concentration, everywhere

January 24, 2019 | xi'an

Although it may sound like an excessive notion of optimality, one can hope at obtaining an estimator δ of a unidimensional parameter θ that is always closer to θ that any other parameter. In distribution if not almost surely, meaning the cdf of (δ-θ) is steeper than for other estimators enjoying the same ...
[Read more...]

Le Monde puzzle [#1081]

January 23, 2019 | xi'an

A “he said-she said” Le Monde mathematical puzzle (again in the spirit of the famous Singapore high-school birthdate problem): Abigail and Corentin are both given a positive integer, a and b, such that a+b is either 19 or 20. They are asked one after the other and repeatedly if they are ...
[Read more...]

Le Monde puzzle [#1076]

December 26, 2018 | xi'an

A cheezy Le Monde mathematical puzzle : (which took me much longer to find [in the sense of locating] than to solve, as Warwick U does not get a daily delivery of the newspaper [and this is pre-Brexit!]): Take a round pizza (or a wheel of Gruyère) cut into seven ...
[Read more...]

running plot [and simulated annealing]

December 14, 2018 | xi'an

Last weekend, I found out a way to run updated plots within a loop in R, when calling plot() within the loop was never updated in real time. The above suggestion of including a Sys.sleep(0.25) worked perfectly on a simulated annealing example for deter...
[Read more...]

Le Monde puzzle [#1075]

December 11, 2018 | xi'an

A new Le Monde mathematical puzzle in the digit category: Find the largest number such that each of its internal digits is strictly less than the average of its two neighbours. Same question when all digits differ. For instance, n=96433469 is such a number. When trying pure brute force (with ...
[Read more...]

Le Monde puzzle [#1078]

November 28, 2018 | xi'an

Recalling Le Monde mathematical puzzle  first competition problem Given yay/nay answers to the three following questions about the integer 13≤n≤1300 (i) is the integer n less than 500? (ii) is n a perfect square? (iii) is n a perfect cube?  n cannot be determined, but it is certain that any ...
[Read more...]

Le Monde puzzle [#1075]

November 21, 2018 | xi'an

A Le Monde mathematical puzzle from after the competition: A sequence of five integers can only be modified by subtracting an integer N from two neighbours of an entry and adding 2N to the entry.  Given the configuration below, what is the minimal number of steps to reach non-negative entries ...
[Read more...]

Le Monde puzzle [#1073]

November 2, 2018 | xi'an

And here is Le Monde mathematical puzzle  last competition problem Find the number of integers such that their 15 digits are all between 1,2,3,4, and the absolute difference between two consecutive digits is 1. Among these numbers how many have 1 as their three-before-last digit and how many have 2? Combinatorics!!! While it seems like […]
[Read more...]

Le Monde puzzle [#1072]

October 30, 2018 | xi'an

The penultimate Le Monde mathematical puzzle  competition problem is once again anti-climactic and not worth its points: For the figure below [not the original one!], describing two (blue) half-circles intersecting with a square of side 20cm, and a (orange) quarter of a circle with radius 20cm, find the radii of ...
[Read more...]

ABC intro for Astrophysics

October 15, 2018 | xi'an

Today I received in the mail a copy of the short book published by edp sciences after the courses we gave last year at the astrophysics summer school, in Autrans. Which contains a quick introduction to ABC extracted from my notes (which I still hope to turn into a book!). ...
[Read more...]

Le Monde puzzle [#1070]

October 10, 2018 | xi'an

Rewording Le Monde mathematical puzzle  fifth competition problem For the 3×3 tables below, what are the minimal number of steps to move from left to rights when the yellow tokens can only be move to an empty location surrounded by two other tokens? In the 4×4 table below, there are 6 green tokens. ...
[Read more...]

Le Monde puzzle [#1066]

October 2, 2018 | xi'an

A purely (?) algorithmic Le Monde mathematical puzzle For the table below, what is the minimal number of steps required to reach equal entries when each step consists in adding ones to three entries sitting in a L, such as (7,11,12) or (5,6,10)? Same question for the inner table of four in yellow. ...
[Read more...]

Le Monde puzzle [#1068]

September 25, 2018 | xi'an

And here is the third Le Monde mathematical puzzle  open for competition: Consider for this puzzle only integers with no zero digits. Among these an integer x=a¹a²a³… is refined if it is a multiple of its scion, the integer defined as x without the first digit, y=...
[Read more...]
1 6 7 8 9 10 45

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)