2

I am looking for the appropriate mathematical notation that will represent this code.

for(X = 0; X < ACA_Bin.size; X++) {
   ACA_CORRECTION[X] = ACA_Bin[X] + ACA_OFFSET
}

This is not a summation or product that would require a Sigma Notation

So is there an assignment Notation?

Thank You

Jean Marie
  • 81,803
MoMan
  • 45

3 Answers3

3

Common mathematical prose has no concept of assignment. Instead of "assigning" something to a variable, you just define things by explaining enough of their properties to make it clear which thing you're describing

Now let $\mathit{Correction}$ be the function [or vector or whatever] defined by $$ \mathit{Correction}(i) = \mathit{Bin}(i) + \mathit{offset} \qquad \text{for all relevant }i $$ ...

This is a perfectly good definition -- the only requirement is that the reader can convince himself that there is one and only one thing that satisfies the condition you're giving.

(Of course, depending on the notation you otherwise use to represent the things in your code, you might want to write $\mathit{Correction}_{\,i} = \mathit{Bin}_{\,i} + \mathit{offset}$ instead. That doesn't change the general principle).

0

$N\leftarrow $ ACA_Bin.size

for $x=0..N$

ACA_CORRECTION[X] $\leftarrow$ ACA_BIN[x] + ACA_OFFSET

It's convention to use an arrow where the head of the arrow points at the object being assigned to.

mm8511
  • 871
0

Using the symbol $\mathit{Id}$ for the identity vector, how about $$\mathit{ACA\_CORRECTION} := \mathit{ACA\_Bin}+\mathit{ACA\_OFFSET}\cdot \mathit{Id}\textrm{ ?}$$

Steve Kass
  • 14,881