0 votes 0 votes Why magic square problem algorithm works ? Problem :- https://en.wikipedia.org/wiki/Magic_square Any proof for the algorithm of problem why the algorithm works ? Analytical Aptitude algorithms puzzles + – Kabir5454 asked Sep 26, 2022 Kabir5454 715 views answer comment Share Follow See all 13 Comments See all 13 13 Comments reply ankitgupta.1729 commented Sep 27, 2022 reply Follow Share Which algorithm ? 0 votes 0 votes Nisha Bharti commented Sep 27, 2022 reply Follow Share I think he ask which algorithm followed by magic square, right @Kabir5454 ? & how it work 0 votes 0 votes Kabir5454 commented Sep 27, 2022 reply Follow Share Yes 👍 . And most importantly why it works ? 1 votes 1 votes ankitgupta.1729 commented Sep 27, 2022 reply Follow Share Could you please redirect me to that algorithm ? If you mean constructing methods then which constructing method you are talking about ? 0 votes 0 votes Kabir5454 commented Sep 27, 2022 reply Follow Share https://www-geeksforgeeks-org.cdn.ampproject.org/v/s/www.geeksforgeeks.org/magic-square/amp/?amp_gsa=1&_js_v=a9&usqp=mq331AQKKAFQArABIIACAw%3D%3D#amp_tf=From%20%251%24s&aoh=16642830156529&referrer=https%3A%2F%2Fwww.google.com&share=https%3A%2F%2Fwww.geeksforgeeks.org%2Fmagic-square%2F @ankitgupta.1729 this one sir 0 votes 0 votes ankitgupta.1729 commented Sep 27, 2022 reply Follow Share @Kabir5454 Solution: https://www.overleaf.com/read/bgsdzvwrdpfz 0 votes 0 votes Kabir5454 commented Sep 28, 2022 reply Follow Share This diagonal sum is not equal to 65 and I did not the conversion how from rows and coloums we get this matrix as only first row and first column are fit with this 0 votes 0 votes Nisha Bharti commented Sep 28, 2022 reply Follow Share @Kabir5454 see this carefully 5*5 matrix format in magic square will be this and yes notice that diagonal element of every magic square will be continuous like here 11,12,13,14,15. same for 3*3 diagonal will be 5,6,7 see this animated matrix carefully u will got the algorithm step 0 votes 0 votes Nisha Bharti commented Sep 28, 2022 reply Follow Share @Kabir5454 actually i studied this magic square in class 9 & i remember some steps like every center value of magic square will be n^2+1/2 that is for 5*5 matrix center element will be =25+1=26/2=13 and as rest element will be continuous in diagonal so put 11,12 & 14,15 0 votes 0 votes ankitgupta.1729 commented Sep 28, 2022 reply Follow Share @Kabir5454 Please give some time to fix it. Since, rows and column sets are correct, so, in this case only 2 diagonal will create problem, and so, order of rows/columns needs to be fixed and conversion is not difficult, you just have to fix only one row and one column in any sequence and then for a particular set of column check which column element goes in which rows as you have already the row set. @Nisha Bharti question is not diagonal elements are in sequence, question is why it is so. So, you need to prove everything to justify it is so like centre element would be $S/n,$ Sum of two end diagonal elements is $\frac{2S}{n}$ etc. 0 votes 0 votes Nisha Bharti commented Sep 28, 2022 reply Follow Share @ankitgupta.1729 yes sir 0 votes 0 votes Kabir5454 commented Sep 28, 2022 reply Follow Share @ankitgupta.1729 sir yes the way you tried that is elegent please sir take your time and I will also try to by my own if got any thing I will add. 0 votes 0 votes ankitgupta.1729 commented Sep 28, 2022 reply Follow Share @Kabir5454 can you please check that link again ? Let me know if you have any concerns. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes I think there are more than one method to solving magic square ankit sir will clear this. Nisha Bharti answered Sep 28, 2022 • edited Sep 28, 2022 by Nisha Bharti Nisha Bharti comment Share Follow See 1 comment See all 1 1 comment reply Kabir5454 commented Sep 28, 2022 reply Follow Share That's not the issue the problem is why this process works or any algorithm we know that there is a process but why that process works that is my doubt. Ankit Gupta sir solved almost the problem but still there is some portion should be fixed. 1 votes 1 votes Please log in or register to add a comment.