Matt

@mmszk
6 Followers
21 Following
70 Posts
@frere_jacques well, try it if you want. Or don't. I don't mean to drag you into this if you don't want to spend more time on it. Thanks for chatting though. It was helpful.
paste

@frere_jacques what about swapping a single pair of As though? The XOR gate that connects to the x and y input? Is that too much?
@frere_jacques yeah there are probably some unwritten rules like "must have only one unique solution". I'd be curious to know what types of swaps are or are not allowed though.
@frere_jacques the last test (changing two Ds) now passes on your code. Exchanging two As, Bs, or Cs still gives a weird result. I also tried exchanging the As and the Zs from a pair of adders and my solution instead exchanged some other gates to make the whole thing work again. So there can be multiple solutions to some problem states.
paste

@frere_jacques so I got your code working on my computer. Works for my input (kudos). I tried a "malicious" input where I corrected one of my switched pairs and in its place I switched two OR gates' outputs. My solution correctly identified the swap while yours did not. Hope you don't mind me being a bit adversarial here.
@frere_jacques I got hung up on "what if a gate is switched with another gate of the same type from a different bit?" It gets complicated, programmatically, to determine which gate is the switched one for such a variety of cases. Not to mention the possibility of two switches occurring in the same full adder. Hence, why I resorted to identifying only the correct full adders and guessing for the rest. I'll have to explore your solution more. I'm not too good with Rust. Thanks for sharing!
@frere_jacques how's it work / can you share it? I've also got one but it's essentially brute force with pruning.
@Snoro from the article, "Only residents are eligible, and they must sign up using a photo ID and proof of address in exchange for a free transport pass. The pass must be scanned on every journey so the city can track usage statistics." I'm curious why not just stop all the cost associated with tracking people and enforcing fares. It must be substantial.