0
$\begingroup$

Is defined in Wikipedia http://en.wikipedia.org/wiki/Taxicab_geometry

But I saw it as another way of calculating it for vectors and similar

$$d = \mathrm{num}_1 + \mathrm{num}_2 - 2 \times \mathrm{intersect}$$

  • $d$= distance
  • $\mathrm{num}_1$ = number of values in left vector
  • $\mathrm{num}_2$ = number of values in right vector
  • $\mathrm{intersect}$ = intersection number of overlapping values

Is this right ? and how the equation becomes ?

  • 0
    What is the "number of values" in a vector? And what is the "intersection number of overlapping values"?2012-03-29
  • 1
    It is not clear what you do. I would like it if you work out an example using your formula here. So, we'll all understand what `num1`, `num2` and `intersect` mean.2012-03-29
  • 0
    We can consider vector as a SET , so num1 = total numbers in the set1 ,2012-03-29
  • 0
    I not dealing with points , but numbers in a sets. I want to compare the sets to each others to find show similar they are2012-03-29
  • 0
    What does your formula give as the distance between $(0,1)$ and $(10,11)$? As I read it, $num_1 = num_2 = 2$, since both vectors are of length 2. The intersection (as sets) is empty, so we get a distance of 4, which is incorrect. What am I misunderstanding?2012-03-29
  • 0
    @AndréNicolas Intersect is the symmetric difference2012-03-29
  • 0
    @AustinMohr We don't have points , only numbers2012-03-29
  • 1
    @tnaser: You seem to be considering the size of the *symmetric difference* $A\Delta B$. You might want to look up *Hamming distance*, which is close in spirit, and has a taxicab distance character. And intersection is quite different from symmetric difference.2012-03-29

1 Answers 1

1

I think we've clarified that you are suggesting defining the distance between two finite sets $A$ and $B$ to be the number of elements of $A$, plus the number of elements of $B$, minus twice the number of elements in the symmetric difference of $A$ and $B$. But this would make lots of distances negative. E.g., if $A=\{{1,2,3\}}$ and $B=\{{4,5\}}$ then since $A$ and $B$ are disjoint their symmetric difference is their union and your formula gives $3+2-2\times5$ which is negative 5.

If I've misinterpreted what you propose to do, I suggest that instead of adding to the trail of comments you edit your question so it asks what you really want to ask.

  • 0
    There was a mapping in the programming which made the confusion , question answered . thanks2012-03-30