|
The question as you have posed it is nonsense. There are an infinite number of solutions. For example, I guess this is not useful, but the formula f(n) defined by:
f(6789542137) = 53426
f(7274707623) = 13890
f(7608909976) = 21097
f(7866018419) = 46204
f(8185833863) = 59982
f(8052724826) = 68535
f(n) = 0 for all other n
actually answers your question.
Perhaps you could explain what you are trying to do?
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
why is it assumed that f(n) = 0 for all other n
|
|
|
|
|
Because based on the finite sample population he posted, it is a valid assumption.
"If only God would give me some clear sign! Like making a large deposit in my name in a Swiss bank."
|
|
|
|
|
But he has just given you few samples of input and output of a function.
all the remaining output cannot be assumed to be zero
what you are saying is this:
if i say
f(100) = 10
f(81) = 9
f(64) = 8
f(49) = 7
f(36) = 6
f(25) = 5
here its a simple example in which output is just square root of input
now based on your assumption
f(n) = 0, does that mean square root of all remaining numbers are zero
|
|
|
|
|
f(100) = 10
f(81) = 9
f(64) = 8
f(49) = 7
f(36) = 6
f(25) = 5
f(n) = 0 for all other n values
It is a perfect legal (and admittely beautiful) function. It satisfies all your requirements until you don't specify the 'square root' one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
okay you can take any other example....this was just to prove the point....
|
|
|
|
|
You didn't prove the point and without further requirements the OP's request is pointless.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
He provides a finite sample of 6 data points. The function he provided describes them perfectly. If the sample size is 6, then all others must be zero. There's nothing wrong with it and it's a perfect fit to the data.
"If only God would give me some clear sign! Like making a large deposit in my name in a Swiss bank."
|
|
|
|
|
he never says the sample size is 6 he just gave you 6 to you because he cannot go on posting all samples
|
|
|
|
|
Cosmic Egg wrote: he never says the sample size is 6 he just gave you 6 to you because he cannot go on posting all samples
...and the function fits the finite sample. The function fits the observed data: any other (unknown) points are irrelevant and can therefore be set to zero. Adding additional points will change the function, obviously, so that if f(7) were defined, then setting f(n>7) = 0 would fit the new data.
"If only God would give me some clear sign! Like making a large deposit in my name in a Swiss bank."
|
|
|
|
|
73Zeppelin wrote: If the sample size is 6, then all others must be zero
That's extraordinarily poor logic. There are six known values; that's no reason to extrapolate all other values to zero. It just means we only know 6 of them; unless a pattern can be derived from the known samples, we know nothing about the other possible values.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: That's extraordinarily poor logic. There are six known values; that's no reason to extrapolate all other values to zero. It just means we only know 6 of them; unless a pattern can be derived from the known samples, we know nothing about the other possible values.
It's a discretization of the available data. If he's trying to fit six observations of the sample population, then setting the remaining data to zero is completely acceptable. That's not to say we assume the rest of the data is zero, but that we are fitting only to the points that we know.
|
|
|
|
|
This question reminds me of the hollywood movie "Beautiful Mind".
|
|
|
|
|
You call the right-hand value a checksum. Why not assume that's what it really is? Checksums are performed on blocks of data, usually of a fixed size, in bit-wise fashion. That is, each character is loaded into a shift register, then the bits are shifted out and summed. Checksums originated with serial data communications, wherein a block of data was shifted out to the communications media and the bits summed as it was transmitted. The total of the checksum was tacked on to the end of each message and sent. At the receiving end the message was serially loaded into a register while the bits were summed. The total value of the sum was then compared to the last block of data sent, which was the checksum calculated by the sender. If they matched, the message was assumed good; if not, a NACK was returned to the sender, and the sender retransmitted.
Convert your data into binary - an 8-bit character is probably acceptable, unless you assume Unicode was used. Pad the higher-order bits with zeroes and sum the bits. Convert the result back into decimal and look for the checksum. This method may take a while, as checksums were used on fixed block sizes and you don't know what size was used. Note, too, that this only applies to text data. Real numbers encoded using IEEE standards or other methods may convert differently.
Without a lot more information about the problem domain it's impossible to suggest anything short of brute force decryption.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
|
1. It depends on the data type. If ASCII, a 6 would become 00100100; if straight binary, 6 = 00000110. It might also be that the entire number is one encoded value, which a straight decimal to binary converter will give you. That's why I say the problem is not well enough defined to solve easily. If the source is text data, the ASCII format is likely, if it's a simple device using an 8-bit processor that is producing this data, the 8-bit straight binary is possible. If it's something else, like stolen launch codes for Italy's secret intercontinental wine bottle launch system, then the whole number might be a single value that needs to be converted. There's no way to tell from the question.
2. If I knew how to do that I'd be making a whole lot more money cracking financial data streams for the IRS. Read a book on encrytion/decrytion methods and pick one. Bruce Schneier's Applied Cryptography is a good introduction.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hello
is any one knows if there is a library in the .net deals with "math union and intersection"
and thanks for all
|
|
|
|
|
Theres a bunch of extension methods on Hashset (framework 3+) that do this. Nice for smaller things, probably not overly optimised for larger sets.
|
|
|
|
|
As the other poster says these are available in .NET 3.5. If you're still on .NET 2.0/3.0 then try the PowerCollections[^] library.
Kevin
|
|
|
|
|
I know that setting the denominators to zero will give me critical numbers, but from there on out I'm confused how to find anymore
equation given is:
3x ......... x
---- <= ----- + 3
x-1 .... x+4
now I know that my two critcal numbers are 1 and -4, so my intervals right now are from (-infinity, -4] U [-4, 1), but after putting in any number [6, inifinity) the statement holds true. How is 6 a critical number?
Thanks in advance.
modified on Thursday, October 9, 2008 11:09 AM
|
|
|
|
|
The critical number is just a point (not an interval), in this case 6 isn't a critical point...
Aside from the critical points, it's not clear what you are trying to find. Are you trying to find the intervals on which the function is differentiable?
“It is better to fail in originality than to succeed in imitation.”
|
|
|
|
|
73Zeppelin wrote: Aside from the critical points, it's not clear what you are trying to find.
No, it is not clear.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
yeah, i'm looking for the intervals
the intervals i got were (-infinity, -4)U(-4, 2)U[6,infinity)
correct?
|
|
|
|
|
Why 6?
“It is better to fail in originality than to succeed in imitation.”
|
|
|
|
|
I wonder that as well. When x is greater than or equal to 6, the inequality does hold true. Not sure if the OP is aware of this or what. There is only two critical values, the two zeroes ( x=-4, x =1 )...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|