|
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
|
|
|
|
|
Paul Conrad wrote: 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 )...
Yeah, I'm just trying to get an idea about what exactly he wants to know!
But yes, there's only two critical points.
The whole expression factors down to:
(x-6)(x+2) >= 0
So that's where the 6 comes from. Looks like he's right with the intervals (if that's what he's looking for...)
“It is better to fail in originality than to succeed in imitation.”
modified on Friday, October 10, 2008 5:27 AM
|
|
|
|
|
I don't know what your exact definition of critical number is, but the key breakpoints for this function are the two poles x=1 and x=-4, and the two solutions of the equality which are x=-2 and x=6.
As the inequality is true for very large positive and negative x, it is true for
(-inf, -4]
[-2, 1]
[6, inf)
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."
|
|
|
|
|
|
Cool.
Kevin
|
|
|
|
|
Hi,
I have a variable amount of participants.
Each participant needs to talk to another participant in a minimal amount of total rounds.
Of all the tables (2 seats per table) there's 1 with a digital camera, which records the conversation (educational purposes).
Every participant must be placed (at least once) at the camera-table.
It's quite easy to build a list ofunique combinations of participant-pairs.
But how do I continue?. Because of my lack of knowledge I can't seem to solve this puzzle.
Do I need some sort of algorithm for this? If so, can you point me in the right direction?
Participants:
P1,P2,P3,P4,P5,P6
Round1 Round2 Round3 Round4 Round5
P1-P2 P2-P3 etc..
P3-P5 P1-P6
P4-P6 P5-P4
Help appreciated.
modified on Monday, October 6, 2008 2:07 PM
|
|
|
|
|
Take your list of unique combinations, and assign one combination each round to the digital-camera table.
At each round, prefer assigning a combination to the digital-camera table where neither participant in that combination has been to the digital-camera table yet.
|
|
|
|
|
Thanks for sharing your thoughts wit me on this.
Apart from the fact that pairs have to sit at 'camera'-position at least once, I already run into problems with the arrangement of pairs in general. This is what happens when I let the 'normal' logic do it's job with (only) 6 participants:
NOTE. Not taking in account the digital camera position.
Generated:
R1____R2____R3____R4____R5___R6____R7
P2-P1,P3-P1,P4-P1,P5-P1,P6-P1,P5-P3,P6-P3
P4-P3,P4-P2,P3-P2,P6-P2,P5-P2,P6-P4,P5-P4
P6-P5
Though, it can be doen in 5 rounds:
R1____R2____R3____R4____R5___R6____R7
P2-P1,P5-P1,P3-P1,P4-P1,P1-P6,-----,-----
P4-P3,P4-P2,P5-P2,P2-P6,P2-P3,-----,-----
P6-P5,P3-P6,P4-P6,P3-P5,P4-P5,-----,-----
(Rx = Round, Px = Participant)
I have no idea how to translate the logic of the bottom grid. For participants < 10 I can probable find a (workaround) way, but the software is intended for larger groups (up to 50).
The steps I think I have to make:
1. Create general arrangement for pairs per round. But how do I arrange them in a minimal amount of total rounds??
2. Assign table-number to pairs.
Do you have an anwser for step #1?
Again, thanks for your help!
P.S. Sorry for the poorly drawn grid-mockup, I hope it clarifies my problem.
|
|
|
|
|
1. Arrange the tables in a row
2. One participant stays fixed at an end table
3. For each round, every participant except the fixed one rotates position around the tables.
For 4 participants:
2 3 => 3 4 => 4 2
1 4 1 2 1 3
For 6 participants:
2 3 5 => 3 5 6 => 5 6 4 => 6 4 2 => 4 2 3
1 4 6 1 2 4 1 3 2 1 5 3 1 6 5
|
|
|
|
|
Wow, that certainly looks like a solution what might do the trick.
I have no clue for now, how to implement this in c#, but it's certainly worthwhile investigating.
Excellent help. Thanks!!
|
|
|
|
|
Help, I'm stuck again.
Your solution works like a charm. I've written a custom class with 2 Arrays and a rotate function. The rotate function shifts the value positions within the Arrays, except for position 1 in Array 1.
I'm walking into problems when I have certain criteria conditions per round(s).
For example:
Round 1-3, participants with the same hair-color have to meet. If there's no match assign random participant.
Round 4-6, participants with the same eye-color have to meet. If there's no match assign random participant.
I can fill in round 1-3... it's still a struggle though. For each matching hair-type I've created a 'rolling-table' and on the empty places I assign a random participant (from collection of non-matches). After all the rollingtables have finished, I make a rolling-table of the left-overs (non-match collection) and process them as well.
The problem is that I don't know how to continue. Some particpants could have matching hair-color as well as eye color. How do avoid fall-out because of double matching?
When P1 and P2 have brown hair and grey eyes, the could have met during round 1-3, If they did they should not meet again. But there're other Participants with grey-eyes that will have to meet with P1 and P2....
I'm thinking about this for the last couple of days and can't solve this. Much respect rewarded for solving this.
Thanks!
|
|
|
|
|