CSE 373 -- Data Structures and AlgorithmsWinter 2002 |
Department of Computer Science and Engineering, University of WashingtonSteve Tanimoto (instructor) |
Assignment 1Version 1.1 of January 4 |
Data Structures OnlineDue date and time: Friday, January 18, 2002, (Part A at 6:00 PM, Part B in class).Turn in Part A of this assignment by filling in the A1 online submission form. Turn in Part B (written on paper) in class. |
Part A
Each of you will be given, in class, a question to answer.
You may trade questions with another student, but each student
will be expected to turn in a unique answer to a unique question.
(Some questions may be somewhat more difficult than others. Do the best
you can with your topic.)
Write your answer
on a web page, under your computer account on Dante, one of the UW web
servers. (If you are not familiar with how to post web pages, we will
be going over this during the optional session on January 14 at 4:30.)
Here is a
sample solution; use it as a template
for your own page, keeping the same color scheme for each of its parts.
Then submit your assignment by filling out and submitting
the online submittal form. Note: if you don't already have one,
you will need to get a
UWNetID
for this.
Individual Work: This assignment
requires individual work. Do NOT work in teams on this assignment..
Part B
Do the following problems on paper and hand them in at class
on Friday, Jan 18.
a. Write out the elements of (S1 U S2) X S3
b. Write out the elements of S1 X S3 X S3
c. Write out the elements of S1 X (S3 X S3)
a. What is the domain of f?
b. What is the range of f?
c. Is f a surjection? (Is every element of the range used?)
d. Is f an injection? (No range element is used more than once).
e. Is f a one-to-one correpondence?
f. Let f' be the set of ordered pairs obtained from those in f
by reversing their order. Is f' a function?
a. Give a formal description of the MID-INSERT operator for a mid-list.
b. Give a formal description of the MID-REMOVE operator for a mid-list.
For each operator, consider it to be a function. Give the domain and range
of the function. Then describe how it maps a domain element into a
corresponding range element using a symbolic notation.