Topic 4 Flashcards
What is the role of sub-procedures in problem solving?
Sub-procedures help break down complex problems into manageable parts.
When is decision making required in a specified situation?
When there are multiple options or paths to consider.
What decisions are required for the solution to a specified problem?
Decisions related to the steps and methods to be used in solving the problem.
What does the term ‘condition’ refer to in decision-making?
The specific circumstances or criteria that must be met for a decision to be valid.
What is the relationship between decisions and conditions in a system?
Decisions depend on conditions being met to proceed.
What are logical rules in real-world situations?
Rules deduced from observations that guide decision-making.
What are inputs and outputs in a solution?
Inputs are the data required to process, and outputs are the results produced.
What is pre-planning in problem solving?
Identifying necessary steps before executing a solution.
What is the difference between sequential and concurrent tasks?
Sequential tasks occur one after another, while concurrent tasks happen simultaneously.
What is a Gantt chart?
A tool used to track events and schedules.
Give an example of pre-planning in real life.
Pre-ordering a game before its actual release.
Why are pre-conditions important when executing an algorithm?
They ensure that necessary requirements are met before execution.
What are pre-conditions and post-conditions in a problem?
Constraints that define the state of the system before and after execution.
What is an example of an exception to consider in a problem solution?
Calculating the end-of-year bonus when not all employees have worked the entire year.
What does it mean for parts of a solution to be implemented concurrently?
It means two or more processes occur at the same time.
How can concurrent processing solve a problem?
By increasing computation speed and allowing simultaneous task handling.
What factors should be evaluated when deciding on concurrent processing?
1) Time savings
2) Cost implications
3) Physical feasibility
4) Consequences of non-concurrency
What is the definition of abstraction in computer science?
The process of simplifying complex systems by focusing on essential characteristics.
Why is abstraction necessary in computational solutions?
It helps manage complexity and allows focus on essential aspects of a problem.
What are the four key standard algorithms for linear arrays?
1) Sequential search
2) Binary search
3) Bubble sort
4) Selection sort
What is a sequential search?
An algorithm that finds an item in a list by checking each element in order.
Describe how a binary search works.
It compares the target value to the middle element and eliminates half the array.
What is bubble sort?
An algorithm that repeatedly steps through a list, swapping adjacent items if they are in the wrong order.
What is selection sort?
An algorithm that divides the list into sorted and unsorted sublists, finding the smallest element to place in the sorted list.
What should be discussed when analyzing an algorithm?
The differences between standard and novel algorithms, including their advantages and disadvantages.
What does it mean to analyze an algorithm presented as a flow chart?
It involves tracing the algorithm and assessing its correctness.
What is the definition of algorithm complexity?
A measure of the time and/or space required by an algorithm for a given input size.
What is the difference between best case, worst case, and average case in algorithm analysis?
Worst Case: Maximum run time
Best Case: Optimistic scenario
Average Case: General behavior measure
What are iterations in the context of algorithms?
The number of times a particular step in an algorithm is performed.