• ANNOUNCEMENTS APPEAR IN REVERSE CHRONOLOGICAL ORDER, WITH THE MOST RECENT BEING AT THE TOP.


  • Click here for a pdf file showing the grades as posted on the wall by the CSI office.

  • Assignment 3: The hint for topsort in the final extra credit problem is indeed accurate. The hint is for having the rules for "ts" build the answer in the first argument, and in the order the nodes are encountered; the tail of the list is unspecified until the base case gets triggered.

    There are of course other ways of organizing the "ts" rules.

  • Assignment 3: The hint for Part 3 has been beefed up a bit. But also some clever students have discovered that you can use "setof" to find all the paths and their costs, then sort them into increasing order, and finally then use the first one as a path of minimum cost.

  • Click here for the answers to Quiz 6b.

  • Click here for the base 10 to Roman translation rules. Try them out. They seem to work; I could not duplicate the difficulties from yesterday's class.

  • You can copy the N-queens programs shown in class Wed. I have modified them slightly to be a bit "cleaner". They start with the empty configuration (Currentcol = 0) and work up to N columns. Click here for the basic algorithm.

    The cleanup results in a nicer algorithm when checking for rows already taken using asserta and retract. Click here for that version.

    I've also prepared a row-checking version that simply keeps a list of occupied rows and uses the member predicate. Click here for that.

    Notice that in both versions that check for occupied rows, the noclash rules have been replaced by nodiag rules. This is because we are avoiding the use of any one row or column by more than one queen; the only capturing that can occur is along a diagonal.

  • For the answers to quiz (4b), click here. Check your graded quiz on the third and fourth parts of Question 1; if there are grading errors, bring them to discussion or Sean's office hours.

  • For the answers to the April 21 practice quiz (6a), click here.

  • Click here for the answers to Quiz 5b.

  • The answer key for Quiz 5a had the base case for the sum program using the cut "!" goal (which was unnecessary). But when removing that goal to make the base case a simple assertion, you have to remove the ":-" symbol also. So the base case cannot be "sum([],0) :- ."
    It has to be "sum([],0)."

  • Assignment 3 is posted; due May 5. It covers the material relevant to
    Quizzes 5a, 5b, 6a, and 6b. It is an SWI-Prolog programming assignment.

    Click on the Assignments link at the main page, or else click here.

  • For the answers to the March 24 practice quiz (5a), first try to work out questions 2 and 3; THEN click here.

  • For the answers to the March 10 practice quiz (4a), click here.

  • On March 16, at 6pm in AS014, there is a panel discussion on Careers in Information Technology. Click here for the detailed announcement.

  • SCHEME: If you are running the bash shell, fix .bash_profile using an editor, or use the export command as in Sean's method. For those using csh or tcsh it's the .cshrc file that sets the definition of $PATH. Whichever file is used by your shell to set up your $PATH environment variable, just add the extra path "/usr/local/depts/cs/bin" to those paths already specified. (Also, don't end the path with "/" even though this shouldn't make any difference.) Be careful to follow the syntax of your existing $PATH definition.

    Also, SCHEME does not define "nil" unless you arrange for it. Sorry -- I had forgotton that. I have a file called ".scheme.init" which is loaded whenever scheme is started. In my .scheme.init file, I have the definition:

    (define nil ())

    Without this, the identifier "nil" is just another atom like X, Z, alist, q17, etc.

  • Assignment 2 is posted; due March 19. It covers the material relevant to
    Quizzes 3a, 3b, 4a, and 4b. It is a SCHEME programming assignment.

    Click on the Assignments link at the main page, or else click here.

  • For the answers to the March 1 practice quiz, click here.
    Note that for clarity, the first example for the Question 2 program has been changed slightly.

  • Here is Sean's alternative to the earlier announcement on SCHEME.
    It has the advantage that you get the man page also which can be an extra info source.
    Open *~/.profile* in your favorite text editor.
    To the very bottom of the file, add the following two lines:

    export PATH=$PATH:/usr/local/depts/cs/bin;
    export MANPATH=$MANPATH:/usr/local/depts/cs/man;

    After saving and closing, log out and log back in. You should now be able to run:

    man scheme           and scheme (CTRL-D to quit).

  • Make sure that in your itsunix account, your $PATH variable includes the path: "/usr/local/depts/cs/bin". You can do this by editing your ".cshrc" file or your ".bash_profile" file (depending upon whether you use csh, tcsh, or bash as your shell). If you are uncertain about how to do this, talk to one of the consultants in the public user rooms. The class account defines its $PATH environment variable in the .cshrc file as follows:

    set path=(~/bin /usr/local/bin /usr/ucb \
             /usr/bin /bin /usr/openwin/bin \
             /usr/local/X11/bin /usr/dt/bin \
             /usr/ccs/bin /usr/local/new/bin \
             /usr/local/depts/cs/bin .)

    If you type "which scheme" at the itsunix prompt, you should get:

    /usr/local/depts/cs/bin//scheme

    If you type "scheme" you should get

    Scheme saved on Sunday November 21, 1993 at 9:15:23 PM
    Release 7.3.1
    Microcode 11.146
    Runtime 14.166
    ;Loading ".scheme.init" -- done (only if you have a scheme.init file)

    1 ]=>

  • Quiz 2b will be given on Monday, February 22.
    (Practice) Quiz 3a will be moved to Monday, March 1.
    Quiz 3b remains scheduled for Wednesday, March 3

  • Please join us on Tuesday, February 9, for an open house at the CCI Undergraduate Office, 1-3 pm in LI-84. It is located between the CS Department and the IST UG advisor.

    This space will host study groups, one-on-one tutoring sessions, some faculty office hours, student group meetings, a place to hang out and play the Wii and build with Legos n. And we're open to more suggestions! We want this space to be for CCI students (grads as well as undergrads!) and the hub for college-wide activities such as our career development series, the Wii socials, and other social events within the College. We want students to find community in CCI, either on Facebook or LinkedIn, or while playing Smarty Pants, or while studying the big exam. This space is for YOU! Help us open it and present it to the university community!

    Light refreshments will be served.

    See you there!
    Assistant Dean Jennifer Goodall

  • Assignment 1 is posted. It covers the material relevant to
    Quizzes 1a, 1b, 2a, and 2b, and is due in class
    on Wednesday, February 17 (the date of Quiz 2b).

    You should do the first 3 questions as preparation for Quiz 1b,
    and the last 2 questions to prepare for Quiz 2b. Don't wait!

  • Remember, Quiz 1b will be given on Wednesday, February 3.

  • Remember, Quiz 1a will be given on Wednesday, January 27.