Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#51 2013-04-14 22:06:08

bobbym

Offline

Re: Four Square

Best to see it with an example.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#52 2013-04-14 22:12:36

anonimnystefy
Real Member

Offline

Re: Four Square

bobbym wrote:

You do not have to stop there. When 31 does not work you try 30 which does. Algorithm is very fast.

Hm, okay, that does work. And it is very fast! Constant speed!

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#53 2013-04-14 22:15:15

bobbym

Offline

Re: Four Square

Hmmm, it is fast but its worst case might be quite slow!

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#54 2013-04-14 22:26:11

Agnishom
Real Member

Online

Re: Four Square

bobbym wrote:

Best to see it with an example.

Okay

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
'Who are you to judge everything?' -Alokananda

#55 2013-04-14 22:28:51

anonimnystefy
Real Member

Offline

Re: Four Square

I do not think so.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#56 2013-04-14 22:44:36

bobbym

Offline

Re: Four Square

Here is one where it works fine:

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#57 2013-04-14 23:30:11

anonimnystefy
Real Member

Offline

Re: Four Square

Have you found an example in which it does not work quickly?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#58 2013-04-14 23:31:14

bobbym

Offline

Re: Four Square

Heck no, why should I hurt my own feelings?

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#59 2013-04-14 23:33:53

anonimnystefy
Real Member

Offline

Re: Four Square

Well, in any case, I think the speed will be sufficient for any number.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#60 2013-04-14 23:35:56

bobbym

Offline

Re: Four Square

Obviously the algorithm must get there the first time or by continually decrementing find the largest square that would work. But he might now have a problem with the subproblem of 3 squares.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#61 2013-04-14 23:40:53

anonimnystefy
Real Member

Offline

Re: Four Square

Oh, yeah, you need to decrement there as well. Can you find an example when the decrement will not work immediately?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#62 2013-04-14 23:47:11

bobbym

Offline

Re: Four Square

You mean where you would have to decrement the second one? No, not yet.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#63 2013-04-14 23:54:28

anonimnystefy
Real Member

Offline

Re: Four Square

Actually, we need an example where both the first and the second number are decremented.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#64 2013-04-15 00:04:00

bobbym

Offline

Re: Four Square

Why would we need an example like that?

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#65 2013-04-15 00:08:26

anonimnystefy
Real Member

Offline

Re: Four Square

Think about what would happen if only the second number needs decrementing. We could just keep the algorithm running until we get to the second number. We subtract it, the next largest square is the number we started with, all is well. But if both the first and the second numbers need decrementing then running the algorithm to the second number will still need the first number decremented (and it is now the second number).

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#66 2013-04-15 00:26:37

bobbym

Offline

Re: Four Square

I do not think that is true, at least if I am understanding it. The first two are an ordered pair. They are in >= order.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#67 2013-04-15 00:28:13

anonimnystefy
Real Member

Offline

Re: Four Square

Not necessarily. If we need to, we can find the second number first!

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#68 2013-04-15 00:35:50

bobbym

Offline

Re: Four Square

Before you get the first one?

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#69 2013-04-15 00:43:12

anonimnystefy
Real Member

Offline

Re: Four Square

Yes. Imagine that the quartuplet for n is (m,k-1,...,...) and that k^2 is the largest square below n-m^2. Then we won't find anything until we run the algorithm for k-1. Then the next largest square below it is n^2 and we get exactly what we needed.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#70 2013-04-15 00:46:48

bobbym

Offline

Re: Four Square

The algorithm will run sequentially. It is possible to get an expression for the second square by running it twice symbolically.

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#71 2013-04-15 00:48:01

anonimnystefy
Real Member

Offline

Re: Four Square

What?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#72 2013-04-15 00:51:10

bobbym

Offline

Re: Four Square

The way you can run it with numbers, you can run it with letters. Say n = a; Then the second square according to the recurrence is:

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#73 2013-04-15 00:54:20

anonimnystefy
Real Member

Offline

Re: Four Square

Ok, so?

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment

#74 2013-04-15 00:58:53

bobbym

Offline

Re: Four Square

I am not sure but there it is. We were talking getting the second largest square without getting the first weren't we?

In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#75 2013-04-15 01:03:03

anonimnystefy
Real Member

Offline

Re: Four Square

No. I was talking about getting the second number from the answer before the first.

The limit operator is just an excuse for doing something you know you can't.
“It's the subject that nobody knows anything about that we can all talk about!” ― Richard Feynman
“Taking a new step, uttering a new word, is what people fear most.” ― Fyodor Dostoyevsky, Crime and Punishment