07/02/2022

"Code" in a Junior High School Entrance Exam

 I noticed a word "code" in a math problem of an entrance examination of Kaisei, a prestigious private junior high school in Tokyo. (I appeared in an ad of a prep school on a newspaper on 6 February 2022.) The following outlines the problem. It is merely about combinations rather than cryptography, as expected.

A code is represented by a 2-by-7 matrix. A filled square cannot be adjacent to another filled square horizontally or vertically. The orientation of the matrix is fixed.

(1) How many squares can be filled at maximum? How many codes can be made with such maximum filling?

(2) Consider the case in which five squares out of the fourteen are filled.
(A) Draw all the codes that can be made without filling the squares in the first and third columns from the left.
(B) How many codes can be made without filling the squares in the third and fifth columns from the left?
(C) When five squares out of the fourteen are filled, how many codes can be made?

(3) Let us consider how many codes can be made as the number of columns used is increased (e.g., only the leftmost column, only the two leftmost columns, ...). The case of no filling is counted as one. For example, the number of patterns to fill the leftmost column is three (as shown in Fig. 2).
(A) When only the two leftmost columns are used, draw all the patterns other than the one with no filled square.
(B) Consider only the three leftmost columns. How many codes can be made?
(C) Consider all the seven columns. How many codes can be made?

KEY: (1) 7; 2; (2)(B) 8; 102; (3)(B) 17; 577


05/02/2022

How George Lasry Solves Ciphers in an Instant

George Lasry, a computer scientist and an expert in cryptanalysis, provided me with his "interim results" for an unsolved ciphertext found in BnF fr.4715, f.85. He has solved many historical ciphers (see "Unsolved Historical Ciphers") besides many other achievements outside my scope (Google Scholar). His "interim results" this time are interesting for me in that he calls it a "machine reconstruction."
He developed many related tools for cryptanalysis of historical ciphers, as well as language models based on historical text for algorithms to work effectively (e.g., his paper on papal ciphers: Lasry et al. (2021)). In addition to these, transcription of the ciphertext is the indispensable first step of any computer processing. He developed a manual tool to mark and classify graphic symbols, of which a glimpse can be made in the provisional decipherment below. (Text data is here.)


  In this case, Arabic figures 01-57 are assigned to symbols more or less in the order of frequency. Symbols 100-122 are ones occurring only once. His algorithm works for homophonic substitution of single letters, so he excluded 100-122 from cryptanalysis because they may not correspond to single letters, but prepositions, suffices, or even names. Of course, some of 01-57 may be syllables rather than letters, but as long as a sufficiently large proportion of these symbols represent letters, his algorithm may give meaningful fracments of words here and there.
In the above decipherment, there seem to be fragments of some Italian words: "scriver", "parlando", "contra", "francese", "signor", "..nditione", "ma consient...." There must be many errors in this "machine reconstruction", but hopefully someone versed in Italian may correct the assignment starting from these correspondence.


03/02/2022

Enciphered Passage about Princess Henriette's Words to 2nd Earl of Chesterfield (1659)

An enciphered passage in the memoirs of Philip Stanhope, 2nd Earl of Chesterfield (Wikipedia), was kindly brought to my attention by Richard Merriman (image).
The memoirs, titled "some short notes for my remembrance of things and actidents, as they yearly happened to mee", is preserved in Add MS 19253 in the British Library (catalog, another catalog) and its main parts are printed in Letters of Philip, Second Earl of Chesterfield (1829) (Google).
The enciphered passage belongs to the year 1659. According to Letters (p.20, 105-106) (different from the narrative in Wikipedia), he killed a certain Wollies in a duel in January 1659 and fled to the Continent. In February, he wrote to Charles II in Brussels to obtain a royal pardon. For some time during this travel, he stayed in Paris, where he waited on Queen Mother and her daughter Princess Henriette, Charles II's youngest sister (who was to wed the Duke of Orleans in 1661). In 1659, Lord Chesterfield was 25, and Henriette was 15. The short ciphertext is something the latter did or said when he took leave. The following is my provisional transcription:
AYE25YALY9v4v5H21Y3Y545YAvLE&2TA2E85Y928T5.
16vTEvL+cc+8S1+2T9++8Y&93t9gFv1cATv93+EY93Y&Fv5Ev62T2vT.
Even before I completed the transcription, the cipher was solved by George Lasry. By filling a few blanks left by him, the paragraph can now be read (the deciphered text is in italics):

... but missing mee I went in to France and from thence in to Holland and waited on the King at Breda where I had his Majesties pardon, from thence, I went back againe through Flanders in to France where I stayd some time at Paris and waited on Queen Mother and her Daughter the Dutches of Orleans who when I took my leave desired me to forgive her fredoms & indiscretion upon so small acquaintance & that [I] would not have the wors[e] opinion[.] from Paris I went to Bourbon and after the having taken the waters there, I went to Callis and meeting the King as hee was comming from Holland on the sea I went in to his Majesties ship and waited on him in to England.


(March 2024) There was another correspondent with whom Henriette used a cipher. A letter of Henriette to Lord Fitzharding (in French), dated 19 December 1664, asks if he understands the cypher which she sent. (Google), p.279