1rev - CIS 121 Spring 2013 First Midterm Review given out...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 121 - Spring 2013 First Midterm Review – given out Saturday, February 16 Our first midterm is scheduled for Thursday, February 21, during the normal lecture period. Please come to the usual classroom, we shall try to fit everybody there. The labs on Monday/Tuesday Feb. 18/19 will be used for midterm review. The lecture on Tuesday Feb. 19 will be used for midterm review. In addition, the TAs will hold a review session Wednesday Feb. 20, 7-9PM in Skirkanich Hall Room 13 - Berger Auditorium. This review sheet contains a list of readings, some sums to memorize, a mock exam, and some additional review problems. These questions should give you an idea of the scope and style of the questions that you’ll see on the exam. Note that all the specified material in the lecture slides or the book slides, in the homeworks, or in the labs may potentially appear on the exam, even if it is not reviewed in the problems included here. The textbook contains more in-depth discussions that help you understand the concepts. However, for this midterm, only the concepts that appear specifically in the slides are tested. We will post and distribute on Monday Feb. 18 solutions to these review problems. We strongly suggest that you attempt to solve them on your own before you see the solutions. 1 Readings Posted slides titled Lecture Notes 1-7. From the posted book slides for section 1.3: slides 1-45, slides 48,49,53,55,56. From the posted book slides for section 2.4: slides 1-20, slides 22,23,24. From the textbook, read sections 1.2, 1.3, 1.4, and 2.4. Solutions to homeworks 2 and 3. I have been known to put same year, actual homework problems on exams. Lab writeups and code up to and including February 18/19. 2 Memorize! 1 + q + q 2 . . . q n - 1 = q n - 1 q - 1 ( q 6 = 1) 1 + 2 + . . . + n = n ( n + 1) 2 1 2 + 2 2 + . . . + n 2 = n ( n + 1)(2 n + 1) 6 In the textbook and in the book slides they use the term “complete” binary for what we call binary tree with the “heap-structure property” in this course (see slides Lecture Notes 7). What we call complete binary 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
tree has various names in other sources; full, fully complete, perfect, perfectly complete, (unimpeachably complete?:). For this course, in a non-empty complete binary tree where the height of the tree is h : There are 2 d nodes at depth d , for all depths, including d = h . Therefore there are 2 h leaves. There are 2 h +1 - 1 nodes in total. A very good approximation for the n ’th Fibonacci number is F n Φ n 5 where Φ = 1+ 5 2 1 . 618 is the Golden Ratio . It follows that log F n is Θ( n ) 3 Mock Exam (60 minutes for 120 points) 1. (20 pts) For each statement below, decide whether it is true or false. In each case attach a very brief explanation of your answer. (a) There is no algorithm that sorts an array of n elements and whose running time is O (7 n log n ), true or false? (b) Let A be an algorithm that, for each n > 0, takes less than 1000 steps for all inputs of size n except for one of these inputs, on which it takes exactly n steps. Then, the worst-case running time of A is Θ( n ), true or false?
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern