cp_1_lect_32 - Problem Solving and Loop Problem Solving Top...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
5/10/10 11 Problem Solving and Loop Problem Solving Top Down Design Iterative Construct in Programs Loop initialization Loop invariance Loop termination Examples of loop invariance
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/10/10 22 The problem solving It is a creative process Defines as systematization and mechanization There is no universal method Different strategies to work for different people. Problem definition phase
Background image of page 2
5/10/10 33 The use of specific Some times it happens that we don’t have any idea, how to start on the problem, even after the problem definition phase. Solution: Pick a specific example of the general problem. Ex: To find the maximum in the given set of
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/10/10 44 Problem Solving techniques :Top Breaking a problem into sub problems Take the general statement and break them into a set of more precisely defined subtasks. Choose a suitable data structure Data structures and algorithms are usually intimately linked to one other. An appropriate choice of data structure usually leads to a simple, transparent, and efficient implementation Construction of loops Iterative construct can be easily convert into the loops Three things required to construct a loop Establishing initial conditions for loops Invariant relation
Background image of page 4
55 General
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/07/2010 for the course CS&IS TA C162 taught by Professor Kavitha during the Spring '09 term at Birla Institute of Technology & Science.

Page1 / 18

cp_1_lect_32 - Problem Solving and Loop Problem Solving Top...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online