In-depth Notes on Algorithms and Computational Concepts

Exam Instructions

  • Write your name, candidate number, and centre number clearly in capital letters.
  • Use black ink; HB pencil is allowed for graphs and diagrams.
  • Answer all questions unless told otherwise.
  • Read questions carefully to understand what is required.
  • Write answers where indicated, using additional paper if necessary and including appropriate identifiers.
  • Quality of written communication is assessed in certain marked questions.

Marking Criteria

  • Total marks: 204
  • Marks may include options ('either/or').

Algorithms

  • Determining Odd or Even: An algorithm decides if a number is odd or even. An odd number will give a remainder of 1 when divided by 2.
  • Binary Search:
    • Usage: Find the number 10 in the dataset: 1, 2, 5, 6, 7, 10, 20.
    • Pre-requisite: Data must be sorted.
    • Merge Sort: A sorting algorithm that splits data into individual items before recombining.
  • Searching Algorithms:
    • Name of Algorithm: Identifies searching technique.
    • Counts Word Occurrences: Refines algorithm to count how many times a word appears in an array.

Computational Thinking

  • Definitions:
    • Abstraction: Removing unnecessary details to focus on main components.
    • Decomposition: Breaking down a problem into smaller, manageable parts.

Insertion Sort**

  • Process: Explains how Insertion Sort builds a sorted array section by section.
  • Final Sorting Steps: Describes how the array is organized into two sections - sorted and unsorted.

Pseudocode**

  • Arithmetic Operators: Correctly identifies and includes mathematical operations in pseudocode.
  • Variables: Example includes adding integers and storing results.

Iteration Example**

  • Display Attendance: Algorithm to iterate through student names, checking presence or absence, and displaying results.

Algorithm for Game**

  • Prompting a player to solve addition questions with scoring system.

Validation in Programs**

  • Example checks for valid room input in hotel booking context, ensuring proper validation and outcomes.

Binary Search Explained**

  • Describes how a binary search narrows down to find a specific value in a sorted list, including the criteria for determining existence.

Sorting Algorithms**

  • Differences between Insertion Sort and Bubble Sort along with their similarities.
  • Merge sort process outlined in steps, including initial split and sorting phases.

Testing and Data Variables**

  • Ensure validation tests cover normal, erroneous, and boundary inputs for new program designs.