Re: question about the 'loves' algorithm



In article <451bd827$1@cs1>, Jeroen <no_mail@xxxxxxxxx> wrote:
The Qurqirish Dragon wrote:
Jeroen wrote:

Hi all,

I have a somewhat practical and maybe silly question about the 'loves'
algorithm. Let me explain first what the algorithm is. Suppose your name
is John, and you like a girl named Jane. You can calculate the chance
that a relationship would work (but don't take the outcome too
seriously). For each character in the word 'loves', count the total
number of occurences in both names 'John' and 'Jane' (you can also take
full names...). Then start adding subsequent digits until a 2 digit
number is obtained, which is the outcome. So we have:

John L O V E S Jane

start 0 1 0 1 0 (only 1 'o' and 1 'e' in both names)
step 1 1 1 1 1
step 2 2 2 2
step 3 4 4 -> 44 % success rate for a relationship


For some combinations of names, the number of digits seems to grow
infinitely. My own name with that of a girl I happen to like grows to
more than 1e6 digits in 66 iterations.

The question is: is there some way of determing that the number of
digits will grow infinitely, based on the starting digits? Or will every
combination of names eventually break down to a 2 digit number? I have
no idea :-)

Jeroen


Some clarification is needed:
Let's assume the two people are "Lovey" and "Dovey":

start: 1 2 2 2 0
step 1: 3 4 4 2
step 2: 7 8 6

is step 3:
1 5 1 4
15 14
1 6 4 (carry the 1 from the 14 into the 15)

or something else?
The way sums larger than 9 are handled will definitely have an impact
on the result (if it ever terminates!)


Each step only handles single digits of the previous result (each
sum-results must be written down as separate digits if > 9), so it is
from step 2:

7 8 6
1 5 1 4
6 6 5
1 2 1 1
3 3 2
6 5

Jeroen

OK, suppose at some step your result consists of n 9's with
n > 3.
Next step is 2n-2 digits, consisting of n-1 repetitions of 1 8.
Next step is 2n-3 9's. Since 2n-3 > n, it grows indefinitely.

Robert Israel israel@xxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.



Relevant Pages

  • Re: question about the loves algorithm
    ... I have a somewhat practical and maybe silly question about the 'loves' ... Let me explain first what the algorithm is. ... the number of digits seems to grow ... causes growth by the 6's case. ...
    (sci.math)
  • Re: question about the loves algorithm
    ... I have a somewhat practical and maybe silly question about the 'loves' ... Let me explain first what the algorithm is. ... and you like a girl named Jane. ... the number of digits seems to grow ...
    (sci.math)
  • Re: question about the loves algorithm
    ... I have a somewhat practical and maybe silly question about the 'loves' ... Let me explain first what the algorithm is. ... the number of digits seems to grow ... causes growth by the 6's case. ...
    (sci.math)
  • Re: Larger field than thought?
    ... I need to generate automated account numbers for a new ... As I see it, I can change the above routine to check for 4 digits, instead ... Some form of loop to go through all parts in the database ... John W. Vinson/MVP ...
    (microsoft.public.access.tablesdbdesign)
  • Re: question about the loves algorithm
    ... I have a somewhat practical and maybe silly question about the 'loves' ... Let me explain first what the algorithm is. ... and you like a girl named Jane. ... the number of digits seems to grow ...
    (sci.math)