Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more.
Course Hero has millions of course specific materials providing students with the best way to expand
their education.
Below is a small sample set of documents:
Duke - CPS - 182
Table of Contents 1. Overview 2. Anonymity and You 2.1 Implications of being Anonymous Online 2.2 Legal Considerations 2.3 Ethical Considerations 2.4 Evaluation of Future Policy 3. Encryption 3.1. Asymmetric Encryption 3.2. Public/Private Key Impleme
Duke - CPS - 182
Censorship in China Part 1 Background and Research I. II. Introduction A. Topic Explore terms, reasons, consequences, procedures, etc. of censorship in China Company Policies explanation of company censorship policies A. Google 1. Abide by the law
Duke - CPS - 182
4/17/06MMORPG's - Virtual Economies Spilling into the Real WorldThe main purpose of this paper is to show that the virtual economies that appear in MMORPG's (Massive Multiplayer Online Role Playing Games) are real economies that can and should be
Duke - CPS - 100
Tools: Solve Computational ProblemsAlgorithmic techniques Brute-force/exhaustive, greedy algorithms, dynamic programming, divide-and-conquer, Programming techniques Recursion, memo-izing, compute-once/lookup, tables, Java techniques java.util
Duke - CPS - 100
Printed by Owen L. Astrachan Jan 30, 08 8:27ArrayListHash.javaPage 1/2Jan 30, 08 8:2775ArrayListHash.javaint bucketIndex = getHash(key); ArrayList<Combo> list = myTable.get(bucketIndex); if (list = null){ list = new ArrayList<Combo>(); myTa
Duke - CPS - 100
Burrows Wheeler Transform BWT efficiency Michael Burrows and David Wheeler in 1994, BWT By itself it is NOT a compression scheme Its used to preprocess data, or transform data, to make it more amenable to compression like Huffman Coding Huf
Duke - APR - 100
Burrows Wheeler Transform BWT efficiency Michael Burrows and David Wheeler in 1994, BWT By itself it is NOT a compression scheme Its used to preprocess data, or transform data, to make it more amenable to compression like Huffman Coding Huf
Duke - CPS - 100
APTs and structuring data/informationAPTs and Class/OO/Java tradeoffsIs an element in an array, Where is an element in an array? DIY: use a loop Use Collections, several options public boolean contains(String[] list, Tradeoffs?If you searc
Duke - JAN - 100
APTs and structuring data/informationAPTs and Class/OO/Java tradeoffsIs an element in an array, Where is an element in an array? DIY: use a loop Use Collections, several options public boolean contains(String[] list, Tradeoffs?If you searc
Duke - CPS - 100
What is Computer Science at Duke?Big Ideas in Computer ScienceWhat we tell you it is A bunch of courses useful in some majors What you want it to be or imagine it to be Independent study, new courses, interdepartmental major Mathematics i
Duke - APR - 100
What is Computer Science at Duke?Big Ideas in Computer ScienceWhat we tell you it is A bunch of courses useful in some majors What you want it to be or imagine it to be Independent study, new courses, interdepartmental major Mathematics i
Duke - CPS - 100
Pieces in GalaxyTripStart with[", "2 3", "1 4", ", "2 5" .]Another piece in GalaxyTripSupposed we have found all the connected components, accounting for all the vertices and we have these sizes: 1, 3, 5Machine 1 depends on 2 and 3 What if
Duke - APR - 100
Pieces in GalaxyTripStart with[", "2 3", "1 4", ", "2 5" .]Another piece in GalaxyTripSupposed we have found all the connected components, accounting for all the vertices and we have these sizes: 1, 3, 5Machine 1 depends on 2 and 3 What if
Duke - CPS - 018
Random Numbers Create a random number generator Random generator; Initialize it generator = new Random(); Generate Random Numbers from 0 to 8 x = generator.nextInt(9); How do you get random numbers from 1 to 10?
Duke - PS - 214
CPS 214: Computer Networks Distributed SystemsJanuary 23, 2007Problem Set 1Instructor: Prof. Bruce Maggs Computer Science Department, Duke UniversityThis problem set has four questions, each with several parts. Answer them as clearly and conci
Duke - PS - 214
CPS 214February 18, 2007Problem Set 2Instructor: Prof. Bruce Maggs Computer Science Department, Duke UniversityThis problem set has three questions. Answer them as clearly and concisely as possible. You may discuss ideas with others in the cla
Duke - CPS - 049
Discussion Report: The Database of IntentionsShivnath Babu Duke University shivnath@cs.duke.eduThis report summarizes the class discussion on "The Database of Intentions". The assigned reading for this discussion was the first chapter of the book
Duke - CPS - 049
CPS 49S Google: The Computer Science Within and its Impact on Society - Spring 2008 Homework 2 Due date: Friday, Feb 29, 2008, 5.00 PM. Late submissions will not be accepted (unless there are documented excuses from the dean). Submission: You shou
Duke - CPS - 049
CPS 49S Google: The Computer Science Within and its Impact on Society - Spring 2008 Homework 1 Due date: Thursday, Jan 31, 2008, 1.00 PM (before class). Late submissions will not be accepted (unless there are documented excuses from the dean). Sub
Duke - CPS - 049
CPS 49S Google: The Computer Science Within and its Impact on Society - Spring 2008 Exercise 1Question 1 Compute the PageRank of the pages in Figure 1.Page BPage APage CPage DFigure 1: Link graph for Question 1Question 2 Compute the Pag
Duke - CPS - 049
1Chapter 1 Introduction to Program DesignChapter OverviewWhat is a computer program? What are the parts of a program? How are they put together? What kinds of questions does a program designer ask?In this chapter you will learn how a compu
Duke - CPS - 271
Why Neural Networks? Maybe we should make our computers more brain-like:Computers BrainsNeural NetworksCPS 271 Ron ParrComputational Units Storage Units Cycle Time Bandwidth Compute Power108 gates/CPU 1011 neurons 109 bits RAM 1012 bits HD 1
Duke - CPS - 210
Dynamic Voltage ScalingThe question: at what clock rate/voltage should the CPU run in the next scheduling interval? Voltage scalable processors StrongARM SA-2 (500mW at 600MHz; 40mW at 150MHz)(adjust clock based on past window, no process reorde
Duke - CPS - 100
ADTs and vectors, towards linked listslltvector is a class-based implementation of a lower-level data type called an array tvector grows dynamically (doubles in size as needed) when elements inserted with push_back tvector protects against bad
Duke - CPS - 110
I/O Caching and Page ReplacementMemory/Storage Hierarchy 101Very fast 1ns clock Multiple Instructions per cycle"CPU-DRAM gap" memory system architecture (CPS 104) volatile "I/O bottleneck" VM and file caching (CPS 110)P $ SRAM, Fast, Small Expe
Duke - CPS - 271
The Problem Learning Probability DistributionsCPS 271 Ron Parr Observe a sequence of events Predict the probability of future events based upon observations Classical statistical problem Surprisingly subtle issues ariseEvent Spaces We first c
Duke - CPS - 108
Inheritance (language independent)qFirst view: exploit common interfaces in programming Iterator and Comparable in Java, see List/ArrayList/Vector Iterators in STL/C+ share interface by convention/templatesImplementation varies while interfac
Duke - CPS - 210
Tricks (mixed syntax)if (some_condition) / as a hint { LOCK m DO if (some_condition) /the truth {stuff} END Cheap to get info but must check for } correctness; always a slow wayMore TricksGeneral pattern:while (! required_conditions) wait (m, c)
Duke - CPS - 108
Software frameworks/cadaversExperience with OO programming and design shows that design patterns are useful Where do we get the experience? How do we impart experience? What can we use to illustrate patterns in practice? What patterns should we em
Duke - CPS - 210
Power-Aware Ad Hoc RoutingMobicom98 paper Power-Aware Routing in Ad Hoc Networks by Singh, Woo, and Raghavendra What is ad hoc routing? Routing through cooperating wireless nodes that may be mobile (topology changing). Goal: reduce the energy cons
Duke - CPS - 189
Thomas Finley An Empirical Study of Novice Program Comprehension in the Imperative and ObjectOriented Styles by Vennila Ramalingam and Susan Wiedenbeck The title says it all, does it not? The authors sought to determine what differences in comprehens
Duke - CPS - 100
Searching, Maps, HashingqSearching is a very important programming application Consider google.com and other search engines In general we search a collection for a key Vector/List, Tree: O(n) and O(log n) If we compare keys when searching we c
Duke - CPS - 100
Intersection, Union, MultisetsFinding the intersection of two sets requires examining all the elements of one set and determining if these are in the other How can we examine all the elements of a MultiSet? What mechanism exists for accessing ind
Duke - CPS - 100
What is Computer Science?What is it that distinguishes it from the separate subjects with which it is related? What is the linking thread which gathers these disparate branches into a single discipline? My answer to these questions is simple - it is
Duke - CPS - 100
Backtracking, Search, HeuristicsqMany problems require an approach similar to solving a maze Certain mazes can be solved using the "right-hand" rule Other mazes, e.g., with islands, require another approach If you have "markers", leave them at
Duke - CPS - 100
Review of Data StructuresqWeve studied concrete data structures Vectors Homogeneous aggregates supporting random access Linked lists Collections supporting constant-time insertionTrees Combine efficiency of search/insert from vector/linke
Duke - CPS - 110
COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating SystemsHow COMPSCI 110 will work Its all explained on the webhttp:/www.cs.duke.edu/educa
Duke - CPS - 100
Intersection, Union, MultisetsAnatomy of IntersectionFinding the intersection of two sets requires examining all the elements of one set and determining if these are in the other How can we examine all the elements of a MultiSet? What mechanis
Duke - CPS - 100
Name: HW 1 - Linked Lists Instructions: This HW is due in-class on Oct. 16. Turn in your work stapled and with your name on every page. This assignment is worth 100 points. You should work on your own, but you can use books/notes. You should not use
Duke - CPS - 100
CPS 100E - Program Design and Analysis I Prof. Rodger Section: 2-3 Trees handout2-3 Treesleaf nodes contain data item all leaves on same level nonleaf node has 2 or 3 children two search values largest item in left subtree largest item in middle s
Duke - CPS - 100
CPS 100E - Program Design and Analysis I Prof. Rodger Section: Trees handout Read Chap 6.5-6.6, Chap 17. We will not use the class implementation of trees in the book, but you should read about them. General Tree set of nodes vertices set of edges no
Duke - CPS - 100
CPS 100E - Program Design and Analysis I Prof. Rodger Section: Red Black Trees handoutRed-Black TreeBinary search tree properties every node is red or black every leaf is a NULL node and black the root is black If node is red, then its children ar
Duke - CPS - 100
The PlanGraphical User Interfaces GUIs Components Flat Layouts Hierarchical Layouts Designing a GUI Coding a GUIGUI.1GUI.2Components JLabel text/image display JTextField single line for text input/output JTextArea multiple lines for te
Duke - CPS - 100
Java: Base Types All information has a type or class designation Built-in TypesCalled : primitive types or base types boolean, char, bye, short, int, long, float, double Primarily use: int, double, booleanNeed to declare before using; defined
Duke - CPS - 100
On the Limits of ComputingExistence of Noncomputable FunctionsReasons for Failure1.Approach Matching up Programs and Functions E.g., assume 3 functions, only 2 programs Without details, conclude one function has no programRuns too long
Duke - CPS - 100
Intro to SortingSelection Sorting Example Sorting "Ideal" Computer Science Topic Theory and Practice meet Efficient Sorting Saves MoneyFirst look at some simple (quick and dirty?) algorithms Selection Sort1. 2. 3. Find smalle
Duke - CPS - 100
Creating HeapsArray-based heap Heap is an array-based implementation of a binary tree used for implementing priority queues, supports:insert, findmin, deletemin: complexities?store "node values" in array beginning at index 1 for node with
Duke - CPS - 100
Binary TreesFrom doubly-linked lists to binary treesLinked lists: efficient insertion/deletion, inefficient search ArrayList: search can be efficient, insertion/deletion not Binary trees: efficient insertion, deletion, and search trees used i
Duke - CPS - 100
Big Oh Again AgainRecognizing Common Recurrences Have taken the attitude that mostly you can look things up Now need to be able to do your own derivations Extend our menu of solutions to common recurrence Lets look at previously shown tableBe
Duke - CPS - 100
Searching, Maps,Tries (hashing)From Google to MapsSearching is a fundamentally important operation We want to search quickly, very very quickly Consider searching using Google, ACES, issues? In general we want to search in a collection for
Duke - CPS - 100
Intro to GraphsDefinitions and VocabularyA graph consists of a set of vertices (or nodes) and a set of edges (or arcs) where each edge connects a pair of vertices. If the pair of vertices defining an edge is ordered, then it is a directed graph.
Duke - CPS - 100
Data CompressionCompression is a high-profile application.zip, .mp3, .jpg, .gif, .gz, What property of MP3 was a significant factor in what made Napster work (why did Napster ultimately fail?)Why do we care?Secondary storage capacity double
Duke - CPS - 100
Searching, Maps,Tries (hashing)Searching is a fundamentally important operationWe want to search quickly, very very quickly Consider searching using Google, ACES, issues? In general we want to search in a collection for a keyWe've searched us
Duke - CPS - 100
Memory ModelCost of Disk I/OFor this course: Assume Uniform Access Time All elements in an array accessible with same time cost Reality is somewhat different Registers On (cpu) chip cache memory Off chip cache memory Main memory Virtual memo
Duke - CPS - 100
Inheritance and Interfaces Single inheritance in JavaInheritance models an "is-a" relationshipA class can extend only one class in Java A dog is a mammal, an ArrayList is a List, a square is a shape, Write general programs to understand
Duke - CPS - 100
Inheritance and Interfaces Inheritance models an "is-a" relationshipA dog is a mammal, an ArrayList is a List, a square is a shape, Write general programs to understand the abstraction, advantages?void doShape(Shape s) { System.out.println(s.a
Duke - CPS - 100
Other N log N SortsBinary Tree SortBasic Recipe o Insert into binary search tree (BST) o Do Inorder Traversal Complexity o Create: O(N log N) o Traversal O(N) Not usually used for sorting unless you need BST for other reasonsCompSci 100E28.1
Duke - CPS - 100
Java: Base Types Java: Operators for Base TypesAll information has a type or class designation Built-in TypesCalled : primitive types or base types boolean, char, bye, short, int, long, float, double Primarily use: int, double, booleanFami
Duke - CPS - 100
Java Basics Arrays!Java Basics Arrays!Should be a very familiar idea"!Problem: Deal with exam grades in a course o!Could have variable for each student o!Would need unique name for each variable o!Need lots of custom code o!Instead, assume
Duke - CPS - 100
Dropping Glass BallsTower with N Floors ! Given 2 glass balls ! Want to determine the lowest floor from which a ball can be dropped and will break ! How?!Glass balls revisited (more balls)! !1.! 2.! 3.! 4.! 5.! 6.! 7.! 8.! 9.! 10.!What is th
Duke - CPS - 100
Data CompressionYear Scheme 1967 ASCII 1950 Huffman 1977 Lempel-Ziv (LZ77) 1984 Lempel-Ziv-Welch (LZW) Unix compress 1987 (LZH) used by zip and unzip 1987 Move-to-front 1987 gzip 1995 Burrows-Wheeler 1997 BOA (statistical data compression)CompSci