2 Pages

Assignment_05

Course: ASSIGNMENT 304, Fall 2009
School: Rose-Hulman
Rating:
 
 
 
 
 

Word Count: 1030

Document Preview

304 Objectives CSSE You should learn Assignment 5 to write more complicated recursive procedures in a functional style. to better understand and use let, lambda, letrec, and named let. to FOLLOW THE GRAMMAR! (see page 12 of EoPL) At the beginning of your file, there should be a comment that includes your name and the assignment number. Before the code for each problem, place a comment that includes the...

Register Now

Unformatted Document Excerpt

Coursehero >> Indiana >> Rose-Hulman >> ASSIGNMENT 304

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.
304 Objectives CSSE You should learn Assignment 5 to write more complicated recursive procedures in a functional style. to better understand and use let, lambda, letrec, and named let. to FOLLOW THE GRAMMAR! (see page 12 of EoPL) At the beginning of your file, there should be a comment that includes your name and the assignment number. Before the code for each problem, place a comment that includes the problem number. Please place the code for the problems in order by problem number. You may use solutions from previous assignments in your solutions for this assignment. Turning in this assignment: It is easiest if you place all of your Scheme code for this assignment in one file. If you prefer to place your code into more than one file, you need to create a .zip archive and submit it to the grading program. However, if you do this, the archive must contain a file called main.ss, which loads the other files. For more details, see the help page of the grading software. You should thoroughly test your procedures, but what you turn in should only include the definitions of the required procedures and any auxiliary procedures that they use. Do not include your test code in the file that you submit unless you comment (or quote) it out. I suggest keeping your test code in a separate file called 5-test.ss, in which you can include (load "5.ss"). You may choose any names that you wish for helper procedures that you write, but the required procedures must have exactly the specified names and they must work for the specified number and types of arguments. Where submit your code. Submit your code to the server located at: https://plc.cs.rose-hulman.edu , where you can also see whether your code passes our test cases. Be sure to choose assignment A5 before submitting. Restriction on Mutation. No mutation or I/O allowed! This includes: do not use set!, and the only use of "define" should follow this pattern: (define <some_variable> (lambda ...)) Abbreviations for the textbooks: EoPL TSPL - Essentials of Programming Languages, 2nd Edition - The Scheme Programming Language, 3rd Edition No argument error-checking is required. Unless specified otherwise, you may assume that all arguments have the correct form. Reading Assignment: See the Schedule page Problems to think about: I do not think you need to take the time to write out solutions to these problems, but you should consider them. EoPL Exercises 1.6 and 1.7, page 16 ; 1.8 and 1.9, page 18. Written problems to turn in (at the beginning of class): #W1 (10 points) EoPL, Exercise 1.4, page 8 (your proof must use mathematical induction) #W2(15 points) Consider the following grammar for a language L whose terminal symbols are a and b: <S> ::= <A><A> <A> ::= <A><A><A> | b<A> | <A>b | a (a) Describe in simple English (i.e. with no recursion or iteration in your description) the language L generated by this grammar, assuming that <S> is the start symbol. (b) Prove (using mathematical induction) that every string of terminals that can be generated by this grammar is a string in the language you described in part (a). (c) Describe algorithm an that, given a string w in L, produces a sequence of productions that can be used to create a derivation of w from <S>. CSSE 304 Assignment 5 Page 1 04/27/09 Programming problems to submit to the grading program (by 8:05 AM): Read the instructions and naming conventions at the beginning of Exercise 1.15 on p 24. They apply to all parts of Exercises 1.15, 1.16, and 1.17. #1 (10 points) exists? EoPL 1.15.5, page 25. #2 (10 points) vector-index EoPL 1.15.6, p 25. #3 (10 points) product EoPL 1.15.8, page 25. Note that the product of the empty set with any other set is empty. #4 (10 points) vector-append-list EoPL 1.15.10, page 25. For this problem only, you may use mutation: namely vector-set! #5 (15 points) rotate (rotate the first element of the returned list. (rotate '(a b c d)) (rotate '(shortlist)) (rotate '()) los) returns a list that is similar to los, except that the last element of los becomes Be sure that you rotate in the correct direction! (d a b c) (shortlist) () #6 (15 points) flatten EoPL 1.16. 4, page 26. #7 (10 points) merge EoPL 1.16.5, page 26. #8 (10 points) path EoPL 1.17.1, page 27. Your code can assume that this is only called for successful searches). Note that the symbol right should be produced by the code 'right . left is similar. #9 (20 points) qsort. (qsort pred ls)is a Scheme procedure whose arguments are a predicate which takes two arguments x and y, and returns #t if x is "less than" y, #f otherwise. a list whose items can be compared using this predicate. qsort should produce the sorted list using a QuickSort (note: write your own; do not use Schemes sort function) algorithm. For example: (qsort < '(4 2 4 3 2 4 1 8 2 1 3 4)) (1 1 2 2 2 3 3 4 4 4 4 8) (qsort (lambda (x y) (< (abs (- x 10)) (abs (- y 10)))) '(5 1 10 8 16 17 23 -1)) (10 8 5 16 17 1 -1 23) If you arent sure how QuickSort works, see http://en.wikipedia.or...

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:

Rose-Hulman - CSSE - 479
DTTF/NB479: DszquphsbqizAnnouncements:1.Day 32Late HW7s now.Questions? This week:Birthday attacks, Digital signatures, DSARSA SignaturesAlice chooses: Sig = f(user, message)p,q, n=pq, e: gcd(n, (p-1)(q-1)=1, d: ed = 1(mod (p-1)(q-1)Publishes n
Rose-Hulman - CSSE - 371
Ambiguity and SpecificitySriram Mohan/ Steve Chenoweth Chapters 23, 24 - Requirements Text1ProblemSpecification must be easy to understand and must be clear. Balancing the two might be difficult Must be easy enough for the client to understand Must b
Rose-Hulman - CSSE - 371
&quot;You are now Ezekiel.&quot; Left Icon of Science &amp; Technology Foresight, a website for future uses of technology in Europe. www.cordis.lu/ foresight/home.htmlThe Vision Document &amp; Product ManagementCSSE 371, Software Requirements and Specification Steve Chen
Rose-Hulman - CSSE - 200830
Session overviewNext 2 weeks: Chaos Today: Dynamical systems and orbits Announcements:All grades should be upto-date on Angel Let me know if notApril 7, 2008 CSSE/MA 325 Lecture #15 1Feedback on FeedbackSee summaryApril 7, 2008CSSE/MA 325 Lecture #
Rose-Hulman - CSSE - 304
CSSE 304 Programming Language Concepts Final Exam Sample QuestionsSpring 2008Name: _On this exam, you may use notes, books, the CSSE 304 web-site and any site linking directly from it, your laptop and any files stored on it. You may NOT execute any of
Rose-Hulman - CSSE - 304
CSSE 304 Day 25Interpreter enhancements: if let lambdaInterpreter AssignmentsAssignment Tentative due date Tentative emphasis 12 13 14 15 16 Thursday, April 30 Tuesday, May 5 Friday, May 8 Friday, May 15 Thursday, May 21 primitive procedures, lambda, l
Rose-Hulman - CSSE - 200820
CSSE 220 Swing Warm-up Programming AssignmentCreate a project called SwingWarmup. Include in your project the following three classes, each containing main(), and any other classes that they use. Submit your code to your SVN repository.1. (40 points) Ci
Rose-Hulman - ECE - 380
ROSE-HULMAN INSTITUTE OF TECHNOLOGYDepartment of Electrical and Computer Engineering ECE 380 Discrete-Time Systems Homework 1 Winter 2003-2004 Mark A. YoderRead Sections 7.0 through 7.3 of Oppenheim and Willsky. All of the Basic Problems With Answers th
Rose-Hulman - CSSE - 442
CSSE442ComputerSecurity Winter20082009 RoseHulmanInstituteofTechnology ComputerScienceandSoftwareEngineeringHomework2Solutions Due:19thDecember(Friday),inclass 1. Consideracomputersystemwiththreeusers:Alice,Bob,andCyndy.Aliceownsthefile alicerc,andBoba
Rose-Hulman - ECE - 130
Name _ CM _ ECE130-03 Homework #5(Boolean algebra) 1Due date: Thursday, Sept. 18Fall 2003(Problem 4 on page 28 of Dr. Eccles book). Use Boolean algebra to simplifyZ ( A, B, C ) = A B + A B + A B C . Be sure to indicate which theorems you areapplying
Rose-Hulman - ECE - 380
ec380Winter 2003-2004EC380 - Discrete Time and Continuous Systems General InformationThis course covers the following: System properties: linearity and time-invariance. Sampling and reconstruction. Convolution in discrete-time systems. Z-transform, FIR
Rose-Hulman - ECE - 581
EC581 DSP Projects: Lab Project #1Dept. of Electrical and Computer Engineering Rose-Hulman Institute of TechnologyTMS320C67x C Familiarization and Audio SamplingLast Modified on 17 Mar-2004 (may) Original by KEHI. Introduction This lab follows right a
Rose-Hulman - CSSE - 333
ObjectRelational DatabasesSalman AzharUserDefined Types Object IDs Nested TablesDatabase Systems: Salman AzharThese slides use some figures, definitions, and explanations from ElmasriNavathe's Fundamentals of Database Systems and MolinaUllmanWidom's D
Rose-Hulman - CSSE - 200920
RecursionCheckout Recursion project from SVNDont forget: Exam 2 Thursday, Feb 5By Douglas Hofstadter Argues that intelligence arises (in part) because of our ability to think about thinkingA solution technique where the same computation occurs repeate
Rose-Hulman - CSSE - 200920
Linked List ImplementationCheck out MyLinkedListReal project from SVNHulbert/Cook lecture 10:50 Hatfield Hall Minesweeper due at 8:05 AM todaySo I can begin grading the ones that are done. If you plan to use a late day, please fill out the survey by n
Rose-Hulman - CSSE - 332
Enforcing Mutual Exclusion Using MonitorsMutual Exclusion Requirements Mutually exclusive access to critical section Progress. If no process is executing in its criticalsection and there exist some processes that wish to enter their critical section, t
Rose-Hulman - CSSE - 332
Process ControlProcess Switching Definition The activity that occurs when the OS kernel switches between processes in an effort to share the CPU among competing, runable processes Actions Save contents of hardware registers (PC, SP, .) Load PC with loca
Rose-Hulman - SEC - 332
Spring 2007-2008CSSE332CSSE332 Operating Systems Rose-Hulman Institute of Technology Computer Science and Software Engineering Department In-Class Exercise 5Points earned: /45Names:Section:Instructions: Do this exercise in pairs. Turn this exercise
Rose-Hulman - CSSE - 200820
CSSE463: Image RecognitionDay 3Announcements/reminders: Lab 0 should have been turned in last night. Tomorrow: Lab 1 (posted): on color images. Bring laptop.Today: Introduce Fruit Finder, due next Friday. Lots of Helpful hints in Matlab. Connected
Rose-Hulman - CSSE - 200820
CSSE490: Image Recognition Winter 2007-2008 Assignment 1: Fruit FinderThe goal of this assignment is to count the number of objects of different types in an image, where the objects of different types have different characteristic colors. In this case, t
Rose-Hulman - CSSE - 497
From: Chenoweth, Stephen V Sent: Friday, May 19, 2006 9:23 AM To: Aikin, Scott A; 'Dave Bauman'; 'bowmande@rosehulman.edu'; 'BOYCEJS@rose hulman.edu'; Bozarth, Matthew P; Brandell, Michael J; Bronson, Joshua A; carlsona@rose hulman.edu; Compton, Andrew T;
Rose-Hulman - CSSE - 374
CSSE 374 - Software Architecture and Design - Winter 2008-9 Quiz 23 Monday, February 9, 2009Name:_ 1. How do &quot;limp watches&quot; mean &quot;persistence of memory&quot;?Grade:_2. Why isn't the RDB paradigm optimal for storing objects?3. So, why haven't OODB's taken o
Rose-Hulman - CSSE - 374
CSSE 374 - Software Architecture and Design - Winter 2008-9 Quiz 19 Monday, February 2, 2009Name:_Grade:_1. Why should system sequence diagrams (SSDs) be revisited by the designers and clients, as the cycles of a project progress?2. Why does the Credi
Rose-Hulman - CSSE - 200910
CSSE221: Software Dev. Honors 11 Pass in HW4 now Fifteen due 11:59pm AnnouncementsQuestions on Fifteen? HW5 posted, due next MondayDay Anyone have 2nd ed of Weiss (brown cover)Next programming assignment postedDiscussion of Round 1 CapsulesDr B's co
Rose-Hulman - CSSE - 374
Below: Where architectural analysis fits into the Unified Process. From http:/www.ibm.com/developerworks/rational/library/5383.html .CSSE374 Iteration 3: Architectural analysis (intro)Steve Chenoweth 1 Day 30, Feb 3, 2009Today &amp; coming up Today Archit
Rose-Hulman - CSSE - 374
Right: Another picture of the UP, showing where Elaboration fits in. From www.hytechpro.com/rup?q=our-approach/rup .CSSE374 Elaboration Modeling domainsSteve Chenoweth 1 Day 4, Dec 5, 2008Today Start Elaboration Ch 8, with Modeling Ch 9 Tonight Turn-
Rose-Hulman - CSSE - 200910
CSSE221: Software Dev. Honors 28 AnnouncementsDay Simulation grades coming back All C Projects due Friday night, 11:59 pm Final Exam next Monday, 610 pm, here.Thursday's daily quiz Show me for completion credit. Check in your code to your personal re
Rose-Hulman - CSSE - 375
Program UnderstandingSteve Chenoweth CSSE 375, Rose-Hulman Based on Don Bagerts 2006 Lecture1Today Finish class intros Introduce Jon Labayo and Sandor Pethes of RHV An opening assignment on the term project One minute talks, next Thursday! Talk about
Rose-Hulman - CSSE - 374
Below: Deployment figure, from a project in a prior year's software architecture class.CSSE374 Iteration 3: UML deployment &amp; componentsSteve Chenoweth 1 Day 34, Feb 10, 2009Today &amp; coming up Tuesday, Feb 10 UML deployment &amp; components (Ch 38) Time t
Rose-Hulman - CSSE - 200820
LinkedList ImplementationTurn in your written problems Reminder: Exam #2 is Thursday, Jan 31. Markov repositories: Markov Progress: In order to reduce time pressure, you optionally may take the non-programming part 7:10-7:50 AM. http:/svn.cs.rose-hulma
Rose-Hulman - CSSE - 200910
CSSE 220: Hardy's Taxi Programming ProblemCarefully follow the turnin instructions at the bottom of this document. This is an individual assignment. As usual, you may talk to others, but your code should be your own. Be sure to add comments that explain
Rose-Hulman - CSSE - 200830
Continue the Sorting intro Work on Spellchecker ProjectTurn in written problems now. Thanks to those who have posted links to dictionaries. We will standardize on one soon. There will be time in class to work with your team every day. Do not miss it! Que
Purdue - GRAD - 590
Pinhole / Frame GeometryCE 503 Photogrammetry I Fall 2006 Purdue UniversitySame Geometry Large ApertureCE 503 Photogrammetry I Fall 2006 Purdue UniversityRelief DisplacementNote: nominal scale is the same everywhere in the imageCE 503 Photogrammetry
Rose-Hulman - CS - 415
Rose-Hulman - CSSE - 377
CSSE 377 Daily Quiz Week 6, Day 1 Monday, April 20, 2009 Welcome back!Name _1. What will be on Friday's biweekly quiz, about the case studies presented tomorrow?2. Why are &quot;effectiveness&quot; and &quot;efficiency&quot; of testing considered separate aspects of &quot;test
Rose-Hulman - CSSE - 376
CSSE 376 Software Quality Assurance Spring 2007 Exam 2 Two Sample Problems1. Write a task list for the usability testing of the following features of Microsoft Notepad: Open Print Save Save as Cut Paste Time/Date2. Graph an operational profile for the f
Rose-Hulman - CS - 414
Computer Science 414, Software Engineering I Winter 2002-2003Peer Evaluation RankingsYour Team:_ Your Name:_ Instructions: 1. Fill in the name of the person you are evaluating in the top left corner of each box. 2. Evaluate each member of your team, inc
Rose-Hulman - CSSE - 377
CSSE 377 Project 5 Security As with Projects 3 &amp; 4, there are two goals for this project 1. Improve the &quot;security&quot; of your project system. In particular, see if you can find something that's a security problem, and use one of Bass's tactics to fix it. 2.
Rose-Hulman - CSSE - 372
Computer Science and Software Engineering 372 Software Project Management Winter 2007-08 Delphi Estimation Exercises(Not to be turned in) 1. Write down you best estimate of the number of files on an average RHIT student laptop: 2. Without talking to the
Rose-Hulman - CSSE - 377
CSSE 377 HW 9 - Case Study Presentation This presentation, which you do as a team, counts as HW9. The general idea is for your team to present a case study in software architecture, taking about half the class period to explain it, and to get down to the
Rose-Hulman - CSSE - 490
CSSE 490 Requirements Technical Course for the MSE Program RHIT Due Class time Wed, June 13, 2007 Assignment Project description.A. There are two reasons for doing this assignment: 1. Give you an early start on the main project for this course. 2. Go thr
Rose-Hulman - CSSE - 461
Spring 2008-2009CSSE 461CSSE 461 Computer Vision Rose-Hulman Institute of Technology Computer Science and Software Engineering Department Problem Set 5This problem set is due 23 April 2009. This document contains hyperlinks and is best viewed as html.
Rose-Hulman - CSSE - 200830
Session overviewMore on orbits Announcements:Imaging Systems Certificate Digital Imaging Talk tomorrow 7th hr in GM Roomhttp:/www.rose-hulman.edu/mathconf/index.phpApril 10, 2008CSSE/MA 325 Lecture #171Eventual fixed pointsx0 is an eventual fixed
Rose-Hulman - CSSE - 373
Exam 2CSSE 373 FORMAL METHODS IN SPECIFICATION AND DESIGN Fall 2007Name: _INSTRUCTIONSThis exam is open book and open notes. You may use your laptop but are not required to do so. You may also reference the course materials on Angel. Network, server,
Rose-Hulman - CSSE - 200910
AKA the scavengerCopying garbage collection algorithm Divides the heap into two equal parts to-space &amp; from-space Use one part at a time (to-space) When to-space fills up, flip the roles Old to-space becomes from-space Old from-space becomes to-space Co
Rose-Hulman - CSSE - 200910
Decision Statements and ExpressionsCheck out Decisions from SVN Quick review of if statements = vs. equals() Selection operator, ? : switch and enumerationsint letterCount = 0; int upperCaseCount = 0; String switchedCase = &quot;; for (int i = 0; i &lt; messa
Rose-Hulman - CSSE - 371
CSSE 371Quiz 5September 27, 2005Please turn in at the end of this class session! Name: _ Score: _ 1. What is a requirements baseline, and how does it related to the project scope?2. What are examples of information concerning project development that
Rose-Hulman - CSSE - 372
Techniques for managing people who dont report to you1. Usegoalstatementsasacommonpointofagreement;linktheprojecttothegoals; builtsupportfromthelinktogoals.ShowhowsupportbenefitsCSP. 2. Statetheprojectobjectivefrequentlytocreatesupportthroughunderstandin
Rose-Hulman - DAY - 413
Rose-Hulman - CSSE - 442
CSSE 442 Computer Security Spring 2006-2007Rose-Hulman Institute of Technology Computer Science and Software Engineering Prof. Laurence D. MerkleExam 2Name_ _ CM _ Instructions: Write your solutions on separate paper. Attach this page as a cover shee
Rose-Hulman - CSSE - 200830
Session overviewBifurcations Edward Lorenz, father of chaos theory (and the &quot;butterfly effect&quot;), died yesterday at age 90 http:/xkcd.com/378/ Pass in HW3 nowApril 27, 2006 CSSE/MA 325 Lecture #21 1Tangent bifurcationConsider a family of curves F(x) No
Rose-Hulman - CSSE - 442
CSSE 442 Computer Security Spring 2006-2007Rose-Hulman Institute of Technology Computer Science and Software Engineering Prof. Laurence D. MerkleExam 1Name_ _ CM _ I want this exam to count for _ % of my exam average (default is 50%). Instructions: W
Rose-Hulman - ES - 202
ES 202 - Exam IISpring 1999-2000RichardsName:_Campus Mail Box _Problem 1( 29 ) _Problem 2( 29 ) _Problem 3 ( 42 ) _ _ TOTAL ( 100 ) _General Comments (1) Anytime you apply conservation or accounting principles in solving a problem, sketch and cl
Rose-Hulman - AY - 0506
MechanicalEngineeringME513Environmental NoiseAcademic Year: 2005-2006Evaluation of the course:What was good? This course was a very good introduction to the topic of noise as an environmental pollutant. The course also introduced types of noise sourc
Rose-Hulman - AY - 0506
Mechanical EngineeringME 328Engineering MaterialsCatalog Description Application of fundamentals of engineering mechanics in analysis and synthesis of machine components and machine systems with special emphasis on stress/strength analysis and fatigue
Rose-Hulman - ME - 305
ME 305 End Of Year Comments Spring 2002 31 May 02 1. Generally I feel very good about the class 2. It was better organized than last year. I liked putting performance before stability &amp; control. 3. Have students plot their own thrust and power curves give
Rose-Hulman - AY - 0405
What should we do in ME 421 first week? (Fall 04-05)Pick a Project You may be asking yourself the question, What do I do this week that is worth 9 to 12 work hours? (3 or 4 people * 3 lab hours). We believe that selecting a project wisely is a worthy end
Rose-Hulman - ES - 204
ROSE-HULMAN INSTITUTE OF TECHNOLOGYDepartment of Mechanical EngineeringES 204 Mechanical SystemsExample Problem - Le 0211.48 Collar A starts from rest at t=0 and moves upward with a constant acceleration of 3.6 in/s2. Knowing that collar B moves downw
Rose-Hulman - ES - 204
Foundation Coalition Sophomore Engineering Curriculum ES204 Lab #3Introduction This lab/demo is an experiment roughly corresponding to problem P3. The purpose is to compare experimental data, analytical results and Working Model results. Pre-lab Bring yo
Rose-Hulman - ES - 204
Kinematics (the geometry of the motion)Relative motion notation rA = rB + rA / B v A = v B + v A/ B a A = a B + a A/ BBasic kinematic relationships dr d v= = dt dt dv a= dt Separate variables and integrate d = dtDependent motion 1) Define position vect
Rose-Hulman - ME - 317
ME317 Design for Manufacturing 2003-2005 Catalog Data: (3R-0L-3C) This is an introductory course that examines the interactions between design and manufacturing from the designer's point of view. Common manufacturing processes will be introduced and desig