0
$\begingroup$

If I have two series, both increasing predictably with different initial values, is there any way to determine if the two will have the same value at some point.

For example:

-.7  ..  .2 -.4  ..  .7 -.1  ..  .12  .2  ..  .17  .5  ..  .22 
  • 1
    Char, $n$ow that you've had a good night's sleep, maybe you'd like to edit the body of your question so the numbers are right, and also edit in an answer to the questions raised elsewhere about whether the value that comes up twice has to be all on one line.2012-11-08

2 Answers 2

1

The left part is increasing of $0.3$ at each step. The right part seems to be increasing of $0.5$ but this is an illusion since $0.7+0.5=1.2$ for example and not $0.12$ as you wrote (please correct your question if $1.2$ and so on were wished).

Let's suppose that you wanted $1.2, 1.7,2.2$ at the right then we get :

  • $l(i)=-0.7+0.3\cdot i\quad$ (starting with $i=0$) and :
  • $r(i)=0.2+0.5\cdot i$

Solving $l(i)=r(i)$ will give you $\ i=-\frac 92\ $ so that you'll have to go back between $4$ and $5$ lines to get an intersection. This may be seen in this table with negative integer values of $i$ considered in the previous formulas for $\ l(i), r(i)$ (the 'crossover' is at $\ l\bigl(-\frac 92\bigr)=r\bigl(-\frac 92\bigr)=-2.05$ i.e. the higher line) : \begin{array} {cc} -2.2&-2.3\\ \hline -1.9&-1.8\\ -1.6&-1.3\\ -1.3&-0.8\\ -1.0&-0.3\\ \hline -0.7&+0.2\\ -0.4&+0.7\\ -0.1&+1.2\\ +0.2&+1.7\\ +0.5&+2.2\\ \end{array}

Perhaps not what you hoped but you'll have to clarify your question for yourself first.

1

Your question needs to be clarified in several ways

  1. Notation: What you've presented are two sequences. A series, on the other hand, refers to the sum of a sequence.
  2. Sleep-deprivation-caused typo: I presume your second sequence should have been $0.2,0.7,1.2, 1.7, 2.2$, as Raymond Manzoni already suggested. If that's the case, your two sequences can be written as $l(i) = -0.7+0.3i\text{ and }r(i)=0.2+0.5i$
  3. Your condition "if the two will have the same value at some point" is open to two possible interpretations: (a) there is an index $i$ at which $l(i)=r(i)$. In other words, the $i$-th values of both sequences are the same somewhere, and (b) the sequences have at least two numbers in common, though they might be at different positions in the lists.

Interpretation (a). In this case, you have to solve $-0.7+0.3i=0.2+0.5i$. If you do, you'll find the unique solution $i=9/2$, as Raymond did. Since our sequences are indexed by integers, there's no possible $(5/2)$-th index, so the answer in this interpretation is that there's no $i$ for which $l(i) = r(i)$.

Interpretation (b). This case is more interesting: are there two indices $m, n$ where the sequences have the same values? In other words, can we find integer solutions to $l(m)=r(n)$? Writing the definitions of the two (and multiplying everything by $10$ so I don't have to write so many decimal points) are there integers $m, n$ such that $7+3m=2+5n$, or, after simplifying, can we solve this equation in integers? $ 3m-5n=9 $ This is what is known as a linear diophantine equation and there have been reams of material written on these equations. I'll keep it simple and just concentrate on the particular values here, but the solution techniques apply in general. First, we're lucky to notice that $m=3, n=0$ is an obvious solution to $3m-5n=9$ so we find one solution right off the bat. (Reality check: $l(3)=0.2=r(0)$) Now if we rewrite this equation as $ 5n=3m-9=3(m-3) $ we see immediately that $5n$ must be a multiple of 3 (since the right-hand side is a multiple of 3), and hence $n$ must be a multiple of 3. With this in mind, we write $n=3k$ and have $ 5(3k)=3(m-3)\quad\text{and so, dividing by $3$,}\quad 5k=m-3 $ and so $m=5k-3\text{ and, as we've seen, }n=3k$, so in this particular situation, we have infinitely many solutions $(m, n)=(5k+3, 3k)$. Here are the first four of them: $ \begin{array}{lcccc} \mathbf{k} & 0 & 1 & 2 & 3 \\ \mathbf{m} & 3 & 8 & 13 & 18 \\ \mathbf{n} & 0 & 3 & 6 & 9 \\ \mathbf{l(m)} & 0.2 & 1.7 & 3.2 & 4.7 \\ \mathbf{r(n)} & 0.2 & 1.7 & 3.2 & 4.7 \\ \end{array} $ The full theory of linear diophantine equations is too large to cover here, but it's well worth a look. Sometimes you'll have infinitely many solutions, as we did here, and sometimes you won't have any solutions at all (for $51m-3n=2$, for instance; can you see why?).