A positive integer N contains each 2-digit combination exactly once:
00, 01, ..., 99.
(A) What is the smallest number of digits N could have?
(B) What is the largest number of digits N could have?
(C) What is the smallest possible value of N?
(D) What is the largest possible value of N?
(no leading zeros)
(In reply to
re: Parts A and B (spoiler) & small example by Larry)
A complete digraph is traversable, so it is possible to map out 101 digit numbers with every 2-digit combination.
To add to your observations
-Any solution can be changed into a new solution by swapping all instances of digits m and n.
1001120221 can become 2002210112
-each digit is doubled exactly once, but this can be anywhere
1001120221 can become 1101200221
So to get (C) and (D), it's a simple matter of mapping out any solution and applying these ideas.
Avoiding leading zeros makes the two answers a bit different.
Part (C) would begin 1001120...
Part (D) would begin 99897...
I assume a greedy algorithm would give the solution as well.
|
Posted by Jer
on 2024-05-16 11:51:25 |