(D-Problems discussed on Thursday, 03-Apr-2008)
(Q-Problems due on Tuesday, 8-Apr-2008)
[Networking, AI]
Discussion Problems: -- Prepare (individually)
for tutorial discussion.
T10-D1: (Getting your SOC account)
With help from SOC IT folks, SOC accounts have been created
for all of you in the class (except for those who already
have an account because they are already taking some SOC modules).
To get the password for your account, please click on the following URL:
https://mysoc.nus.edu.sg/~myacct/iforgot.cgi
and login with your NUSNET ID and password.
An email with your password will then be sent to your NUSNET account.
Retrieve it and login to the SOC computer called sunfire-r.comp.nus.edu.sg
and you can change your password from there. This machine runs the Unix
operating system.
(Note: It may be a little confusing for some of you at the beginning since you now have a NUSNET account (via the NUS Computer Centre) and an SOC account (via the School of Computing) and they may share the same id. But, just remember which is which when you "log" on to the two different systems.)
SOC provide a number of very useful help (how-to) web-pages on using the
SOC account, about using ssh client, about setting homepages, and so on.
Please check it out at
http://www.comp.nus.edu.sg/cf-pub/index1.html.
Click on "click here" under "For internal access only".
You will see a long list of Guides and Help pages.
Click on "SSH & X-Windows Guide" for help on SSH and where to
download the SSH 3.2.9.
Click on "WWW" to get help pages related to homepages and so on.
T10-D2: (Getting ssh client and doing file transfers)
You will need to do file transfers when designing your own web-page
in the SOC account on the server-host called
sunfire-r.comp.nus.edu.sg.
There are many ways to do file transfer, but
for this tutorial, we will use the free software called
SSH 3.2 that you can download from my mirror
here.
(You should click on the previous url to save this file
(SSHSecureShellClient-3.2.2.exe) in your computer.)
Then "run" it to install the SSH 3.2 software into your computer. Two icons will be added to your computer desktop, the SSH Client and the SSH Secure File Transfer Client (sftp).
To do file transfer, you will first start up sftp (double-click on it). Now, to log-in to the server-host sunfire-r.comp.nus.edu.sg choose "Quick Connect" and under "Host Name", type in sunfire-r.comp.nus.edu.sg, under "User ID", type in your SOC userid, leave the rest alone, and click on "Connect". Type in your password for the SOC account and, if everything went well, you are connected.
You will see two window-panels, one for files in your local computer,
and one panel for the files in your SOC account. To transfer file, just
drag-and-drop accordingly.
T10-D3: (Creating a Simple Homepage)
You will first create a simple homepage on your local computer.
To start things off, please download the sample homepage from
T9-D5. Change the filename from
sample-webpage.html to index.html.
Then, using a text-editor like Notepad or Wordpad, edit (customize)
this web page for your page. To preview it
with a browser (such as IE), you can double-click on the file.
(However, this page is not accessible from the web yet.)
T10-D4: (Homepage set-up on your SOC accounts)
To set up a homepage with your SOC account (for this tutorial, we will
use the hypothetical SOC account uit2201), you will need
to do the following steps:
Problems to be Handed In for Grading by the Deadline:
(Note: Please submit hard copy to me. Not just soft copy via email.)
T10-Q1: (10 points) (Recursive tables in your homepage)
You now know how to do simple web-pages using html.
In this problem, we combine the ideas of html-tables with the
idea of recursion in algorithms.
To produce a simple table in html, we use the following code:
<table border=1 cellpadding=10 valign=top> <tr> <td> This is a test </td> </tr> </table>(a) [5 points] Using a simple editor like wordpad, design an html page (using only plain html) that displays the recursive-table shown on the right. Call this html file table-recursive.html and upload it into your SOC homepage and give a link from your homepage (index.html). I will grade directly from your homepage.
(c) [5 points] Explain how this figure can be an alternative representation of the search tree for a binary search algorithm on 7 names.