22GE002_Unit_1_LM
22GE002_Unit_1_LM
UNIT I
VISUAL PROCESS MODELING
1.1 SCENARIO DECOMPOSITION
Defining the Problem
The foundation of effective problem-solving lies in accurately defining the problem.
This step involves transitioning from an undesirable state (the starting point) to a desirable one
(the goal). These two states are inherently linked, and understanding their relationship is critical
for designing an effective solution. Often, the challenge is not just solving the problem but fully
comprehending its nature.
1. Inefficiency in Processes
o Undesirable State: Processes take longer than necessary, increasing costs and
reducing productivity.
o Example: A manufacturing line with prolonged cycle times delays production
schedules and increases labor costs.
o Goal: Reduce cycle times by 30% through automation, lean methodologies, or
optimized workflows.
2. Overwhelming Data
o Undesirable State: Excessive, unstructured data hinders decision-making and
leads to analysis paralysis.
1
Computational Problem Solving
3. Lack of Understanding
o Undesirable State: Limited knowledge or insights into critical areas, such as
customer behavior or market trends, obstructs strategic planning.
o Example: A company lacks sufficient understanding of customer preferences,
leading to poor product recommendations.
o Goal: Develop predictive analytics models, conduct surveys, or use simulations
to gain deeper insights.
2
Computational Problem Solving
2. Functional Requirements
Specify the functionalities that the solution should deliver.
o Example: For a conference planning tool, the goal could include a detailed
schedule with speaker assignments, session durations, and breaks.
3. Feature Specifications
For more complex projects, describe the desired features in detail to avoid ambiguity
during development.
o Example: When designing an e-commerce platform, feature specifications
might include an intuitive user interface, secure payment gateways, and real-
time inventory updates.
1. High-Level Descriptions
Provide a broad overview of the solution without delving into excessive detail.
o Example: “The solution will consist of an AI-powered recommendation engine
integrated with the existing e-commerce platform.”
2. Specification Development
Develop comprehensive specifications outlining desired functionalities, performance
metrics, and constraints.
o Example: For an online learning platform, specifications might include features
like interactive quizzes, progress tracking, and real-time feedback.
3
Computational Problem Solving
Continuous Validation
Throughout the problem-solving and implementation process, continually validate the
solution against the original problem and defined goals. This ensures alignment and helps avoid
costly deviations:
1. Regular Testing
Continuously test the solution to identify and rectify any misalignments or unforeseen
issues.
o Example: In software development, conduct weekly user acceptance tests
(UATs) to verify alignment with user needs.
2. Iterative Refinement
Use feedback loops to refine the solution iteratively, ensuring continuous improvement.
o Example: Adjust conference schedules based on attendee feedback to optimize
time management.
3. Measuring Success
Regularly measure the solution's impact using predefined metrics to ensure it delivers
the desired outcomes.
o Example: Monitor key performance indicators (KPIs), such as efficiency
improvements or cost reductions, to evaluate success.
Scenario decomposition is a methodical process that involves defining the problem,
setting actionable goals, and developing solutions aligned with these goals. By leveraging
strategies like rephrasing, visualization, and iterative validation, problem solvers can create
effective and efficient solutions that address the root causes of undesirable states and transition
seamlessly into achieving desirable outcomes. This structured approach lays the groundwork
for success in any problem-solving endeavor.
4
Computational Problem Solving
What is Decomposition?
Decomposition refers to the process of breaking down a larger, more complex problem
into smaller, easier-to-manage sub-problems or tasks. This approach allows you to address each
smaller task separately, simplifying the entire problem-solving process. Think of it as dividing
a large project into individual tasks, each of which is more straightforward to handle.
For example, imagine you're given the problem of organizing a school event. Instead
of trying to solve everything at once, you would break the problem into smaller parts such as:
booking a venue, sending invitations, arranging for catering, and preparing materials for the
event. Solving each of these smaller problems individually will ultimately lead to solving the
entire problem.
2. Time Management:
Breaking a problem into smaller parts allows you to prioritize tasks and allocate your
time effectively. Working on one part of the problem at a time prevents multitasking,
which can lead to mistakes and delays.
3. Resource Allocation:
In both individual and team-based work, resources such as time, effort, and tools can
be distributed more efficiently. By assigning specific tasks to different people or
utilizing tools suited to particular parts of the problem, resources are optimized for
better results.
5. Enhanced Collaboration:
When working in teams, decomposition allows for collaboration by letting individuals
work on specific sub-problems. Each team member can focus on their part of the overall
problem, which leads to faster and more effective solutions.
5
Computational Problem Solving
Steps in Decomposition
To effectively use decomposition in problem-solving, follow these steps:
o Example:
Time management: Introduce a task management system or techniques
like the Pomodoro method.
Communication: Set up weekly check-ins to discuss progress and
challenges.
Task Prioritization: Use methods like the Eisenhower Matrix to
prioritize tasks based on urgency and importance.
6
Computational Problem Solving
7
Computational Problem Solving
3. Improved Focus:
When you focus on one part of the problem at a time, you can give it your full attention,
leading to better results. Decomposition eliminates distractions and helps maintain
concentration.
5. Higher Accuracy:
By addressing individual components, you reduce the risk of making errors. Smaller,
focused tasks are less likely to be done incorrectly compared to handling an entire
problem at once.
8
Computational Problem Solving
Challenges in Decomposition
While decomposition offers many benefits, it’s important to recognize the challenges it
may present:
2. Ignoring Interdependencies:
Some sub-problems may be connected to each other, and solving them independently
without considering these relationships can lead to incomplete or ineffective solutions.
9
Computational Problem Solving
10
Computational Problem Solving
8. Create a Schedule:
o What is the timeline for the reunion (when will people arrive, when will the
meal be served, when will activities happen)?
o How can you ensure the day runs smoothly without feeling rushed or too long?
Step 3: Solve Each Sub-Problem
Now that you've broken down the task into smaller components, you can begin to address each
sub-problem:
11
Computational Problem Solving
o Make sure you leave some flexibility in the schedule to accommodate guests’
needs.
Step 4: Combine Solutions to Address the Overall Problem
Once each sub-task is completed, you combine them to address the overall problem of
organizing the family reunion. Here’s how:
Venue & Setup: The venue will be prepared with decorations, seating arrangements,
and safety measures.
Guest List & Invitations: The invitations will be sent out, and the guest list will be
confirmed.
12
Computational Problem Solving
Food & Entertainment: You will have organized the food, ensuring everyone’s needs
are met, and have planned a variety of activities to keep everyone entertained.
Schedule: The event will run smoothly with a clear schedule and allotted time for each
activity.
Make sure the schedule is clear and realistic for a relaxed but fun day.
Check safety arrangements to ensure all family members will be comfortable.
Once you confirm that all parts are in place, you're ready for the family reunion!
In this example of planning a family reunion, decomposition helped break down the
overwhelming task of organizing a large event into smaller, actionable parts. Each task—
whether it's selecting a venue, preparing food, or planning activities—was tackled separately,
making it easier to focus on each one and ensure nothing was missed. By decomposing the
problem, you were able to approach it systematically, reducing stress and increasing the
likelihood of a successful, enjoyable reunion.
2. Efficiency is maximized.
With logical sequencing, you avoid unnecessary steps and redundancies, ensuring that
every action taken brings you closer to the goal.
13
Computational Problem Solving
14
Computational Problem Solving
Evaluate Dependencies:
Determine which sub-tasks must be completed before others can begin. For instance,
you cannot finalize the catering without knowing how many guests will attend, so
sending invitations and getting RSVPs must be prioritized.
Dependency Identification:
Some tasks cannot begin until others are completed. For instance, if the problem
involves software development, coding can only proceed after the system design is
finalized.
o Example: In event planning, sending invitations must be done before
confirming the venue, as the venue capacity will depend on the number of guests
invited.
o Example: You can start preparing a guest list while simultaneously researching
venues, as these two tasks are independent.
Create a Flowchart or Timeline:
To visually represent the logical order, you can create a flowchart or a timeline of
events. This helps identify where the process might get stuck or where bottlenecks may
occur.
Track Progress:
Regularly assess whether the current step is completed before moving to the next one.
This ensures that tasks aren’t skipped or overlooked.
15
Computational Problem Solving
Adjust as Necessary:
If a milestone is not achieved as planned, adjust the sequence or reallocate resources
accordingly.
16
Computational Problem Solving
Steps to Follow:
5. Arrange Transportation:
o Make arrangements for getting to the picnic location. If you’re transporting
heavy items like coolers or tables, make sure to plan this in advance.
17
Computational Problem Solving
3. Develop a Strategy:
o Create a detailed plan, including a timeline, budget, and resource allocation.
Determine which tasks need to be completed first (e.g., market research before
advertising).
7. Post-Launch Support:
o Once the product is launched, focus on customer support, monitoring sales, and
gathering feedback for future improvements.
The Importance of Logical Sequencing
Logical sequencing is a powerful tool in problem-solving that helps streamline complex
tasks by breaking them down into smaller, more manageable pieces. The ability to logically
order tasks is essential for maintaining efficiency, minimizing errors, and ensuring successful
outcomes. Whether organizing a small event or undertaking large-scale projects, applying a
logical sequence allows for a clear path to follow, making the process more manageable and
increasing the likelihood of success.
By incorporating logical sequencing into your problem-solving toolkit, you gain the
ability to approach challenges methodically, ensuring that every step is purposeful, contributing
to the overall solution and leading to timely and effective completion.
18
Computational Problem Solving
19
Computational Problem Solving
Finiteness: There is a definite starting point (filling the kettle) and a clear endpoint
(drinking the tea).
Input and Output: The input is the water and tea bag, and the output is a cup of tea.
Effectiveness: These steps are straightforward and can be performed by anyone, with
no need for complex resources or excessive effort.
This process of making tea is a perfect example of an everyday algorithm—clear, finite,
and designed to achieve a specific outcome.
2. Step 2: Compare their titles alphabetically. If the first book’s title comes before the
second, leave them as they are. If not, swap them.
3. Step 3: Move one book to the right and compare the next two books in the same way.
4. Step 4: Repeat Steps 1-3 for the entire shelf until all books are arranged alphabetically.
20
Computational Problem Solving
4. Step 4: Choose the route with the shortest travel time or distance.
5. Step 5: Follow the chosen route and adjust as needed, if conditions change (e.g., if
there's unexpected traffic or roadwork).
Input and Output: The input is your location and available routes, and the output is
the best route to your destination.
Effectiveness: By following these steps, you ensure that you find the most efficient
route to your destination, without having to deal with excessive decision-making at each
turn.
This is another practical example of an algorithm: evaluating options based on available data
and systematically choosing the best one.
21
Computational Problem Solving
Effectiveness: This process is quick and simple, achieving the desired result with
minimal effort.
This is one of the simplest forms of an algorithm but still follows the basic principles of clear
instructions, finiteness, input, and output.
Input and Output: The input is your waking state, and the output is being ready for
the day (dressed, fed, and prepared).
Effectiveness: This series of steps ensures that you get ready efficiently, minimizing
delays and confusion.
Conclusion
An algorithm is not just a technical concept confined to computer science; it is a
structured process that we use daily to solve problems, make decisions, and complete tasks.
Whether making tea, sorting books, finding the best route, solving a math problem, or following
a morning routine, algorithms help guide us through each task in an efficient and logical
manner.
In all of these examples, the key characteristics of algorithms are clearly illustrated:
clear instructions, a definite start and end, input and output, and effective steps that guide us
toward achieving a desired result. Understanding how algorithms work in non-technical,
22
Computational Problem Solving
everyday scenarios helps demystify them and shows how they are essential in both our personal
and professional lives.
What is Pseudocode?
Pseudocode is a structured outline of an algorithm that uses simple, plain language to
describe the steps involved. It combines natural language with some programming concepts
to represent the logic of an algorithm in a way that is easy to follow. Unlike actual programming
languages (such as Python, Java, or C++), pseudocode doesn’t have strict syntax rules. It’s
flexible and focuses on clarity, which makes it ideal for planning before coding or explaining
how an algorithm works.
23
Computational Problem Solving
It avoids programming-specific details like variable types or function calls but still
effectively communicates the process.
24
Computational Problem Solving
25
Computational Problem Solving
The algorithm describes the process in clear, logical steps, and avoids any unnecessary
technical complexity.
END
26
Computational Problem Solving
1.3 FLOWCHART
A flowchart is a graphical representation of an algorithm or process using symbols and
arrows to depict the sequence of steps and decision points. It's a universal way to convey
algorithms and processes, making it easier for individuals, including non- programmers, to
understand the logic. A flow chart, or flow diagram, is a graphical representation of a process
or system that details the sequencing of steps required to create output.
Usually, when we are using a flow chart for the program, it consists of three steps:
Input
Process
Output
Input/Output: Represents input or output operations (e.g., reading data from a user or
displaying results).
Flow Arrow: Indicates the flow of control from one step to another.
27
Computational Problem Solving
Terminal: The oval symbol indicates Start, Stop and Halt in a program’s logic flow. A
pause/halt is generally used in programming logic under some error conditions. The terminal
is the first and last symbol in the flowchart.
Processing: A box represents arithmetic instructions. All arithmetic processes such as addition,
subtraction, multiplication, and division are indicated by the action/process symbol.
Flow lines: Flow lines indicate the exact sequence in which instructions are executed. Arrows
represent the direction of flow of control and the relationship among different symbols of the
flowchart.
28
Computational Problem Solving
29
Computational Problem Solving
30
Computational Problem Solving
Problem 5: Flow chart for printing odd numbers less than a given number. It should also
calculate their sum and count.
Problem 6: Flow chart for the calculate the average from 25 exam scores.
31
Computational Problem Solving
32