(no title)
ashtami8 | 1 year ago
For the shape Q, instead of clipping opposite corners of the 8x8 square board, one (what would lay under a) white square and one black square, which are non-adjacent, are randomly removed.
makes the elegant proof argument fail.Real world programming is usually like this, it is hard to cast the problem in the framework of a formal language, like first order predicate logic, and manipulation of uninterpreted formulae (i.e. the problem now mapped into the domain of first order logic) using the rules of first order logic might not lead to anything useful.
It seems to me that EWD is showcasing some example programming problems that are elegantly handled by his formal proof techniques, while ignoring the vast swathes of programming problems that might not be well handled by these techniques.
Chinjut|1 year ago
(Much more generally, Hall's marriage theorem characterizes which finite bipartite graphs have a perfect matching, and there are polynomial-time algorithms to compute maximum cardinality matchings in arbitrary finite graphs.)
carapace|1 year ago
Typically people have insisted that it's too expensive to prove software correct, but as the machines and techniques improve proven-correct software becomes cheaper and cheaper.
The last argument standing is that it's unpopular.
Pet_Ant|1 year ago
Most software development is wrestling with malleable requirements.
As the old joke goes: writing software from requirements is like walking on water, both are easy when frozen
ogogmad|1 year ago
What's the general solution in the random non-adjacent opposite-colour case, out of only the slightest curiosity?
eigenket|1 year ago
The part where you notice the two paths are even length feels a bit like dark magic the first time you see it. Notice that if you have two different coloured squares which are consecutive on the cycle the paths you get are length 64-2 and 0, then if as you move one of them further and further along the path you have to move in steps of 2 to keep them opposite colours.