Sanjay Goel, JIIT, 2002                          Data Structures: Design ExercisesDesign Exercise #1 (1st week)- Make a gr...
Sanjay Goel, JIIT, 2002-    Propose a scheme to efficiently linearise 2D/3D/…/nD triangular/ k dimensional     tetrahedral...
Sanjay Goel, JIIT, 20023.    Design Algorithms for sparse matrix input, output, addition, subtraction,      transpose and ...
Sanjay Goel, JIIT, 2002Design Exercise #12 ( 14th Week)1. Modify the algorithms for other design options for Array based i...
Sanjay Goel, JIIT, 20026. Write algorithms for transformation of k-ary tree into binary tree (left child, right   sibling)...
Upcoming SlideShare
Loading in …5
×

Data Structures problems 2002

793 views

Published on

Data Structures problems by sanjay Goel, JIIT, 2002

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
793
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Data Structures problems 2002

  1. 1. Sanjay Goel, JIIT, 2002 Data Structures: Design ExercisesDesign Exercise #1 (1st week)- Make a group of Three.- Pick any domain of your choice.- Propose computerisation opportunities in your chosen domain.Design Exercise #2 ( 2nd Week)- Make Macro-Groups of six Groups- Refine your Designs based on the Feedback- Propose a set of General purpose Formative Modules with permitted Functions on each to serve the needs of all the groups in a Macro-Group- Each Group Submit the Refined Designs for their project- Each Macro-Group submit specifications of General purpose Formative ModulesDesign Exercise #3 ( 3rd Week)- Each Batch divide yourself into two equal size Groups.- Propose a set of General purpose Formative Modules (Data storage Building Blocks) with permitted Functions on each to serve the needs of all the applications conceived by the group members.- Each Group submit specifications of General purpose Formative Modules .- Propose a high level design for computer aided Analog electronic circuit design cum analysis tool.- Propose a high level design for Chess player. Think, how many patterns are legally possible? What criteria should be adopted to take the decision for the next move by the computer.Design Exercise #4 ( 4th Week)- Propose schemes for Linearising you data i.e. storing the data from your chosen domain(s) in a Linear Array of Bytes.Design Exercise #5 ( 5th Week)- Conclude your Group Assignment.- Propose a scheme to linearise 1D/2D/3D/…/nD arrays of int/char/double/float/struct/union: LOC(A[i,j]) = ? LOC(A[i,j,k]) = ? LOC(A[i1,i2,i3,…,ik]) = ?
  2. 2. Sanjay Goel, JIIT, 2002- Propose a scheme to efficiently linearise 2D/3D/…/nD triangular/ k dimensional tetrahedral matrices: LOC(A[i,j]) = ? LOC(A[i,j,k]) = ? LOC(A[i1,i2,i3,…,ik]) = ? i,j,k,i1,i2…..,ik = ?- Propose a scheme to efficiently store a 2D/3D/…/nD sparse matrix in linear (1D) memory ?- Identify the Generic ADTs as a result of your group exercise. Design specifications for these ADTs.- Design an ADT to model the control flow in all your recursive programs.- Design an ADT to model the Books of different types.- Think how to implement C++ compiler in C. Propose some data structure to readily offer OO features to the C++ user.- Design the specifications for Basic ADTs (set, dictionary, linear list, array, stack, queue, deque, tree, graph) in terms of : - Permitted operations - Pre and Post-conditions for each operationDesign Exercise #6 ( 7th Week)1. Design Algorithms and Write programs for multi variable polynomial input, output, addition, subtraction, multiplication, differentiation and integration using linked list representation.Design Exercise #7 ( 9th Week)1. Write algorithms for Matrix addition, subtraction, multiplication and transpose of sparse matrices using pointer less representation.2. Represent the lists of contributors (with their enrollment number, address, hobbies, past record of extra curricular activities, awards, previously held positions, current responsibilities, personally known established hobbyists/professionals and so on) to various activities of JYC under the three broad sections of literary, cultural and sports. Write algorithms to insert, delete, modify and inquire the records.
  3. 3. Sanjay Goel, JIIT, 20023. Design Algorithms for sparse matrix input, output, addition, subtraction, transpose and multiplication for different linked list based representations.Design Exercise #8 ( 10th Week)1. Write the specifications for the following ADTs: - Table - String2. Create Design options for Stack ADT in terms of List ADT.Design Exercise #9 ( 11th Week)1. Write a non-recursive program for Tower of Hanoi problem.2. Design the specifications for ADT “video”.3. Use a stack to convert the following function to non-recursive, iterative form: function r(x:T) if p(x) then a(x) else b(x) r(f(x)) c(x) end if end p where T is an arbitrary type, p is an arbitrary predicate, a, b and c are arbitrary procedures and f is an arbitrary function.3. Write the algorithm for Rat in the maze problem.Design Exercise #10 ( 12th Week)1. Write the algorithm for Postfix evaluation.2. Propose a design to store N stacks in one Array.4. Propose the options to handle the growth of stacks within the limits of the array.Design Exercise #11 ( 13th Week)1. Write the pre and post conditions for the operations of Queue.2. Define the ADT Queue in terms of List ADT.3. Develop Queue from Scratch using the available features of programming language4. Derive Queue from LinearList5. Rewrite palindrome checker using one stack and one queue
  4. 4. Sanjay Goel, JIIT, 2002Design Exercise #12 ( 14th Week)1. Modify the algorithms for other design options for Array based implementation of queue from scratch.2. Develop a linked list based Queue from scratch to get better performance than obtainable by deriving from Chain.Design Exercise #13 ( 15th Week)1. Write an algorithm for finding the shortest path between given points in a maze.2. Write an algorithm for finding out the unreachable points from any given point in a maze.3. Choose different definitions for neighbours to design and analyse other maze traversal schemes.4. Write a generic maze traversal algorithm that works with neighbour definition as an additional input.Design Exercise #14 ( 16th Week)1. Propose a design to store N queues in one Array.2. Propose the options to handle the growth of queues within the limits of the array3. Propose a design for creating a queue of stacks4. Extend the car wash simulation discussed in the class (constant wash time and single wash line ) to include multiple car washing lines as well as varying wash time requirements.5. Propose a design for creating a stack of queues headers. Supervisor I creates new queues and pushes them onto this stack. It also randomly generates and enqueues job requests in stacked queues. Supervisor II serves the queues in normally LIFO order and dequeues the front of each queue on the stack in of each cycle. However, if the queue count of any queue is more than 100, it is given one time priority over any other queue.Design Exercise #15 ( 17th Week)1. Generate the design options for designing deque ADT.2. Give the detailed descriptions of your design options.3. Propose a design to store N deques in one Array.4. Propose the options to handle the growth of deques within the limits of the array.Design Exercise #16 ( 19th Week)5. Write iterative algorithms for inorder, preorder and post order traversal of array base as well as linked binary trees.
  5. 5. Sanjay Goel, JIIT, 20026. Write algorithms for transformation of k-ary tree into binary tree (left child, right sibling) and vice versa.7. Write algorithm for making a clone of a binary tree.8. Write algorithm for checking the equality of two binary trees.

×