Introduction to Computer Science - 0366.1106

Shai Gutner (shai.gutner@cs.tau.ac.il)
2nd Semester, 2006/7 - 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
28/2/07 Computer structure, First C program, Input and output functions Lesson 1 Development environment, First C program Tirgul 1
7/3/07 Arithmetic expression, logic expression, control flow Lesson 2 scanf & printf, Data types, if structures and while loops Tirgul 2
14/3/07 Flow of control: loops, break, continue, switch case; Use of char type Lesson 3 for, switch case Tirgul 3
21/3/07 Arrays, Functions Lesson 4 Arrays, Functions Tirgul 4
23/5/07 -   Time complexity, Sieve of Eratosthenes, Binary representation  
30/5/07 Functions, Recursion, Pointers Lesson 5 Functions, Recursion Tirgul 5
6/6/07 Dynamic memory allocation, Time complexity Lesson 6 Pointers, Strings, Dynamic memory allocation Tirgul 6
13/6/07 Structures, typedef, Muli dimensional arrays Lesson 7 Structures, Two dimensional arrays Tirgul 7
20/6/07 Sorting [2.1,2.2] Merge sort [2.3] Counting sort [8.2] Greatest common divisor [31.2] Modular exponentiation [31.6] Towers of Hanoi   The syntax of the C programming language  
27/6/07 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 Liron Levkovitz's mail box (box #260, 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 ~courses/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 July 29, 2007