CS 150 Final Exam Topic List Major Topics since Test 2 (2/3 of the test)- Predicate Calculus: Know how to use /\ (and), \/ (or), and ~ (not) to describe sets of data in languages such as... RA: Relational Algebra. Know how to write basic queries from a relation/table using select, project, natural join, union, and intersection. SQL: Know how to write basic queries, similar to those from RA. Intractability: Know what it means for a problem to be in P or NP. Know the basics of the 3-SAT problem. Know P and NP means and what it means for whether a problem can be solved or not. Computability: Know what it means for a problem to be computable or uncomputable. Know the basics of the halting problem. Regular Expressions / Graphs: Know what a graph is. Know what a regular expression is and how it is another version of pattern matching. Hardware: Know the basics of the six different types of memory we discussed. Know how each is used, relative speed/cost comparison (i.e RAM is cheaper than cache, but cache is faster than RAM) SQL Injection: Know how the attack basically works - you will not have to actually perform an attack on the test Quantum Computing: Know the basics of quantum computing, a qbit, and how a cat can be dead and alive at the same time in just the right box. Previous Major Topics (1/3 of the test, major points only)- History of CS: Nothing on the final from this section. Grammars and Language: Remember what a grammar is and what it's function is. It would be good to think about how SQL and PHP as a language and how that relates to grammars. Haskell: Nothing on the final from this section. Recursion: Expect to have to write another algorithm. Search and Sort: Remember the basic algorithms of mergesort and binary search, and how they relate to recursion. Algorithmic Complexity: Remember Big Oh, critical sections, and why it's important to count operations and not seconds. Object-Oriented Design: Remember what a class is and why they are important in system design. Be able to identify classes in a system. The Internet: Remember latency, bandwidth, and how the internet works through packet switching. Cryptography: Remember the difference between security and privacy. Questions and Answers: 1. Will the questions on the final be composed just of "big questions" and short-answer questions or will there also be essays and other questions that don't really fall under any specific category of question? A. Multiple choice, short answer, longer essay, and "write an algorithm" questions will appear on the test. 2. Do we need to understand/know about Russell's paradox and Epimendes paradox (like on the Godel slides by Professor Evans and in GEB)? A. No. 3. Are you still planning on asking a question from the guest lecture about digital humanities? A. Probably not. 4. Do you know what the policy will be for final exam regrades? A. Exams will be available the next Monday for people to come and look at them (you can't keep the final). RA/SQL Example Questions from Review Session [] = subscript; () = table or relation operated on 1. List all branches that have an account and a loan at them RA - Project[branch-name] (account NJ loan) RA - Project[branch-name] (account) /\ Project[branch-name] (loan) SQL - select branch-name from account natural join loan 2. List all customers that live in Brooklyn RA - Project [cust-name] (Select [cust-city='Brooklyn'] (Customer)) SQL - select cust-name from Customer where cust-city='Brooklyn' 3. Everything in the branch RA - Branch SQL - select * from Branch 4. Cities that have loans associated with a branch there RA - Project [branch-city] (Loan NJ Branch) SQL - select branch-city from loan natural join Branch 5. Customers that have an account or a loan RA - Project [cust-name] (Depositor) U Project [cust-name] (Borrower) SQL - select * from (select cust-name from Depositor) as UsersWithAccounts Union (select cust-name from Borrower) as UsersWithLoans