homework1
80 Pages

homework1

Course Number: CSE 130, 2009

College/University: San Diego Supercomputer...

Word Count: 491

Rating:

Document Preview

Department of Computer Science and Engineering University of California, San Diego CSE 130 Winter 2001 assigned: Jan. 10th; due: Wednesday Jan. 17th, before class, i.e., 4:40pm sharp The URL of the class web page is http: www.sdsc.edu ~ludaesch CSE130 . You will nd important announcements, lecture notes, assignments, etc. there. There is a web bulletin board for CSE130 where you can ask your fellow students or...

Unformatted Document Excerpt
Coursehero

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.

of Department Computer Science and Engineering University of California, San Diego CSE 130 Winter 2001 assigned: Jan. 10th; due: Wednesday Jan. 17th, before class, i.e., 4:40pm sharp The URL of the class web page is http: www.sdsc.edu ~ludaesch CSE130 . You will nd important announcements, lecture notes, assignments, etc. there. There is a web bulletin board for CSE130 where you can ask your fellow students or the TAs who also monitor the board general questions about CSE130, e.g., organizational questions, technical problems, questions to clarify assignments etc. The URL is http: www.sdsc.edu ~ludaesch CSE130 board . The rst discussion section will be in the second week. There will be individual assignments and group projects. The weights on the assignments and projects vary; the individual assignments and group projects together account for 50 of the grade, the midterm and nal together for the other 50. For this individual assignment prepare a concise and readable answer sheet and hand it in on Jan. 17th, before class. Write your name and email address on the front page. INDIVIDUAL ASSIGNMENT 1 Problem 1 Data Types A good way of thinking of types is as sets of values on which a common set of operations makes sense. Consider the following types boolean values are true " and false " char characters integer real aka oat string record aka structure in C over some types array of set of associative array from 1 to 2 T T T ; T T1 : : : ; Tk where and T Ti denote arbitrary given types. a Name for each of the above types one typical operation, as well as one operation that does not make sense for this type but for another of the above types. Also note whether each type is primitive or composite. 1 b When seen as a mathematical object, composite types can be described by their signature. For example, given the type declarations type Person = Name, Age type Name = string type Age = integer a corresponding signature for would be the Cartesian product string integer. What are the signatures for string seen as a composite type Person T associative array from string to integer array of records, indexed by an enumeration type e , and where each record has a component holding a real and a string. Tree Problem 2 Trees Consider a composite type c ;:::;c Tree , de ned as follows:...
MOST POPULAR MATERIALS FROM CSE 130
MOST POPULAR MATERIALS FROM CSE
MOST POPULAR MATERIALS FROM San Diego Supercomputer Center