3 Pages

ex3

Course: COMP 524, Fall 2008
School: UNC
Rating:
 
 
 
 
 

Word Count: 276

Document Preview

524--Spring Comp 2009 Exercise 3 Due at 3:30 PM (on paper), March17, 2009. 1. (27 pts) Ex. 7.2, p. 398. Use a chart to record your answers, as shown below: Structural Equiv A and B A and C A and D 2. (17 pts) Ex. 7.8, p.400. Show your work, e.g. show the address offset for each field in the first record. Hint: drawing a diagram is helpful. 3. (15 pts) Write an ML function called isPalin to test whether or not a...

Register Now

Unformatted Document Excerpt

Coursehero >> North Carolina >> UNC >> COMP 524

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.
524--Spring Comp 2009 Exercise 3 Due at 3:30 PM (on paper), March17, 2009. 1. (27 pts) Ex. 7.2, p. 398. Use a chart to record your answers, as shown below: Structural Equiv A and B A and C A and D 2. (17 pts) Ex. 7.8, p.400. Show your work, e.g. show the address offset for each field in the first record. Hint: drawing a diagram is helpful. 3. (15 pts) Write an ML function called isPalin to test whether or not a string s is a palindrome. Hint: you may find some of the built-in functions useful (http://www.cs.unc.edu/~stotts/723/ML/pre.html). Here is an example of isPalin in use: - isPalin "abcba"; val it = true : bool 4. (5 pts) What is the type of the following ML expression? [([1,2],("ab",true)),([],("xy",false))] 5. (18 pts) Write an ML function called numDiff for numerical differentiation. the Use following formula: Strict Name Equiv Loose Name Equiv ( f (x + ) f (x - ) ) / 2 Three arguments are needed: f, x, and delta. It should use currying and operate on real numbers. Here is an example of numDiff in use: - numDiff (fn x => x * x * x - x - 1.0) 3.0 1E~6; val it = 26.0000000036 : real What is the type of the function numDiff? 6. (18 pts) Write two ML functions called iDoubleMap and rDoubleMap that take a function f and a list l as curried arguments. iDoubleMap should op...

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:

UNC - COMP - 524
Lecture 13: Complex Types and Garbage CollectionCOMP 524 Programming Language Concepts Stephen Olivier March 17, 2009Based on slides by A. Block, notes by N. Fisher, F. Hernandez-Campos, and D. StottsThe University of North Carolina at Chapel Hi
UNC - COMP - 524
Lecture 14: Control FlowCOMP 524 Programming Language Concepts Stephen Olivier March 19, 2009Based on slides/notes by A. Block, N. Fisher, F. Hernandez-Campos, and D. StottsThe University of North Carolina at Chapel HillGoal of TalkThe goal o
UNC - COMP - 524
Comp 524-Spring 2009Exercise 4Due at 3:30 PM (on paper), March 26, 2009. 1. (20 pts) Ex. 7.19, p. 401. Hint: Due to alignment constraints, there is padding between array elements. Show your work. 2. (10 pts) Ex. 7.28, parts a and b, p.403. 3. (20
UNC - COMP - 524
Comp 524-Spring 2009Exercise 4 SolutionsDue at 3:30 PM (on paper), March 26, 2009. 1. (20 pts) Ex. 7.19, p. 401. Hint: Due to alignment constraints, there is padding between array elements. Show your work. Each member of the 2D array is a struct c
Stanford - HRBFA - 1033
US District Court Civil Docket as of 11/16/2005 Retrieved from the court on Thursday, February 09, 2006U.S. District Court California Northern District (San Francisco)CIVIL DOCKET FOR CASE #: 3:04-cv-04848-MHPBennett et al v. H&R Block Financial
UNC - COMP - 524
Lecture 17: Objects ContinuedCOMP 524 Programming Language Concepts Stephen Olivier April 7, 2009Based on slides by A. Block, notes by N. Fisher, F. Hernandez-Campos, and D. StottsThe University of North Carolina at Chapel HillBindingclass pe
UNC - COMP - 524
Comp 524-Spring 2009Exercise 5Due at 3:30 PM (on paper), April 16, 2009. Please type your answersThe questions below refer to the following database: :- dynamic pop/2. capital(france,paris). capital(uk,london). capital(peru,lima). capital(chile,
Washington University in St. Louis - CSE - 547
CSE 547 Lecture 12Jeremy Buhler February 23 20091Are Regular Languages Context-Free?So far, we've seen that CFGs can represent languages that are not regular. But can they represent all regular languages? YES! Defn: a regular grammar G is a g
Washington University in St. Louis - CSE - 547
CSE 547 Lecture 11Jeremy Buhler February 18 2009And now for something completely dierent.1Are Finite Automata Good Enough?Hard as it is to believe, this course had a purpose: inquiring as to what computers can do. So far: one model, namely
Stanford - PUBS - 20186
Macro Patterns in the Use of Traditional Biomass FuelsNadejda M. Victor & David G. VictorWorking Paper #10November 2002The paper was first presented at the Rural Energy Transitions conference, jointly convened by PESD and the Tata Energy Resea
Stanford - PUBS - 20268
Political Economy and the Hydrogen RevolutionDavid G. Victor, Thomas C. Heller, Nadeja M. VictorWorking Paper # 17September 2003The Program on Energy and Sustainable Development at Stanford University is an interdisciplinary research program fo
Stanford - PUBS - 22226
MEASURING THE CLEAN DEVELOPMENT MECHANISMS PERFORMANCE AND POTENTIALMichael Wara*The Clean Development Mechanism (CDM) of the Kyoto Protocol is the first global attempt to address a global environmental public goods problem with a market-based me
Stanford - PUBS - 20678
The Polish Electricity Market Investment ContextJoshua C. HouseWorking Paper #31August 2004The Program on Energy and Sustainable Development at Stanford University is an interdisciplinary research program focused on the economic and environment
Stanford - PUBS - 20603
geopolitics of gas working paper seriesTHE BELARUS CONNECTION: EXPORTING RUSSIAN GAS TO GERMANY AND POLANDdavid victor and nadejda makarova victorThe Belarus Connection: Exporting Russian Gas to Germany and PolandDavid G. Victor and Nadejda Mak
Stanford - DAVISFUNDS - 1033
US District Court Civil Docket as of 12/8/2004 Retrieved from the court on Friday, December 17, 2004US District Court for the Southern District of New York1:04cv4186 Alexander Ira v. Davis Investments, LLC et al Date Filed: 06/03/2004 Assigned To:
UNC - COMP - 290
NeonGraphics AcceleratorAnselmoLastraTheUNIVERSITYofNORTHCAROLINAatCHAPELHILLHistoryAproposedDECproduct Neversold,asfarasIknow TheywereboughtbyCOMPAQLaterHPPaperat1998GraphicsHardwareTakeintoaccountthatthiswasinthedaysof3dfx VoodooNottoom
Minnesota - MATH - 2263
MATH 2263, Midterm 2, Spring 2005, March 24 Problems and Solutions 1. Use Lagrange multipliers to nd the maximum and minimum values of f (x, y) = x + 2y subject to the constraint g(x, y) = x2 + y 2 = 5. Solution. By the method of Lagrange multipliers
UNC - CS - 290
The WarpEngine: An Architecture for the Post-Polygonal AgeVoicu Popescu, John Eyles, Anselmo Lastra, Joshua Steinhurst, Nick England, Lars Nyland University of North Carolina at Chapel HillABSTRACTWe present the WarpEngine, an architecture design
Minnesota - MATH - 8583
Math 8583: Theory of Partial Dierential Equations: Fall 2007 Announcement: Problems for Final Exam will be given on Wednesday, December 5. Solutions are due till 1:30 pm on Wednesday, December 19, 2007. Homework Assignment 4 (due on Wednesday, Decemb
Minnesota - MATH - 4512
MATH 4512. Dierential Equations with Applications. Midterm Exam #1. March 4, 2009.60 points are distributed between 5 problems, 12 points each. You have 50 minutes to work on these problems. No books, notes, and calculators. 1. Solve the initial val
Minnesota - MATH - 8583
Math 8583: Theory of Partial Differential Equations: Fall 2007 Information and some problems for in-class Midterm Exam The Midterm Exam is scheduled on Wednesday, November 7, 2007, during the class time: 10:10 am - 11:00 am, VinH 211, Books, notes, a
Stanford - CS - 347
Network partitions CS 347: Distributed Databases and Transaction Processing Notes 09: Network PartitionsHector Garcia-Molina Groups of nodes may be isolated or nodes may be slow in respondingPNetPCS347Notes091CS347Notes092 Where
Minnesota - MATH - 1297
Math 1297 Calculus II Spring Semester 2009Instructor: Diana Colt Office: MWAH 157 Email: dcolt1@d.umn.edu Phone: 726-6353 Office hours: MW: 2 - 4:00, F: 2 - 3:00, and by appointmentWebpage: http:/www.d.umn.edu/~dcolt1 Text: Calculus, Early Transc
Minnesota - MATH - 3280
Math 3280: Differential Equations & Linear AlgebraInstructor: Diana Colt Office: MWAH 157 Email: dcolt1@d.umn.edu Phone: 726-6353Office hours: MW: 2 - 4:00, F: 2 3:00, and by appointmentWebpage: http:/www.d.umn.edu/~dcolt1 Lecture: MWF 9-9:50 K
Minnesota - MATH - 3355
Math 3355 Discrete Mathematics Spring Semester 2009Instructor: Diana Colt Office: MWAH 157 Email: dcolt1@d.umn.edu Phone: 726-6353 Office hours: MW: 2 - 4:00, F: 2 3:00, and by appointmentWebpage: http:/www.d.umn.edu/~dcolt1 Text: Discrete Mathe
Washington University in St. Louis - CSE - 260
CSE 260 Digital Computers: Organization and Logical DesignProblem Set 8Jon Turner1. Write a VHDL module that defines a sequential circuit implementing each of the state diagrams in the posted solutions for problem 8 of Problem Set 9. Write thes
Washington University in St. Louis - CSE - 260
CS/EE 260 Digital Computers: Organization and Logical DesignDesign Problem 5 SolutionJon Turner 4/16/02In this assignment, you have a choice of two problems you may do. The first involves extending the simple processor that has been discussed i
Washington University in St. Louis - CSE - 577
CS/EE 577 Homework 3 Solutions1. Suppose you are required to design an ATM network to support 4096 users, but that the only switches available have just 32 ports. Give a diagram of a network similar to the one on page 3-2 of the notes, with 1:1 co
Allan Hancock College - MATH - 3062
School of Mathematics and Statistics The University of Sydney MATH3062 NUMBER THEORY AND ALGEBRA LECTURE 14Squares in Z - Quadratic Residues. p Consider the following table:p: 3 5 7 11 13 17 19 231 1 1 1 1 1 1 14 2 3 3 2 4 24 4 4 4 6 35 9
Allan Hancock College - MATH - 3062
School of Mathematics and Statistics The University of Sydney MATH3062 NUMBER THEORY AND ALGEBRATutorial 520091. Write down the values of the Legendre symbol 1 a, p 11.a p, for every relevant value of a, p witha 2. Write down the square
Allan Hancock College - MATH - 3062
School of Mathematics and Statistics The University of Sydney MATH3062 NUMBER THEORY AND ALGEBRA LECTURE 15Proof of Theorem 24 continued Suppose that x Sp and so Hence xp-1 2x p= 1. If g Zp is a generator, x = g 2r for some integer r. g 2r