Monday, March 23, 2020

ABOUT GENERALIZED LINK LIST

As we are going to implement Family tree using Generalized link list,Let us understand what a generalized link list is and how we are going to implement it.



  •  Generalized Linked List L, is defined as a finite sequence of elements in which  each element can be atom or group of atom.
  • A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations .

The elements in a linked list are linked using pointers as shown below




A generalized link list consists of some extra fields such a as Flag,down pointer.
1)Flag is used to indicate the type of information stored by the node.
2)Down pointer is used if any element in the list is sub list.
A general node structure of generalized link list is as  shown below:
we can assign values in flag as per our convenience.
e.g Flag=0 implies node consist of data
      Flag=1 implies next pointer
     Flag=2 implies down pointer

Given below is a structure of general lists consisting of sub list.


1)In above example,in list A first node is a atom variable a.hence flag is equal to 1.
The second atom of list A is sub list-((b,c). the second node will be down pointer pointing to sub list,
2)In Sub list both atom are variables(data).Hence Flag is equal to 0.

So,now from the above discussion I think that all of you are cleared with what a generalized link list looks like and how we store the data in it.
In further posts i  will give the hole idea for family tree using Generalized link list...
If anyone having doubts in the concepts dicusussed in post can comment below and if you like our posts,dont forget to share it...
        Thank you...

23 comments:

  1. Helpful to get the idea of data structure application, particularly linked list.

    ReplyDelete
  2. It really helped me to clear the concept of linked list ..... Awesome work team .... Keep it up πŸ’―πŸ’―πŸ’―πŸ’―πŸ’―

    ReplyDelete
  3. Good Content ND well explained πŸ‘

    ReplyDelete

DOCUMENTATION

Course project Title:      Implementation of Family tree Using Generalized Link List Description:    In this project we have create...