permutations of elements of vector I'm trying to find a simple representation of a set I can describe with words, but not mathematically...  probably a simple question..
Consider some two-element vector $q=(q_1,q_2)$.  
How can I define a function $\mathcal{P}(q)$ that takes in a vector $q$ and returns the set of unique permutations of $\{\pm q_1,\pm q_2\}$, where $q_1$ and $q_2$ are positive integers?
So if $q=(1,0)$, I want $\mathcal{P}(q)=\{(1,0),(-1,0),(0,1),(0,-1)\}$.
If $q=(2,1)$, I want $\mathcal{P}(q)=\{(2,1),(-2,1),(2,-1),(-2,-1),(1,2),(1,-2),(1,-2),(-1,-2)\}$, etc.
 A: It's not at all a simple question, and is in fact quite fertile with pretty contemporary research.
Permuting entries and possibly multiplying them by $-1$ is really a very natural thing for a group to do, and consequently the language of groups is the most natural way to express such a thing.
First, we'll need a bunch of (eight) linear transformations that correspond to symmetries of a square; call this group $B_2$ for mysterious reasons. This group consists of matrices like $$\begin{bmatrix}0&1\\1&0\end{bmatrix},$$ which switches the $x$- and $y$-coordinates by reflecting across the line $y = x$, and $$\begin{bmatrix}1&0\\0&-1\end{bmatrix},$$ which sends a point $(x, y)$ to $(x, -y)$ by reflecting across the $x$-axis.
With all of this in place, we can give a really compact definition, essentially given by Fomin and Reading in their lecture notes Root Systems and Generalized Associahedra.
Given any point $q$ the set of vectors you're after is just the orbit of $q$ under the action of $B_2$! In symbols, it's the set $\{T(q): T \in B_2\}$.
What's neat about this approach is that it generalizes in really interesting ways. This is because $n$-dimensional cubes always have a group of symmetries that we can write down as linear transformations, and we can always let them act on an $n$-dimensional vector and see what happens after all the transformations have had a turn.
With a good choice of starting vector $q$ in $\Bbb R^3$, we get this beauty

(image from Stefan Forcey's website), which is combinatorially equivalent to a truncated cuboctahedron, an Archimedean Solid. Its mysterious name is the type $B_3$ permutohedron.

I realize this may not have been the answer you were expecting. In my opinion, it's because you've allowed a fairly complicated group to do the acting. If you were just permuting coordinates, it would be easier to write down in a pretty self-contained way (obtaining the classical, or type A, permutohedra), using permutations and the symmetric group. 
For the set you want, let $[n]$ be shorthand for the set $\{1, 2, \ldots, n\}$ (it's frankly too much work to write down and not generalize to higher dimensions! Just use $n = 2$ in two dimensions). We'll need 


*

*the set $S_n$ of permutations $\sigma: [n] \to [n]$, 

*the set $F$ of all functions $f: [n] \to \{1, -1\}$, and finally

*the notation $q_i$ to mean the $i$th component of your point $q$.
Then your set of points would be
$$\Big\{\big( f(1)q_{\sigma(1)}, f(2)q_{\sigma(2)}, \ldots, f(n)q_{\sigma(n)} \big) : f \in F, \sigma \in S_n\Big\}.$$
It looks awful, and now you see why I've hidden it at the end here!
A: Yes there is . For each element there are $2$ ways  $+$ and $-$ respectively  so for $n$ elements there are $2^n$ thus tgese are total number of unique combinations but as you have edited n different terms can be arranged in $n!$ ways so total ways are $n!.2^n$ and if terms are repeating ie $|x|$ is same then its $\frac{n!}{p!}2^n$
