|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On April 02 2016 03:06 spinesheath wrote:That parametric solution for 1... why go to such lengths when you can just use 1 = 1^3 + x^3 + (-x)^3 and still get infinitely many solutions? The same holds true for every single k^3 = k^3 + x^3 + (-x)^3. Anyways, even though he didn't say so specifically, we can safely assume that there is no easy way to find an upper limit for the 33 case. Or else someone would already have found a solution. Integer math is surprisingly hard, even though the numbers seem so much simpler than real numbers. In fact many problems are a lot easier if you're looking for solutions in the real numbers instead of integer solutions. Long story short: if you want to solve this, you should probably head to university and delve into the field of discrete mathematics. It seems like people with way more experience and knowledge in the field than us combined have tried to find a solution. Well, the equation 1 = 1 + x^3 + (-x)^3 gives you infinitely many solutions, but it doesn't give you all of them. For example, 1 = 10^3 + 9^3 + (-12)^3 would not be included as a solution.
|
On April 02 2016 02:47 tofucake wrote: wat?
c = 4 changes the equation to -31 = a^3 + b^3, not -53... Yeah. Arithmetic fubar.
|
On April 02 2016 03:52 Prillan wrote:Show nested quote +On April 02 2016 03:06 spinesheath wrote:On April 02 2016 02:46 Manit0u wrote: I always get spooked by such stuff... That parametric solution for 1... why go to such lengths when you can just use 1 = 1^3 + x^3 + (-x)^3 and still get infinitely many solutions? The same holds true for every single k^3 = k^3 + x^3 + (-x)^3. Anyways, even though he didn't say so specifically, we can safely assume that there is no easy way to find an upper limit for the 33 case. Or else someone would already have found a solution. Integer math is surprisingly hard, even though the numbers seem so much simpler than real numbers. In fact many problems are a lot easier if you're looking for solutions in the real numbers instead of integer solutions. Long story short: if you want to solve this, you should probably head to university and delve into the field of discrete mathematics. It seems like people with way more experience and knowledge in the field than us combined have tried to find a solution. Well, the equation 1 = 1 + x^3 + (-x)^3 gives you infinitely many solutions, but it doesn't give you all of them. For example, 1 = 10^3 + 9^3 + (-12)^3 would not be included as a solution. But the formula presented in the video for infinitely many solutions does not include all solutions either.
|
I wonder if there are numbers for which there are infinitely many parametric solutions?
|
On April 02 2016 04:02 spinesheath wrote:Show nested quote +On April 02 2016 03:52 Prillan wrote:On April 02 2016 03:06 spinesheath wrote:On April 02 2016 02:46 Manit0u wrote: I always get spooked by such stuff... That parametric solution for 1... why go to such lengths when you can just use 1 = 1^3 + x^3 + (-x)^3 and still get infinitely many solutions? The same holds true for every single k^3 = k^3 + x^3 + (-x)^3. Anyways, even though he didn't say so specifically, we can safely assume that there is no easy way to find an upper limit for the 33 case. Or else someone would already have found a solution. Integer math is surprisingly hard, even though the numbers seem so much simpler than real numbers. In fact many problems are a lot easier if you're looking for solutions in the real numbers instead of integer solutions. Long story short: if you want to solve this, you should probably head to university and delve into the field of discrete mathematics. It seems like people with way more experience and knowledge in the field than us combined have tried to find a solution. Well, the equation 1 = 1 + x^3 + (-x)^3 gives you infinitely many solutions, but it doesn't give you all of them. For example, 1 = 10^3 + 9^3 + (-12)^3 would not be included as a solution. But the formula presented in the video for infinitely many solutions does not include all solutions either. That's exactly what it does, it's the whole point of it.
The equation 1 = a^3 + b^3 + c^3 has integer solutions a = 1 + 9m^3, b = 9m^4, c = -9m^4 - 3m for all (integers) m.
On April 02 2016 04:12 Acrofales wrote: I wonder if there are numbers for which there are infinitely many parametric solutions? That depends on what you mean by "infinitely many parametric solutions".
|
This problem is a "Number Theory" problem; the type of equation you're trying to solve is called a Diophantine equation. This question is relevant. Despite what is said in that link, there are surely many algorithms for specifics problems.
|
On April 02 2016 05:13 CoughingHydra wrote:This problem is a "Number Theory" problem; the type of equation you're trying to solve is called a Diophantine equation. This question is relevant. Despite what is said in that link, there are surely many algorithms for specifics problems.
Yep, yesterday on ICCUP was discussing this type of question with fululf and he was trying to solve such equation (though his was linear one, not cubic) using the "Euclidean Algorithm"
|
I really tried to do maths once, but then I come to read sentences like "conjectural Langlands correspondence on representations of the absolute Galois group of a number field" and my brain said "nope".
|
On April 02 2016 05:02 Prillan wrote:Show nested quote +On April 02 2016 04:02 spinesheath wrote:On April 02 2016 03:52 Prillan wrote:On April 02 2016 03:06 spinesheath wrote:On April 02 2016 02:46 Manit0u wrote: I always get spooked by such stuff... That parametric solution for 1... why go to such lengths when you can just use 1 = 1^3 + x^3 + (-x)^3 and still get infinitely many solutions? The same holds true for every single k^3 = k^3 + x^3 + (-x)^3. Anyways, even though he didn't say so specifically, we can safely assume that there is no easy way to find an upper limit for the 33 case. Or else someone would already have found a solution. Integer math is surprisingly hard, even though the numbers seem so much simpler than real numbers. In fact many problems are a lot easier if you're looking for solutions in the real numbers instead of integer solutions. Long story short: if you want to solve this, you should probably head to university and delve into the field of discrete mathematics. It seems like people with way more experience and knowledge in the field than us combined have tried to find a solution. Well, the equation 1 = 1 + x^3 + (-x)^3 gives you infinitely many solutions, but it doesn't give you all of them. For example, 1 = 10^3 + 9^3 + (-12)^3 would not be included as a solution. But the formula presented in the video for infinitely many solutions does not include all solutions either. That's exactly what it does, it's the whole point of it. The equation 1 = a^3 + b^3 + c^3 has integer solutions a = 1 + 9m^3, b = 9m^4, c = -9m^4 - 3m for all (integers) m. 1 = 1^3 + 2^3 + (-2)^3 What m would produce this valid solution? None of these terms can ever be equal to 2 as far as I can tell.
So for each m this produces a valid solution, but it does not produce all the solutions.
|
On April 02 2016 05:02 Prillan wrote:Show nested quote +On April 02 2016 04:02 spinesheath wrote:On April 02 2016 03:52 Prillan wrote:On April 02 2016 03:06 spinesheath wrote:On April 02 2016 02:46 Manit0u wrote: I always get spooked by such stuff... That parametric solution for 1... why go to such lengths when you can just use 1 = 1^3 + x^3 + (-x)^3 and still get infinitely many solutions? The same holds true for every single k^3 = k^3 + x^3 + (-x)^3. Anyways, even though he didn't say so specifically, we can safely assume that there is no easy way to find an upper limit for the 33 case. Or else someone would already have found a solution. Integer math is surprisingly hard, even though the numbers seem so much simpler than real numbers. In fact many problems are a lot easier if you're looking for solutions in the real numbers instead of integer solutions. Long story short: if you want to solve this, you should probably head to university and delve into the field of discrete mathematics. It seems like people with way more experience and knowledge in the field than us combined have tried to find a solution. Well, the equation 1 = 1 + x^3 + (-x)^3 gives you infinitely many solutions, but it doesn't give you all of them. For example, 1 = 10^3 + 9^3 + (-12)^3 would not be included as a solution. But the formula presented in the video for infinitely many solutions does not include all solutions either. That's exactly what it does, it's the whole point of it. The equation 1 = a^3 + b^3 + c^3 has integer solutions a = 1 + 9m^3, b = 9m^4, c = -9m^4 - 3m for all (integers) m. Show nested quote +On April 02 2016 04:12 Acrofales wrote: I wonder if there are numbers for which there are infinitely many parametric solutions? That depends on what you mean by "infinitely many parametric solutions".
Well, for 1 = a^3 + b^3 + c^3 you have at least two:
a = 1 + 9m^3, b = 9m^4, c = -9m^4 - 3m a = 1, b = m, c = -m
Now I am not talking about trivially equivalent equations, of which there are obviously infinite (a = 1, b = x, c = -x for instance is "different" from the latter equation, but is a syntactic equivalent. Similarly a= 73(x - 1) - 73x + 74, b = x, c= -x is equivalent to it), but parametric solutions that are different like the above two parametric solutions are different.
|
Hyrule18968 Posts
|
Hey everyone! Long time lurker of the regular form. I just got my first job as a programmer and the tech stack is something I have never programed in before!
I went to a bootcamp and learned a shit ton of Ruby and Rails, but now I have to program in Java, .Net, and C#
Any good books out there so I can learn the basics of these languages? I have looked around but wondered what you all thought would be a good idea.
|
For Java you can always read the Thinking In Java book. With C# I'm not sure, I kind of learned it by doing it (not that I had to do much in it, but I did ship a very small program in it that I even got paid for). For .NET/C# be sure to check out the dotnetperls - their examples and explanations helped me immensely when I had only a vague idea of what I should be looking for (and msdn documentations blow donkey balls).
|
On April 01 2016 23:55 enigmaticcam wrote:Show nested quote +On April 01 2016 08:08 Blisse wrote:I can't imagine doing it in SQL but it looks super close to how you would implement union-find/merge :o What's a union-find/merge?! Man, I need to take an algorithm class so I can know about these ahead of time without having to spend hours to work up my own.
I don't think I learned it during algorithms class. I had to read someone's Matlab code and they were doing something awfully confusing with some trees and indices, and I had to research a bit before I realized they were implementing an algorithm to find all the forests in a tree.
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
Essentially if you have N nodes in a graph, you can label each node from 0 to N-1, and then for every edge (a, b), change all the nodes with label a to label b. The end result is that all nodes in the same forest have the same label number, which means you can easily check if two nodes are in the same forest.
With regards to the SQL algorithm, if we wanted to treat all consecutive dates as belonging to the same data point, then it would represent a forest and we could generate a unique label/id for only those dates, similar to what you've done. Except like, not in SQL :p
|
On April 03 2016 11:59 Blisse wrote:Show nested quote +On April 01 2016 23:55 enigmaticcam wrote:On April 01 2016 08:08 Blisse wrote:I can't imagine doing it in SQL but it looks super close to how you would implement union-find/merge :o What's a union-find/merge?! Man, I need to take an algorithm class so I can know about these ahead of time without having to spend hours to work up my own. I don't think I learned it during algorithms class. I had to read someone's Matlab code and they were doing something awfully confusing with some trees and indices, and I had to research a bit before I realized they were implementing an algorithm to find all the forests in a tree. https://en.wikipedia.org/wiki/Disjoint-set_data_structureEssentially if you have N nodes in a graph, you can label each node from 0 to N-1, and then for every edge (a, b), change all the nodes with label a to label b. The end result is that all nodes in the same forest have the same label number, which means you can easily check if two nodes are in the same forest. With regards to the SQL algorithm, if we wanted to treat all consecutive dates as belonging to the same data point, then it would represent a forest and we could generate a unique label/id for only those dates, similar to what you've done. Except like, not in SQL :p I'm pretty sure you mean all trees in a forest. The naming actually matches the real world counterpart.
|
|
On April 02 2016 06:15 spinesheath wrote:Show nested quote +On April 02 2016 05:02 Prillan wrote:On April 02 2016 04:02 spinesheath wrote:On April 02 2016 03:52 Prillan wrote:On April 02 2016 03:06 spinesheath wrote:On April 02 2016 02:46 Manit0u wrote: I always get spooked by such stuff... That parametric solution for 1... why go to such lengths when you can just use 1 = 1^3 + x^3 + (-x)^3 and still get infinitely many solutions? The same holds true for every single k^3 = k^3 + x^3 + (-x)^3. Anyways, even though he didn't say so specifically, we can safely assume that there is no easy way to find an upper limit for the 33 case. Or else someone would already have found a solution. Integer math is surprisingly hard, even though the numbers seem so much simpler than real numbers. In fact many problems are a lot easier if you're looking for solutions in the real numbers instead of integer solutions. Long story short: if you want to solve this, you should probably head to university and delve into the field of discrete mathematics. It seems like people with way more experience and knowledge in the field than us combined have tried to find a solution. Well, the equation 1 = 1 + x^3 + (-x)^3 gives you infinitely many solutions, but it doesn't give you all of them. For example, 1 = 10^3 + 9^3 + (-12)^3 would not be included as a solution. But the formula presented in the video for infinitely many solutions does not include all solutions either. That's exactly what it does, it's the whole point of it. The equation 1 = a^3 + b^3 + c^3 has integer solutions a = 1 + 9m^3, b = 9m^4, c = -9m^4 - 3m for all (integers) m. 1 = 1^3 + 2^3 + (-2)^3 What m would produce this valid solution? None of these terms can ever be equal to 2 as far as I can tell. So for each m this produces a valid solution, but it does not produce all the solutions. That's a great observation. I didn't see that. I completely agree that it's a weird choice of solutions to present. After doing some short googling I stumbled upon the reason for the confusion.
For example, determine the integers x,y,z with |x|,|y|,|z| > 1 such that x^3 + y^3 + z^3 = 1 (1)
This has infinitely many solutions because of the identity
(1 +- 9m^3)^3 + (9m^4)^3 + (-9m^4 -+ 3m)^3 = 1 (2)
but there are other solutions as well. Are there any other identities that give a different 1-parameter family of solutions? Is every solution of (1) a member of a family like this? http://www.mathpages.com/home/kmath071.htm
Note how it says integers x,y,z with |x|,|y|,|z| > 1, something they forgot to say in the Numberphile video. So, if we restrict ourselfs to the, what I assume would be called, non-trivial solutions we end up with (1 +- 9m^3)^3 + (9m^4)^3 + (-9m^4 -+ 3m)^3 = 1 as the easiest way of describing infinitely many solutions to the equation.
As a final note, the page also says this:
However, he says it's not known whether EVERY solution of the equation lies in some family of solutions with an algebraic parameterization. So as far as we know, there might not be a simple way of describing all solutions to the equation x^3 + y^3 + z^3 = 1.
|
Scratch that.
It says that a, b, c must be greater than the cubic root of x. So the |a| > 1 is just a special case.
So why does the video present a solution for 20 that uses c = 1? Same thing for 6.
|
Basically, in the video he presents a parametric solution. The reason why that seemingly complex parametric solution is interesting is because it's non-trivial, i.e |x|,|y|,|z| > 1.
The general case does not require |x|,|y|,|z| > 1. Does that make it clearer?
|
On April 04 2016 05:42 Prillan wrote: Basically, in the video he presents a parametric solution. The reason why that seemingly complex parametric solution is interesting is because it's non-trivial, i.e |x|,|y|,|z| > 1.
The general case does not require |x|,|y|,|z| > 1. Does that make it clearer? Your link does require the equivalent of |a| > 1 for the general case:
each with absolute value greater than the nth root of k
|
|
|
|