Date: Wed, 20 Nov 1996 23:03:18 GMT Server: Apache/1.0.2 Content-type: text/html Content-length: 7262 Last-modified: Thu, 31 Oct 1996 23:19:50 GMT CS 130A Gonzalez

CS 130 A (Fall 1996)

****** Added Sept 30, at 3:15 pm

Instructor

Dr. Teofilo F. Gonzalez

Office: 2119 Engineering I
Phone: 893-3849
Office hours: M 1:00 - 2:00 pm and Th 2:00 - 3:00 pm.
E-mail: teo@cs

Teaching Assistants

Mr. Bogdan Cocosel (Discussion Session F 1:00 - 1:50)

Office: Building (trailer) 380, Room 101B.
Office hours: M 4:00 pm - 5:00pm and F 3:00pm - 4:00 pm.
E-mail: bcocosel@cs

Mr. Huican Zhu (Discussion Session W 11:00am - 11:50am)

Office: Building (trailer) 380, Room 101B.
Office hours: T 1:00 - 2:00 pm and W 4:30 - 5:30 pm.
E-mail: hczhu@cs

****** Added October 2, at 4:30 pm

The code we will review Thursday Oct 3 is in file ~cs130a/files/llist.C You may one to see the one used last year which does the same thing but in a slightly different way. That program is in file ~cs130a/files/95llist.C

Copy them into your directory and type: g++ llist.C

then type a.out

Sample input (one number per line): 6 7 5 4 3 0 7 6 8 9 1 2 3 0

*************************** October 9, 1996 3:00 pm ***************************

You may use the listitarator class for the hw, as long as it results in a time efficient procedure as without it, (time efficient with respect to O notation).

For problem two if you do insert(s), insert(s+1), ... insert(f) results in very inefficient code. So just implement the operation directly .

Remember, we want time efficient code, but do not try to optimize to the last bit (i.e., do not try to reduce to the last bit the constant "c" in the O notation for the time complexity).

*************************** October 11, 1996 5:00 pm ***************************

Typo in Hw: In the sorting algorithm (problem 6d) replace if (count == 0) by if (count != 0)

*************************** October 15, 1996 5:00 pm ***************************

Comments on the project:

(1) Use g++

(2) Note that k is either zero or it is a positive integer >= 2

(3) Typos ( replace "retured" by "returned", replace "occurence" by "occurance", replace "occurences" by "occurances", replace "ingnore" by "ignore", replace "clases" by "classes". )

(4) An example for the project is in ~cs130a/files/example

Comments on the project:

The root node in both figures should have a 9 instead of an 8

*************************** October 16, 1996 1:00 pm ***************************

Comments on the project:

The root node in both figures should have a 9 instead of an 8

*************************** October 17, 1996 1:00 pm ***************************

Just called the RBR and they said the old midterms for cs130a are there. If they are not listed, then ask the person in the counter directly.

*************************** October 18, 1996 5:00 pm ***************************

As we said in the first handout: you must work in the project (and homeworks) individually.

As I said before in the project, my member functions should not be your final memeber functions. The purpose of the functions is to give examples on how to acceess the data. However the data in the nodes should be left untouched.

In the project handout (page 6) I say that x is followed by a CR. I should have said that x is followed by a CR or a blank. The same holds for string y. A little C++ program to read data is in file ~cs130a/files/read.C

*************************** October 18, 1996 7:00 pm ***************************

In the project I say that when a ArrayTrieNode or a LinkedTrieNode has a count that becomes 1 it should become a TinyTrieNode. That is INCORRECT (sorry about that). It becomes a TinyTrieNode when in addition to the count being 1 the StrEnds is TRUE.

*************************** October 21, 1996 10:30 pm ***************************

The homeworks have been graded. You can pick them up during my office hours today from 1-2.

The solutions are in the RBR. They are also in the file ~cs130a/files/hw1.ps

You can print that file or view it with ghostscript hw1.ps The press the left bottom on the dismiss sign if it appears. Put the mouse insede the window and type CR to advance the page. Additional information on ghostview appears when you type man hw1.ps

In the hw it should say that Bogdan Cocosel is a co-author of the solutions.

*************************** October 22, 1996 2:00 pm ***************************

Oops!! I forgot to add this. But here it is. In the file ~cs130a/files/proj.C and the file ~cs130a/files/projh.C you will find code to access and create the two examples in the project handout. You can copy them into your directory, compile it and run it.

*************************** October 28, 1996 10:30 am ***************************

As we say in the project description we are dealing with sets, so we do not keep multiple copies of the same word in the same set. Also, the input is ERROR FREE. But one might try to insert a word in a set that is already there or delete a word that is not in a set. In the first case you must not insert the word and the count needs to remain unchanged. In the second case, the count must remain unchanged and nothing must be deleted. Note that this is important to facilitate testing.

If you implement insert as in the class notes, you will have to make to passes over the Trie in some cases. Either to update the count when inserting a new word, or "unupdating" the count if it was updated incorrectly because the word was already there.

You can create a member function whoami (defined like GetNext) to return the type of object you have for derived classes (like TinyTrieNode, etc.).

*************************** October 28, 1996 15:30 pm ***************************

Remember that the final type of a node DEPENDS on the NUMBER OF WORDS in that subtree It DOES NOT depend on the number of nodes or the number of nonnull pointers in that subtree.

*************************** October 31, 1996 15:15 pm ***************************

The Office hours of the TAs on Wednesday and Friday will be in CSIL from now till December.

If you would like CSIL to be open during the Thankgiving Holidays, please send e-mail to humphrey@cs. It would be nice if you specify the times and days you want it be open, and if you would like to "babysit" the machines.

Under Construction

Current Weather Maps/Movies
A Beginner's Guide to HTML
The C++ Virtual Library
DO NOT CLICK HERE