# Basic operations on sequences (conventional notation)

1. Mar 19, 2012

### azal

Hi All,

So here's my question:

Suppose we have two sets $A$ and $B$, then $A \setminus B$ denotes their set-difference.
Does there exist an equivalent operator for the case where A and B are not sets, but sequences?

Otherwise, is there an operator to convert a sequence into a set, removing the index, and all repetitions? In that case, I can take my sequences, convert them to their corresponding sets, and use $\setminus$ to get the result I'm looking for.

Also, what is the counterpart of $A \cup \{b\}$ for the case where $A$ is a sequence? is it $A \oplus b$?

I can't seem to find such conventions regarding sequences anywhere on the web ...

Thanks so much for your help,

-A.

2. Mar 19, 2012

### Stephen Tashi

You aren't being specific enough abou what operation you want. For example,
if A = 1,2,3,4,5 and B = 1,3,3,4,6 what do you want "the equivalent operator" to do? Produce the sequence 1-1,2-3,3-3,4-4,5-6 = 0,-1,0,0,-1 ? Or produce the sequence 2,3,5,6 ? Or produce the sequence 2,6 ?

Some authors use the notation A - B to mean term-by-term subtraction. For more elaborate operations, I don't think there is any standard notation. If you are writing a paper on this specialized subject, look in the related literature and see what people have invented. (And don't feel obligated to use it!)

3. Mar 19, 2012

### azal

So, assume the operator $f$ takes a sequence, and returns its elements as a set (without repetitions). For example if $\mathbf{a} = (1,1,2,1,3,2)$ then $f(\mathbf{a}) = \{1,2,3\}$.

Now suppose we have a pair of sequences $\mathbf {a} = (a_1,a_2,\cdots,a_n)$ and $\mathbf {b} = (b_1,b_2,\cdots,b_m)$. I want $\mathbf {a}-\mathbf {b}:= f(\mathbf {a})\setminus f(\mathbf{b})$.

4. Mar 19, 2012

### azal

So in your example I want the operator to produce: $\{1,2,3,4,5\} \setminus \{1,3,4,6\} = \{2,5\}.$