You are on page 1of 16

CS F111 Computer Programming 1st Sem.

2011-2012

Agenda Course Introduction Course Motivation - What is a computer? - What is computable?

Sundar B.

CSIS, BITS Pilani

8/2/2011

Course Introduction

First course on Computing: Focus on Programming Methodology and Best Practices Not on specific Programming Language OR hacks The C programming language is used as a vehicle but methodology will apply to most languages (of similar style) No background or prior preparation presumed We will start from scratch If you who have learnt programming earlier you may have to un-learn certain things particularly style, methodology, and philosophy!

Sundar B.

CSIS, BITS Pilani

8/2/2011

Administrivia

3 lectures a week Attendance is not mandatory in BITS but students missing classes miss a lot more I do guarantee that :-) Continuity from class to class is essential A little bit of review after a class (and before the next) goes a long way If you miss out on a few classes (or reviews) you will find it difficult to catch up! 1 session of 2 hours of lab per week (per student): Room 1102 A student must go to the lab section he / she registered for! Each lab will carry a nominal weight of 5 marks (out of 300) See Course website for more details: http://csis.bits-pilani.ac.in/faculty/sundarb/courses/cp OR just go to csis and drill down Evaluation: see handout and course website
Sundar B. CSIS, BITS Pilani 8/2/2011

Pedagogy

Teaching focus is on concepts: basics as well as hard to learn ideas Emphasis on practicum wherever applicable But details of practice are often left as (lab) exercises. Teaching Methodology You are expected to think in class :-) If you dont understand some thing even a single word, you should stop me! You must ask questions in or out of class! Consultation Hours: 1 hour on 4 days a week (see website)
4 Sundar B. CSIS, BITS Pilani 8/2/2011

Course Specific Pedagogy

Focus on Programming Methodology Programming Principles and Strategies that will serve you for a life time of programming More importantly concepts that enable you to learn on your own new programming methods and languages as you go along. Text book and other Reading Prescribed text book is useful Additional reading / material will be posted as required Lectures and Labs are complementary Missing one will affect the other! Lectures may not follow the text book blindly Examples will be derived from the real-world!
5 Sundar B. CSIS, BITS Pilani 8/2/2011

Course Motivation

Sundar B.

CSIS, BITS Pilani

8/2/2011

What is a computer?

Consider the following (example) devices: A calculator An auto-rickshaw meter A personal computer A mobile phone

Sundar B.

CSIS, BITS Pilani

8/2/2011

What is a computer?

Consider the following (example) devices: A (simple business) calculator User enters (arithmetic) expressions using a keyboard e.g. 5000 * 0.03 * 12 + 5000 Calculator Evaluates the expression and produces a value say, 6800, in this case. An auto-rickshaw meter A personal computer A mobile phone

Sundar B.

CSIS, BITS Pilani

8/2/2011

What is a computer?

Consider the following (example) devices: A (simple business) calculator An auto-rickshaw meter As the auto is driven, a Watts Governor measures current velocity Meter calculates distance: S = v(t)*dt Meter calculates fare: Fare = BaseFare + S * Rate A personal computer A mobile phone
9 Sundar B. CSIS, BITS Pilani 8/2/2011

What is a computer?

Consider the following (example) devices: A (simple business) calculator An auto-rickshaw meter A personal computer Enumerate all the things that a Personal Computer can do. A (low end) mobile phone

10

Sundar B.

CSIS, BITS Pilani

8/2/2011

What is a computer?

Consider the following (example) devices: A (simple business) calculator An auto-rickshaw meter A personal computer A (Rs. 500) mobile phone User enters a number and presses dial Users phone connects to another phone User speaks and hears Users phone receives an incoming call User presses accept User hears and speaks
11 Sundar B. CSIS, BITS Pilani 8/2/2011

Exercise: Generalize and Distinguish

Common Factors

Distinct Factors

12

Sundar B.

CSIS, BITS Pilani

8/2/2011

Computation and Computers

Nature of Computation Discrete (i.e. digital) or Continuous (i.e. analog) User Interaction (input / output) This can also be digital or analog Single instant or over time Time can also be discrete or continuous How do you integrate discrete computations? General Purpose or Special purpose User Driven or Event Driven

13

Sundar B.

CSIS, BITS Pilani

8/2/2011

Computation and Computers

Our (Primary) Interest General Purpose Computations and Computers These computers are programmable (we will come back to this later!) These computers have memory and communication with external devices including other computers (often referred to as I/O or networking)

14

Sundar B.

CSIS, BITS Pilani

8/2/2011

What is computable?

Informal but intuitive notion of computability: Anything that can be computed using a finite sequence of steps where each step consumes a finite amount of resources and time [Resources refer to memory/storage and energy/power] i.e. anything that can be computed in finite amount of time using finite amount of resources is computable Is anything and everything computable? i.e. are there things that can not be computed? [Observe that this is different from not knowing how to compute something.]
15 Sundar B. CSIS, BITS Pilani 8/2/2011

What is computable?

Two Theorems (without proofs): Halting Theorem (paraphrased): No computer can decide whether an arbitrary problem is computable in finite time. Countable Computations Theorem: There are more functions than can be computed. Proof Outline: The set of all computations (say defined by programs) is countably infinite. The set of all functions (from natural numbers to natural numbers) is uncountable. i.e. there are more functions than can be computed.
IF YOU DONT UNDERSTAND THIS SLIDE IGNORE IT!
16 Sundar B. CSIS, BITS Pilani 8/2/2011

You might also like