Linear progression

  1. Solve the following recurrence relations with the fastest method available
    to you:
    1a) T(n) = 4T(n/2) + n log(n), with T(1) = 1
    1b) T(n) = 7T(n/2) + n
    3
    1c) T(n) = 6T(n/3) + n
    2
    1d) T(n) = T(n/2) + log(n)
  2. This question asks you to insert an item into a 2-3 tree and the corresponding red-black tree.
    2a) insert the letter ‘b’ into the following 2-3 tree. Show each step of the
    process. If a 4-node is created show it in the tree and then show how
    you process it afterwards.
    a c
    d f
    e h k p
    i
    m
    2
    22:544:613, Fall 2021
    Final Exam date: 12/16/21
    2b) Draw the corresponding equivalent red-black tree of the tree above
    (before inserting ’b’). Make sure to clearly mark red and blank links.
    If you do not have access to red pen use two parallel lines k to represent
    red links.
    2c) Now again insert the letter ‘b’ in this red-black tree. Showing the
    status of the tree at each step, including rotations.
  3. In this question we are interested in applying Dijkstra’s algorithm to the
    following graph. The graph also shows a partially constructed shortest
    path tree starting from node labeled ‘S’, and containing edges ‘SA’ and
    ‘SB’ (depicted by red color.) This partially created shortest path tree is
    constructed based on Dijkstra’s algorithm.
    A
    B
    C
    E
    D
    F
    6
    S
    1
    5
    1
    3
    9
    2
    4
    1
    3
    3a) Show the heap for this stage. You do not need to construct the heap
    from scratch. Just show a heap in tree form