Click here to Skip to main content
15,889,830 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Tiny Encryption Algorithm Help????? Pin
Luc Pattyn27-Jul-09 11:38
sitebuilderLuc Pattyn27-Jul-09 11:38 
Questiondepth first search help.. Pin
neha_rai25-Jul-09 8:00
neha_rai25-Jul-09 8:00 
AnswerRe: depth first search help.. Pin
Abhijit Jana25-Jul-09 10:49
professionalAbhijit Jana25-Jul-09 10:49 
GeneralRe: depth first search help.. Pin
that_dude_tj26-Jul-09 23:22
that_dude_tj26-Jul-09 23:22 
NewsRe: depth first search help.. Pin
Abhijit Jana27-Jul-09 0:56
professionalAbhijit Jana27-Jul-09 0:56 
QuestionMerging Inputs and producting ID number [modified] Pin
ZeroPun24-Jul-09 12:35
ZeroPun24-Jul-09 12:35 
AnswerRe: Merging Inputs and producting ID number Pin
Moreno Airoldi28-Jul-09 23:31
Moreno Airoldi28-Jul-09 23:31 
GeneralRe: Merging Inputs and producting ID number Pin
Leonardo Muzzi7-Aug-09 4:00
Leonardo Muzzi7-Aug-09 4:00 
Good. But maybe you could use smaller and more close numbers to multiply, or else a slight diferent X1 will never pass a threshold, and a very different X4 will always pass.

I think you could do the same with different weights:

long ID = (X1 * W1) + (X2 * W2) + (X3 * W3) + (X4 * W4);


and vary the weights W1, W2, W3 and W4 and the threshold until you get a good result.

As another solution, if your inputs are really 3 numbers, you could just treat them as mathematical three dimentional vectors and calculate the size of the vector, that is, the modulus of the vector. This would be:

double Modulus = Math.Sqrt(X1*X1 + X2*X2 + X3*X3)


You can also add weights in this formula, like X1*X1*W1 and so on. Then you can compare:

if (If Math.Abs(Modulus1 - Modulus2) <= Threshold) ...


Regards,

Leonardo Muzzi

GeneralRe: Merging Inputs and producting ID number [modified] Pin
Moreno Airoldi7-Aug-09 21:57
Moreno Airoldi7-Aug-09 21:57 
GeneralRe: Merging Inputs and producting ID number Pin
Leonardo Muzzi9-Aug-09 17:33
Leonardo Muzzi9-Aug-09 17:33 
GeneralRe: Merging Inputs and producting ID number Pin
Moreno Airoldi9-Aug-09 22:43
Moreno Airoldi9-Aug-09 22:43 
GeneralRe: Merging Inputs and producting ID number Pin
Moreno Airoldi12-Aug-09 1:36
Moreno Airoldi12-Aug-09 1:36 
QuestionHelp! I need a book that describes hash in details. Pin
jibeex22-Jul-09 15:00
jibeex22-Jul-09 15:00 
AnswerRe: Help! I need a book that describes hash in details. Pin
Luc Pattyn22-Jul-09 15:43
sitebuilderLuc Pattyn22-Jul-09 15:43 
QuestionRe: Help! I need a book that describes hash in details. Pin
harold aptroot22-Jul-09 18:23
harold aptroot22-Jul-09 18:23 
AnswerRe: Help! I need a book that describes hash in details. Pin
riced23-Jul-09 5:59
riced23-Jul-09 5:59 
AnswerRe: Help! I need a book that describes hash in details. Pin
jibeex23-Jul-09 23:42
jibeex23-Jul-09 23:42 
GeneralRe: Help! I need a book that describes hash in details. Pin
harold aptroot25-Jul-09 13:39
harold aptroot25-Jul-09 13:39 
QuestionAbout showing the picture in Matlab Pin
Dhyanga18-Jul-09 2:01
Dhyanga18-Jul-09 2:01 
QuestionAbout Masking function in Matlab Pin
Dhyanga18-Jul-09 1:57
Dhyanga18-Jul-09 1:57 
Question[Message Deleted] Pin
deepthi0916-Jul-09 9:44
deepthi0916-Jul-09 9:44 
AnswerRe: urgent help Pin
Luc Pattyn16-Jul-09 10:04
sitebuilderLuc Pattyn16-Jul-09 10:04 
GeneralRe: urgent help Pin
Tim Craig16-Jul-09 18:18
Tim Craig16-Jul-09 18:18 
QuestionOverlapping dates Algorithem Pin
kKamel9-Jul-09 13:37
kKamel9-Jul-09 13:37 
AnswerRe: Overlapping dates Algorithem Pin
Eslam Afifi9-Jul-09 13:58
Eslam Afifi9-Jul-09 13:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.