Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Hi I am learning about Barker sequence. I have a problem, because I do not know, why for example 5, in Barker Code looks like this: +++-+. What is the base of this code. I am looking for some algorithm, because, I do not want to learn by hearth.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You should look at wikipedia.

There you will find the definition: "A Barker code is a sequence of N values of +1 and −1, $a_j$ for $j= 1, 2, ..., N$ such that

$$|\sum_{j=1}^{N-v} a_ja_{j+v}| \le 1$$

for all $1 \le v < N$."

The Barker code for 3 is given by $+1$ $+1$ $-1$, i.e $a_1 = +1$, $a_2 = +1$, $a_3 = -1$. Here you can check that the definition works: if $v = 1$ you have that

$$|\sum_{j=1}^{3-1} a_ja_{j+1}| = |\sum_{j=1}^{2} a_ja_{j+1}| = | a_1a_2 + a_2a_3| = |1\cdot 1 + 1 \cdot (-1)| = 0 \le 1$$

And for $v = 2$ you have:

$$|\sum_{j=1}^{3-2} a_ja_{j+2}| = |a_1a_3| = |1\cdot (-1)| \le 1$$

Hence $+1$ $+1$ $-1$ is a correct Barker code for $3$.

So in Barker code, 5 is given by the sequence $+1$ $+1$ $+1$ $−1$ $+1$. This is just a sequence of numbers that works given your definition. You can check this by computing the 4 sums.

share|improve this answer

As milcak said $1,1,1,-1,1$ satisfies the definition. You can also verify that the reversal of the sequence also works and the sequence obtained by multiplying the entire sequence by $-1$ also works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.