1 Fundamentals Of Algorithms Flashcards
What is Abstraction?
Abstraction is the technique that simplifies a problem by removing unnecessary details so you can focus on the important parts that are relevant to the problem
What are two examples of Abstraction?
Maps and Money
How are Maps an example of Abstraction?
Maps are an example of Abstraction as they leave out irrelevant information and only leave key parts such as roads and landmarks
How is money an example of Abstraction?
Money is a type of Abstraction as it is just an abstract concept. Money has no value but represents the value of goods and services.
What is decomposition?
Decomposition is the breaking down of a complex problem into smaller, more manageable, sub-problems. Each sub-problem can be solved individually, before the sub-solutions are combined to solve the original problem
What are the advantages of Decomposition?
Decomposition allows large teams to work on a part of the problem and work on it.
Decomposition allows extremely hard problems to be solved easily by splitting it up into simple tasks
What are Structure Charts?
Structure Charts are used to visually represent breaking a large problem down into the smaller parts that make it up.
Each box represents a smaller problem to be solved.
Lines show which bigger problem the box is a part of.
What is Algorithmic thinking?
Algorithmic thinking is the way of solving problems by producing algorithms.
What is an algorithm?
An algorithm is a reusable set of instructions that solve a given problem
How do we represent algorithms in computing?
We mainly represent algorithms as Pseudocode or Flow diagrams
What is Pseudocode?
Pseudocode is a way to write out algorithms using code-like statements. It is intended to be readable and easy to understand.
What is the purpose of Pseudocode?
Pseudocode is used to plan algorithms, focusing on logic and steps rather than language specific syntax
Can Pseudocode be run on a computer?
No as it isn’t an actual programming language
What are flow diagrams?
Flow diagrams are used to visually represent the steps that make up an algorithm
What do the arrows in a flow diagram represent?
Arrows in a flow diagram represent the flow of control, or what to execute next.
What is an oval used for in a flow diagram?
An oval is used for the start and end of a process
What is a rectangle used for in a flow diagram?
A rectangle is used to represent a process
What is a parallelogram used for in a flow diagram?
A parallelogram is used to represent an input or an output
What is a diamond used for in a flow diagram?
A diamond is used to represent a decision.
How many arrows comes out of a decision?
Two
What are some tips for interpreting algorithms?
- Look out for Identifiers
- Identify Inputs and Outputs
- Examine Output Messages
- Look for comments