Jump to content


Not Enough Generations


  • Please log in to reply
10 replies to this topic

#1 Guest_CLaughlin_*

Guest_CLaughlin_*
  • Guests

Posted 09 May 2006 - 07:02 PM

I've asked this before, but I have far more than 32 generations in my database, which means that I can't generate accurate and complete narrative reports of my lineage. Even if I hard code more than the allowed 32 generations, the numbering is totally messed up and when it reaches that "magic" generation number, people start being duplicated over and over. While all of my information is definitely not verified, I have generations back to the days of Julius Caesar...so you can imagine how much is missing from any reports I generate. Seems to me that there should be a way to allow reports to have an unlimited number of generations...or at least a more reasonable number than 32.

#2 Alfred

Alfred

    Advanced Member

  • Members
  • PipPipPip
  • 5734 posts

Posted 09 May 2006 - 09:29 PM

You can type in any number of generations and get the correct report except for the numbers displayed.

Because of the way binary numbers and computers work, the numbers start to get messed up after 31 generations.

In a future program, the field could be widened to hold twice as many generations or even more, but right now, the number is a double word, 32 bits wide, one bit is the sign, negative or positive, so the ahnentafel numbers get turned nagative at the 32nd generation and start overrunning past that.

So, the wish has to be for a wider field if we want these numbers to be correct past 31 generations.
Alfred

#3 Guest_Guest_*

Guest_Guest_*
  • Guests

Posted 15 May 2006 - 01:00 PM

I guess you werenít kidding... ohmy.gif

#4 apw6270

apw6270

    Member

  • Members
  • PipPip
  • 12 posts

Posted 15 May 2006 - 02:28 PM

That was right - you only need 5 bits to store 32 numbers, not 32 bits, therefore the limit is artificially imposed.

#5 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3493 posts

Posted 15 May 2006 - 03:27 PM

Must be more to it... than just being a computer mathematician! blink.gif
If it was as easy to implement, as you assume... it would have been done a long time ago. wink.gif

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#6 RootsMagician

RootsMagician

    Administrator

  • Admin
  • PipPipPip
  • 826 posts

Posted 15 May 2006 - 04:55 PM

QUOTE(apw6270 @ May 15 2006, 01:28 PM) View Post

That was right - you only need 5 bits to store 32 numbers, not 32 bits, therefore the limit is artificially imposed.


But you need 32 bits to store the ahnentafel (ancestor) numbers of the people in the 32nd generation, therefore it *isn't* artificially imposed.
RootsMagician

#7 apw6270

apw6270

    Member

  • Members
  • PipPip
  • 12 posts

Posted 16 May 2006 - 04:41 AM

I don't assume anything and it is simple to implement, and before you say "go on then, do it", I already am. tongue.gif

There is no reason to store the ancestor number in a single bit, therefore the limit *IS* artificially imposed.

It's all down to poor or lazy programming.

#8 Alfred

Alfred

    Advanced Member

  • Members
  • PipPipPip
  • 5734 posts

Posted 16 May 2006 - 09:19 AM

first generation, 1 person
second generation, 2 people
third generation, 4 people
fourth generation, 8 people
fifth generation, 16 people
sixth generation, 32 people
- - - - - - - - - - -
Take that on for 32 generations and you have a total of 4294967295 people who need to have unique ahnentafel numbers.

Can you explain to me how you can keep track of all these with only five binary bits.
If you can do this, you had better get a programing job, because no one else can.

You seem to be talking about the number of generations and the rest of us are talking about the number of people.



Alfred

#9 John_of_Ross_County

John_of_Ross_County

    Advanced Member

  • Members
  • PipPipPip
  • 699 posts

Posted 16 May 2006 - 11:32 AM

QUOTE(RootsMagician @ May 15 2006, 03:55 PM) View Post

But you need 32 bits to store the ahnentafel (ancestor) numbers of the people in the 32nd generation, therefore it *isn't* artificially imposed.


I once worked for company that was acquired by another contractor. A personnel related program was written in DEC PDP11 assembly language with some reports in Fortran. Employee badge numbers were expressed as single precision signed 16 bit integers. Historically, badge numbers had ranged from 1 to about 10000. The new employer added 50000 to everyone's badge number to match their other locations. The magic number for the largest positive single precision integer is 32767. The assembly language programs were OK, but the Fortran programs blew up since this version of Fortran interpreted everyone's badge number as a negative quantity.

Now more to the point, how many data structures would be impacted by RootsMagic switching to double precision integers? But if you made this switch, then someone would want more than 64 generations.



#10 apw6270

apw6270

    Member

  • Members
  • PipPip
  • 12 posts

Posted 17 May 2006 - 06:58 AM

Clearly it is not possible to use just 5 bits to store 4KM numbers, and I havenít suggested that it is. mad.gif

Clearly the number of ancestors in a number of generations is 2ⁿ where n is the number of generations. dry.gif

If one ancestor was added to the database every second, it would take over 136 years NON STOP to add all 4KM of them. No one could possibly add all the ancestors in 32 generations. ohmy.gif

The limit of 32 generations is imposed because someone who has only half thought about the problem has decided that 4KM ancestors would be reached before 32 generations. blink.gif

I guarantee the originator of this thread has *significantly* less than 4KM ancestors in his 32+ generations. rolleyes.gif

The limit of 32 generations is artificially imposed.

#11 RootsMagician

RootsMagician

    Administrator

  • Admin
  • PipPipPip
  • 826 posts

Posted 17 May 2006 - 06:55 PM

QUOTE(apw6270 @ May 17 2006, 05:58 AM) View Post

The limit of 32 generations is imposed because someone who has only half thought about the problem has decided that 4KM ancestors would be reached before 32 generations. blink.gif

The limit of 32 generations is artificially imposed.


That might be true *IF* a numbering system was used that only allocated a number to people who actually appear in the report. But the standard ancestor numbering system used in genealogy is the Ahnentafel numbering system which assigns a number to every possible ancestor so that doubling a person's number gives their father's number (and adding one to that gives the mother).

RootsMagic uses the standard Ahnentafel numbering system, and thus is required to use the full 32 bits to handle numbers in the 32nd generation.
RootsMagician