1
$\begingroup$

I have an input array of line segments $(a,b)_1 ... (a,b)_n$. Let's call it $S$ so $(a,b)_{S_1} ... (a,b)_{S_n}$.

I have another array of the same construct, let's call it $I$, so $a,b)_{I_1} ... (a,b)_{I_n}$.

I wish to mathematically express the shortest distance of each of $I$ against $S$. In other words, the matrix formed from the product of $I\ S$. To be very clear, each $I$ is compared to each $S$. I want the minimum.

I know $\|(a,b)_{I_k}-(a,b)_{S_k}\|$ denotes distance. How do I represent the matrix formed and indicate the Min of the cells?

  • 0
    You say line segments, but only give $(a,b)$. How do you define the distance between two line segments, btw? What exactly do you mean by "indicate"?2010-12-28
  • 0
    The line segments are in 1D. a = point 1, b = point 2. a <= b. The distance is the distance between the closest two points (of I and S) when the segments don't intersect, otherwise it's 0.2010-12-28
  • 0
    "Indicate" = mathematically denote.2010-12-28

1 Answers 1

2

Denote $(a,b)_{S_i}$ by $S_i$ and $(a,b)_{I_k}$ by $I_k$.

Distance between $i^{th}$ line segment of $S$ and $j^{th}$ segment of $I$ is $|| (S_i,\ I_j) ||$.

You can now denote the minimum by

$$ \text{min}_{1 \le i \le n,1 \le j \le n} \{|| (S_i,\ I_j)||\}$$

Or you can denote the matrix by

$M_{ij} = || (S_i,\ I_j)||$ and the min by

$$ \text{min}_{1 \le i \le n,1 \le j \le n} \{ M_{ij} \}$$

Does this help?

  • 0
    Yes, that helps, thanks. Just to ensure I get it 100%, (...) denotes matrix and ||...|| denotes distance, right?2010-12-28
  • 0
    @IanC: The notation varies. Here I didn't intend the (...) to mean matrix at all. It is just a pair. ||..|| is usually used to denote something called a norm, which corresponds with distance in many cases. Here, the matrix is $M$, whose element of the $i^{th}$ row and $j^{th}$ column is $M_{ij}$.2010-12-28
  • 0
    I mean in your first example (where you don't indicate M), what specifically tells us this is a matrix? In other words, how do we know this just isn't simply the distance between S_i and I_j?2010-12-28
  • 0
    @Ianc. It does not. ||(S_i, I_j)|| is simply the distance between S_i and I_j. The matrix first appears with the word matrix and $M_{ij}$ defines the entries.2010-12-28
  • 0
    Bear with me please. the line "min_12010-12-28
  • 0
    @Ianc: It only seems to be that way because i and j both run through 1 to n. We could as well use that notation for saying min_{i is prime and j is composite}. If you want a specific notation for matrix, I believe [...] can be used.2010-12-28
  • 0
    Right. So I could say "min_12010-12-28
  • 0
    @Ianc: No. The stuff inside the min represents a single number, not a matrix. || [S_i, I_j] || does not make too much sense as you have not defined what S_i, I_j means. You could probably just say min [ ||(S_i, I_j)|| ]_n. Though I am not too confident of that notation being standard.2010-12-28
  • 0
    I'm going with min1≤i≤n,1≤j≤n{||(Si, Ij)||}2010-12-28