# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

2 Pages

Course: WEEK 100, Fall 2009
School: Duke
Rating:

Word Count: 240

#### Document Preview

doPath(Tree 1) void * t, tvector&lt;int&gt;&amp; path) { if (t == 0) { for(int k=0; k &lt; path.size(); k++) { cout &lt;&lt; path[k] &lt;&lt; &quot; &quot;; } cout &lt;&lt; endl; } path.push_back(t-&gt;info); doPath(t-&gt;left,path); doPath(t-&gt;right,path) path.pop_back(); // remove my...

Register Now

#### Unformatted Document Excerpt

Coursehero >> North Carolina >> Duke >> WEEK 100

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.

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.
doPath(Tree 1) void * t, tvector<int>& path) { if (t == 0) { for(int k=0; k < path.size(); k++) { cout << path[k] << " "; } cout << endl; } path.push_back(t->info); doPath(t->left,path); doPath(t->right,path) path.pop_back(); // remove my footprints } 2) void maxfreq(const tvector<string>& codes) { int max = 0; for(int k=0; k < codes.size(); k++){ if (codes[k].length() > max){ max = codes[k].length(); } } for(int k=0; k < codes.size(); k++){ if (codes[k].length() == max){ cout << k << endl; } } } 3) TreeNode * map2tree(tmap<int, string> * map) // pre: map represents int->string encodings for a Huffman tree // map contains at least 2 (int, string) pairs // post: returns pointer to root of Huffman tree representing // the encodings { * TreeNode root = new TreeNode(1234,0,0); Iterator<pair<int,string> > * it = map->makeIterator(); for(it->Init(); it->HasMore(); it->Next()) { helper(root, it->Current().second, it->Current().first); } return root; } 4) n log n 5) n^2 6) O(N), must look at entire vector counting 7) sort, look for where elements differ from predecessor, that's # unique count, e.g., sort(myList.begin(), myList,end()); int count = 0; for(int k=1; k < myList.size(); k++) { if (myList[k] != myL...

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 - 221
Baring It All to Software: Raw Machines E. Waingold, M. Taylor, D. Srikrishna, V. (Presented by Linda Deng)Sarkar, W. Lee, V. Lee, J. Kim, M. Frank, P. Finch, R. Barua, J. Babb, S. Amarasinghe, A. AgarwalHitting a wall Already in 1997? As
Duke - CPS - 262
http:/www.icsb-2009.org/http:/www.icsb-2008.org/http:/www.icsb-2007.org/http:/www.icsb-2006.org/http:/www.icsb-2005.org/ICSB 2004: summarized in schuster.2006.pdfhttp:/meetings.cshl.edu/meetings/network09.shtmlhttp:/meetings.cshl.edu/meetings
Duke - CPS - 110
Outline for Today Announcements How office hours for UTAs work: announced around Nachos assignments. Those who didn't get your photo taken last time, we will do it again next time (or you can provide a picture jpg, 216x216 px) Groups - if you ha
Duke - CPS - 110
CPS 110 F08 Practice Problems for Discussions the Week of 9/8/08Problem 1) You have been hired by an airline company and asked to design a Monitor solution to handle seat reservations on a flight. The flight has MAX seats, initially all a
Duke - CPS - 196
Cube Computation and Indexes for Data WarehousesCPS 196.03 Notes 71ProcessingROLAP servers vs. MOLAP servers q Index Structures q Cube computation q What to Materialize? q AlgorithmsqClient Query &amp; Analysis Metadata Warehouse IntegrationCli
Duke - CPS - 196
CPS 196.03: Information Management and Mining Association Rules and Frequent Itemsets1Improvements to APrioriParkChenYu Algorithm Multistage Algorithm Savasere, Omiecinski, and Navathe Algorithm2PCY Algorithmx Hashbased improvement to APri
Duke - CPS - 196
CPS 196.03: Information Management and Mining Association Rules and Frequent Itemsets1Let Us Begin with an Examplex A common marketing problem: examine what people buy together to discover patterns.1. What pairs of items are unusually often
Duke - CPS - 196
CPS 196.03: Information Management and MiningShivnath BabuOutline for Today Logistics What this class is aboutInstructor Shivnath Babu, http:/www.cs.duke.edu/~shivnath Office hours: TBA Research interests: Database systems Simplifying sys
Duke - CPS - 196
Multi-way Algorithm for Cube ComputationCPS 196.03 Notes 81First Programming Projectq qIndividual project, 15 Points in final grade Sales(customer_id, item_id, item_group, item_price, purchase_date)xWill be provided as a file during demo a
Duke - CPS - 170
CPS 170: Artificial Intelligencehttp:/www.cs.duke.edu/courses/spring09/cps170/First-Order LogicInstructor: Vincent ConitzerLimitations of propositional logic So far we studied propositional logic Some English statements are hard to model in
Duke - CPS - 170
CPS 170: Artificial Intelligencehttp:/www.cs.duke.edu/courses/spring09/cps170/Two-player, zero-sum, perfect-informationGamesInstructor: Vincent ConitzerGame playing Rich tradition of creating game-playing programs in AI Many similarities to
Duke - CPS - 104
1. d2. a3. d4. c5. c d6. LRUFIFO0xFFFFEE44mm0xA10C0450mm0xFFFFEE88mm0xC4444464mm0xA10C0440hh0x77777770mm0xFFFFEE7Chh0xBA000440mm0xFFFFEE68hm0xA10C046ChmMiss ratio60%80%
Duke - CPS - 104
1. a2. b3. b4. d5. b6. tagindexblock offset 18 bits9 bits5 bits7. 60%
Duke - CPS - 104
1. b2. c3. a4. a5. b6. a7. b
Duke - CPS - 104
Datapath and Related Stuff1. Which of the following is not a stage of the &quot;Fetch-Execute&quot; cycle ?a. Instruction Fetchb. Executec. Find Next Instructiond. Check for User Input2. Which is not a part of the &quot;Register Transfer Language (RTL)&quot; for
Duke - CPS - 104
1. a2. b3. c4.func: subu \$sp, \$sp, 32 # create frame sw \$ra, 20(\$sp) # save return address sgt \$t0, \$a0, 1 bnez \$t0, recursion # if k &gt; 0, make recursive call
Duke - CPS - 104
A= 0xFADEB= 0xDEAF1. What is A &amp; Ba. 0xDA8Eb. 0xFADEc. 0xDEAFd. 0xFFFF2. What is A | Ba. 0xFFEFb. 0xFFFFc. 0xFEDFd. 0xFEFF3. What is (A &lt; 4)a. 0xFAD0b. 0x0ADEc. 0xADE0d. 0xFADE4. If an address is &quot;word aligned&quot;, it is divisible b
Duke - CPS - 104
Virtual Memory 1. Which of the following is NOT a true reason for using virtual memorya. More memory as seen by the userb. User can map a program to any part of the logical address space withoutworrying about the actual physical addressc. It pr
Duke - CPS - 104
I/O and Misc1. Which of the following is NOT a potential storage devicea. DRAMb. CD-ROMc. Tape Drived. ALU 2. Which of the following is not a component of disk access time ?a. Seek Timeb. Rotational Delay (or Rotational Latency)c. Head S
Duke - CPS - 104
More Cache Stuff 1. Which is NOT a reason for using a set-associative cache, as compared toa direct mapped cache ?a. Higher Hit Rateb. Fewer Conflict Missesc. Fewer bits required to index the cached. Faster hit detection 2. What is &quot;Write-Th
Duke - CPS - 104
1. What does the &quot;Hit Ratio&quot; measure ?a. Number of hits per accessb. Number of misses per accessc. Number of hits per missd. None of the above2. Consider the following piece of codefor(i=0;i&lt;100000;i+) Data[i]+;What kind of localit
Duke - CPS - 001
=CPS 1: Computer Science FundamentalsSample Lab Final=Be sure to read the WHOLE handout before starting and follow all ofthe directions. You should do this program in stepsThe goal of this lab is to make an applet that will tell youeverythi
Duke - CPS - 100
=The Sorting Cheat Sheetby: J. Forbes=This handout is intended as a very rough guide. It's for those of youwho want the quick and dirty answers to what how does sorting algorithm&quot;x&quot; work and how does it compare to the other ones we've learned.
Duke - CPS - 001
Today's topicsNetworks &amp; the Internet Basic HTML The basis for web pages &quot;Almost&quot; programming Upcoming Connections Algorithms Reading Internet history readings Great Ideas Chapters 1 Computer Science, Chapter 4CompSci 001 2.1Networksqqq
Duke - CPS - 296
CPS 296.2 Computational Game Theory and Mechanism DesignInstructor: Vincent Conitzer Assistant Professor of Computer Science Assistant Professor of Economics conitzer@cs.duke.edu Course web page: http:/www.cs.duke.edu/courses/fall06/cps296.2/What
Duke - CPS - 296
Automated mechanism designVincent Conitzer conitzer@cs.duke.eduGeneral vs. specific mechanisms Mechanisms such as Clarke (VCG) mechanism are very general. . but will instantiate to something specific in any specific setting This is what we car
Duke - CPS - 296
Risk attitudes, normal-form games, dominance, iterated dominanceVincent Conitzer conitzer@cs.duke.edu Which would you prefer?Risk attitudes A lottery ticket that pays out \$10 with probability .5 and \$0 otherwise, or A lottery ticket that pay
Duke - CPS - 296
Concise representations of gamesVincent Conitzer conitzer@cs.duke.eduGames with many agents How do we represent a (say, normal-form) game with n agents? Even with only 2 actions (pure strategies) per player, there are 2n possible outcomes Impr
Duke - CPS - 296
Learning in gamesVincent Conitzer conitzer@cs.duke.eduLearning in (normal-form) games Approach we have taken so far when playing a game: just compute an optimal/equilibrium strategy Another approach: learn how to play a game by playing it many
Duke - CPS - 296
Collusion and the use of false namesVincent Conitzer conitzer@cs.duke.eduCollusion in the Vickrey auction Example: two colluding biddersv = first colluder's v = second colluder's price colluder 1 would pay when colluders bid truthfully gains to
Duke - CPS - 001
Introduction to Processing Digital Soundsadapted from: Barb Ericson Georgia Institute of Technology Sept 2005Georgia Institute of TechnologyHow does Hearing Work? The outer ear &quot;catches&quot; sounds The eardrum vibrates The inner ear translates th
Duke - CPS - 296
Minimax strategies, Nash equilibria, correlated equilibriaVincent Conitzer conitzer@cs.duke.eduZero-sum games revisited Recall: in a zero-sum game, payoffs in each entry sum to zero . or to a constant: recall that we can subtract a constant fro
Duke - CPS - 296
Repeated &amp; stochastic gamesVincent Conitzer conitzer@cs.duke.eduRepeated games In a (typical) repeated game, players play a normal-form game (aka. the stage game), then they see what happened (and get the utilities), then they play again, et
Duke - CPS - 097
The RCXq q q qq q q q qHitachi H8/3297 series processor 3 inputs/sensors (1, 2, 3) 3 outputs/motors (A, B, C) 32k RAM/ 16k ROM 12 kB free in leJOS Multiple threads of execution LCD Display &amp; Speaker 3 programmable buttons IR send/receive Sensor
Duke - CPS - 100
On the Limits of ComputingReasons for Failure 1.1. 2.Complexity, N Runs too long o Real time requirements o Predicting yesterday's weather Noncomputable ! Don't know the algorithm Time Space Tractable and Intractable CompSci
Duke - CPS - 100
CompSci 100Ehttp:/www.cs.duke.edu/courses/fall06/cps100eDietolf (Dee) Ramm http:/www.cs.duke.edu/~dr Robert A. Wagner http:/www.cs.duke.edu/~rawCompSci 100E1.1What is Computer Science?What is it that distinguishes it from the separate subj
Duke - CPS - 100
Solving Problems RecursivelyRecursion is an indispensable tool in a programmer's toolkit Allows many complex problems to be solved simply Elegance and understanding in code often leads to better programs: easier to modify, extend, verify (and
Duke - CPS - 100
Sorting: From Theory to PracticeWhy do we study sorting? Because we have to Because sorting is beautiful Example of algorithm analysis in a simple, useful settingThere are n sorting algorithms, how many should we study? O(n), O(log n
Duke - CPS - 001
Duke - CPS - 001
393 The Infamous Traveling Salesperson Problem - 39393 3 ge Palel al ar Pn tio ta pu om CHU RInfamousRAH!CRUS HED!ya b (n-1)!/2 processorscomputes at around 1019 processorsDpD eePb EEeo luns! ceaCOMPARATOR.find
Duke - CPS - 001
Duke - CPS - 001
The poem grammar. This is the same simple grammar discussed in the assignment handout. It is a good one to test on since it is so small.Simple poem grammarThe first line of the file should be a short description of your grammar.The first defini
Duke - CPS - 001
Today's topicsqq qBinary Numbers Brookshear 1.11.6 Slides from Prof. Marti Hearst of UC Berkeley SIMS Upcoming Networks Interactive Introduction to Graph Theoryhttp:/www.utm.edu/cgi-bin/caldwell/tutor/departments/math/graph/introProblem
Duke - CPS - 001
The Internetqq qHow valuable is a network? Metcalfe's Law Domain Name System: translates betweens names and IP addresses Properties of the Internet Heterogeneity Redundancy Packetswitched 1.08 billion online (Computer Industry Almanac 2005
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapter
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapter
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapter
Duke - ECE - 283
Increasing Information per Bit Information in a source Mathematical Models of Sources Information Measures Compressing information Huffman encoding Optimal Compression for DMS? Lempel-Ziv-Welch Algorithm For Stationary Sources? Practical C
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapte
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapter
Duke - ECE - 283
ECE 283 Digital Communication Systems Course Description Digital modulation techniques. Coding theory. Transmission over bandwidth constrained channels. Signal fading and multipath effects. Spread spectrum. Optical transmission techniques. Prerequi
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapter
Duke - ECE - 283
Outline Transmitters (Chapters 3 and 4, Source Coding and Modulation) (week 1 and 2) Receivers (Chapter 5) (week 3 and 4) Received Signal Synchronization (Chapter 6) (week 5) Channel Capacity (Chapter 7) (week 6) Error Correction Codes (Chapter
Duke - ECE - 135
Optical Gigabit EthernetPresentation 3February 10, 2005David LaradoGroup 4 Progress Overview Built and tested the test board Continued part research (ROSA) Refined an Optical Link Budget Contacted more part vendors Test Board
Duke - ECE - 4006
ECE 4006 CAPSTONE DESIGN R.Y.M.M.YGeorgia Institute of Technology Electrical Engineering Spring 2003Parameter Values of the ComponentsTRANSIMPEDENCE AMPLIFIER -MAX3266PARAMETERS MIN TYP MAX UNITSLIMITING AMPLIFIER - MAX3264PARAMETERS MIN 3.00
Duke - ECE - 4006
ECE 4006 Group 6 Presentation 3 Gigabit Ethernet[3]Akil Khamisi Sutton Thursday January 30, 2003 Group 6Gigabit EthernetCompleted/In Progress Optical Link Budget Vendor Contact Learning Receiver Board Transmitter Design Expre
Duke - ECE - 4006
Group 5 ECE 4006: Week 15Jason Young05/14/091Progress made Tests performed with attenuation FFT Analysis Performed Alignment Tolerance test performed Shielding added to PD &amp; VCSEL05/14/092Updated Schedule05/14/093Test Results
Duke - ECE - 4006
ECE 4006 Group6 Presentation 6Gigabit Ethernet By Vikas J. ParekhA review of last weekA relaxing Spring break for everyone.More importantly India beat Pakistan in the cricket world cup.ProgressThings done this week: Or
Duke - ECE - 4006
Presenter: Curtis Grens April 3, 2003Highlights of the Last Week Connectorized PD on current board replaced with unconnectorized PD Second board constructed, uses connectorized PD Baseline and attenuation tests repeated on second board.2Atten
Duke - ECE - 4006
Design Group 1Progress Report, January 30, 2003 By Yeonshin WonECE 4006 Spring, 2003, Group 1, Yeonshin Won Progress Report Period (January 23 January 30, 2003)Progress: Continuing Vendor search Evaluations of Products -IEEE 802.3z standards
Duke - ECE - 4006
Capstone Design UpdateWeek 7 ECE 4006 Group 1 Presentation by: Michael Fabery March 13, 2003ECE 4006 Spring, 2003, Group 1, Michael Fabery Progress Week 7 (February 28 March 12, 2003)Progress: Successfully tested receiver test board with vari