17-Assignment-2-ADTs

17-Assignment-2-ADTs - CS106X Winter 2008 Handout 17...

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

View Full Document Right Arrow Icon
CS106X Handout 17 Winter 2008 January 23, 2008 Assignment 2: ADT Client Applications Inspiration credit to Joe Zachary, University of Utah (random writer) and Owen Astraction, Duke University (word ladder). Now that you've been introduced to the most excellent 106 class library, it's time to put these objects to use. In the role of client, the low-level details have already been dealt with and you can focus your attention on solving more interesting problems. Having a library of well-designed and debugged classes vastly extends the range of tasks you can take on. Your next assignment is to write two short client programs that heavily leverage the standard classes to do nifty things. The tasks may sound a little daunting at first, but given the power tools in your arsenal, each requires only about a hundred lines of code. Let's hear it for abstraction! The assignment has several purposes: 1. To more fully explore the notion of using objects. 2. To stress the notion of abstraction as a mechanism for managing data and providing functionality without revealing the representational details. 3. To become familiar with using C++ class templates. 4. To gain practice with classic data structures such as the stack, queue, vector, and map. Due: Friday, February 1 st at 1:15 p.m. Part I: Random writing and Markov models of language In the past few decades, computers have revolutionized student life. In addition to providing no end of entertainment and distractions, computers also have also facilitated much productive student work. However, one important area of student labor that has been painfully neglected is the task of filling up space in papers, Ph.D. dissertations, letters to mom, grant proposals, statements of purpose, and the like with important sounding and somewhat sensible random sequences. You are to take your newly acquired knowledge of data abstraction and put our Vector and Map classes to work in constructing a program that addresses this burning need. The random writer is a marvelous bit of technology that generates somewhat sensible output by generalizing from patterns found in the input text. When you're coming up short on that 10-page paper due tomorrow, feed in the eight pages you already have and voila: another two pages comes right up. Sheesh, you can even feed your own .cpp files back into your program and have it build you a new random program on demand.
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 How does this work? Random writing is based on an idea advanced by Claude Shannon in 1948 and subsequently popularized by A.K. Dewdney in his Scientific American column in 1989. Shannon's famous paper introduces the idea of a Markov model for English text. A Markov model is a statistical model that describes the future state of a system based on the current state and the conditional probabilities of the possible transitions. Markov models have a wide variety of uses, including recognition systems (handwriting, speech, etc), machine learning, bioinformatics, even Google's PageRank algorithm has a Markov
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

17-Assignment-2-ADTs - CS106X Winter 2008 Handout 17...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online