Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Challenge: Hidden Message

by diotalevi (Canon)
on May 11, 2006 at 18:10 UTC ( #548784=note: print w/replies, xml ) Need Help??


in reply to Challenge: Hidden Message

I don't see how a person was supposed to solve this without doing some crypto analysis. Could you explain that please? I read your spoiler and thought it'd be trivial to write a regex to extract the solution. Here it is. It's really slow. It'd be faster if I could use backreferences in negated character classes. I could have written this using a regex that generates another regex to incorporate the negated backreference but that seemed like a whole lot of work and I guessed it wouldn't be . It's pretty as-is.

[Updated: Added an expensive and less wasteful version. I'll be adding timing info when my computer has finished running these. They succeed within a few minutes but take a lot longer to finish failing.]

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Replies are listed 'Best First'.
Re^2: Challenge: Hidden Message
by Limbic~Region (Chancellor) on May 11, 2006 at 20:31 UTC
    diotalevi,
    You're probably right about people in general not having a clue as to the right approach without reading the spoilers. I am an avid puzzle and riddle aficionado. One kind of puzzle I see is identifying someone's ATM PIN using a constrained version of this. I incorrectly assumed people who enjoyed my challenges to have the same kind of exposure and recognize it as being similar :-(

    The more interesting problem to me is the general case which I am hoping someone provides a better solution then my own.

    Thanks for your regex solution. I am not sure I understand it but it gives me something new to work at learning.

    Cheers - L~R

      It's just making a regex like \A[^\n]*(\w)[^\n]*\n(?:[^\n]*\1[^\n]*\n)+\z which just says, I captured $1 and it has to exist on every line. Higher # versions just capture more and assert the new digits, in order. It's really very simple. rx() could be improved if you pegged certain captures with specified characters. I'm searching the entire space so I'm slower.

      What's this have to do with ATM PINs?

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

        diotalevi,
        The riddle setup is along the lines that when the website asking for your PIN does so, it will ask for it by creating a larger PIN and place the true values in positions W, X, Y, and Z (which change each time). You are then free to fill all the remaining positions with random numbers. The riddle itself is to determine the PIN after capturing a certain number of succesful logins. Forget I said ATM as this was web banking.

        Cheers - L~R

      You're probably right about people in general not having a clue as to the right approach without reading the spoilers. I am an avid puzzle and riddle aficionado. One kind of puzzle I see is identifying someone's ATM PIN using a constrained version of this. I incorrectly assumed people who enjoyed my challenges to have the same kind of exposure and recognize it as being similar :-(

      Personally, I enjoyed the challenge of trying to figure out what the message was as well as coming up with a general solution (which has now been fixed). I worked out that C,S,0,1,M,E were statistically significant, but I couldn't make heads or tails of what that could possibly mean so I did eventually have to look at the spoilers to work it out.

      I just wish I had more time to spend on things like this instead of doing actual work :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://548784]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2019-10-14 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?