Problem Solving and Python Programming: UNIT I: Computational Thinking and Problem Solving

Fundamentals of Computing

Engineering Python Programming

People make decisions in everyday life. This decision is considered as a solution to the problem. The problems we face in day to day life can be important or can be least important. Here are some examples of various problems faced in our everyday life

Fundamentals of Computing

What is Problem?

• A problem is a state of difficulty that need to be resolved.

• When a problem exists then that means there is some uncertainty in the solutior While solving a problem there is a desire to attain some specific goal.

• People make decisions in everyday life. This decision is considered as a solution to the problem. The problems we face in day to day life can be important or can be least important. Here are some examples of various problems faced in our everyday life –

1) Will I get proper transport to go to my workplace ?

2) Should I wear shoes today?

3) Should I go to a movie ?

4) Which course should I take?

5) Which mobile phone should I buy?

6) Which college should I choose for admission ?

7) How to buy best stock ?

And so on...

If bad decision is made then time and resources may get wasted. Hence it is very important to make proper decisions while solving the problem. Normally decisions can be made using a problem solving approach.

• Here are six steps of problem solving

1. Identify the problem : Identifying the problem is the first step in solving the problem. Problem identification is very essential before solving any problem.

2. Understand the problem : Before solving any problem it is important to understand it. There are three aspects based on which the problem can be understood.

Knowledgebase : While solving the problem the knowledgebase can be related to a person or a machine. If the problem is to be solved for the person then it is necessary to know what the person knows. If the problem is to be solved for the machine then its instruction set must be known. Along with this the problem solver can make use of his/her own instruction set.

Subject : Before solving the problem the subject on which the problem is based must be known. For instance : To solve the problem involving Laplace, it is necessary to know about the Laplace transform.

Communication : For understanding the problem, the developer must communicate with the client.

3. Identify the alternative ways to solve the problem : The alternative way to solve the problem must be known to the developer. These alternatives can be decided by communicating with the customer.

4. Select the best way to solve the problem from list of alternative solutions : For selecting the best way to solve the problem, the merits and demerits of each problem must be analysed. The criteria to evaluate each problem must be predefined.

5. List the instructions using the selected solution : Based on the knowledgebase (created/used in step 2) the step by step instructions are listed out. Each and every instruction must be understood by the person or the machine involved in the problem solving process.

6. Evaluate the solution : When the solution is evaluated then - i) Check whether the solution is correct or not ii) Check whether it satisfies the requirements of the customer or not.

For example -


(i) Problem description

Steps

Identify problem

Outcome

Problem : Enrolling a descent college and a branch.

Goal: Name the college and branch he will join this year

(ii) Problem description

Parth wants to decide which course to opt for his graduation ?

Steps

Understand the problem

Outcome

Facts

i) Searching for the colleges and available branches.

ii) Consider his percentage of marks in entrance examinations.

iii) His inclination towards the subjects

iv) Skills he posses

(iii) Problem description

Steps

List possible solutions to the problem

Outcome

Possible solutions :

i) Colleges available in home university.

ii) Colleges out of his hometown

iii) Autonomous colleges.

iv) Colleges/University abroad,

(iii) Problem description

Steps

Select the best solution to the problem

Outcome

Criteria based on which the best solution can be made

i) List high ranked colleges with desired branch

ii) Affordable fees

iii) Hostel accommodation/ not far away from residential area.

iv) Good placement service.

(iv) Problem description

Steps

List instructions

Outcome

i) Enroll to admission procedure.

ii) Fill up the option form for admission

iii) Wait for merit list to get displayed.

iv) Get admission to desired course in desired college

v) Pay the fees.

vi) Attend the college,

(v) Problem description

Steps

Evaluate the solution

Outcome

Option 1 (Success) : Parth enjoys his choice of college so no need to evaluate,

Option 2 (Reevaluate): i) Parth feels homesick.

ii) Parth does not find interest in the subject or his grades are low - so he must change the solution

 

1. Problem Solving with Computers

• Solution : It is the instruction that must be followed to produce the best results. The result may be : More efficient, faster, or more understandable.

• Results: It is an outcome or the completed computer-assisted answer. It can be in any form such as printout, updated files, output to monitor, speakers, and so on.

• Programs : Computer programs are set of instructions executed to obtain solution to certain problem. These programs are written in some specific programming language.

• Basically computers can deal with the problems having algorithmic solutions. That means a problem for which an algorithm can be created - such problem can be solved using computer.

• For instance - Evaluating a complicated expression or generating series of names

from the letters are the type of problems that a computer can solve easily. But it is difficult for a computer to solve some heuristic problem. For instance - How a paint a scene beautifully - is a problem that a computer can not solve because such problems need skills, and experience.

• The field of computer that deals with solving the heuristic problems is called artificial intelligence.

• Artificial intelligence is based on knowledge base and the result in it are displayed in a language that a human speaks. Still lot of research and development is required in this field.

• Hence human can deal with the problems that are based on heuristic solutions and computers can deal with the problems that are based on algorithmic solutions.

Review Question

1. Write and explain the six steps of problem solving with suitable example.

 

Problem Solving and Python Programming: UNIT I: Computational Thinking and Problem Solving : Tag: Engineering Python : Engineering Python Programming - Fundamentals of Computing