The Universe of Discourse
           
Tue, 03 Jan 2006

How old was Diophantus?

Mark Dominus:

One of the types of problems that al-Khwarizmi treats extensively in his book is the problem of computing inheritances under Islamic law.

Well, these examples are getting sillier and sillier, but I still think they're kind of fun. I was thinking about the Islamic estate law stuff, and I remembered that there's a famous problem, perhaps invented about 1500 years ago, that says of the Greek mathematician Diophantus:

He was a boy for one-sixth of his life. After one-twelfth more, he acquired a beard. After another one-seventh, he married. In the fifth year after his marriage his son was born. The son lived half as many as his father. Diophantus died 4 years after his son. How old was Diophantus when he died?

So let's haul out Linogram again:

    number birth, eo_boyhood, beard, marriage, son, son_dies, death, life;

    constraints { 
       eo_boyhood - birth = life / 6;
       beard = eo_boyhood + life / 12;
       marriage = beard + life / 7;
       son = marriage + 5;
       (son_dies - son) = life / 2;
       death = son_dies + 4;
       life = death - birth;
    }

    draw { &dump_all; }

    __END__

    use Data::Dumper;
    sub dump_all {
      my $h = shift;
      print Dumper($h);
    }

And the output is:

        $VAR1 = bless( {
                         'life' => '83.9999999999999'
                       }, 'Environment' );

84 years is indeed the correct solution. (That is a really annoying roundoff error. Gosh, how I hate floating-point numbers! The next version of Linogram is going to use rationals everywhere.)

Note that because all the variables except for "life" are absolute dates rather than durations, they are all indeterminate. If we add the equation "birth = 211" for example, then we get an output that lists the years in which all the other events occurred.


[Other articles in category /linogram] permanent link