Playing Doublets with the Primes

321 Views Asked by At

Lewis Carroll's famous game of Doublets is well known. In it you are asked to transform a given word into another by changing only one letter at a time, forming a genuine new word (not a proper name) with each letter change.

Doublets with primes is identical except that instead of playing with words you play with prime numbers, say two 3-digit primes.

Question 1. Can any 3-digit prime be transformed into any other 3-digit prime number following the Doublet rule?

Question 2. What is the longest distance (i.e. the largest number of links required) between two 3-digit primes?

One could ask the same questions about 4-digit primes.

2

There are 2 best solutions below

3
On BEST ANSWER

For the first question the answer is yes, for the second question the answer is 6,

To solve the question i used both (Java and Wolfram), the idea is this i made a graph with nodes being the primes with 3-digits and there is a line between two nodes iff the primes representing the nodes are 1-Doublet(meaning with one digit change we can transfer one into another) and then we can state you question as graph theory question which are :

1) is the graph connected ?

2) what is the graph diameter ?

building the graph using Java and answering the questions using Wolfram we are done.

it seems that this is true for any number of digits primes, but i don't think there is a simple proof.

1
On

I can confirm that the corresponding graph is connected. Moreover, it has a hamiltonian cycle:

Hamiltonian cycle