# Some help with set and vector notation, please

1. Jul 6, 2013

### wvguy8258

Preface note: the R and Z in the {}s below should be double-struck, but I couldn't figure out how to do that here. I tried the usual shortcuts to no avail.

I am writing pseudo-code for a publication, and am asked to use rigorous math notation, which is new to me.

I am trying to express the following: I have a vector of values called SIMCOMP it is composed of n elements that are real numbers and can be between 0 and +infinity. Does the following accomplish this? Any constructive criticism?

Let SIMCOMP=(SIMCOMP1,SIMCOMP2,…,SIMCOMPn ) be the values in the existing SIMCOMP map for each cell i where {SIMCOMP ∈ R | SIMCOMP ≥ 0}.

I am using boldface to indicate the entire vector. I am unsure whether the entire vector (bolded) belongs in the set builder notation {} or something like SIMCOMPi. More background, the vector is from an existing pixellated map (composed of cells) called SIMCOMP map which has a number of cells equal to n. So, I am representing a 2xmatrix (row,col) by a 1xvector here, that is what some of the verbage means and is apparent in the context of the pub.

ONE MORE QUESTION:

I have separate Initialization and Algorithm sections in the overall pseudo-code. The end product of the algorithm is a vector of integer values 0 or 1. Before I describe how the vector is filled in the Algorithm section, is it best practice to let the reader know that the vector "exists" in a sense, meaning it is there and ready to be filled but no values are currently assigned that have meaning? This is similar to just allocation in computer programming.

If so, does the following accomplish this well? Again, please be brutal. I am outside my field here.

Let SIMCAL= (SIMCAL1,SIMCAL2,…,SIMCALn ) indicate the state of cells in the SIMCAL map to be created where 0 or 1 indicates the absence or presence of transition to developed LULC, respectively, and {SIMCAL ∈ Z | 0 ≤ SIMCAL ≤ 1}.

Last edited: Jul 6, 2013
2. Jul 6, 2013

### HallsofIvy

Your use of the word "vector" confused me for a moment. Your question not about mathematics, but about computer programming. And exactly what notation is used depends upon which language you are using. As far as "pseudo-code" is concerned, there is no standard- you are free to use whatever notation you want, as long as you declare it clearly.

3. Jul 6, 2013

### wvguy8258

"I am writing pseudo-code for a publication, and am asked to use rigorous math notation, which is new to me."

Hi, thanks for the input. I am writing pseudo-code that uses numerical vectors. I was asked to represent these numerical vectors using formal mathematical notation. Computer programs do use vectors that can be described in this way. My pseudo-code is in a sense just a verbal description of program execution, it will be verbal in a way that requires no programming background (e.g. For each iteration i = 1, 2 ,....,n). In a way, the use of the term "pseudo-code" was incorrect on my part. It is more algorithm description, but of an algorithm elemented in a programming language.

4. Jul 6, 2013

### jbunniii

FYI, here is how to typeset $\mathbb{R}$:
Code (Text):
$\mathbb{R}$

5. Jul 6, 2013

### Stephen Tashi

That doesn't explain what you're doing. Modern programming languages allow complicated structures to be defined. It isn't clear whether you have an array of numbers (which you call a (single) vector) or whether you have an array of structures, each one of which could be a "vector".

Doesn't pseudo-code notation allow the standard mathematical notation for arrays like "A[j]" or A[i,j]?

Have you looked in the journal to see examples of pseudo code that the editors approved for publication?

6. Jul 6, 2013

### wvguy8258

It is an array of numbers.

I regret ever using the term pseudo-code to describe a multi-step algorithm. It has completely sidetracked things.

I have looked. This is a GIS journal where this type of work relatively rare (describing the development of a new algorithm). I have not found anything useful. It is an applied journal, and I had to develop something for a specific application.

I am asking about standard notation for vectors of numbers and set building. I assume this is not totally journal dependent. I do not want to read an entire book on set theory in order to get a few sentences correct. I have done my best with what I have found in a day of searching.

Last edited: Jul 6, 2013
7. Jul 7, 2013

### nucl34rgg

It seems like what you are describing is just a particular vector -- let's call it $\mathbf x$ for simplicity -- $\mathbf x = \left({x_1, x_2, \ldots, x_n}\right)$ in $\mathbb{R^n}$ where ${x_i} \in [0,\infty)$.

To answer your second question, the components of the bold simcal vector are elements of the set {0,1}. So you would write that an arbitrary indexed component is an element of {0,1}. For example, ${x_i} \in \left\{0,1\right\}$.

The "set builder notation" you are using in your final statement does not make sense. Think of the curly braces as literally listing the set. What you mean to say is that the components of your simcal vector are elements from the set {0,1}.

There are many different notations used for vectors depending on what field you are in. http://en.wikipedia.org/wiki/Vector_notation
http://www.proofwiki.org/wiki/Definition:Vector_Notation

Last edited: Jul 7, 2013