The document outlines the course 'Problem Solving Using Computers' for B.Tech first-year students, detailing its importance in logical thinking, software development, and programming. It explains the problem-solving process, the significance of algorithms, and their properties, along with examples and flowchart representation. The course is taught by Assistant Professor Virendra Kumar Meghwal in the Computer Science & Engineering department.
The document outlines the course 'Problem Solving Using Computers' for B.Tech first-year students, detailing its importance in logical thinking, software development, and programming. It explains the problem-solving process, the significance of algorithms, and their properties, along with examples and flowchart representation. The course is taught by Assistant Professor Virendra Kumar Meghwal in the Computer Science & Engineering department.
Course code : CSE 1002 Faculty : Virendra Kumar Meghwal Designation : Assistant Professor Department : Computer Science & Engineering Email-id : virendra.meghwal@jaipur.manipal.edu Problem Solving • Problem-solving is the process of identifying a problem, analyzing it, and finding an effective solution. • It is a critical skill in computing, engineering, business, and everyday life. • The term problem solving is used in many disciplines, sometimes with different perspectives and often with different terminologies.
• The problem-solving process starts with the problem
specification and end with a correct program. Why Problem Solving is important? • Helps in logical thinking and decision- making. • Essential for software development and programming. • Enhances the ability to break complex problems into manageable parts. • Improves efficiency and innovation in various fields. Problem Solving in Programming • In programming, problem-solving involves writing algorithms and flowcharts before coding. • Algorithms give a structured plan, while flowcharts visually represent the logic. (or)Design an Algorithm
(or) Test the problem
Stages of Software Development Problem Analysis: • Analysis the problem or analysis involves the following: ? – Inputs (i.e. The data you have to work with.) – Output(i.e. Desired Result) – Any additional requirements on the Solution. Algorithm – An Algorithm is a step-step procedure to solve a given problem. – The word algorithm originates word ‘algorism’ which means process of doing arithmetic with Arabic numerals. – Around 825 AD, Persian scientist and polymath Muḥammad ibn Mūsā al-Khwārizmī , who develop methods for solving problem which is , used specific step by step instructions. Algorithm Algorithm (English) Pseudocode Algorithm 1. Input first number in variable 1. A = (first input value) A. 2. B = (second input value) 2. Input second number in variable B. 3. Initialize sum =0 and avg 3. Initialize sum variable with =0. zero. 4. sum = A + B 4. Initialize avg variable with zero. 5. avg = sum/2 5. Add A and B and store in sum. 6. Print avg. 6. Divide the sum value by 2 and store in avg. 7. Print avg. Why Are Algorithms Important? • Helps break down complex problems. • Ensures correctness before coding. • Improves efficiency and debugging. • Can be implemented in multiple languages. Algorithm • An algorithm is a method of representing the step- by-step procedure for solving a problem. • Properties of algorithm: An algorithm must possess the following properties: 1. Finiteness 2. Definiteness 3. Effectiveness 4. Generality 5. Input/Output Algorithm Properties 1. Finiteness: An algorithm should terminate in finite number of steps. 2. Definiteness: Each step of the algorithm must be precisely stated. 3. Effectiveness: Each step must be effective, in the sense that it should be easily convertible into program statement and can be performed exactly in a finite amount of time. Algorithm Properties 4. Generality: The algorithm should be complete in itself, so that it can be used to solve all problems of a given type for any input data. 5. Input/Output: Each algorithm must take zero, one or more quantities as input data and yield one or more output values. Example • Suppose we want to find the average of three numbers. • The algorithm can be written as follows: 1. Read 3 numbers a, b and c. 2. Compute the sum of a, b and c. 3. Divide the sum by 3 4. Store the result in variable d. 5. Print the value of d 6. End the program. • Flowchart is a diagrammatic representation of an algorithm. It is built using different types of boxes and symbols. The operation to be performed is written in the box. All symbols are interconnected by arrows to indicate the flow of information and processing. On Page connector vs Off page connector