You are on page 1of 3

CS702

Assignment no 2
Taqdees Fatima

ID: MS210400057

Question no 1.

Suppose the manufacturing an assembling of an object in an industry and deliverable are


assigned to you till the end of final deliverable. By using the following assembly lines, you have
to calculate the shortest path and minimum time required to manufacture the whole object. Draw
the proper number of tables and highlight the short path also.

5 5 3 8 2
2 3 9 3 1
5 2 3 2 3

5 3 3 1
1
4 2 8 1 5
1 9 8

Answer:
1 2 3 4 5 2 3 4 5
F1, j 5 10 12 20 18 L1 j 1 2 1 2
F2, j 4 6 14 15 20 L2 j 2 2 2 2

In the above diagram the highlighted path is the shortest path and which also costs the minimum.

Question no 2.

Read the paper entitled as “Data Structure: Theoretical Approach” available in the zip
folder.

a) Give critical analysis of the above paper in your own words.

b) Suggest the kind of techniques which can be used by the programmers to solve the
storage management issue.

Answer:

a) Give critical analysis of the above paper in your own words.


Solution:

The main focus of this paper is data structures which are considered the base for abstract data
types. Abstract data types explain the logical form of a data type. While data structures
implement the physical form of data type. One type of data structure cannot be suitable for all
kind of applications. That means there are different data structures available for different
applications. Also data structures are a way to manage the large amounts of data efficiently.
Normally, efficient data structures are used as a core part to develop efficient algorithms. This
research is done to motivate the theoretical concept of abstract data types. We can say it as a data
structure which is defined indirectly by the operations performed on it and the mathematical
characteristics of those operations. Author has compared different data structures and their
advantages on each other. For instance, the basic advantage of linked list over an array is

Values can be inserted and removed without relocating the remaining list efficiently. But when it
comes to the random access the lists are slower than arrays. Author has also compared the
complexities of different algorithms like selection sort, merge sort, binary search and linear
search. He has also discussed different collision resolution strategies. Few of things which can
concluded from this paper are that a dynamic data structure need a dynamic storage allocation
and reclamation, which can be achieved by a programmer or we can also achieve it through a
high level language implicitly. The storage which is allocated once will be returned back after it
is no longer needed which is in contrast to static allocation. Static allocation is restricted for
being used by static data structures. For implementing memory storage management the two
basic popular techniques mentioned by the author are reference counters and garbage collection.
These techniques can be combined to use when necessary. A high level language can take over
most of the burden from the programmer which may the programmer has to bear in case of low
level language. The phenomenon of pointers or pointer variables underlies the use of these
facilities and we require complex algorithms for their implementation.

b) Suggest the kind of techniques which can be used by the programmers to solve the
storage management issue.

Answer:

Reference counters and garbage collection are the techniques mentioned in this paper which can
be used by programmer for the sake of storage management.

You might also like