Skip to main content

CSC 301.01, Class 41: Wrapup

Overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Questions
  • More about the final
  • Some learning goals/outcomes

News / Etc.

Upcoming work

Extra Credit (Academic/Artistic)

Extra credit (Peer)

  • Pub-free quiz, TONIGHT.

Extra Credit (Misc)

Other good things

  • Musical this weekend.
  • More music stuff.

Questions

Should I submit really old extra credit writeups that are sitting on my computer?
It couldn’t hurt.
Will you be available next week?
I should be sitting in my office much of the day on Monday and Tuesday.

More about the final

  • Goal: A chance for you to demonstrate what you’ve learned/mastered. (See below.)
  • Often, more “can you read and apply/critique an algorithm” than “can you design one”?
  • We’ll look quickly at the sample final.

Some learning goals/outcomes

Note: In spite of what I said about EOCEs, we’re really doing this because I think it’s useful to step back and look at what you learned (or might have learned).

Big picture:

  • Skills and strategies for designing algorithms and data structures.
  • Increased knowledge of “the literature” of common algorithms and data structures.
  • Other related stuff

Habits of thought in dealing with algorithm design

  • Consider approaches
  • Develop a potential algorithms to solve a problem
  • Work though examples
  • Try to find a counter-example
  • Try to prove it correct
  • Analyze it
  • Do it all over again (“Can I do better?”)

Approaches to algorithm design

  • Use one of the main techniques
    • Greed
    • Divide and conquer
    • Exhaustive search (and dynamic programming)
    • Turn the problem into an already solved problem
  • Plus …
    • Drawing pictures can help
    • Modify an existing algorithm
    • Introduce randomness
    • Restrict the input
    • Accept approximations

“The literature” - Classic (and not so classic) algorithms and data structures

Algorithms

  • Rabin-Karp - Substring matching based on hashing
  • Shortest path - Solve the more general problem: Find the shotest path from s to every node. (Dijkstra’s)
  • Prim - Minimum spanning tree (builds connected)
  • Kruskal - Minimum spanning tree (builds disconnected)
  • Ford-Fulkerson - Max flow
  • Maximum bipartite
  • Heap sort and other sorting algorithms
  • Min stamps
  • Approximate matching
  • 0-1 knapsack
  • Plus many many more.
  • Heapsort

ADTs

  • Lists
  • Dictionary/Map
  • Set
  • Graph
  • Tree

Data Structures

  • Skip list
  • Trie (there are multiple implementations of tries, but we usually use tries as a way to achieve an ADT or other goal)
    • Used for those weird suffix tree things useful for pattern matching
    • Dictionaries
  • Balanced search trees
    • Red-black trees
    • 2:3 trees
    • B tree (generalized 2:3 trees)
  • Heaps
  • Hash tables
  • Union-find
  • Different implementations of graphs
    • Adjacency list
    • Adjacency matrix

Other stuff

  • Formalized asymptotic analysis - Big O, Big Omega, Big Theta
    • A bit of amortized analysis
  • Techniques for solving recurrence relations.
    • Master theorem
    • Recurrence trees
    • Repeated expansion
  • Way too many summations and rules for summations.
  • Program verification
    • Memory/state models
    • Loop invariants
  • Proof, informal and formal
    • Induction (strong and weak)
    • Constructive
    • Contradiction
  • Counter-examples (covered earlier, but …)
  • Practice with (stupid) hackerrank approaches
  • Practice with C and GNU code conventions