3 ms·
You know Ford/Lincoln had those buttons / touch strip in the door with the buttons labelled like [1|2] [3|4], and so on to [9|0]? There's a permutation list cl
by genewitch 2y ago
You know Ford/Lincoln had those buttons / touch strip in the door with the buttons labelled like [1|2] [3|4], and so on to [9|0]?
There's a permutation list claimed to be the shortest that I used to carry in my PDA to impress friends that had one of those sorts of cars. If I recall, it was guaranteed to open the door in something like 32 button presses, but it may have been less.
It was because there was no "start" or stop to the sequence, the computer would unlock if the sequence appeared intact anywhere. So a code 3,4,5,6 would trigger with 8,2,7,3,4,5,6,0,2
- ChoGGi 2y agoAnd in other fun knowledge, the f150 2016 has no way to disable that keypad. Short of taking apart the door and disconnecting it.
- lupire 2y ago3+5432=123, so 4 digit code would require at least 134 key presses. Even 3 digit code would require over 60 keypresses. We're there other constraints on valid codes? Did the door unlock in a valid non-consecutive* subsequence like 3,4,5,0,6?
- genewitch 2y agoNo, but it would unlock with 3355 or 3455 or 3365 or 4466 or there's 5 buttons, and the code is four of those 5 in an arbitrary order. at least to my memory. it could have been 5 buttons in an arbitrary order. It's been 20 years! 5 pick 4 = 120, so that's an upper bound for my recollection. I remember it being fewer than that, but the original "paper" was a sheet of graph paper that had been scanned, i just transcribed it to my palm pilot. oh. It isn't 120 * 4 keypresses. Because the thing that decided if the code was valid didn't have start/stop/reset states, so 1234523413452 would trigger 1234, 2345, 3452, 4523, 5234, 2341, 3413, 4134, 1345, and 3452. that would take "40 keypresses" in the OP "game", whereas it only takes 13 keypresses on these code pads. so the paper was "an" shortest permutation that covered every possible combination. edit: python gave a 625 keypress answer, i replied to a sibling with the full list of numbers.
- windward 2y agoIs this a mean trick to snipe HN users into thinking about algorithms for hours? I have a friend who wants to know.
- genewitch 2y agopython assures me this is a valid solution: >111211131114111511221123112411251132113311341135114211431144114511521153115411551212131214121512221223122412251232123312341235124212431244124512521253125412551313141315132213231324132513321333133413351342134313441345135213531354135514141514221423142414251432143314341435144214431444144514521453145414551515221523152415251532153315341535154215431544154515521553155415552222322242225223322342235224322442245225322542255232324232523332334233523432344234523532354235524242524332434243524432444244524532454245525253325342535254325442545255325542555333343335334433453354335534343534443445345434553535443545355435554444544554545555 625(?) presses, i was way off. :-( It's still a lot fewer than trying all 10,000 individual 4 digit possibilities that the keypad implies are there. Also this is possibly not the shortest, according to some sibling comments to mine, above. This could be the upper bound?