Cos 102
Cos 102
Designing a new product that meets specific requirements and customer needs.
Finding ways to reduce costs in a business without compromising on quality.
Developing a new marketing strategy for a company.
Creating a plan to address climate change and its effects on a region.
Solving a crime or finding a missing person.
Non-routine problems may require more creativity and critical thinking. Examples include
designing a new product or finding a way to reduce costs in a business.
It's important to correctly identify the type of problem in order to choose the appropriate
approach to solving it.
Routine problems can be automated and solved by a computer program while non-routine
problems need human intelligence and creativity.
The ability to correctly identify the type of problem will be important in the later stages of the
problem-solving process, including solution formulation and design.
On the one hand, weather forecasting relies on mathematical models and computer
simulations that use a set of established procedures and algorithms to predict weather
conditions. This can be considered a routine problem as it follows a set of established
procedures to arrive at a solution.
On the other hand, weather forecasting is also a non-routine problem in that it requires a
significant amount of data analysis, interpretation and integration. Weather forecasting also
requires a degree of creativity and critical thinking as meteorologist not only needs to
consider the data but also historical patterns and other factors like air pressure, wind
direction, and temperature changes and also needs to consider the uncertainty and errors in
the data and models. Therefore, weather forecasting can be considered a non-routine
problem as it requires a significant amount of human intelligence and creativity to accurately
predict weather conditions.
Unemployment is a complex issue that can be caused by various factors such as economic
downturns, changes in technology and automation, shifts in global trade, and more.
Identifying the root causes of unemployment and developing effective solutions requires a
significant amount of research and analysis, as well as creativity and critical thinking.
For example, to solve unemployment problem, economist need to analyze the data and
statistics on the labor market, the performance of different sectors of the economy, the
education and skills of the workforce, the impact of government policies, etc. Also, finding
solutions to unemployment may require a multidisciplinary approach, involving experts from
fields such as economics, sociology, labor law, and education. Therefore, unemployment is a
non-routine problem that requires a significant amount of human intelligence and creativity to
solve.
Budget allocation is the process of deciding how to divide a set budget among different
projects, programs or areas. It requires careful consideration of the goals and objectives of
the organization, the resources available, the potential benefits and risks of different
projects, and the trade-offs that need to be made.
For example, budget allocation for a government agency may require balancing competing
priorities such as education, healthcare, infrastructure, and public safety. It requires
analyzing the data and statistics on the performance of different sectors, the impact of past
budgets and policies, the availability of resources and funding, etc. It also requires a degree
of creativity and critical thinking, as budget allocation is also a political process that involves
balancing the needs and wants of different stakeholders. Therefore, budget allocation is a
non-routine problem that requires a significant amount of human intelligence and creativity to
solve.
Methods of solving computing problems (introduction to algorithms and heuristics)
Algorithms:
An algorithm is a step-by-step procedure for solving a problem or performing a task.
Algorithms are a fundamental concept in computing, as they provide a way to automate the
solution of problems and perform repetitive tasks.
Algorithms are usually expressed in a clear and precise language, such as pseudocode or a
programming language, and can be implemented on a computer to automate the solution of
a problem.
Clear and unambiguous: An algorithm must be clear and unambiguous, with each step
defined in a way that is easy to understand and follow.
Input and output: An algorithm takes input and produces an output. It should be clear what
the input is and what the expected output is.
Finiteness: An algorithm must terminate after a finite number of steps. It should not go into
an infinite loop or continue running forever.
Effectiveness: An algorithm must be effective, meaning it must solve the problem or task for
which it was designed. It should also be efficient, using the fewest possible steps and
resources.
Modularity: An algorithm should be modular, meaning it can be broken down into smaller
parts that can be individually tested and debugged.
While algorithms are a powerful tool for problem-solving, they do have certain limitations.
Some of the limitations of algorithms are:
Limited applicability: Algorithms are designed to solve specific problems or perform specific
tasks. They may not be suitable for solving problems that are outside their scope or that
require a different approach.
Time and space complexity: The time and space required to execute an algorithm can be a
limiting factor. Some algorithms may be very slow or require a large amount of memory to
execute, making them impractical for certain applications.
Deterministic: Algorithms are deterministic, meaning they will always produce the same
output given the same input. This can be a limitation in cases where randomness or
variability is required.
Limited creativity: Algorithms are designed to follow a set of rules and procedures. They do
not have the creativity or intuition that humans possess, which can limit their ability to solve
complex or novel problems.
Dependence on input quality: The quality of the input data can significantly impact the
effectiveness of an algorithm. Poor quality input can lead to incorrect or suboptimal results.
Expressions: Algorithms are usually expressed in a clear and precise language, such as
pseudocode or a programming language, while programs are written in a specific
programming language that can be understood by the computer.
Execution: Algorithms are not executed directly, they need to be translated into a program
before they can be executed by a computer. A program is a set of instructions that can be
executed by a computer to perform a specific task or solve a problem
Debugging: Programs can contain bugs and errors, which need to be debugged before they
can be executed. Algorithm don't have bugs, the problem is only with the implementation.
Expressions: Algorithms are usually expressed in a clear and precise language, such as
pseudocode or a programming language, while flowcharts use standard symbols and
shapes to represent different types of actions or decisions.
Execution: Algorithms are not executed directly, they need to be translated into a program
before they can be executed by a computer. A flowchart is a visual representation of an
algorithm, it is not executed by a computer.
Understanding: Flowcharts are useful for understanding the logic of an algorithm and can be
used to communicate the algorithm to others. Algorithms are written in a clear and precise
language but flowcharts make it visually easier for others to understand.
Expressions: Algorithms are usually expressed in a clear and precise language, such as
pseudocode or a programming language, while pseudocode is a simplified version of
programming language.
Execution: Algorithms are not executed directly, they need to be translated into a program
before they can be executed by a computer. Pseudocode is not executed by a computer, it is
a tool to express algorithm in human-readable language.
Understanding: Pseudocode is useful for understanding the logic of an algorithm and can be
used to communicate the algorithm to others. Algorithms are written in a clear and precise
language but pseudocode makes it easier for others to understand.
Syntax: Pseudocode does not have a strict syntax, it does not follow the rules of any specific
programming language. Algorithm can be expressed in pseudocode, but it can also be
expressed in other languages such as natural language or programming languages.
Expressions: Algorithms are usually expressed in a clear and precise language, such as
pseudocode or a programming language, while a program is a set of instructions written in a
specific programming language that can be executed by a computer. Programming
languages are designed to be understood and used by computers, not humans.
Execution: Algorithms are not executed directly, they need to be translated into a program
before they can be executed by a computer. A program is a set of instructions that can be
executed by a computer, and a programming language is used to write those instructions.
Understanding: Algorithms are written in a clear and precise language, but they can be
difficult for people to understand. Programs are written in a specific programming language
and can be difficult for people to understand, while a programming language is designed to
be understood and used by computers, not humans.
Heuristics:
Heuristics are general problem-solving strategies or "rules of thumb" that can be used to find
approximate solutions to problems.
Heuristics are often used to solve problems for which no exact algorithm exists, or when the
exact solution is too time-consuming or expensive to compute.
Heuristics are often used in fields such as artificial intelligence and operations research to
solve difficult problems.
Traveling Salesman Problem: The traveling salesman problem involves finding the shortest
possible route that visits each of a set of cities and returns to the starting city. One heuristic
approach to solving this problem is to use a nearest neighbor algorithm, which starts at a
random city and chooses the nearest unvisited city as the next destination.
Maze solving: When solving a maze, a heuristic approach could involve always choosing the
direction that brings you closer to the exit. For example, if you are at a junction in the maze
and can choose to go left or right, you would choose the direction that brings you closer to
the exit.
Chess game: In chess, one popular heuristic approach is the minimax algorithm, which
assumes that the opponent will always make the best possible move and tries to minimize
the maximum possible loss. This algorithm searches through possible moves and chooses
the one that leads to the best outcome, based on a heuristic evaluation function that assigns
a score to each possible move.
Route optimization: Heuristic algorithms can also be used to optimize routing in logistics and
transportation industries. For example, a heuristic approach could involve optimizing a
delivery route by choosing the order in which to visit customers based on proximity, traffic
conditions, and delivery deadlines.
A solvable problem is a problem for which an algorithm or heuristic exists that can be used
to find a solution in a reasonable amount of time.
An unsolvable problem is a problem for which no algorithm or heuristic exists that can be
used to find a solution in a reasonable amount of time.
Unsolvable problems can be either theoretically unsolvable (e.g. halting problem) or
practically unsolvable (e.g. given the current technology, it's impossible to solve it within a
reasonable time frame)
Sorting a list of numbers in ascending or descending order using sorting algorithms such as
bubble sort, quick sort, and merge sort.
Searching for a specific value in a list of values using searching algorithms such as linear
search, binary search, and hash tables.
Finding the shortest path between two points in a graph using algorithms such as Dijkstra's
algorithm, Bellman-Ford algorithm, or A* search algorithm.
Encrypting and decrypting messages using algorithms such as RSA or AES encryption.
Calculating the factorial of a number or solving equations using algorithms such as recursive
functions or numerical methods like Newton-Raphson method.
Finding the maximum or minimum value in a list of values using algorithms such as selection
sort or searching algorithms.
Predicting the weather using algorithms such as numerical weather prediction models.