SlideShare a Scribd company logo
1 of 18
Download to read offline
Advanced Data Structures, JIIT                                      Sanjay Goel, 2006


                                 ADS: Lecture Notes
                                 Even Sem: 2005-06


   1. 10.01.06
   1. Learning Outcomes, relationship with DS, DBMS, and OOPS.
   2. Concept map (DS)             Concept map (DBMS)                    ER Diagram
                                                                       Class Diagram
   3. Assignment: Suggest a solution of converting file format in any domain. Identify
      the problems and issues.

   2. 17.01.06
   1. Review of Key issues:
         - Computational problem solving process.
         - Design as story telling.
   2. Some options for identifying your first paper for your literature survey:
         i.     Select paper(s) that use one or more of the of the Data Structure
                already studied by you (e.g. Table, Stack, Binary Tree, BST, Queue,
                Dequeue and so on) in the first course.
         ii.    Select paper(s) on ADT specification and design.
         iii.   Select paper(s) that describe the ADTs or classes used for designing a
                complete software system of your choice.
         iv.    Select paper(s) that discuss recursive solution for some algorithmic
                problem.
         v.     Select paper(s) that recursion removal techniques.
         vi.    Select Paper(s) that discuss simulation models using queues.
         vii.   Select papers that analyze the performance of some DS.
         viii. Select papers that discuss some file format.

   3. 18.01.06
   1. Review and Enhancement Concept mapping Notation
          - Identify data tanks as
                  i. IN Data Tanks
                 ii. OUT Data Tanks
                iii. IN & OUT Data Tanks
                iv. Buffer Data Tanks
          - All IN and IN & OUT data Tanks are part of INITIAL STATE (IS)
          - All OUT and IN & OUT data Tanks are part of FINAL STATE (FS)
          - Develop Initial State Diagram (ISD) as a collection of IN and IN & OUT
             Data tanks.
          - Develop Final State Diagram (FSD) as a collection of OUT and IN &
             OUT Data tanks.
          - Develop Concept map (CM) as a network of all Data tanks and
             Processing Units.
Advanced Data Structures, JIIT                                        Sanjay Goel, 2006


           -   Put the following symbols on the center of the top line of the Rectangular
               box of Tank.
                        i. IN Data Tanks :

                        ii. OUT data tanks :


                        iii. IN & OUT Data tanks:


                        iv. Temporary buffer type data tanks: No symbol.

   2. Storing a Graph as a Table.
   3. Storing a Binary Tree in a Table.
   4. Traversing (pre-order) of Binary tree stored as a table.
   5. Assignment: When you have learnt SQL in DBMS, use it to do traversal over
      binary tree stores as a table.
   6. Assignment (Group of 2) (3 marks each): Export the Table(s) created by you or
      by your group partner as your DBMS assignment to a text file. Write any three
      query functions (already executed by you using ACCESS) to process this text file
      using C language.

   4.   24.01.06
   1.   Big O, small o, Big Omega, small omega, Big Theta notations.
   2.   Worst case, Best case, Average Case complexity analysis.
   3.   Assignment: Perform the average case complexity analysis for following
        algorithms:
           - Linear Search in unordered array, Linear search in Ordered array, Binary
               search.
           - Insertion sort, Bubble sort, Selection sort.

   5. 25.01.06
   1. Average Case Complexity analysis: Linear search, Binary search, Insertion sort.
   2. Impact of hardware speedup on the data size that can be processed by an
      algorithm of known complexity f (n).
   3. Assignment: In the three research papers that have to be studied by you, at least
      one should be on complexity analysis. Write program to experimentally
      validate the theoretical/experimental results on complexity analysis reported
      in the paper studied by you. Include your results in the literature survey report
      and presentation. Keep reporting your Lab instructors about the progress on
      literature survey.


   6. 31.01.06
   1. Insertion sort  Selection sort. Comparison of algorithmic process.
   2. Merge sort Transform the process Quick Sort.
Advanced Data Structures, JIIT                                              Sanjay Goel, 2006


   3. Comparison less sorting Radix sort
   4. Assignment: Analyze the Best case, Worst case, and average case complexity for
      sorting a linked list using selection sort and insertion sort, Your algorithm
      should have a space complexity of O(1).
   5. Assignment (5 marks): WAP for Radix sort, non-recursive Merge sort, and Quick
      sort algorithms. Experimentally test the performance for varying data size and
      distribution. Design the test cases for this experiment. Graphically plot the results
      of your experiment.

   7. 01.02.06
   1. Best case and Worst case analysis of Merge Sort.
   2. Algorithmic performance improvement by mixing different algorithms Binary
      insertion sort.
   3. Algorithmic performance improvement by identifying the weakness and
      removing them for large n      Shell sort.
   4. Assignment (Group of two, 3 marks each): In the three research papers that have
      to be studied by you, one can be on sorting techniques. Write program to
      experimentally find out the best initial step size for shell sort for sorting an
      array of 10,000 integers.

   8.     07.02.06
   1.    Best case and Worst case Complexity Analysis of Quick sort.
   2.    Algorithmic visualization techniques.
   3.    Assignment (bonus: only for those who have submitted earlier assignments on
         sorting program before 10.02.04: 3 marks): Write a function for array
         visualization to graphically display its sorted-ness. Insert this function in sorting
         programs to demonstrate algorithms’ progress.

   9.     08.02.06
   1.     Tree Sort algorithm: Using BST.
   2.     Top down Vs Bottom up growth of tree.
   3.     Construction of expression tree.
   4.     Huffman encoding algorithm.
   5.     Assignment (2 marks): Using your existing functions, WAP and experimentally
         evaluate the performance of Tree sort algorithm.

   10.   14.02.06
   1.    Review of key ideas.
   2.    Dynamic programming: e.g. Merge sort.
   3.    Greedy Algorithms: Huffman encoding.
   4.    Heap: Priority Queue: insertion and deletion operations. Number of comparison
         during insertion and deletion.

   11. 15.02.06
   1. Heap: element insertion, deletion.
   2. Heapsort.
Advanced Data Structures, JIIT                                       Sanjay Goel, 2006



   12. 02.03.06
   1. Review of Algorithmic Design techniques:
          a. Brute Force Method: Instead of creative logic, computational speed is
              used for solving the problem e.g. Linear Search, Selection sort, Bubble
              sort.
          b. Decrease and Conquer: Instead of solving the problem with n elements,
              the problem is solved for n-k elements and then n-2k and so on. The
              solution for n elements is derived from the solution of smaller size data
              set e.g. Insertion sort.
          c. Divide and conquer: The problem size is decreased by a ratio rather than
              a constant e.g. Binary search, Quick sort, Hanoi, Maze, recursive Merge,
              and so on.
          d. Greedy: Rather than trying to take best alternative a locally best solution
              is picked us and short sighted decisions are taken to solve problems e.g.
              Huffman encoding, Traveling salesman, Activity scheduling, Map
              coloring, and so on.
   2. Assignment (4 marks): All should allow a user inputted data for processing.
                    B1, B2: Huffman encoding (variable number of n symbols)
                    B2, B3: Activity scheduling, (variable number of n activities and
                              variable number of m venues).
                    B4, B5: Traveling Salesman (variable number of n cities)
                    Others: Map coloring (variable number of n regions)

   13. 03.03.06
   1. Greedy Algorithms:
        - Coin exchange
        - Graph: Dominant set of graph
        - Graph: MST: Kruskal, Prim
   2     Assignment (4 marks): All should allow a user inputted data for processing.
                   B1 : Dominant set (variable number of n nodes and m links using
                           Adjacency matrix based storage of Graph)
                   B2: Dominant set (variable number of n nodes and m links using
                           Adjacency list based storage of Graph)
                   B3: Dominant set (variable number of n nodes and m links using
                           linked storage of Graph)
                   B4: Kruskal’s Algorithm, (variable number of n nodes and m links
                           using Adjacency matrix based storage of Graph).
                   B5: Kruskal’s Algorithm, (variable number of n nodes and m links
                           using Adjacency list based storage of Graph).
                   B6: Kruskal’s Algorithm, (variable number of n nodes and m links
                           using linked storage of Graph).
                   B7: Prim’s Algorithm, (variable number of n nodes and m links
                           using Adjacency matrix based storage of Graph).
                   B8: Prim’s Algorithm, (variable number of n nodes and m links
                           using Adjacency list based storage of Graph).
Advanced Data Structures, JIIT                                           Sanjay Goel, 2006


                     B9: Prim’s Algorithm, (variable number of n nodes and m links
                             using linked storage of Graph).


   13-14. 7.3.06 and 8.3.06

           More on Greedy Algorithms

Cases of Greedy Algorithms: MST Algorithms

Kruskal’s Algo

       Examine arcs one-by-one in the sorted order and add them to OUTPUT if their
       addition does not create a cycle.



                                     10
                               2               4
                     35

                                25
                 1                        20       30


                     40
                            3                  5
                                     15
                                                         Minimum cost, No cycle, select

                                     10
                            2                  4
                     35

                               25
                 1                        20   30


                     40
                           3                   5
                                     15
                                                        Selected Link count < 4 so continue
                                                        Next Minimum cost, No cycle, select
Advanced Data Structures, JIIT                                                        Sanjay Goel, 2006



                                           10
                                  2                       4
                    35

                                  25
                1                               20            30


                    40
                              3                           5
                                           15
                                                                   Selected Link count < 4 so continue
                                                                   Next Minimum cost, No cycle, select


                                      10
                         2                           4
               35

                             25
           1                               20            30


               40
                         3                           5
                                      15
                                                 Selected Link count < 4 so continue
                                                 Next Minimum cost, will create a cycle so reject
                                      10
                         2                           4
               35

                             25
           1                               20        30


               40
                         3                       5
                                      15
                                                 Selected Link count < 4 so continue
                                                 Next Minimum cost, will create a cycle so reject
Advanced Data Structures, JIIT                                                    Sanjay Goel, 2006


                                    10
                           2                      4
              35

                           25
          1                              20        30


              40
                       3                          5
                                    15
                                                      Selected Link count < 4 so continue
                                                      Next Minimum cost, No cycle, so select

                                     10
                               2                      4
                  35

                               25
              1                              20        30


                  40
                           3                          5
                                     15
                                         Selected Link count = 4, so stop.
Prim’s Algo
Start with a vertex and grow the tree by gradually adding the cheapest unselected edge
connected to any node in the selected subset.

                                                  10
                                         2                   4
                           35

                                         25
                       1                               20     30


                           40
                                     3                       5
                                                  15
                                                                   Start with any node say 1.
Advanced Data Structures, JIIT                                            Sanjay Goel, 2006


                                                  10
                                     2                           4
                       35

                                        25
                  1                                    20        30


                       40
                                    3                           5
                                              15
                                                   Selected links <4 so continue
Check the minimum cost link (amongst the dotted blue),
                                                  Does not create a cycle so select

                                             10
                                2                           4
                   35

                                 25
              1                                   20            30


                  40
                            3                               5
                                             15
                                                        Selected links <4 so continue
                                Check the minimum cost link from the already selected nodes,
                                                        Does not create a cycle so select

                                         10
                            2                               4
                  35

                                25
             1                                20            30


                 40
                            3                           5
                                         15
                                                     Selected links <4 so continue
                                Check the minimum cost link from the already selected nodes,
                                                        Does not create a cycle so select
Advanced Data Structures, JIIT                                                Sanjay Goel, 2006


                                     10
                             2                     4
                   35

                             25
             1                            20       30


                   40
                         3                     5
                                     15
                                                    Selected links <4 so continue
                                  Check the minimum cost link from the already selected nodes,
                                                          Does not create a cycle so select

                                    10
                         2                     4
                 35

                             25
           1                             20    30


               40
                        3                      5
                                    15
                                                        Selected links =4 so stop


Sollin’s Algorithm

     1. Proceeds by adding the least cost arc emanating from each tree.
     2. Each iteration reduces the number of components by a factor of at least 2.
                     10
               2                     4
     35

                   25
 1                           20       30


     40
               3                     5
                        15
                                                 Selected link count <4 so continue
                                      Choose a node, check its cheapest link, No cycle so select
Advanced Data Structures, JIIT                                        Sanjay Goel, 2006


                     10
             2                 4
     35

                25
 1                        20     30


     40
            3                  5
                     15
                                     Selected link count <4 so continue
           Choose next node, check its cheapest link, No cycle or duplication, so select

                     10
             2                 4
     35

                25
 1                        20     30


     40
            3                  5
                     15
                                    Selected link count <4 so continue
           Choose next node, check its cheapest link, No cycle or duplication, so select

                     10
             2                 4
     35

                25
 1                        20     30


     40
            3                  5
                     15
                                       Selected link count <4 so continue
Choose next node, check its cheapest link, No cycle but duplication, so no new selection

No New adge is added for node 4 as the cheapest edge from node 4 is already
selected.
Advanced Data Structures, JIIT                                        Sanjay Goel, 2006


                      10
                2               4
      35

                 25
  1                        20       30


      40
            3                   5
                      15
Selected link count <4 so continue
Choose next node, check its cheapest link, No cycle but duplication, so no new selection

No New adge is added for node 5 as the cheapest edge from node 5 is already
selected.

                      10                                             10
             2                  4                             2                4
      35                                               35

                25
 1                         20    30                1

      40
            3                   5                            3                 5
                      15                                             15

Ist iteration over we get some connected components

(2nd Iteration starts to link these connected components)

                      10
             2                  4
      35

                25
 1                         20    30


      40
            3                   5
                      15
Selected link count <4 so continue
Choose a tree (connected component) , check its cheapest link, No cycle no duplication,
so select.
Advanced Data Structures, JIIT                                            Sanjay Goel, 2006



                      10
              2                 4
     35

                 25
 1                         20    30


     40
             3                  5
                      15
                                        Selected link count = 4 so stop

     15. 21.3.06
     1. Dijkastra’s shortest path Algorithm for un-weighted graph and weighted graph.
     2. Programming Assignments: (5 marks)
        B1: Dijkastra’s Algorithm for weighted graph using Adj matrix for Graph and
              linked structure for priority queue.
        B2: Dijkastra’s Algorithm for weighted graph using Adj matrix for graph and
              array based structure for priority queue.
        B3: Dijkastra’s Algorithm for weighted graph using Adj List for graph and array
              based structure for priority queue.
        B4: Dijkastra’s Algorithm for weighted graph using Adj List and linked structure
              for priority queue.
        B5: Dijkastra’s Algorithm for weighted graph using Linked Structure for graph
              and array based structure for priority queue
        B6: Dijkastra’s Algorithm for weighted graph using Linked Structure for graph
              and linked structure for priority queue.
        B7: Dijkastra’s Algorithm for weighted graph using Simulated pointer based
              Structure for graph and array based structure for priority queue
        B8: Dijkastra’s Algorithm for weighted graph using Simulated pointer based
              Structure for graph and linked structure for priority queue.
        B9: Sollin’s Algorithm using Adj Matrix for Graph.

     16. 22.3.06
     1. Map Colouring.
     2. Limitations of Greedy Algorithm: Optimality is an issue.
     3. Dynamic Programming: overlapping sub-problems, recursion removal:
         Fibonacci, Binomial Coefficients, Coin.
     4. Assignment: If your choice of three research papers is not over, include one
         paper or Dynamic Programming.

     17-18. 4.4.06 and 5.4.06
     1. Decision Tree for classification
     2. Puzzle solving:
                    i. Problem space States: goal, initial, others, states are defined by
                       problem
Advanced Data Structures, JIIT                                        Sanjay Goel, 2006


                  ii. Operators for state transition depend upon the problem.
                iii. Goal test.
                 iv. Data Structure for State representation (generally using flags).
                          1. 8-puzzle
                          2. River Problem
                          3. 8-Queen       possible 3d extension
                          4. Robot path finding
                          5. Robot block world
                          6. Water jug problem
                          7. Rat in the maze
                          8. Tower of Hanoi
                          9. Rubic Cube
                  v. Generating choice depending upon the available operators:
                      generating decision tree.
                 vi. Searching the goal state and path to reach goal state in decision
                      tree: Depth first Vs Breadth First Search.
                vii. Search strategy properties: completeness (yes/no), optimality
                      (yes/no), and Time and Space complexity of algorithm.

   3. Assignment: (group of 2 students, 5 marks each)
      B1: WAP for placing maximum number of queen on chess like board of 5x5 cells
           following the rules of chess. Analyze the complexities of your algorithm.
      B2: WAP for placing maximum number of Knights on chess like board of 5x5
           cells following the rules of chess. Analyze the complexities of your
           algorithm.
      B3: WAP for placing maximum number of rooks (n1) and bishops (n2) on a
           chess like board of 5x5 cells following the rules of chess such that ABS (n1-
           n2) <=1. Analyze the complexities of your algorithm.
      B4: WAP for solving 4x4 puzzle (one hole) (re-arrange any user inputted initial
           pattern of letters into a desired user inputted given pattern). Analyze the
           complexities of your algorithm.
      B5: WAP for solving Water jug problem for any user inputted amount with 4
           jugs of capacity of 10, 9, 5, and 2. Analyze the complexities of your
           algorithm.
      B6: WAP for solving Water jug problem for any user inputted amount with 3
           jugs of capacity of 7, 4, and 3. Analyze the complexities of your algorithm.
      B7: WAP for solving Water jug problem for any user inputted amount with 2
           jugs of capacity of 7 and 6. Analyze the complexities of your algorithm.
      B8: WAP for solving 4x4 puzzle (two holes) (re-arrange any user inputted initial
           pattern of letters into a desired user inputted given pattern). Analyze the
           complexities of your algorithm.
      B9: WAP for solving 4x4 puzzle (three holes) (re-arrange any user inputted
           initial pattern of letters into a desired user inputted given pattern). Analyze
           the complexities of your algorithm.
Advanced Data Structures, JIIT                                       Sanjay Goel, 2006



     19. 11.04.06
          1. Threaded BST

          Assignment (Group of 2, 7.5 marks each):
          B1: Create a graph of student records with following attributes:
           i. Name
          ii. Roll Number
         iii. Department
          The inter-node links represent close friendship between students. One student
          can have at most 5 close friends.
          A BST tree is used to index this database on student’s Name. WAP to store
          this database and answer following queries and perform following operations:
              i. List the Roll numbers of friends of a given name.
             ii. List the Names of the friends of given roll number.
            iii. insertion of new record.
            iv. deletion of a record
             v. insertion of a link
            vi. deletion of a link
          Use pointer based storage for graph and pointer-less storage for BST.

          B2: Create a graph of student records with following attributes:
            • Name
            • Roll Number
            • Department
          The inter-node links represent close friendship between students. One student
          can have at most 5 close friends.
          A BST tree is used to index this database on student’s Name. WAP to store
          this database and answer following queries and perform following operations:
                     List the Roll numbers of friends of a given name.
                     List the Names of the friends of given roll number.
                     insertion of new record.
                     deletion of a record
                     insertion of a link
                     deletion of a link
          Use pointer based storage for graph and pointer based storage for BST.

          B3: Create a graph of student records with following attributes:
            • Name
            • Roll Number
            • Department
          The inter-node links represent close friendship between students. One student
          can have at most 5 close friends.
          A BST tree is used to index this database on student’s Name. WAP to store
          this database and answer following queries and perform following operations:
                     List the Roll numbers of friends of a given name.
Advanced Data Structures, JIIT                                       Sanjay Goel, 2006


                    List the Names of the friends of given roll number.
                    insertion of new record.
                    deletion of a record
                    insertion of a link
                    deletion of a link
          Use pointer-less storage for graph and pointer based storage for BST.

          B4: Create a graph of student records with following attributes:
            • Name
            • Roll Number
            • Department
          The inter-node links represent close friendship between students. One student
          can have at most 5 close friends.
          A BST tree is used to index this database on student’s Name. WAP to store
          this database and answer following queries and perform following operations:
                     List the Roll numbers of friends of a given name.
                     List the Names of the friends of given roll number.
                     insertion of new record.
                     deletion of a record
                     insertion of a link
                     deletion of a link
          Use pointer-less storage for graph and pointer-less storage for BST.

          B5: Create a graph of employee records with following attributes:
            • Name
            • Employee Number
            • Department
          The inter-node links represent shared postings between employees. One
          employee can have at most 4 shared postings with other employees.
          A BST tree is used to index this database on employee number. WAP to store
          this database and answer following queries and operations:
                     List the department of co-posted employees of a given name.
                     List the Names of the co-posted employees of given employee
                     number.
                     insertion of new record.
                     deletion of a record
                     insertion of a link
                     deletion of a link
               Use pointer-less storage for graph and pointer-less storage for BST.

           B6: Create a graph of employee records with following attributes:
            • Name
            • Employee Number
            • Department
          The inter-node links represent shared postings between employees. One
          employee can have at most 4 shared postings with other employees.
Advanced Data Structures, JIIT                                    Sanjay Goel, 2006


          A BST tree is used to index this database on employee number. WAP to store
          this database and answer following queries and operations:
                     List the department of co-posted employees of a given name.
                     List the Names of the co-posted employees of given employee
                     number.
                     insertion of new record.
                     deletion of a record
                     insertion of a link
                     deletion of a link
               Use pointer-less storage for graph and pointer based storage for BST.

           B7: Create a graph of employee records with following attributes:
            • Name
            • Employee Number
            • Department
          The inter-node links represent shared postings between employees. One
          employee can have at most 4 shared postings with other employees.
          A BST tree is used to index this database on employee number. WAP to store
          this database and answer following queries and operations:
                     List the department of co-posted employees of a given name.
                     List the Names of the co-posted employees of given employee
                     number.
                     insertion of new record.
                     deletion of a record
                     insertion of a link
                     deletion of a link
               Use pointer based storage for graph and pointer-less storage for BST.

           B8: Create a graph of employee records with following attributes:
            • Name
            • Employee Number
            • Department
          The inter-node links represent shared postings between employees. One
          employee can have at most 4 shared postings with other employees.
          A BST tree is used to index this database on employee number. WAP to store
          this database and answer following queries and operations:
                     List the department of co-posted employees of a given name.
                     List the Names of the co-posted employees of given employee
                     number.
                     insertion of new record.
                     deletion of a record
                     insertion of a link
                     deletion of a link
               Use pointer based storage for graph and pointer based storage for
          BST.
Advanced Data Structures, JIIT                                       Sanjay Goel, 2006




          B9: Create a graph of Book records with following attributes:
            • Title
            • Author name
            • ISBN Number
            • Library Acquisition Number
            • Publisher
          The inter-node links represent cross referencing between books. One book can
          refer to at most 5 other employees.
          A BST tree is used to index this database on ISBN number. WAP to store this
          database and answer following queries and operations:
                      List the publishers of books referred by of a given book given its
                      ISBN number.
                      List the publishers of books referring to of a given book given its
                      Title
                      Insertion of new record.
                      deletion of a record
                      insertion of a link
                      deletion of a link
               Use pointer-less storage for graph and pointer-less storage for BST.

     20. 18.04.06
           1. Comparison of Linear Index and BST based Index.
           2. Indexed BST.
           3. ASSIGNMENT (Group of two or alone, 9 marks each) : Modify your
               last assignment given on 11.04.05 as follows:
               i. Replace ordinary BST with Threaded Indexed BST.
               ii. Save and upload your database (graph as well as index) on (and
                  from) file(s).

     21. 19.04.06
           1. AVL Tree.
           2. Bonus Assignment (single student, 5 marks, only for those who
               scored a total of minimum 20 marks out of 60 in two minor tests and
               all five lab tests, three tests conducted by seniors in the evenings as
               well as two tests by faculty during lab time): Modify your last
               assignment by replacing Threaded Indexed BST with Threaded Indexed
               AVL search Tree.

     22-23. 25-26.04.06
          1. AVL Tree: Balancing after Insertion and Deletion. LL, RR, LR, RL, R0,
             R1, R-1, L0, L1, L-1.
          2. TRIE, Compact TRIE.
Advanced Data Structures, JIIT                                       Sanjay Goel, 2006


     24-25. 02.5.06

     1.     Multi-way Search Trees for creating Index structure for large database:
            B Tree, B+ Tree, B* Tree: Data structure, Search, Insertion, Deletion.

     25.     03.05.06

     1.     Hashing: Hash function, Synonym, Collision, Collision resolution, Open
            hashing, Bucket hashing, Closed hashing.

     ****************************************************************
     Some relevant quotes:


     1. I cannot teach anybody anything; I can only make them think. – Socrates

     2. You cannot teach people anything.
        You can only help them discover it within themselves.           - Galileo

     3. I do not teach anything. I create conditions for learning.
     4. The only source of knowledge is experience.                     - Einstein

More Related Content

What's hot

모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로 모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
r-kor
 

What's hot (20)

Yarn spark next_gen_hadoop_8_jan_2014
Yarn spark next_gen_hadoop_8_jan_2014Yarn spark next_gen_hadoop_8_jan_2014
Yarn spark next_gen_hadoop_8_jan_2014
 
Application of combined support vector machines in process fault diagnosis
Application of combined support vector machines in process fault diagnosisApplication of combined support vector machines in process fault diagnosis
Application of combined support vector machines in process fault diagnosis
 
Data clustering using map reduce
Data clustering using map reduceData clustering using map reduce
Data clustering using map reduce
 
Customer Clustering For Retail Marketing
Customer Clustering For Retail MarketingCustomer Clustering For Retail Marketing
Customer Clustering For Retail Marketing
 
Python data structures - best in class for data analysis
Python data structures -   best in class for data analysisPython data structures -   best in class for data analysis
Python data structures - best in class for data analysis
 
Implementation of p pic algorithm in map reduce to handle big data
Implementation of p pic algorithm in map reduce to handle big dataImplementation of p pic algorithm in map reduce to handle big data
Implementation of p pic algorithm in map reduce to handle big data
 
Differential analyses of structures in HiC data
Differential analyses of structures in HiC dataDifferential analyses of structures in HiC data
Differential analyses of structures in HiC data
 
Financial Networks IV. Analyzing and Visualizing Exposures
Financial Networks IV. Analyzing and Visualizing ExposuresFinancial Networks IV. Analyzing and Visualizing Exposures
Financial Networks IV. Analyzing and Visualizing Exposures
 
Text categorization
Text categorizationText categorization
Text categorization
 
Pandas data transformational data structure patterns and challenges final
Pandas   data transformational data structure patterns and challenges  finalPandas   data transformational data structure patterns and challenges  final
Pandas data transformational data structure patterns and challenges final
 
# Neural network toolbox
# Neural network toolbox # Neural network toolbox
# Neural network toolbox
 
Investigating the 3D structure of the genome with Hi-C data analysis
Investigating the 3D structure of the genome with Hi-C data analysisInvestigating the 3D structure of the genome with Hi-C data analysis
Investigating the 3D structure of the genome with Hi-C data analysis
 
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로 모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
모듈형 패키지를 활용한 나만의 기계학습 모형 만들기 - 회귀나무모형을 중심으로
 
Chapter - 4 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
Chapter - 4 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; KamberChapter - 4 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
Chapter - 4 Data Mining Concepts and Techniques 2nd Ed slides Han &amp; Kamber
 
Graphical Structure Learning accelerated with POWER9
Graphical Structure Learning accelerated with POWER9Graphical Structure Learning accelerated with POWER9
Graphical Structure Learning accelerated with POWER9
 
G0354451
G0354451G0354451
G0354451
 
Unit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptxUnit 2 - Data Manipulation with R.pptx
Unit 2 - Data Manipulation with R.pptx
 
Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)
 
Semantic Web mining using nature inspired optimization methods
Semantic Web mining using nature inspired optimization methodsSemantic Web mining using nature inspired optimization methods
Semantic Web mining using nature inspired optimization methods
 
Data Mining: Concepts and Techniques — Chapter 2 —
Data Mining:  Concepts and Techniques — Chapter 2 —Data Mining:  Concepts and Techniques — Chapter 2 —
Data Mining: Concepts and Techniques — Chapter 2 —
 

Viewers also liked

Viewers also liked (8)

Developing and Publishing Academic Products
Developing and PublishingAcademic ProductsDeveloping and PublishingAcademic Products
Developing and Publishing Academic Products
 
Software Development Careers: Why, What, and How?
Software Development Careers:  Why, What, and How?Software Development Careers:  Why, What, and How?
Software Development Careers: Why, What, and How?
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Computer Graphics 2004
Computer Graphics 2004Computer Graphics 2004
Computer Graphics 2004
 
CSCW lecture notes, Sanjay Goel, JIIT, 2012
CSCW lecture notes, Sanjay Goel, JIIT, 2012CSCW lecture notes, Sanjay Goel, JIIT, 2012
CSCW lecture notes, Sanjay Goel, JIIT, 2012
 
Image Processing, 2012
Image Processing, 2012Image Processing, 2012
Image Processing, 2012
 
Problem Solving and Research Methodology: Part-I- Risk Engineering - Excerpts...
Problem Solving and Research Methodology: Part-I- Risk Engineering - Excerpts...Problem Solving and Research Methodology: Part-I- Risk Engineering - Excerpts...
Problem Solving and Research Methodology: Part-I- Risk Engineering - Excerpts...
 
HCI lecture notes by Sanjay Goel, JIIT 2012
HCI lecture notes by Sanjay Goel, JIIT 2012HCI lecture notes by Sanjay Goel, JIIT 2012
HCI lecture notes by Sanjay Goel, JIIT 2012
 

Similar to Advanced Data Structures 2006

Web Information Extraction Learning based on Probabilistic Graphical Models
Web Information Extraction Learning based on Probabilistic Graphical ModelsWeb Information Extraction Learning based on Probabilistic Graphical Models
Web Information Extraction Learning based on Probabilistic Graphical Models
GUANBO
 
MC0077 SMU 2013 Fall Session
MC0077 SMU 2013 Fall SessionMC0077 SMU 2013 Fall Session
MC0077 SMU 2013 Fall Session
Narinder Kumar
 

Similar to Advanced Data Structures 2006 (20)

Advanced Data Structures 2005
Advanced Data Structures 2005Advanced Data Structures 2005
Advanced Data Structures 2005
 
Data Structures problems 2002
Data Structures problems 2002Data Structures problems 2002
Data Structures problems 2002
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
 
Web Information Extraction Learning based on Probabilistic Graphical Models
Web Information Extraction Learning based on Probabilistic Graphical ModelsWeb Information Extraction Learning based on Probabilistic Graphical Models
Web Information Extraction Learning based on Probabilistic Graphical Models
 
Matrix Factorization In Recommender Systems
Matrix Factorization In Recommender SystemsMatrix Factorization In Recommender Systems
Matrix Factorization In Recommender Systems
 
MC0077 SMU 2013 Fall Session
MC0077 SMU 2013 Fall SessionMC0077 SMU 2013 Fall Session
MC0077 SMU 2013 Fall Session
 
Geographical Information System (GIS)
Geographical Information System (GIS)Geographical Information System (GIS)
Geographical Information System (GIS)
 
Summer training project on Data structures and algorithms.pptx
Summer training project on Data structures and algorithms.pptxSummer training project on Data structures and algorithms.pptx
Summer training project on Data structures and algorithms.pptx
 
Current clustering techniques
Current clustering techniquesCurrent clustering techniques
Current clustering techniques
 
IRJET- Review of Existing Methods in K-Means Clustering Algorithm
IRJET- Review of Existing Methods in K-Means Clustering AlgorithmIRJET- Review of Existing Methods in K-Means Clustering Algorithm
IRJET- Review of Existing Methods in K-Means Clustering Algorithm
 
Large-scale Recommendation Systems on Just a PC
Large-scale Recommendation Systems on Just a PCLarge-scale Recommendation Systems on Just a PC
Large-scale Recommendation Systems on Just a PC
 
Map-Reduce for Machine Learning on Multicore
Map-Reduce for Machine Learning on MulticoreMap-Reduce for Machine Learning on Multicore
Map-Reduce for Machine Learning on Multicore
 
introduction to geographical information system
introduction to geographical information systemintroduction to geographical information system
introduction to geographical information system
 
Mc0088 data mining
Mc0088  data miningMc0088  data mining
Mc0088 data mining
 
Data Exploration in R.pptx
Data Exploration in R.pptxData Exploration in R.pptx
Data Exploration in R.pptx
 
Big data distributed processing: Spark introduction
Big data distributed processing: Spark introductionBig data distributed processing: Spark introduction
Big data distributed processing: Spark introduction
 
Parallel KNN for Big Data using Adaptive Indexing
Parallel KNN for Big Data using Adaptive IndexingParallel KNN for Big Data using Adaptive Indexing
Parallel KNN for Big Data using Adaptive Indexing
 
Learning from similarity and information extraction from structured documents...
Learning from similarity and information extraction from structured documents...Learning from similarity and information extraction from structured documents...
Learning from similarity and information extraction from structured documents...
 
Summer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & AlgorithmsSummer Training Project On Data Structure & Algorithms
Summer Training Project On Data Structure & Algorithms
 
Enterprise Scale Topological Data Analysis Using Spark
Enterprise Scale Topological Data Analysis Using SparkEnterprise Scale Topological Data Analysis Using Spark
Enterprise Scale Topological Data Analysis Using Spark
 

More from Sanjay Goel

An Overview of Selected Learning Theories about Student Learning
An Overview of Selected Learning Theories about  Student  LearningAn Overview of Selected Learning Theories about  Student  Learning
An Overview of Selected Learning Theories about Student Learning
Sanjay Goel
 

More from Sanjay Goel (20)

New Generation MTech and MSc Programs at JKLU
New Generation MTech and MSc Programs at JKLUNew Generation MTech and MSc Programs at JKLU
New Generation MTech and MSc Programs at JKLU
 
Build a Career in Engineering and Technology 19.08.20
Build a Career in Engineering and Technology    19.08.20Build a Career in Engineering and Technology    19.08.20
Build a Career in Engineering and Technology 19.08.20
 
Advanced Data Structures 2007
Advanced Data Structures 2007Advanced Data Structures 2007
Advanced Data Structures 2007
 
Data Structures 2007
Data Structures 2007Data Structures 2007
Data Structures 2007
 
Data Structures 2005
Data Structures 2005Data Structures 2005
Data Structures 2005
 
Data Structures 2004
Data Structures 2004Data Structures 2004
Data Structures 2004
 
Preparing Graduate Mindset
Preparing Graduate MindsetPreparing Graduate Mindset
Preparing Graduate Mindset
 
Multimedia Creation
Multimedia CreationMultimedia Creation
Multimedia Creation
 
Manuscript digitisation
Manuscript digitisationManuscript digitisation
Manuscript digitisation
 
An Overview of Selected Learning Theories about Student Learning
An Overview of Selected Learning Theories about  Student  LearningAn Overview of Selected Learning Theories about  Student  Learning
An Overview of Selected Learning Theories about Student Learning
 
Prayag Centre
Prayag CentrePrayag Centre
Prayag Centre
 
Ph D Presentation
Ph D PresentationPh D Presentation
Ph D Presentation
 
Learning
Learning   Learning
Learning
 
Computer Vision based Dance Visualisation
Computer   Vision   based Dance  VisualisationComputer   Vision   based Dance  Visualisation
Computer Vision based Dance Visualisation
 
Multimedia For Cultural Learning
Multimedia  For Cultural LearningMultimedia  For Cultural Learning
Multimedia For Cultural Learning
 
Computer aided Cognition support systems
Computer aided Cognition support systemsComputer aided Cognition support systems
Computer aided Cognition support systems
 
Enterprise Apps
Enterprise AppsEnterprise Apps
Enterprise Apps
 
engage...to facilitate deeper learning
engage...to facilitate deeper learningengage...to facilitate deeper learning
engage...to facilitate deeper learning
 
Classification And Reconstruction Of Indian Pottery
Classification And Reconstruction Of Indian PotteryClassification And Reconstruction Of Indian Pottery
Classification And Reconstruction Of Indian Pottery
 
Archaeo Heritage Informatics Masters Program
Archaeo Heritage Informatics Masters ProgramArchaeo Heritage Informatics Masters Program
Archaeo Heritage Informatics Masters Program
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 

Advanced Data Structures 2006

  • 1. Advanced Data Structures, JIIT Sanjay Goel, 2006 ADS: Lecture Notes Even Sem: 2005-06 1. 10.01.06 1. Learning Outcomes, relationship with DS, DBMS, and OOPS. 2. Concept map (DS) Concept map (DBMS) ER Diagram Class Diagram 3. Assignment: Suggest a solution of converting file format in any domain. Identify the problems and issues. 2. 17.01.06 1. Review of Key issues: - Computational problem solving process. - Design as story telling. 2. Some options for identifying your first paper for your literature survey: i. Select paper(s) that use one or more of the of the Data Structure already studied by you (e.g. Table, Stack, Binary Tree, BST, Queue, Dequeue and so on) in the first course. ii. Select paper(s) on ADT specification and design. iii. Select paper(s) that describe the ADTs or classes used for designing a complete software system of your choice. iv. Select paper(s) that discuss recursive solution for some algorithmic problem. v. Select paper(s) that recursion removal techniques. vi. Select Paper(s) that discuss simulation models using queues. vii. Select papers that analyze the performance of some DS. viii. Select papers that discuss some file format. 3. 18.01.06 1. Review and Enhancement Concept mapping Notation - Identify data tanks as i. IN Data Tanks ii. OUT Data Tanks iii. IN & OUT Data Tanks iv. Buffer Data Tanks - All IN and IN & OUT data Tanks are part of INITIAL STATE (IS) - All OUT and IN & OUT data Tanks are part of FINAL STATE (FS) - Develop Initial State Diagram (ISD) as a collection of IN and IN & OUT Data tanks. - Develop Final State Diagram (FSD) as a collection of OUT and IN & OUT Data tanks. - Develop Concept map (CM) as a network of all Data tanks and Processing Units.
  • 2. Advanced Data Structures, JIIT Sanjay Goel, 2006 - Put the following symbols on the center of the top line of the Rectangular box of Tank. i. IN Data Tanks : ii. OUT data tanks : iii. IN & OUT Data tanks: iv. Temporary buffer type data tanks: No symbol. 2. Storing a Graph as a Table. 3. Storing a Binary Tree in a Table. 4. Traversing (pre-order) of Binary tree stored as a table. 5. Assignment: When you have learnt SQL in DBMS, use it to do traversal over binary tree stores as a table. 6. Assignment (Group of 2) (3 marks each): Export the Table(s) created by you or by your group partner as your DBMS assignment to a text file. Write any three query functions (already executed by you using ACCESS) to process this text file using C language. 4. 24.01.06 1. Big O, small o, Big Omega, small omega, Big Theta notations. 2. Worst case, Best case, Average Case complexity analysis. 3. Assignment: Perform the average case complexity analysis for following algorithms: - Linear Search in unordered array, Linear search in Ordered array, Binary search. - Insertion sort, Bubble sort, Selection sort. 5. 25.01.06 1. Average Case Complexity analysis: Linear search, Binary search, Insertion sort. 2. Impact of hardware speedup on the data size that can be processed by an algorithm of known complexity f (n). 3. Assignment: In the three research papers that have to be studied by you, at least one should be on complexity analysis. Write program to experimentally validate the theoretical/experimental results on complexity analysis reported in the paper studied by you. Include your results in the literature survey report and presentation. Keep reporting your Lab instructors about the progress on literature survey. 6. 31.01.06 1. Insertion sort Selection sort. Comparison of algorithmic process. 2. Merge sort Transform the process Quick Sort.
  • 3. Advanced Data Structures, JIIT Sanjay Goel, 2006 3. Comparison less sorting Radix sort 4. Assignment: Analyze the Best case, Worst case, and average case complexity for sorting a linked list using selection sort and insertion sort, Your algorithm should have a space complexity of O(1). 5. Assignment (5 marks): WAP for Radix sort, non-recursive Merge sort, and Quick sort algorithms. Experimentally test the performance for varying data size and distribution. Design the test cases for this experiment. Graphically plot the results of your experiment. 7. 01.02.06 1. Best case and Worst case analysis of Merge Sort. 2. Algorithmic performance improvement by mixing different algorithms Binary insertion sort. 3. Algorithmic performance improvement by identifying the weakness and removing them for large n Shell sort. 4. Assignment (Group of two, 3 marks each): In the three research papers that have to be studied by you, one can be on sorting techniques. Write program to experimentally find out the best initial step size for shell sort for sorting an array of 10,000 integers. 8. 07.02.06 1. Best case and Worst case Complexity Analysis of Quick sort. 2. Algorithmic visualization techniques. 3. Assignment (bonus: only for those who have submitted earlier assignments on sorting program before 10.02.04: 3 marks): Write a function for array visualization to graphically display its sorted-ness. Insert this function in sorting programs to demonstrate algorithms’ progress. 9. 08.02.06 1. Tree Sort algorithm: Using BST. 2. Top down Vs Bottom up growth of tree. 3. Construction of expression tree. 4. Huffman encoding algorithm. 5. Assignment (2 marks): Using your existing functions, WAP and experimentally evaluate the performance of Tree sort algorithm. 10. 14.02.06 1. Review of key ideas. 2. Dynamic programming: e.g. Merge sort. 3. Greedy Algorithms: Huffman encoding. 4. Heap: Priority Queue: insertion and deletion operations. Number of comparison during insertion and deletion. 11. 15.02.06 1. Heap: element insertion, deletion. 2. Heapsort.
  • 4. Advanced Data Structures, JIIT Sanjay Goel, 2006 12. 02.03.06 1. Review of Algorithmic Design techniques: a. Brute Force Method: Instead of creative logic, computational speed is used for solving the problem e.g. Linear Search, Selection sort, Bubble sort. b. Decrease and Conquer: Instead of solving the problem with n elements, the problem is solved for n-k elements and then n-2k and so on. The solution for n elements is derived from the solution of smaller size data set e.g. Insertion sort. c. Divide and conquer: The problem size is decreased by a ratio rather than a constant e.g. Binary search, Quick sort, Hanoi, Maze, recursive Merge, and so on. d. Greedy: Rather than trying to take best alternative a locally best solution is picked us and short sighted decisions are taken to solve problems e.g. Huffman encoding, Traveling salesman, Activity scheduling, Map coloring, and so on. 2. Assignment (4 marks): All should allow a user inputted data for processing. B1, B2: Huffman encoding (variable number of n symbols) B2, B3: Activity scheduling, (variable number of n activities and variable number of m venues). B4, B5: Traveling Salesman (variable number of n cities) Others: Map coloring (variable number of n regions) 13. 03.03.06 1. Greedy Algorithms: - Coin exchange - Graph: Dominant set of graph - Graph: MST: Kruskal, Prim 2 Assignment (4 marks): All should allow a user inputted data for processing. B1 : Dominant set (variable number of n nodes and m links using Adjacency matrix based storage of Graph) B2: Dominant set (variable number of n nodes and m links using Adjacency list based storage of Graph) B3: Dominant set (variable number of n nodes and m links using linked storage of Graph) B4: Kruskal’s Algorithm, (variable number of n nodes and m links using Adjacency matrix based storage of Graph). B5: Kruskal’s Algorithm, (variable number of n nodes and m links using Adjacency list based storage of Graph). B6: Kruskal’s Algorithm, (variable number of n nodes and m links using linked storage of Graph). B7: Prim’s Algorithm, (variable number of n nodes and m links using Adjacency matrix based storage of Graph). B8: Prim’s Algorithm, (variable number of n nodes and m links using Adjacency list based storage of Graph).
  • 5. Advanced Data Structures, JIIT Sanjay Goel, 2006 B9: Prim’s Algorithm, (variable number of n nodes and m links using linked storage of Graph). 13-14. 7.3.06 and 8.3.06 More on Greedy Algorithms Cases of Greedy Algorithms: MST Algorithms Kruskal’s Algo Examine arcs one-by-one in the sorted order and add them to OUTPUT if their addition does not create a cycle. 10 2 4 35 25 1 20 30 40 3 5 15 Minimum cost, No cycle, select 10 2 4 35 25 1 20 30 40 3 5 15 Selected Link count < 4 so continue Next Minimum cost, No cycle, select
  • 6. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected Link count < 4 so continue Next Minimum cost, No cycle, select 10 2 4 35 25 1 20 30 40 3 5 15 Selected Link count < 4 so continue Next Minimum cost, will create a cycle so reject 10 2 4 35 25 1 20 30 40 3 5 15 Selected Link count < 4 so continue Next Minimum cost, will create a cycle so reject
  • 7. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected Link count < 4 so continue Next Minimum cost, No cycle, so select 10 2 4 35 25 1 20 30 40 3 5 15 Selected Link count = 4, so stop. Prim’s Algo Start with a vertex and grow the tree by gradually adding the cheapest unselected edge connected to any node in the selected subset. 10 2 4 35 25 1 20 30 40 3 5 15 Start with any node say 1.
  • 8. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected links <4 so continue Check the minimum cost link (amongst the dotted blue), Does not create a cycle so select 10 2 4 35 25 1 20 30 40 3 5 15 Selected links <4 so continue Check the minimum cost link from the already selected nodes, Does not create a cycle so select 10 2 4 35 25 1 20 30 40 3 5 15 Selected links <4 so continue Check the minimum cost link from the already selected nodes, Does not create a cycle so select
  • 9. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected links <4 so continue Check the minimum cost link from the already selected nodes, Does not create a cycle so select 10 2 4 35 25 1 20 30 40 3 5 15 Selected links =4 so stop Sollin’s Algorithm 1. Proceeds by adding the least cost arc emanating from each tree. 2. Each iteration reduces the number of components by a factor of at least 2. 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count <4 so continue Choose a node, check its cheapest link, No cycle so select
  • 10. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count <4 so continue Choose next node, check its cheapest link, No cycle or duplication, so select 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count <4 so continue Choose next node, check its cheapest link, No cycle or duplication, so select 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count <4 so continue Choose next node, check its cheapest link, No cycle but duplication, so no new selection No New adge is added for node 4 as the cheapest edge from node 4 is already selected.
  • 11. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count <4 so continue Choose next node, check its cheapest link, No cycle but duplication, so no new selection No New adge is added for node 5 as the cheapest edge from node 5 is already selected. 10 10 2 4 2 4 35 35 25 1 20 30 1 40 3 5 3 5 15 15 Ist iteration over we get some connected components (2nd Iteration starts to link these connected components) 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count <4 so continue Choose a tree (connected component) , check its cheapest link, No cycle no duplication, so select.
  • 12. Advanced Data Structures, JIIT Sanjay Goel, 2006 10 2 4 35 25 1 20 30 40 3 5 15 Selected link count = 4 so stop 15. 21.3.06 1. Dijkastra’s shortest path Algorithm for un-weighted graph and weighted graph. 2. Programming Assignments: (5 marks) B1: Dijkastra’s Algorithm for weighted graph using Adj matrix for Graph and linked structure for priority queue. B2: Dijkastra’s Algorithm for weighted graph using Adj matrix for graph and array based structure for priority queue. B3: Dijkastra’s Algorithm for weighted graph using Adj List for graph and array based structure for priority queue. B4: Dijkastra’s Algorithm for weighted graph using Adj List and linked structure for priority queue. B5: Dijkastra’s Algorithm for weighted graph using Linked Structure for graph and array based structure for priority queue B6: Dijkastra’s Algorithm for weighted graph using Linked Structure for graph and linked structure for priority queue. B7: Dijkastra’s Algorithm for weighted graph using Simulated pointer based Structure for graph and array based structure for priority queue B8: Dijkastra’s Algorithm for weighted graph using Simulated pointer based Structure for graph and linked structure for priority queue. B9: Sollin’s Algorithm using Adj Matrix for Graph. 16. 22.3.06 1. Map Colouring. 2. Limitations of Greedy Algorithm: Optimality is an issue. 3. Dynamic Programming: overlapping sub-problems, recursion removal: Fibonacci, Binomial Coefficients, Coin. 4. Assignment: If your choice of three research papers is not over, include one paper or Dynamic Programming. 17-18. 4.4.06 and 5.4.06 1. Decision Tree for classification 2. Puzzle solving: i. Problem space States: goal, initial, others, states are defined by problem
  • 13. Advanced Data Structures, JIIT Sanjay Goel, 2006 ii. Operators for state transition depend upon the problem. iii. Goal test. iv. Data Structure for State representation (generally using flags). 1. 8-puzzle 2. River Problem 3. 8-Queen possible 3d extension 4. Robot path finding 5. Robot block world 6. Water jug problem 7. Rat in the maze 8. Tower of Hanoi 9. Rubic Cube v. Generating choice depending upon the available operators: generating decision tree. vi. Searching the goal state and path to reach goal state in decision tree: Depth first Vs Breadth First Search. vii. Search strategy properties: completeness (yes/no), optimality (yes/no), and Time and Space complexity of algorithm. 3. Assignment: (group of 2 students, 5 marks each) B1: WAP for placing maximum number of queen on chess like board of 5x5 cells following the rules of chess. Analyze the complexities of your algorithm. B2: WAP for placing maximum number of Knights on chess like board of 5x5 cells following the rules of chess. Analyze the complexities of your algorithm. B3: WAP for placing maximum number of rooks (n1) and bishops (n2) on a chess like board of 5x5 cells following the rules of chess such that ABS (n1- n2) <=1. Analyze the complexities of your algorithm. B4: WAP for solving 4x4 puzzle (one hole) (re-arrange any user inputted initial pattern of letters into a desired user inputted given pattern). Analyze the complexities of your algorithm. B5: WAP for solving Water jug problem for any user inputted amount with 4 jugs of capacity of 10, 9, 5, and 2. Analyze the complexities of your algorithm. B6: WAP for solving Water jug problem for any user inputted amount with 3 jugs of capacity of 7, 4, and 3. Analyze the complexities of your algorithm. B7: WAP for solving Water jug problem for any user inputted amount with 2 jugs of capacity of 7 and 6. Analyze the complexities of your algorithm. B8: WAP for solving 4x4 puzzle (two holes) (re-arrange any user inputted initial pattern of letters into a desired user inputted given pattern). Analyze the complexities of your algorithm. B9: WAP for solving 4x4 puzzle (three holes) (re-arrange any user inputted initial pattern of letters into a desired user inputted given pattern). Analyze the complexities of your algorithm.
  • 14. Advanced Data Structures, JIIT Sanjay Goel, 2006 19. 11.04.06 1. Threaded BST Assignment (Group of 2, 7.5 marks each): B1: Create a graph of student records with following attributes: i. Name ii. Roll Number iii. Department The inter-node links represent close friendship between students. One student can have at most 5 close friends. A BST tree is used to index this database on student’s Name. WAP to store this database and answer following queries and perform following operations: i. List the Roll numbers of friends of a given name. ii. List the Names of the friends of given roll number. iii. insertion of new record. iv. deletion of a record v. insertion of a link vi. deletion of a link Use pointer based storage for graph and pointer-less storage for BST. B2: Create a graph of student records with following attributes: • Name • Roll Number • Department The inter-node links represent close friendship between students. One student can have at most 5 close friends. A BST tree is used to index this database on student’s Name. WAP to store this database and answer following queries and perform following operations: List the Roll numbers of friends of a given name. List the Names of the friends of given roll number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer based storage for graph and pointer based storage for BST. B3: Create a graph of student records with following attributes: • Name • Roll Number • Department The inter-node links represent close friendship between students. One student can have at most 5 close friends. A BST tree is used to index this database on student’s Name. WAP to store this database and answer following queries and perform following operations: List the Roll numbers of friends of a given name.
  • 15. Advanced Data Structures, JIIT Sanjay Goel, 2006 List the Names of the friends of given roll number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer-less storage for graph and pointer based storage for BST. B4: Create a graph of student records with following attributes: • Name • Roll Number • Department The inter-node links represent close friendship between students. One student can have at most 5 close friends. A BST tree is used to index this database on student’s Name. WAP to store this database and answer following queries and perform following operations: List the Roll numbers of friends of a given name. List the Names of the friends of given roll number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer-less storage for graph and pointer-less storage for BST. B5: Create a graph of employee records with following attributes: • Name • Employee Number • Department The inter-node links represent shared postings between employees. One employee can have at most 4 shared postings with other employees. A BST tree is used to index this database on employee number. WAP to store this database and answer following queries and operations: List the department of co-posted employees of a given name. List the Names of the co-posted employees of given employee number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer-less storage for graph and pointer-less storage for BST. B6: Create a graph of employee records with following attributes: • Name • Employee Number • Department The inter-node links represent shared postings between employees. One employee can have at most 4 shared postings with other employees.
  • 16. Advanced Data Structures, JIIT Sanjay Goel, 2006 A BST tree is used to index this database on employee number. WAP to store this database and answer following queries and operations: List the department of co-posted employees of a given name. List the Names of the co-posted employees of given employee number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer-less storage for graph and pointer based storage for BST. B7: Create a graph of employee records with following attributes: • Name • Employee Number • Department The inter-node links represent shared postings between employees. One employee can have at most 4 shared postings with other employees. A BST tree is used to index this database on employee number. WAP to store this database and answer following queries and operations: List the department of co-posted employees of a given name. List the Names of the co-posted employees of given employee number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer based storage for graph and pointer-less storage for BST. B8: Create a graph of employee records with following attributes: • Name • Employee Number • Department The inter-node links represent shared postings between employees. One employee can have at most 4 shared postings with other employees. A BST tree is used to index this database on employee number. WAP to store this database and answer following queries and operations: List the department of co-posted employees of a given name. List the Names of the co-posted employees of given employee number. insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer based storage for graph and pointer based storage for BST.
  • 17. Advanced Data Structures, JIIT Sanjay Goel, 2006 B9: Create a graph of Book records with following attributes: • Title • Author name • ISBN Number • Library Acquisition Number • Publisher The inter-node links represent cross referencing between books. One book can refer to at most 5 other employees. A BST tree is used to index this database on ISBN number. WAP to store this database and answer following queries and operations: List the publishers of books referred by of a given book given its ISBN number. List the publishers of books referring to of a given book given its Title Insertion of new record. deletion of a record insertion of a link deletion of a link Use pointer-less storage for graph and pointer-less storage for BST. 20. 18.04.06 1. Comparison of Linear Index and BST based Index. 2. Indexed BST. 3. ASSIGNMENT (Group of two or alone, 9 marks each) : Modify your last assignment given on 11.04.05 as follows: i. Replace ordinary BST with Threaded Indexed BST. ii. Save and upload your database (graph as well as index) on (and from) file(s). 21. 19.04.06 1. AVL Tree. 2. Bonus Assignment (single student, 5 marks, only for those who scored a total of minimum 20 marks out of 60 in two minor tests and all five lab tests, three tests conducted by seniors in the evenings as well as two tests by faculty during lab time): Modify your last assignment by replacing Threaded Indexed BST with Threaded Indexed AVL search Tree. 22-23. 25-26.04.06 1. AVL Tree: Balancing after Insertion and Deletion. LL, RR, LR, RL, R0, R1, R-1, L0, L1, L-1. 2. TRIE, Compact TRIE.
  • 18. Advanced Data Structures, JIIT Sanjay Goel, 2006 24-25. 02.5.06 1. Multi-way Search Trees for creating Index structure for large database: B Tree, B+ Tree, B* Tree: Data structure, Search, Insertion, Deletion. 25. 03.05.06 1. Hashing: Hash function, Synonym, Collision, Collision resolution, Open hashing, Bucket hashing, Closed hashing. **************************************************************** Some relevant quotes: 1. I cannot teach anybody anything; I can only make them think. – Socrates 2. You cannot teach people anything. You can only help them discover it within themselves. - Galileo 3. I do not teach anything. I create conditions for learning. 4. The only source of knowledge is experience. - Einstein