How much different are they?
-
Good Day, Is there a mathematical formula/theory that can tell how much different (in numbers or percentage) two objects are? Say, I have 2 files, File A and File B, and the formula can tell how much are they different? Regards, Ian
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
-
Good Day, Is there a mathematical formula/theory that can tell how much different (in numbers or percentage) two objects are? Say, I have 2 files, File A and File B, and the formula can tell how much are they different? Regards, Ian
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
You need some kind of metric by which to measure the difference. For example, length. Text files could differ by the number of different words if you are comparing an original file with a modified one. So you need to specify what, exactly, you imply by "differ".
-
Good Day, Is there a mathematical formula/theory that can tell how much different (in numbers or percentage) two objects are? Say, I have 2 files, File A and File B, and the formula can tell how much are they different? Regards, Ian
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
This may help you: http://en.wikipedia.org/wiki/WinDiff[^]
-
You need some kind of metric by which to measure the difference. For example, length. Text files could differ by the number of different words if you are comparing an original file with a modified one. So you need to specify what, exactly, you imply by "differ".
Well, I will be comparing binary data. A string of 1's and 0's.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
-
This may help you: http://en.wikipedia.org/wiki/WinDiff[^]
Thank you. But I would be comparing binary data. But this is somewhat along the line of what I need.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
-
Thank you. But I would be comparing binary data. But this is somewhat along the line of what I need.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
You still have to define "different". Say file REF holds 99 bytes of data. File APPEND holds the same 99 bytes of data followed by one more byte. File PREFIX holds that same one byte followed by the original 99 bytes. Now these three files are different. How different are they? That is up to you. One would say APPEND is very similar to REF. One could argue PREFIX is completely different, or very similar. Take your pick. And some parsers would object to "very similar"; if REF represents a valid image (say something Image.FromFile understands), then APPEND is not likely to be a valid image (as per Image.FromFile). :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
-
You still have to define "different". Say file REF holds 99 bytes of data. File APPEND holds the same 99 bytes of data followed by one more byte. File PREFIX holds that same one byte followed by the original 99 bytes. Now these three files are different. How different are they? That is up to you. One would say APPEND is very similar to REF. One could argue PREFIX is completely different, or very similar. Take your pick. And some parsers would object to "very similar"; if REF represents a valid image (say something Image.FromFile understands), then APPEND is not likely to be a valid image (as per Image.FromFile). :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
I see. I thought there was a general formula to test for "difference".
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
-
I see. I thought there was a general formula to test for "difference".
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
It depends on what your goal is.
-
It depends on what your goal is.
how about the binary correlation. sum of results where bits equal gives 1 and not equal gives -1 total divided by # bits in file should be useful.
-
how about the binary correlation. sum of results where bits equal gives 1 and not equal gives -1 total divided by # bits in file should be useful.
As I said, it depends what your goal is. If this metric is useful for you, go for it.