Introduction to Computer Science - 0366.1106

Shai Gutner (shai.gutner@cs.tau.ac.il)
2nd Semester, 2007/8 - Wed 17-19, Thu 15-16, Ex: Thu 16-17 Shenkar 222
Tel-Aviv University
Office Hours: Wednesday 16:00-17:00, or by appointment.

This page will be modified during the course.

General Information

Grades

Grades

Books

Course Plan

Week Class Slides Recitation Slides
14/5/08 General Introduction   -  
21/5/08 Computer structure, First C program, Input and output functions Lesson 1 Lab session  
28/5/08 Arithmetic expression, logic expression, control flow Tirgul 1
Lesson 2
scanf & printf, Data types, if structures and while loops Tirgul 2
4/6/07 Flow of control: loops, break, continue; Use of char type; Arrays, Functions Lesson 3
Lesson 4
for loops; Arrays, Functions Tirgul 3
11/6/07 Time complexity; Sieve of Eratosthenes; Sorting [2.1,2.2]   Arrays, Functions Tirgul 4
18/6/08 Functions, Recursion, Pointers Lesson 5 Dynamic memory allocation Lesson 6
25/6/08 Time complexity, Binary search, Strings, Pointers   Functions, Recursion Tirgul 5
2/7/08 Pointers, Strings, Dynamic memory allocation Tirgul 6 The syntax of the C programming language; Structures, typedef, Muli dimensional arrays Lesson 7
9/7/08 Structures, Two dimensional arrays Tirgul 7 Merge sort [2.3] Counting sort [8.2]  
16/7/08 Greatest common divisor [31.2] Modular exponentiation [31.6] Towers of Hanoi   Solutions to selected exercises  
References are from the book "Intoduction to Algorithms".

Handouts

Software

Details concerning the software required for the course can be found here.
If you do not have a Unix account, create one by pressing here, and then here.

Exercises

Exercises (including the printout of the source code) should be submitted either in class
or to Oron Vanunu's mail box (box #322, Shrieber building, first floor).
General guidelines for submitting exercises can be found here.

The source code itself should be placed in your home directory.
For example, the source code file relevant to question 3 of exercise 2 must be named ~/cs4math/ex2/q3/q3.c.

Before you submit each exercise, you must run a script that compiles all the source code files and gives permission to read and execute them.
For example, before submitting exercise 1, you must run the script compile_ex1.
(To be able to do so, you need to run the script ~gutner/p once at the beginning of the course.)
When you run compile_ex1, 4 executable files named q1.out, q2.out, q3.out and q4.out will be created in your home directory.
These files are the result of performing "gcc -Wall" on the files q1.c,q2.c,q3.c, and q4.c, respectively.
In case mathematical functions from math.h are needed, then "gcc -Wall -lm" is performed.

You can solve exercises in pairs, but you must clearly say who you worked with.
You must write the solution on your own.

In case you have questions, just make a copy of the file you are working on, and send me an e-mail telling me about the problem.
For example, if you have a question concerning question 4, run the command "cp q4.c q41.c" and send me an e-mail about it.
Do not send me the program itself!


Last updated August 11, 2008