Is there an algebraic way to know In which square two diagonals meet?
For example a2 and f3 meet in d5
How can one find d5 without looking at the board? (Blindfolded chess exercise)
Is there an algebraic way to know In which square two diagonals meet?
For example a2 and f3 meet in d5
How can one find d5 without looking at the board? (Blindfolded chess exercise)
The math formula is relatively easy (intersection of two straight lines, even with fixed slant), but I assure you I can visualize it much faster on the board than solving it, even if I'm a lousy visualizer!
Actually the accepted answer is not correct. Where do the diagonals from a4 and g4 intersect? There are two solutions, d7 and d1. It is easy to modify @Hauke Reddmann's algebra, but it seems to me much easier (and more useful) to try and improve your visualization.
As many others have pointed out, the best idea is to learn to visualise the board better.
But since there is a neat mathematical answer, let's start by converting the letter coordinates to numbers, with A=1, B=2 etc. Then:
(TL;DR:) Take the sum of coordinates of one square, and the difference of coordinates of the other, and find the square that matches both.
Just in case that seems a bit too terse:
There are two diagonals through every square. One of these diagonals preserves the sum of the coordinates, the other preserves the difference.
So, to find the squares reachable diagonally from both a2 and f3, you first convert them into coordinate number pairs:
and then into sum-difference pairs:
Since you have to take a diagonal in a different direction (and thus, preserve a different quantity) from each square, you get the intersection points by taking the coordinate sum of one square, and the coordinate difference of the other. In this case, they are
You can then convert these back to coordinate pairs and then regular coordinates by a little mental arithmetic:
And that right there is the answer.
This all looks a lot more difficult than it actually is, because in the real world, we wouldn't try to find both intersections at once, like we did above. Instead we'd just calculate
and then
Special cases: If you ended up with an intersection point that has an odd sum and an even difference (or vice versa), your original squares were of different colours, and of course there is no integer solution to the last step.
Also, if you got the same coordinate sum (or the same coordinate difference) for both of the squares, then the process will give you the two original squares as the result. This means your two squares were on the same diagonal already.
PS. In case you're wondering how one might come up with this kind of idea, this process is actually just a coordinate system switch. We start with the regular orthogonal coordinates, then switch to defining the location each square by the two diagonals it's on. In this coordinate system the original problem is really easy to solve, and then we convert the result(s) back to normal coordinates again.
Sum letter and digit, using A=1, B=2, ...
The difference is 6. It is even, so intersections exist.
Half of the difference is 3. That is the delta.
To find the 2 intersections:
A special case is when both squares share a diagonal. You can detect that case when the sums are equal or when interections you find match the original squares. If not, you are good.
X = (x1 + x2 + y2 - y1)/2 and Y = X + y1 - x1 Using this formula, we can calculate intersecting square of any two squares on chess board.
for example: a2 > (1, 2) and f3 > (6, 3) [assuming x co-ordinate a =1, b=2, c=3....f=6, g=7, h=8]
Note: You should always consider the left side point (square) as to be the first point So, X = (1+6+3-2)/2 = (10-2)/2 = 8/2 = 4 and Y = 4+2-1 = 5 As, X=4 and Y=5 The intersecting square is d5
Another thing to mention is that, if you don't get a positive integer (whole number, not fractions) as the X value, it means these two square doesn't intersect at all. That will happen only when you take two different colored squares.
First step: check if both squares are white or black, Write a2 as (1,2), then 1 + 2 is odd hence a2 is white Write f3 as (6,3), then 6 + 3 is odd hence f3 is white
Now, the squares on the diagonal (1,2) are the squares with a difference of 1 (a, a + 1) (and in more general the upright diagonal from (a,b) are those with difference |b-a|. For the squares on the diagonals (6,3), these are the upright squares with a difference of 3 (we can clearly ignore these) or the going upleft we subtract from the first coordinate and add to the second.
This quickly gives (6,3) --> (5,4) --> (4,5)! bingo! Or even faster, note that their sum, 9, stays the same for an upleft diagonal! Hence we need (a, a+1) with a + a + 1 = 9.
More generally, the upright or downleft diagonals will be easy (some set difference) and the upleft or downright diagonals has a constant sum.