The famous Kohinoor diamond has been put on display in a certain museum. The museum authorities have installed an electronic lock which has N buttons, each with a different symbol. To open the lock one must select the correct combination of the symbols, irrespective of the order in which the buttons are pressed. When each button is pressed it lights up. If the correct combination is lit, the lock immediately opens. On the side of the lock is a reset button which will turn off all the lights.
The Jewel Thief visited the museum and noted down all the symbols. That night, he returned to steal the precious gem. Due to shortage of time, he must open the lock as fast as possible.
What is the minimum number of presses needed to guarantee that the lock will open (including both symbols and reset)? Assume that all the lights are off when he arrives.
(In reply to
some thoughts by Charlie)
You could have been a bit more efficient with 3 and 4 symbols.
With 3 you did ABCr BAr but in both cases you started with A and B.
In your notation you can do
ABCr
BCr
CA
For 11 presses
With 4 symbols looked just at string lengths and got
4r3r3r3r2r2 for 22 presses but I can't find your (or my) error.
Edit: found your error your first two strings repeat the triple ABC, the second one can be just BCr.
5 symbols is 45 presses
5r4r4r4r4r3r3r3r3r3
There is no sequence in OEIS but if you modify the counts the numbers are related to pascals triangle.
More to follow.
Edited on April 17, 2019, 3:01 pm
|
Posted by Jer
on 2019-04-17 14:55:02 |