IT101-1L (1-3 Lessons) :( Flashcards
step-by-step procedure or set of rules for solving a specific problem.
Algorithm
How can be algorithms be expressed? (4)
Natural Language
Pseudocode
Flowchart
Actual Programming code
Algorithms must have a ‘precisely’ defined set of instructions that leave no ambiguity or room for interpretation.
Well-defined:
: Algorithms must terminate after a finite number of steps. They should not enter an infinite loop or continue indefinitely.
Finite
Algorithms take zero or more inputs, which are the initial data or values on which they operate to produce the desired output.
Input:
Algorithms produce one or more outputs, which are the results or solutions obtained after executing the instructions.
Output:
meaning that for a given input, they will always produce the same output.
Deterministic:
It is the foundation of computer science and plays a crucial role in problem-solving and software development.
Algorithm
Algorithms should be practical and efficient, capable of solving the problem within a reasonable amount of time and resources.
Feasible:
Each step should be clear and unambiguous.
Well-defined
There should be no randomness or uncertainty involved in their execution.
Deterministic
_____________ involves careful planning, analysis, and consideration of various factors.
Designing effective algorithms
Clarify the requirements, constraints, and expected outcomes. Break down the problem into smaller subproblems, if necessary.
Understand the Problem
Identify the input required to solve the problem. Determine the format, data types, and possible range of input values. Similarly, define the expected output and its format.
Determine the Input and Output
Break the problem into smaller subproblems, solve them independently, and combine the solutions to obtain the final result.
Divide and Conquer
Make locally optimal choices at each step, hoping to reach the global optimum.
Greedy:
is a well-defined set of instructions that precisely describes how to perform a particular task or solve a problem.
algorithm
: Break the problem into overlapping subproblems, solve them once, and store the results to avoid redundant computations.
Dynamic Programming
Systematically explore all possible solutions by trying out different choices and undoing them if they do not lead to a valid solution.
Backtracking:
Enumerate all possible solutions in a systematic manner, pruning branches that are guaranteed to be suboptimal.
Branch and Bound:
Use randomness or probability to find a solution or improve the efficiency of the algorithm.
Randomized:
_________ provide a systematic approach to breaking down complex tasks into smaller, more manageable steps.
Algorithms
What are the algorithmic paradigms? (6)
Divide and Conquer
Greedy
Dynamic Programming
Backtracking
Branch and Bound
Randomized
Select an ____________ or approach that suits the problem at hand
Choose an Algorithmic Paradigm