Theory of Relative Squares - Printable Version +- Forums - Open Redstone Engineers (https://forum.openredstone.org) +-- Forum: ORE General (https://forum.openredstone.org/forum-39.html) +--- Forum: Tutorials (https://forum.openredstone.org/forum-24.html) +---- Forum: Advanced Tutorials (https://forum.openredstone.org/forum-26.html) +----- Forum: Concepts (https://forum.openredstone.org/forum-28.html) +----- Thread: Theory of Relative Squares (/thread-454.html) |
Theory of Relative Squares - fl3tching101 - 06-26-2013 So I somehow randomly came up with this theory for finding a square based on a relatively close square you know the solution to. Yea, random I know lol. I'm betting someone else has already come up with this theory and has named it, but I've never heard of it and came up with it all on my own so whatever I'm naming it the Theory of Relative Squares. So, the basic theory is this: The difference between two squares of numbers one apart can be represented as ((2*(n-1))+3) where n is the smaller of the two numbers. In English...well I'm not exactly sure of a better way to express it, so I'll give an example. So, say we want to find what 21 squared is equivalent to, and we know that 20 squared is 400 from memory. So, to find what 21 squared is, take and plug it into the equation. ((2*(20-1)+3) which equates to 41, so the difference between the squares of 20 and 21 is 41. 20 squared we know to be 400, so 400+41 is 441, the square of 21. Same idea can be used to find a number further away, so you still know 20 squared is 400 (let's say you've forgotten and can't look back to see that 21 squared is 441) and you want to find 23 squared. So, what you do, is the same as above, ((2*(20-1)+3) for 41, the difference between 20 squared and 21 squared, and the difference between sequential squares grows by 2 every square, so the difference between 21 squared and 22 squared is 41+2, and 22 squared and 23 squared would be 41+2+2, so the difference between 20 squared and 23 squared is 41 (the difference of 20 and 21 squares) + 43 (the difference of 21 and 22 squares) + 45 (the difference of 22 and 23 squares) or, 129. So we then add that to our known square, 20 squared for 400, and we get 23 squared to equate to 529, which is correct. This works for any relative squares, now of course there are faster ways for people most likely, however maybe this method is faster than simpler but easier-to-get-confused methods. Though probably this method is confusing for most people lol. Now maybe you're thinking "Well that's great, but I don't have many large squares memorized so it won't really help me because I don't know a relatively close square!?" So, I have a trick for that too, oh, and it isn't simple either. So, there is a fairly simple way to find the square of a multiple of 10 or 5 (so 5,10,15,20,25...). So, multiples of 10 first. This is an easy one and probably several people already know it. So for the square of a multiple of ten, take the number in the ten's place (or the digits before the one's place in a larger number IE 120) and square that number, then left shift the number two places and add 0s there, 30 squared is 3 squared, 9, left shift two places, so 900. For the triple digit example, 12 squared is 144 left shift twice, 14,400 is 120 squared. Next the multiples of 5 between the multiples of 10, so I'm not sure how to write this one mathematically, so you take the number, round down to the nearest tens place, then you take the digit in the tens place (or again the digits before the zero) and add two zeros after it, or I suppose you could just take it and multiply by ten. Then take that and add 25, then add that to the rounded down multiple of ten square. I bet that's confusing so I'll give an example. So you want the square of 25, you take 20, multiply by 10, add 25 and it's 225, add that to the 20 squared, so 400, and you get 625 which is 25 squared. Don't believe it works/still confused? If we want 55 squared we take 50, multiply by 10 get 500 add 25 get 525 add that to the square of 50, which based on our previous statement should be 5 squared multiply by 100 (left shift 2) so 2500 and add the 525 to that and you get 3025 which is in fact the square of 55. Cool stuff right? And, if you slightly modify the original Theory of Relative Squares you can find those multiples of 10 and multiples of 5 squares based on a relative square of the respective multiple of 10 or 5. So, for the tens, the theory is exactly the same, just take the number before the zeros, find its square, then add two zeros. Take 70, 7 squared, you could use my theory to find it, but I'd hope you don't need to, you take the 49 and add two zeros (left shift twice or multiply by 100 same difference) 4,900 is the square of 70. So, now multiples of 5, from the last relative multiple of 5, you take that relative multiple of 5, and add 200 times the numbers before the 5 of the second number. That's a bad description, but for example an easy 15 relative to 5. 5 squared I'd hope you know to be 25, so you take 200*1 from the 15, and add that to the 5 squared which is 25, so 15 squared is 225. Now let's try 25 relative to that 15, 15 squared we just found to be 225, now we take 200*2 from the 25, and get 400. so 25 squared equals 225+400 or 625. That was a really long description, however using all those tricks (and combinations thereof, such as to find the square of 863 you would first find the square of 85 using one of the two multiple of 5 methods, then use the original theory to get the square of 86, then add two zeros to the square of 86 to get the square of 860, then the fastest way would be to find the difference between the square of 860 and 861 then add 2 to that, and 4 to that and add the three numbers, then add that to the square of 860 to arrive at the designated square of 863 to be 744,769) you can find any square of a number relatively easily. (Yes, pun intended.) The idea being you can do several simple calculations and arrive at the square of the number fairly easily, though remembering all the steps of the processes and all the numbers...meh probably not the most practical method, but it works with 100% reliability. Obviously if you have a piece of paper it would probably be easier to just do long multiplication and find it that way. However, this method is simple and extremely effective, so hopefully you learned something new. Sorry this is such a long post ! Thanks for reading! Alright, for Virt, this is my Mathematical Induction proof, though I'm not sure it's meant to prove this kind of statement: The difference between two squares is (2*(n-1))+3 where n = the lesser of the two square roots. 3,5,7,...n = (2*(n-1))+3 1) Prove statement to be true for n = 1, 2, and 3: N1 = 3 N1 = (2*(1-1))+3 = 3 N2 = 5 N2 = (2*(2-1))+3 = 5 N3 = 7 N3 = (2*(3-1))+3 = 7 2) Assume true when n=k where k = positive int: 3,5,7,...k = (2*(k-1))+3 3) Prove true for any positive integer k, whenever Pk is true, then Pk+1 is also true: 3+5+7+...k+(k+1) = (2*(k-1))+3 2k+1 = 2k-2+3 2k+1 = 2k+1 RE: Theory of Relative Squares - VirtualPineapple - 06-26-2013 Ummm, maybe a small tl;dr section at the bottom to sum it all up would be nice q_q Also, if you could make a proof of this theory, that would be awesome :{D RE: Theory of Relative Squares - AFtExploision - 06-26-2013 So, I have found that: n^2 = (n-1)^2 + 2(n-1) + 1 (n+1)^2 = n^2 + 2n +1 is this essentially what you are saying? RE: Theory of Relative Squares - fl3tching101 - 06-26-2013 (06-26-2013, 06:18 AM)AFtExploision Wrote: So, I have found that: Sort of, my theory relies on you knowing a square and using the known square to calculate an unknown square of relative position on the number line. What you show is kind of just a breakdown of how to solve a square. I figured out my theory really quite simply, so if here's the thought process. 1^2 = 1, 2^2 = 4, 4-1 = 3. 3^2 = 9, 9-4 = 5. 4^2 = 16, 16-9 = 7. 7-5 = 2. 5-3 = 2. So, starting after the difference between 1 squared and 2 squared, the difference increases by 2 each time, so if you take 2 times the lesser number subtract 1, then you get the difference, but 3 off, so add 3 to the end of that and you get the difference between the two squares. Pretty much it was just a random coincidence that I found the pattern. Yours works too, mine is just easier assuming you know the square previous to it, or one relatively close. RE: Theory of Relative Squares - Thor23 - 06-26-2013 I haven't done induction in over a year, but the format of your proof just seems wrong to me. I've been messing with it a bit, and I think this would be more accurate. I substituted 2(k-1)+3 for 2k+1, there wasn't any reason not to and it made it easier to figure out: First, we define S(k) as a series of additions: Then we define S(k+1) as an advancement of that series: So S(k) can be represented by this equation, with 2 being added k times equal to 2k: We assume this equation is true for k. Then we see that: Which, when we substitute k+1 for k in S(k), is exactly what we should get. Or something like that anyway; I could never get my head fully around induction since it always seems to be going around in a circle. So apparently we can only use TeX 3 times in each post? That's kinda unfortunate. RE: Theory of Relative Squares - fl3tching101 - 06-26-2013 Thor, the format is the format which was taught to us in our Advanced Algebra class (I literally went and got my binder and took out the notes on Mathematical Induction), so the format is at least one of possibly many formats for Mathematical Induction, however towards the end I did pretty much just start trying to fit something that worked in, because I too never got my head around it, and I know it should work for any natural number. Your method seems to work as well, my method should work, though not exactly perfect, and I'm not sure that using Mathematical Induction is the best way to use Mathematical Proof for this theory. And again, just like you, I've always had trouble with Mathematical Induction and don't like it at all, seems to just be using like anything that can make it look true to prove something... Point is, it is true for all natural numbers, no matter how you'd like to prove it. RE: Theory of Relative Squares - Thor23 - 06-28-2013 Yeah, I was just going off my notes from my Discrete Math class, and what you wrote didn't look like any of my notes, so it didn't seem right to me. I am pretty sure, though, that induction is the sort of thing you would use to prove something like this, so I don't think there's any problem there. Fun Fact: If you include the previous term (S(k-1)) in there, then you have recurrence relation that will tell you what the square of the number after it is. I.E. putting in 20 will get you 21^2. RE: Theory of Relative Squares - AFtExploision - 06-28-2013 (06-26-2013, 07:44 PM)fl3tching101 Wrote: Thor, the format is the format which was taught to us in our Advanced Algebra class (I literally went and got my binder and took out the notes on Mathematical Induction), so the format is at least one of possibly many formats for Mathematical Induction, however towards the end I did pretty much just start trying to fit something that worked in, because I too never got my head around it, and I know it should work for any natural number. Your method seems to work as well, my method should work, though not exactly perfect, and I'm not sure that using Mathematical Induction is the best way to use Mathematical Proof for this theory. And again, just like you, I've always had trouble with Mathematical Induction and don't like it at all, seems to just be using like anything that can make it look true to prove something... Point is, it is true for all natural numbers, no matter how you'd like to prove it.My equation works, if you work the numbers around you get n^2 = n^2, and I think that proves it is true. RE: Theory of Relative Squares - xdot - 06-28-2013 (06-26-2013, 06:42 AM)fl3tching101 Wrote:(06-26-2013, 06:18 AM)AFtExploision Wrote: So, I have found that: Exactly the same. (06-26-2013, 10:54 AM)Thor23 Wrote: So apparently we can only use TeX 3 times in each post? That's kinda unfortunate. The plugin/TeX server seems to ignore multi-line scripts. RE: Theory of Relative Squares - Ntwede - 06-28-2013 16^2=(15+1)^2 or if 15 is x, (x+1)^2 = x^2+2x+1 225+30+1=256=16^2 RE: Theory of Relative Squares - Guy1234567890 - 06-29-2013 Just as a note, you only have to show that the proposition is true for one case (usually the case where n is the smallest) and then you can immediately show that it is true for the k+1th case. RE: Theory of Relative Squares - fl3tching101 - 06-29-2013 (06-29-2013, 01:40 AM)Guy1234567890 Wrote: Just as a note, you only have to show that the proposition is true for one case (usually the case where n is the smallest) and then you can immediately show that it is true for the k+1th case. Yea, I saw that on the wiki, but we were taught to show true for the three cases. Also we were taught to make a middle step that was just replacing n with k lol... I quite hate Mathematical Induction so Lol when I posted this I really didn't expect such discussion I know there are like a thousand different shortcuts and ways of finding a square, I was just posting a quick, fun(ish) way to find a square...not trying to rewrite a textbook here lol. The origin of this was actually that one day in math, we were doing some group work and one of my friends was in the group, and I just said one of the steps out loud, a square of like 17 (I talk to myself a lot through math problems, really just to help others around me or have someone smarter correct a problem ) and he immediately spit out the answer. The like 10 people around him including me all just looked at him...turns out he had memorized the squares of the numbers through 25. So wishing I could do that lol, I randomly remembered that moment and was thinking about it, trying to figure out a shortcut to find squares quickly. These were the shortcuts I figured out in the car on the way home from a short trip lol. RE: Theory of Relative Squares - Thor23 - 06-29-2013 (06-29-2013, 01:40 AM)Guy1234567890 Wrote: Just as a note, you only have to show that the proposition is true for one case (usually the case where n is the smallest) and then you can immediately show that it is true for the k+1th case. No, if you you only had to show it was true for one case, then you wouldn't be proving anything. If I had the equation 2+k=4, and showed that it was true when k=2, that doesn't mean it would be true for 3. You'd have to show that the k+1'th term was equivalent to simply substituting k+1 in for k in the original equation. If it works for both k and k+1, since k can be anything, then you've proven that it works for all k's. (06-28-2013, 10:06 AM)xdot Wrote: The plugin/TeX server seems to ignore multi-line scripts. Ah, so that's what it was. Fix'd. Finding products of 2 and/or 3 digit numbers is pretty easy if you just foil them in your head. No memorization required. RE: Theory of Relative Squares - Guy1234567890 - 06-29-2013 Yes, you must show the proposition to be true for both k and k+1 (that wasn't the part I was talking about). However, the assumption is that it does hold for k, and so that step is unnecessary. However, I was just referencing the 3 specific cases, two of which were unnecessary. RE: Theory of Relative Squares - Thor23 - 06-30-2013 Ah, ok then. It seemed like you were saying that if you can show it works for one case, then it would work for all cases by extension. RE: Theory of Relative Squares - Guy1234567890 - 06-30-2013 Yeah, the step where you assume it works for all n=k therefore it must work for all k+1 is called the inductive step XD Upon re-reading what i wrote here it does not make much sense* RE: Theory of Relative Squares - Thor23 - 06-30-2013 But you can't assume it works for all n = k because you don't know if that's true. You can only assume it works for one k, then show that if - based off that assumption - k+1 also happens to be true, then it will work for whatever k happens to be. If k+1 doesn't work, then your assumption must have been wrong. RE: Theory of Relative Squares - Guy1234567890 - 07-01-2013 (06-30-2013, 09:01 PM)Thor23 Wrote: But you can't assume it works for all n = k because you don't know if that's true. You can only assume it works for one k, then show that if - based off that assumption - k+1 also happens to be true, then it will work for whatever k happens to be. If k+1 doesn't work, then your assumption must have been wrong. Actually, the assumption is not that it works for all n. Rather, it is that it works for all k+1. Then after showing this to be true, and because you know it works for a specific k, you must therefore know that it works for all whole number values greater than the "seed" value. Effectively, you show it to work for n=0, and hence n=1, and hence n=2 etc. because each time you show it works for a specific n, it therefore also works for that n+1, and hence for that n+1 and so on. RE: Theory of Relative Squares - Thor23 - 07-01-2013 Alright yes, I think we're finally on the same page. Everything you said right there makes sense to me. I think it was just the context on which I was getting confused. RE: Theory of Relative Squares - Guy1234567890 - 07-01-2013 XD yeah probably RE: Theory of Relative Squares - AJMansfield - 02-14-2014 If you could find a really efficient way to calculate given for some , there is a way to use that to crack an RSA encryption. RE: Theory of Relative Squares - AFtExploision - 02-14-2014 (02-14-2014, 03:02 AM)AJMansfield Wrote: If you could find a really efficient way to calculate given for some , there is a way to use that to crack an RSA encryption.what RE: Theory of Relative Squares - Darkroom - 02-14-2014 all (n+1)^2 is an addition and a multiplication literally its super fast even for huge bit sizes RE: Theory of Relative Squares - Iceglade - 02-14-2014 And if you don't like the composition then just do n^2+2n+1... but I can't imagine why you'd want that. RE: Theory of Relative Squares - AJMansfield - 02-14-2014 What I mean, is that if all you knew was , normally you have to take its square root (a tedious, process, where the current best for ) to find , and then you can just do to get . But if you could figure out how to get from without needing to calculate , you could crack RSA using the difference-of-squares method much more quickly than existing methods. Basically, find a way of computing a square root of a perfect square that is significantly faster than multiplying two numbers of the same lemgth, and you win. (Not that I expect this to ever happen.) RE: Theory of Relative Squares - Iceglade - 02-15-2014 Yeah, I'm not sure how that would be done if it was at all. It would be an interesting thing to look into at some point though, I guess. RE: Theory of Relative Squares - Dcentrics - 02-21-2014 * Dcentrics stares in disbelief RE: Theory of Relative Squares - CrazyPyroEagle - 06-08-2016 (a + b)^2 - a^2 = a^2 + 2ab + b^2 - a^2 = b^2 + 2ab It's not as simple in different powers though. (a + b)^3 - a^3 = a^3 + 3ba^2 + 3ab^2 + b^3 - a^3 = 3ba^2 + 3ab^2 + b^3 RE: Theory of Relative Squares - Chibill - 06-08-2016 Please don't bump threads older than a year. RE: Theory of Relative Squares - LordDecapo - 08-13-2016 It was bumped already... But I'll add this here N^2 = (N-1)^2 + (N-1) + N RE: Theory of Relative Squares - josh03222 - 08-14-2016 (08-13-2016, 09:24 PM)LordDecapo Wrote: It was bumped already... capo savage |