0

[] is used in most programming languages to define a variable as an array. In a mathematical formula, is it fine to indicate the symbol I am using is an array, if yes how can I achieve it?

For that reason, could I use [] next to a symbol definition or should I use symbols without using any []?


For example:


$N$: Data files used by job $j$: $N = \{n_{1},n_{2},\dotsc,n_{\lvert N\rvert}\}$
$A^{}_{{\!N}}[\,]$ : Array of required run time to store data files in $N$.

I refer to

$A^{}_{{\!N}} = \{a^{}_{{1}},a^{}_{{2}},\dotsc,a^{}_{{\lvert N\rvert}}\}$ as $A[]$.

$C(A_N[]) = \sum_{n \in N}{A_n}$

alper
  • 101
  • 4
    As long as you define it first I don’t see a problem. – insipidintegrator Oct 15 '22 at 12:11
  • 3
    I don't understand your notation. What are your indices inside the array? The $n_0, \cdots, n_N$ I mean. And surely you don't mean to sum over $A_n$, whatever that means, in the final sum? Did you mean $a_n$? Something else? – lulu Oct 15 '22 at 12:13
  • 2
    Is $A[]$ an array or is it a function on an array? (or both?) – lulu Oct 15 '22 at 12:15
  • 2
    I think it might clarify things if you were to give a clear, consistent example of the sort of definition(s) you'd like to make. Be as detailed as possible. As a general rule, it's fine to introduce notation but unless it is universally familiar it is necessary to explain clearly what your notation means. – lulu Oct 15 '22 at 12:18
  • 2
    For what its worth, it is more common in mathematics to refer to it as a sequence rather than an array... and to refer to it as $A_N$ or as $(A_N)$ or similar. That being said, there is a common enough overlap between programmers and mathematicians that most people would be fine understanding your notation that it probably shouldn't matter. Your indices could use some work though... I would much sooner have them labeled $a_0,a_1,a_2,\dots,a_N$ – JMoravitz Oct 15 '22 at 12:21
  • @lulu I updated my quation hoping it will be clearer. A[] is an array, but its each item refers to a different object. Like $A_1$ is data-1’s value, $A_2$ is data-2’s value and so on. Its indices are 0,1,2,3 …N. – alper Oct 15 '22 at 12:47
  • Still not clear. As I asked before, are the $A_n$ the same as the $a_n$? – lulu Oct 15 '22 at 12:54
  • Some scholars (including myself) use $f(x)$ to define a function of a continuous variable and $f[x]$ to define a function of a discrete variable, but this is not a universal convention. – David G. Stork Oct 15 '22 at 13:20
  • @lulu I am sorry for not being clear, I think I am kind of lost in representing what I think as a programmer in a correct mathematical perspective. I was trying to represent the iteration on the array that I refer as $A_N$. Hoping to say that A_{n_{1}} is (data_1’s value), A_{n_{2}} is (data_2’s value) … But I am not sure how should I refer it inside the sum notation as : $\sum_{n \in N}{a_n}$ or $\sum_{n \in N}{A_n}$. – alper Oct 15 '22 at 13:31
  • 1
    As JMoravitz already said: $\sum_{n \in N}{a_n}$ is perfect. In a math paper we don't need [] because you want it to be read by humans and presumably not by a compiler. – Kurt G. Oct 15 '22 at 15:17

0 Answers0