0
$\begingroup$

I have the following algorithm which needs to be expressed more concisely using mathematical symbols and I need help for that.

The algorithm accepts a square matrix and a related set of integers (ids) and returns a real number.

(1) I have a square matrix S of size N x N.

(2) Each row of the matrix has two integers associated with it. $Id_{true}$ and $Id_{obs}$.

(3) V consecutive rows have the same $Id_{true}$. Rows with the same $Id_{true}$ may or may not have same $Id_{obs}$. Thus each $Id_{true}$ is related to V number of $Id_{obs}$.

(4) Let the most frequently occurring id in $\{Id_{obs}\}$ be $Id_f$. Tie is not acceptable. The frequency with which $Id_f$ occurs must be greater than all other Ids frequency.

(5) If $Id_{true}$ == $Id_{f}$, success else failure.

(6) At the end of processing all rows of S, the no of successes is counted and returned as a percentage.

  • 0
    The matrix S does not seem relevant to your algorithm.2011-11-19
  • 0
    I process each row of the matrix....2011-11-19
  • 0
    You are not processing matrix S in any way. What is relevant is the integers associated with each row, but from your description, they have nothing to do with matrix S.2011-11-19
  • 0
    @TsuyoshiIto yes - you are right. That is because I did not explain how the ids are related to the rows...which I thought is irrelevant to mention here.2011-11-19

1 Answers 1