Turn a sequence of one's and negative one's into a set of coordinates (complex numbers)

32 Views Asked by At

I was talking with my math professor about complex numbers and he said there is a really easy way to use complex numbers to change a sequence of one's and minus one's into a set of coordinates. In these coordinates, minus one means a turn to the right and one means a turn to the left. His hint was to note that multiplying with complex $i$ means a counter clockwise turn, while a turn to the is the same as multiplying with $-i$ is the same as turning clockwise.

E.g. the sequence $(1, 1, -1)$ would include the coordinates $(0, 0)$ and $(0, 1)$ given: $$ (0, 0) \to (0, 1) \to (1, 1) \to (0, 1) \to (0,2) $$

Any tips on how this works? Thanks in advance

1

There are 1 best solutions below

0
On

What I think you're trying to do is akin to mapping the path of someone who takes either one step to the left of the direction they're facing or to the right, which is nothing but a composition of translation maps.

I don't like my method. I hope you can make a better algorithm or improve mine.

I thought of the direction it is facing as a complex no. where $1$ is in the direction of the positive reals, $-1$ is in the direction of the negative reals, $i$ is in the direction of positive complex and $-i$ is in the direction of negative complex.

  1. Observe that, if you move in the direction of say the positive reals, then you can only move in the direction of the positive or the negative complex, as only left or right is allowed.
  2. Observe that multiplying by $i$ has the same effect as taking a left from your current direction. For example: If you are moving in the negative reals direction, i.e. $-1$, then taking a left is equivalent to moving in $-1*i=-i$ which is the negative complex direction.

So say you had a sequence $\langle x_n\rangle=1,-1,1,1,1,-1,-1,1,-1,1,-1,..$

You can generate a sequence of complex numbers given by the recurrence relation

$z_n=z_{n-1}*x_n*i\ \forall n\geq2$ and $ z_1=i*x_1$

So, $z_1 =i, z_2=i*-1*i=1, z_3=1*1*i=i,...$

$\langle z_n\rangle=i,1,i,-1,-i,-1,i,-1,i..$

Then, we have $y_n =z_0+\sum_{k=1}^{n}z_k $ is our position at the $n^{th}$ step, where $z_0$ is our intial position.

So, if we start from $0$ in the complex plane facing in the direction of the positive real axis we move to $y_1=i$

then to $y_2=i+1$

then to $y_3=i+1+i=1+2i$

and so on...

So in $\mathbb{R^2} $ we have $(0,0)\to(0,1)\to(1,1)\to(1,2)\to(0,2)\to(0,1)\to(-1,1)\to...$ and so on