You are on page 1of 31

Data Structures

Algorithms:
Theory and Lab
(CS 213 and CS 293)
Instructor: Prof. Varsha Apte
www.cse.iitb.ac.in/~varsha
July 19
th
, 2012
What is the course about?
Learning to represent data required for a
program in a proper structure and designing an
algorithm that uses this structure such that
Program runs fast
Program uses minimal memory
E.g. consider an online dictionary
How should we store the words?
What is the fastest way to search for the meaning of
a word?
E.g. Routing in Maps
How should we represent the Map?
How should we find the route?
What is the course about
You will learn about various known data
structures
You will learn how to use the right one for your
application
You may also develop your own data structures
You will learn various algorithms for common
problems
You will develop your own algorithms (in homeworks,
exams)
You will learn how to analyze these algorithms
for efficiency
This course is the
heart and soul of
Computer Science
Very critical prerequisite, all
subsequent CS courses
depend on this course

Every single one of
you must master the
basics!!!
My introduction
Professional:
Ph.D. in CS in 1994 (Duke University, US)
1994-2002: Member Technical Staff at Bell Labs, then
AT&T Labs
2002-Current: CSE, IITB
Research: quantitative evaluation of systems using
probabilistic methods (not much related to this course)
Personal:
Like music, movies, reading.
Passionate about environment and nature
Live in Powai (off-campus) with husband (Jiten) & two
kids (Ankoor, 15 & Akash, 13).
My teaching
approach, philosophy
& goals
The What
The Why
Interactive Lectures (What & Why)
Please ask questions, make a comment, crack a joke!!!
Please attempt to answer my questions (doesnt have to be correct)
Why?
Like many enthusiastic teachers, participation from students is a key
motivator for me!
It is simply boring to talk at length without interaction!
It serves as instant feedback on the material I am teaching
You get to clear your doubts right away and set the pace of the class
I try to ensure that one small set of students are not always doing all
the participating. Why?
It usually ends up being students who are doing well in the class, and
they may drive the discussion out of reach of the majority of the class.
Pace of the class becomes too fast.
Thus, all of you should participate
Do not be afraid of asking any question however basic it might
seem.
In the worst case, I might say Please come to see me later and I will
explain.
Meaningful Teacher-Student
relationship
I believe in a teacher-student relationship that goes
beyond you writing an exam and I giving you marks.
I will get to know each one of you by name and face by mid-sem
(hopefully) by taking attendance
I would like to know you by more than your marks in exams
Because there is more to you than your marks in exams
I would like continuous, frank but polite feedback
If you found a lab too difficult tell me
If you need a deadline extended why not ask?
If I am going to fast, too slow, you did not like the TA, exam is
too hard, too easy, topic is too confusing, too easytell me!!
In short: DONT BE ANGRY - BE COMMUNICATIVE!! I
MAY BE ABLE TO FIX WHATEVER IT IS THAT IS
BOTHERING YOU!
Meaningful Teacher-Student
relationship
Seems all mushy?
One practical relevance:
This will be a hard prerequisite for giving
recommendations.
If you have done well in the course, then the
grade will speak for you anyway
For me to write anything beyond what the
grade says, I must have material to write. I
must have interacted with you beyond
correcting your exams and giving you marks.
Expectations from each other
I will:
Come to class on time, give a full hour of
lecture 3 times a week
Teach all classes as per institute requirement,
covering the prescribed syllabus
Try to teach to the best of my ability, making
good slides, and giving many examples


What you can expect from me
what to expect from me
I will:
Be present at all labs and work with my TAs to
address your doubts
Give you adequate practice problems
Prepare exams that test basics as well as challenge
you
Arrange for correction of exams, labs etc on time and
as fairly as possible
Be available outside of class during announce office
hours


what to expect from me
I want to
Focus on getting everybody to have learnt
something at a minimal level
Since getting left behind in this course will make the
rest of this program very difficult
Challenge those who need it
But this may be difficult if I am also focusing on
everybody
The next course (CS 218), usually taught by
someone in the department whose field is
algorithms, will address this need for students who
need to be challenged.
what to expect from me
Will try but may not be able to do in-
class tutorials. Why?
Syllabus (fixed by department, not me) is
HUGE whichever way I plan it, all lectures
get occupied by explaining the theory
If you want tutorials, you may have to do
reading assignment at home, then we do
problems in class

what to not expect from me
Large numbers of practice problems with
solutions, so that exam becomes easy
Will give a reasonable number, but may not
be how much you want

A few words on this issue
The coaching class hangover
While (!bored || !exam
date) do
Revise theory
See hundreds of problems
being solved
Solve hundreds of other
problems on your own
Get them corrected
sit_for_exam()
Do thousand_and_first
problem in the exam easily
This is NOT the purpose of a
course at IIT
The raison-de-etre (reason of
existence) of a course is not for
passing the exam of the
course.
What is the purpose?
It is to solve real problems
in Computer Science
It is to think of problems to
solve in Computer Science
(your lab project allows this
creativity)
Problem solving vs creative
thinking
Of course, practicing problems is good. All of
you should of course do it.
But you must understand the limitations of
exam type problems
Exam problems are artificial.
Often made for clarity and ease of grading.
Have a clear solution (else cannot be given in an
exam)
Real problems are very different!
Mostly multi-disciplinary
Often no clear solution
Often complicated by human issues
Creative Thinking
Suppose you are doing given problems
quickly and thirsting for more
Think of ideas yourself.
What existing problem of humanity would you
like to solve?
Can computing help?
Do not look only into textbooks or your
course instructor for problems. Just look
around, or within yourself real problems
are all around us!
creative thinking
Think of solving practice problems as
similar to an Art Teacher coming into class
and saying
Draw a picture of children playing in a park
Sure, it is difficult, and you must be a good
artist to draw it well
Instead, I am tell you this:
Take a blank paper, draw whatever you want,
but make it beautiful
What do I expect from you?
First and foremost come to the course with a sense of
excitement and enthusiasm!
Think of the class as a learning community exchange
ideas, learn from each other
Be generally considerate of others
Come to lectures and exams on time
Remember that various demands may result in TA time
overhead, instructor time overhead,etc, so be thoughtful
Dont talk to each other in class
Bring an unwavering stand of academic ethics to this
course (Garv se kaho - No matter what happens - I
WILL NEVER COPY).
Give polite but frank feedback, to me directly (rather than
writing bitterly in anonymous feedback) about any
issues.
Specifics
The rules, policies etc that are
based on these philosophies
The How
Attendance
Compulsory upto mid-sem
This allows me to get a mental picture of each
of my students
After mid-sem correction is done
I will put a close watch on struggling students
will put pressure to attend classes.

Focus groups (for interactivity and
manageability)
Class will be divided into ~10 focus groups
In each lecture, there will be one focus group (I
will put up a schedule).
I will ask the focus group to sit in the front bench in a
lecture, and focus on this group during that lecture
Focus group will pick a representative
These reps (or a subset) will form a committee of
class reps for CS 213/293 that will be responsible for
back & forth communication between me (and TAs)
and students.
Evaluation Scheme (CS 213)
(Tentative subject to change)
3 mid-sems of equal weightage (all will be counted)
15% each (total 45%)
Two hours each
1 end sem of 45% weight.
10 % for enthusiasm (details later)
In the overall evaluation, approx 40% weightage will be
given to questions that test minimal knowledge and skill
that you must have to be able to pass CS 213.
Questions will range from very easy to hard.
Students good in this subject will get almost 100 marks.
Passing will be around 40 marks.
Easy = straightforward application of material
Hard = may not get the problem even if you have studied very
hard
Homework
Given frequently
Mix of reinforcement & creative problems
Each homework will be assigned to one
focus group
Will not be graded but compulsory to be done
(Will be counted in class participation marks)
Solutions to be given by focus group on class
discussion forum: piazza
All members of the focus group should post
answers (for enthusiasm mark credit)
Introduction to Piazza
Class discussion forum website
But much, much more than an
unstructured discussion forum
Sort of like a facebook group, but
customized for class interaction

Piazza
Instructors can post questions (and
announcements)
Students can post solutions
Other students can improve on solutions
posted by others or mark them as good
Instructor can improve on solutions posted
by others (or mark them as good)

Piazza
Students can post questions
Can do so with name or anonymously also
Instructor can answer
Other students can mark it as good question
Instructor sees record of online activity by
students
Piazza
I will encourage the use of Piazza in a big
way for this class!! I will
use Piazza notes instead of moodle for e-
mail announcements
redirect e-mails to me which are of general
interest to Piazza
Put homework problems on Piazza which
must be solved by a focus group

Enthusiasm
Active class attendance
Answering my questions
Asking doubts/questions
Making useful comments
Sitting attentively near the front benches
Interacting with me outside class (in my office
hours)
Active on Piazza
Important for those who are just shy speaking up in a
class
Summary about online course
resources
Permanent stuff on moodle: All slides,
other files, important instructions, lecture
schedules.
Temporal stuff - discussion type
activity, question/answers, or
announcements, on Piazza.

You might also like