Enigmatic Code

Programming Enigma Puzzles

Puzzle #172: Four got it

From New Scientist #3391, 18th June 2022 [link] [link]

Emma Neesha is a forgetful sort, and she has just locked herself out of her house with her keys still inside.

Not to worry, she installed keypads on both her house and car for such occasions. Unfortunately, she has also forgotten the four-digit code to her house.

This shouldn’t be a problem, because she keeps a code clue in her wallet. It says: “Four times the car’s four-digit code”.

Well, that is fine, but she has forgotten that one too. Fortunately, Emma is prepared: she has a clue written down for the car’s code as well. Pulling that one out, it reads: “The reverse of the house code”. Oh dear.

Can you help?

[puzzle#172]

One response to “Puzzle #172: Four got it

  1. Jim Randell 18 June 2022 at 9:26 am

    See: Tantalizer 324, Teaser 36.

    We can use the [[ SubstitutedExpression ]] solver from the enigma.py library to solve this puzzle.

    #! python3 -m enigma -r
    
    # House = ABCD; Car = DCBA; House = 4 * Car
    
    SubstitutedExpression
    
    --distinct=""
    --invalid=""
    
    "4 * DCBA = ABCD"
    

    Solution: The house code is 8712. The car code is 2178.

    There is also a second solution where both codes are 0000. Which is not disallowed by the puzzle text.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: