Eventually got there with part 2. Like others have said it was a case of working out what fitted inside other numbers. So doing 1 compared to 7 gets you the top part of the number, then if you compare the strings with length = 5 you know that only a 3 contains a 1 (thanks @NicoleJohnson for that tip). If you subtract a 9 from an 8 you get the bottom left position which helps identify the 5 etc...
I also used transpose and 2x summarise tools to convert the strings into alphabetical order, which probably wasn't required, but it made it easier to check combinations, so I stuck with it.
Yikes! Translating the way my brain solved this problem was ugly, so I'm not posting my solution. I'm not even sure I can post my thought process, but will try when I have some time.
Like everyone else said, it just took me too long to understand the problem, then to formulate the solution. As others said, glad this is zoomed out. I'm sure there could be a 25% reduction in tools.
This one was a mind-bender for me... told myself I can just be content with part 1 and move on with my life but I couldn't stop thinking about haha. The breakthrough moment for me to be able to solve for part 2 was once I realized I could determine the digit using if then formulas to test the length and overlap with the digits discovered in part 1. Turned out to be a pretty successful round of golf 😁
It's an ugly one today. No tool golf winner for me
Hi @starkey
Welcome to the club! Can you put your images in spoiler tags so as not to give clues?
Thanks
Dan
WOW - not only is this quite a formula, but my brain is cooking just trying to figure out how you did this @grossal
this is clever @danilang - I never thought to count the frequency of the segments.
I went about this using intersection / commonality.
For example - if you're a 6 segment and you do NOT have all the same segments as a 1, then I know that you are the number 6. This does cheat a little though 'cause the instructions specifically say that you should map wires to segments (like you did)
So - this one took a few hours - and a few wrong turns.
Eventually got a solution by ignoring the segment -> wire mapping, and just looking at the numbers.
I think this is similar to what @NicoleJohnson and @cgoodman3 did?
Translation Logic:
- we can identify the translation for digits 1,4,7,8 just by length
6 segment numbers:
- 6 is the only one without full overlap with number 1
- 9 is then the 6 digit number that shares full overlap with number 4
- 0 is then the remaining 6 digit number
- now we have numbers 0,1,4,6,7,8,9 - only 2,3,5 to go
5 digit numbers:
- 3 is the only 5 digit number with full overlap vs. number 1
- The digit 2 has 2 differences vs. the number 4; where the digit 5 only has 1 difference
To do this Intersection / overlap of the numbers by segment - built a simple macro. You feed in your comparison number (e.g. the number 1) and then the ones you want to compare to - and it tells you how many are missing / matching
The main workflow then looks like this:
- First Prep and clean the data (including sorting)
Then match the numbers based on overlap / intersection with other numbers:
The whole thing is a bit big if you look at it in entirety.