021019-1:

Give an ASN.1 specification of a protocol unit for transferring a list of people, and for each person indicating which other person is his/her father and mother. Fathers and mothers outside the listed people need not be specified. The solution must be able to handle two different people with the same name.

Answer

One possible solution:

Personlist ::= SEQUENCE OF Person

Person ::= SEQUENCE {
     name VisibleString,
     socialSecurityNumber Id,
     father Id OPTIONAL,
     mother Id OPTIONAL }

Id ::= NumericString (SIZE (10)) -- Social security no without space and dash

Many students gave variants of the following solution

Personlist ::= SEQUENCE OF Person

Person ::= SEQUENCE {
     name VisibleString,
     socialSecurityNumber Id,
     father Person OPTIONAL,
     mother Person OPTIONAL }

Id ::= NumericString (SIZE (10)) -- Social security no without space and dash

I gave five points to this solution, since it requires a lot of repetition of information. For example if we have John father of Mary and Eliza then the name of John has to be repeated twice. Since the socialsecuritynumber is a unique identification of a person, it is enough to indicate the parent with this number.

List of exam questions