wu :: forums
« wu :: forums - How many values? »

Welcome, Guest. Please Login or Register.
Dec 2nd, 2024, 8:52am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   medium
(Moderators: Eigenray, towr, william wu, SMQ, ThudnBlunder, Icarus, Grimbal)
   How many values?
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: How many values?  (Read 361 times)
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
How many values?  
« on: Nov 26th, 2005, 5:23am »
Quote Quote Modify Modify

Each number x(n) may be [sqrt(2) - 1] or [sqrt(2) + 1.]  
 
How many different integer values might be the sum S:
 
S = x(1)*x(2) + x(2)*x(3) + x(3)*x(4) +...+ x(2003)*x(2004)?  
« Last Edit: Nov 26th, 2005, 5:25am by pcbouhid » IP Logged

Don´t follow me, I´m lost too.
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
Re: How many values?  
« Reply #1 on: Nov 26th, 2005, 6:09am »
Quote Quote Modify Modify

The way I see it, if we'll call one value a and the other b, ab will give an integer result, as will a^2+b^2 (a^2, and b^2 alone won't).
Hence, we need an equal number of "a strings" (repeated values of a's, that will give a^2's) and "b strings". The location and distribution of these strings does not matter.
 
The question then becomes: how many such (#a-strings = #b-strings) combinations exist?
 
There can be any number between 0 (for any n, x(n)!=x(n+1) and 1001 (one value change).
 
The answer, then, would be 1002.
« Last Edit: Nov 26th, 2005, 6:10am by BNC » IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #2 on: Nov 26th, 2005, 6:20am »
Quote Quote Modify Modify

Not quite.
IP Logged

Don´t follow me, I´m lost too.
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2873
Re: How many values?  
« Reply #3 on: Nov 26th, 2005, 6:20am »
Quote Quote Modify Modify

503506
 
Assuming my arithmetic was up to the task.
 
Justification:
 
hidden:
Each of the 1002 terms of the sum can be 3-2[sqrt]2, 1 or 3+2[sqrt]2. Call them x, y and z. For ax+by+cz=dx+ey+fz to hold, c-a=f-d must also hold (to have the same number of [sqrt]2's) as must 3a+b+3c=3d+e+3f (to equate rational parts) and a+b+c=d+e+f=1002. So a+c=d+f so a=d, c=f, and b=e must hold.
 
So any three values 0<=a,b,c<=1002 with a+b+c=1002 will give a unique value for S. There are 503506 such triples (1004C2)
IP Logged
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #4 on: Nov 26th, 2005, 6:23am »
Quote Quote Modify Modify

nope!
IP Logged

Don´t follow me, I´m lost too.
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2873
Re: How many values?  
« Reply #5 on: Nov 26th, 2005, 6:54am »
Quote Quote Modify Modify

OK, yeah, integer values...
 
502
 
Because:
hidden:
Continuing from my previous analysis, using the same notation: for integer S, a=c must hold, so 2a+b=1002, so 0<=a<=501, for 502 possibilities
IP Logged
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
Re: How many values?  
« Reply #6 on: Nov 26th, 2005, 7:32am »
Quote Quote Modify Modify

rmsgrey,
 
There are 2003 terms in the sum, not 1002.
 
OK, I see the problem:

(sqrt(2)-1)^2+(sqrt(2)+1)^2 = 6 = 6*[(sqrt(2)-1]*[sqrt(2)+1]
So some of the 1002 values overlap.

I don't see the solution still, though...
« Last Edit: Nov 26th, 2005, 7:43am by BNC » IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #7 on: Nov 26th, 2005, 8:07am »
Quote Quote Modify Modify

rmsgrey´s last answer is right.
 
« Last Edit: Nov 26th, 2005, 8:08am by pcbouhid » IP Logged

Don´t follow me, I´m lost too.
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
Re: How many values?  
« Reply #8 on: Nov 26th, 2005, 8:10am »
Quote Quote Modify Modify

on Nov 26th, 2005, 8:07am, pcbouhid wrote:
rmsgrey´s last answer is right.
 

 
The reasoning or the result (or both)?
IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #9 on: Nov 26th, 2005, 8:35am »
Quote Quote Modify Modify

Thw answer, certainly. His reasoning is a little bit confusing when he introduces x, y, and z, and extracts some equalities.  
 
If you excuse me, I´ll take a look more closely latter.
IP Logged

Don´t follow me, I´m lost too.
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Re: How many values?  
« Reply #10 on: Nov 27th, 2005, 12:27am »
Quote Quote Modify Modify

I really cannot see a flaw in BNC's reasoning...
 
What would be the answer if instead of 2004 the last index is 6? I get 3 different sums then:
 
ab + ba + ab + ba + ab = 5
aa + ab + bb + ba + ab = 9
aa + aa + ab + bb + bb = 13
 
 Undecided
IP Logged
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2873
Re: How many values?  
« Reply #11 on: Nov 27th, 2005, 8:47am »
Quote Quote Modify Modify

on Nov 26th, 2005, 7:32am, BNC wrote:
rmsgrey,
 
There are 2003 terms in the sum, not 1002.

Good point.
 
I think I'll quit while I'm ahead - on current form, I'll probably just come up with the answer "42" next time...
IP Logged
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2873
Re: How many values?  
« Reply #12 on: Nov 27th, 2005, 9:03am »
Quote Quote Modify Modify

on Nov 26th, 2005, 7:32am, BNC wrote:
OK, I see the problem:

(sqrt(2)-1)^2+(sqrt(2)+1)^2 = 6 = 6*[(sqrt(2)-1]*[sqrt(2)+1]
So some of the 1002 values overlap.


A fair chunk of my first post went to proving that that isn't a problem - replacing 2 terms with 6 changes the total number of terms, so you don't get overlap after all.
 
Despite what I just said, I have had another shot at the problem, and got an answer of 1002 this time -
hidden:
Since the values for S each have a unique set {a, b, c} for the number of times each term appears, any two instances of the same sum must be rearrangements of the terms of each other. So you only need to consider sums where the first c terms are x, followed by a single y, then c z's with the remaining terms y (x...xyz...zy...) (in BNC's analysis, aa=x, bb=z, and y is either ab or ba)
 
So 0<=c<=2003/2 so can take 1002 possible values.

 
In other words, I now agree with BNC
IP Logged
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #13 on: Nov 27th, 2005, 1:35pm »
Quote Quote Modify Modify

nope!
IP Logged

Don´t follow me, I´m lost too.
Eigenray
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 1948
Re: How many values?  
« Reply #14 on: Nov 27th, 2005, 7:15pm »
Quote Quote Modify Modify

I have to agree with BNC, rmsgrey, and Barukh . . . it's definitely 1002:
 
hidden:
Of the 2003 terms in the sum, X of them are aa, another X of them are bb, and 2003-2X of them are either ab or ba.  Then
S = 2003 + 4X,
and 0 <= X <= 1001, so there are no more than 1002 possibilities.  On the other hand, we can take (X+1) a's, then (X+1) b's, following by alternating a's and b's, so all 1002 possibilities are realized:
S = 2003, 2007, 2011, ..., 6007.
IP Logged
SMQ
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 2084
Re: How many values?  
« Reply #15 on: Nov 27th, 2005, 8:45pm »
Quote Quote Modify Modify

on Nov 27th, 2005, 1:35pm, pcbouhid wrote:
nope!

Hmm, you state that with confidence, yet four of the best mathematical minds on this forum appear to disagree with you and agree with one another...this should be interesting. Grin
 
For what it's worth, BNC, rmsgrey, Barukh and Eigenray are demonstrably right.  Consider the following C++ program based on Eigenray's description:
Code:
#include <iostream>
#include <cmath>
using namespace std;
int main() {
 for (int X = 0; X < 1002; ++X) {
 
  double x[2005];
  for(int i = 1; i <= 2004; ++i) {
   if (i <= X + 1) x[i] = sqrt(2.0) - 1.0;
   else if (i <= X * 2 + 2) x[i] = sqrt(2.0) + 1.0;
   else if (i % 2 == 1) x[i] = sqrt(2.0) - 1.0;
   else x[i] = sqrt(2.0) + 1.0;
  }
 
  double S = 0;
  for(int j = 1; j <= 2003; ++j) {
   S += x[j] * x[j+1];
  }
 
  if (X > 0) cout << ", ";
  if (X % 10 == 0) cout << endl;
  cout << S;
 }
 
 cout << endl;
 return 0;
}

 
The outer loop iterates over the 1002 proposed solutions.  The first inner loop generates an array of x[1..2004] which clearly meets the problem statement as each element is set to either sqrt(2)-1 or sqrt(2)+1.  The second inner loop sums the terms, again, clearly according to the prblem statement.  When run this program outputs 1002 distinct integer results: 2003, 2007, ..., 6007, so there are demonstrably at least 1002 unique integer sums.
 
--SMQ
IP Logged

--SMQ

pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #16 on: Nov 28th, 2005, 11:44am »
Quote Quote Modify Modify

As I already said to Icarus, I´m here to learn with you.
 
Please, tell me what´s wrong with this solution:
 
The possible products are:
 
(sqrt(2) - 1) * (sqrt(2) - 1) = 3 - 2*sqrt(2)
 
(sqrt(2) + 1) * (sqrt(2) + 1) = 3 + 2*sqrt(2)
 
(sqrt(2) + 1) * (sqrt(2) - 1) = 1.
 
Suppose we have A products of the first form, B products of the second, and (1002 - A - B) products equal to 1.
 
The sum will be A * (3 - 2*sqrt(2)) + B * (3 + 2*sqrt(2)) + (1002 - A - B) * 1 = 1002 + 2 * (A + B) + 2 * (B - A) * (sqrt(2)).
 
To the sum be an integer value we must have B = A, thus the sum is equal to (1002 + 4*A).
 
Since A vary from 0 to 501 (because A+B can´t be greater than 1002), the sum can result in 502 different integer values
.
IP Logged

Don´t follow me, I´m lost too.
SMQ
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 2084
Re: How many values?  
« Reply #17 on: Nov 28th, 2005, 12:39pm »
Quote Quote Modify Modify

No worries--we're all here to learn!
 
It looks like you made a simple mistake, either in stating the problem or in your soultion; as BNC stated above:
 
on Nov 26th, 2005, 7:32am, BNC wrote:
There are 2003 terms in the sum, not 1002.

If, rather than S = f(1)*f(2) + f(2)*f(3) + ... + f(2003)*f(2004) as stated, S were to = f(1)*f(2) + f(3)*f(4) + ... + f(2003)*f(2004) your solution would indeed be accurate.
 
Hope that clears up all our counfusion! Smiley
 
--SMQ
IP Logged

--SMQ

pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #18 on: Nov 28th, 2005, 2:19pm »
Quote Quote Modify Modify

All I have to do is apologize for my mistake and sorry for the time you wasted. I was only "watching" yours answers, since I already knew "my answer".
 
Indeed, my problem is wrong and the correct one is f(1)*f(2) + f(3)*f(4) + ...
 
Hope you forgive me.
 
IP Logged

Don´t follow me, I´m lost too.
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
Re: How many values?  
« Reply #19 on: Nov 28th, 2005, 2:45pm »
Quote Quote Modify Modify

on Nov 28th, 2005, 2:19pm, pcbouhid wrote:

Hope you forgive me.
 

 
Nothing to forgive... we all make mistakes.
 
I would like to take the chance to thank you for the many new puzzles you posted recentlly. This place is now buzzing with activity!
IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
pcbouhid
Uberpuzzler
*****





   
Email

Gender: male
Posts: 647
Re: How many values?  
« Reply #20 on: Nov 28th, 2005, 3:26pm »
Quote Quote Modify Modify

Should I remove this problem?
 
And tk you for your words.
IP Logged

Don´t follow me, I´m lost too.
BNC
Uberpuzzler
*****





   


Gender: male
Posts: 1732
Re: How many values?  
« Reply #21 on: Nov 28th, 2005, 3:50pm »
Quote Quote Modify Modify

on Nov 28th, 2005, 3:26pm, pcbouhid wrote:
Should I remove this problem?
 
 

 
Not at all. In fact, I, personally,  like the version you posted by mistake better!
IP Logged

How about supercalifragilisticexpialidociouspuzzler [Towr, 2007]
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board