0% found this document useful (0 votes)
192 views23 pages

AMC Sample Exam MS

Uploaded by

Kaung Khant Kyaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views23 pages

AMC Sample Exam MS

Uploaded by

Kaung Khant Kyaw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Algorithms and Mathematical Concepts

Sample Examination Paper

Marking Scheme
Answer ALL questions.

Clearly cross out surplus answers.

Time: 3 hours

The maximum mark for this paper is 100.

Any reference material brought into the examination room must be


handed to the invigilator before the start of the examination.
Answer ALL questions

Marks
Question 1

Consider the following scenario:

You are tasked with developing a software application for a small business to manage
their inventory. The application needs to track product quantities, update inventory
levels, and generate reports.

a) Which stage of the software development process involves gathering 1


requirements and defining the scope of the project?

i) Analysis
ii) Design
iii) Implementation
iv) Testing

Mark scheme

i) Analysis (1 mark)

b) In the software development process, ________ involves creating visual 1


representations of the system, such as flowcharts and UML diagrams, to aid in
understanding and communication.

Mark scheme

Answer: Modelling (1 mark)


c) Write a pseudocode function to add a new product to the inventory system. 4
Assume the inputs are the product name, quantity, and price.

Page 2 of 23
Algorithms and Mathematical Concepts © NCC Education Limited 2024
Mark scheme

Answer:

Function AddProduct (productName, quantity, price)


Create a new product record with the given name, quantity, and price
Add the product record to the inventory data
End Function

Criteria:
• Function and End Function keywords (1 mark)
• Parameters (1 mark)
• Step 1: Create a new product record (1 mark)
• Step 2: Add the product record to the inventory data (1 mark)

d) Explain the concept of abstraction and decomposition in problem-solving and 4


how they can be applied when designing software solutions. Make sure you
include an explanation of the purpose and benefits of abstraction /
decomposition.

Mark scheme

Abstraction and decomposition involve breaking down a complex problem into


smaller, more manageable parts, focusing on essential details while hiding
unnecessary complexities. Abstraction allows us to focus on high-level
concepts without getting bogged down in implementation details, while
decomposition breaks a problem into smaller, more manageable sub
problems, making it easier to understand and solve. In software design,
abstraction and decomposition are essential for managing complexity,
improving maintainability, and facilitating collaboration among team
members.

Criteria:
• Abstraction and decomposition involve breaking down a complex
problem into smaller, more manageable parts (1 mark)
• Abstraction allows us to focus on high-level concepts without getting
bogged down in implementation details (1 mark)
• Decomposition breaks a problem into smaller, more manageable sub
problems (1 mark)
• Abstraction and decomposition are essential for managing complexity,
improving maintainability, and facilitating collaboration (1 mark)

Total 10 Marks
Page 3 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 2

Consider the following content related to numbers and number systems:

a) Which of the following is NOT a type of number? 1

i) Whole number
ii) Rational number
iii) Relation number
iv) Prime number

Mark scheme

Relation number (1 mark)

b) Decimal to ________ conversion involves converting a number from base 10 to 1


base 2.

Mark scheme

binary (1 mark)

c) Explain the difference between a prime number and a composite number. Provide 2
examples of each.

Mark scheme

• A prime number is a natural number greater than 1 that has no


positive divisors other than 1 and itself. Examples include 2, 3, 5, and
7. (1 mark)
• A composite number is a natural number greater than 1 that has
more than two positive divisors. Examples include 4, 6, 8, and 9.
(1 mark)

Page 4 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
d) Conversion between Binary, Octal, and Decimal 6

Perform the following conversions:


i) Convert the binary number 1101 to octal.
ii) Convert the octal number 37 to binary.
iii) Convert the decimal number 25 to octal.

Mark scheme:
i) (001) (101)
001=1
101=5
Answer: 15 (1 mark for correct answer, 1 mark for working)
ii) 3 =011
7 =111
--------------------
011 111
Answer: 11 111(1 mark for correct answer, 1 mark for working)
iii) 25/8 = 3, remainder is 1
3/8 = 0, remainder is 3
Read from bottom to top as 31
Answer= 31 (1 mark for correct answer, 1 mark for working)

Total 10 Marks

Page 5 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 3

Answer the following questions related to logic and Boolean algebra:

a) Which of the following operators represents the logical OR operation? 1


i) ^
ii) &
iii) |
iv) !

Mark scheme
Answer: iii) | (1 mark)

b) Complete the truth table for the Boolean expression: 6

(P∧Q)∨(¬P)
P Q ¬P P∧Q (P∧Q)∨(¬P)
T T
T F
F T
F F

Mark scheme

Accurate completion of the truth table (each correct column = 2


Marks)
Answer:
P Q ¬P P∧Q (P∧Q)
∨(¬P)
T T F T T
T F F F F
F T T F T
F F T F T
c) Explain the concept of biconditional operator in Boolean algebra and provide an 3
example.
Mark scheme

The biconditional operator (↔) evaluates to true if both operands are the
same, either both true or both false. For example, A ↔ B is true if A and B
are both true or both false.

Criteria:
• both operands are the same (1 Mark)
• either both true or both false (1 Mark)
• For example, A ↔ B is true if A and B are both true or both false (1
Mark)
Total 10 Marks
Page 6 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 4

Answer the following questions related to Predicate Logic, Set Theory, and Venn
Diagrams:

a) Which of the following symbols represents the existential quantifier in predicate 1


logic?

• ∀
• ∃
• ∧
• ∨

Mark scheme

Answer: ∃ - Existential quantifier (1 mark)

b) Explain the concept of complementation in set theory and provide an example. 2

Mark scheme

Complementation in set theory refers to the elements not included in


a given set. For example, if set A = {1, 2, 3} is the universal set, then
the complement of set A, denoted as A', would include all elements
not in set A, such as {4, 5, 6}.

c) Calculate the intersection of the following sets: 1


A = {1, 2, 3, 4} and B = {3, 4, 5, 6}

Mark scheme

{3, 4} (1 mark)

d) What is the Cartesian product of two sets, and how is it represented? Calculate 4
the Cartesian product of the following sets: A = {1, 2, 3} B = {a, b}

Page 7 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Mark scheme

The Cartesian product of two sets A and B is the set of all possible ordered
pairs where the first element comes from set A and the second element
comes from set B.

The Cartesian product of sets A and B is: A × B = {(1, a), (1, b), (2, a), (2, b),
(3, a), (3, b)}

Criteria:
• The Cartesian product of two sets A and B is the set of all possible
ordered pairs (1 mark)
• where the first element comes from set A and the second element
comes from set B. (1 mark)
• The Cartesian product of sets A and B is: A × B = {(1, a), (1, b), (2, a),
(2, b), (3, a), (3, b)} (2 marks)

e) Calculate the union of the following sets:


2
A = {a, b, c}
B = {c, d, e}
Mark scheme

A ∪ B = {a, b, c, d, e} (2 marks)
Deduct mark if duplication of element c.

Total 10 Marks

Page 8 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 5

Answer the following questions related to statistics:

a) Which of the following is a measure of central tendency? 1

i) Standard deviation
ii) Range
iii) Mean
iv) Variance

Mark scheme
ii) Mean (1 mark)

b) The measure of dispersion shows the ________ of data around the central value. 1

Mark scheme

spread (1 mark)

c) Calculate the mean of the following data set: 10, 15, 20, 25, 30. Show your 3
working.

Mark scheme

Mean = (10 + 15 + 20 + 25 + 30) / 5


= 100 / 5
= 20

Criteria:
• 2 marks for showing the steps
• 1 mark for final result

Page 9 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
d) Explain the concept of range as a measure of dispersion and provide an 2
example.

Mark scheme

• The range is a measure of dispersion that represents the difference


between the largest and smallest values in a dataset. It gives an
indication of how spread out the values are. (1 mark)
• For example, if we have a dataset of test scores ranging from 60 to
90, the range would be 90 - 60 = 30. (1 mark)

e) Calculate the median of the following data set: 15, 27, 18, 21,12, 24, Show your 3
working.

Mark scheme

Arrange the data in ascending order:

12, 15, 18, 21, 24, 27

Since the number of data points is even, the median is the average of the
two middle values:

Median = (18 + 21) / 2


= 39 / 2
= 19.5

So, the median of the given data set is 19.5.

Criteria:
• 2 marks for showing the steps
• 1 mark for final result

Total 10 Marks

Page 10 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 6

Answer the following questions related to Data Structures and Arrays:

a) Which of the following best defines a data structure? 1

i) A method used to organise and store data in a computer system.


ii) A programming language used for data manipulation.
iii) A tool for analysing data patterns.
iv) A graphical representation of data relationships.

Mark scheme

i) A method used to organise and store data in a computer system. (1 mark)

b) An array is a ________ data structure that stores elements of the same data 1
type.

Mark scheme

linear (1 mark)

c) Write Pseudocode to find the sum of all elements in a 1-dimensional array. You 5
should assume the existence of a function called length(arr) which returns the
number of elements in the array arr.

Mark scheme

Pseudocode to find the sum of all elements in an array:


// Initialize sum as 0
sum = 0 (1 mark)
// Iterate over each element in the array
For i = 0 to length(arr) - 1 (2 marks) 1 mark for
starting index i from 0, 1
mark for length -1
// Add the current element to sum
sum = sum + arr[i] (1 mark)
End For
// Return the sum
return sum (1 mark)

Page 11 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
d) Explain the concept of a singly linked list and describe one advantage it offers 3
over arrays in terms of memory allocation.
Mark scheme

• A singly linked list is a data structure consisting of nodes, where


each node contains data and a reference (pointer) to the next node in
the sequence. (1 mark)
• Unlike arrays, linked lists do not require contiguous memory
allocation. Instead, each node can be located anywhere in memory,
and the pointers connect them sequentially. (1 mark)
• One advantage of singly linked lists over arrays in terms of memory
allocation is their ability to dynamically grow and shrink without
needing to allocate memory for the entire structure upfront. (1 mark)

Total 10 Marks

Page 12 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 7

Answer the following questions related to Data Structures:

a) Which data structure follows the Last-In-First-Out (LIFO) principle? 1

i) Stack
ii) Queue
iii) Linked List
iv) Array

Mark scheme

i) Stack (1 mark)

b) In a queue, elements are removed from the ________ and added to the 2
________.

Mark scheme

• front/ head (1 mark)


• rear / tail (1 mark)

c) Consider a queue which is initially empty. Perform the following operations on the 3
queue, showing the queue after each operation:

I. Enqueue the numbers 10, 20, and 30 in sequence.


II. Dequeue one element.
III. Enqueue the numbers 40, 50, and 60 in sequence.
IV. Dequeue two elements.

What is the sum of the remaining elements in the queue after these operations?

Mark scheme

I. Queue = [10, 20, 30]


II. After dequeue: Queue = [20, 30]
III. After enqueue: Queue = [20, 30, 40, 50, 60]
IV. After dequeue: Queue = [40, 50, 60] (2 marks for showing the steps)

Sum of remaining elements = 40 + 50 + 60 = 150 (1 mark for final sum)

Page 13 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
d) Provide a real-world example where a stack and a queue data structure would be 4
appropriately used.

Mark scheme

• Stack Real-world example: A stack can be likened to a stack of plates in


a cafeteria. When you add a plate to the stack, it goes on top. When you
need to remove a plate, you take the one from the top. (2 marks – any
other correct example will be acceptable)

• Queue Real-world example: A queue can be compared to a line of


people waiting for tickets at a movie theatre. The first person to join the
line is the first to get the ticket. (2 marks – any other correct example
will be acceptable)

Total 10 Marks

Page 14 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 8

Answer the following questions related to algorithm efficiency and searching techniques:

a) Which of the following best describes Big O notation? 1

i) It represents the worst-case scenario of an algorithm's runtime.


ii) It measures the average-case performance of an algorithm.
iii) It indicates the best-case scenario of an algorithm's time complexity.
iv) It only considers the space complexity of an algorithm.

Mark scheme

i) It represents the worst-case scenario of an algorithm's runtime. (1 mark)

b) Linear search algorithms have a time complexity of __________. 1

Mark scheme

O(n) (1 mark)

Page 15 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
c) Write pseudocode for a function for a binary search algorithm that searches for a 6
target value in a sorted 1-dimensional array. The function takes the target value
and array as parameters. You should assume the existence of a function called
length(arr) which returns the number of elements in the array arr.

Mark scheme

function binarySearch(array, target):


low = 0
high = length(array) - 1
while low <= high:
mid = (low + high) / 2
if array[mid] == target:
return mid
elif array[mid] < target:
low = mid + 1
else:
high = mid - 1
return -1
End function

Criteria:
• 1 mark for function keyword and parameters
• 1 mark for defining low and high
• 1 mark for correct while loop
• 1 mark for mid calculation
• 1 mark for correct if, elseif and else statement
• 1 mark for correct if, elseif and else content

d) Explain the significance of binary search algorithms in terms of time complexity 2


compared to linear search algorithms.

Mark scheme

• The binary search algorithm has a time complexity of O(log n), which is
significantly better than the linear search algorithm's time complexity of
O(n). (1 mark)
• This means that binary search can efficiently search large arrays in
logarithmic time, making it much faster than linear search for sorted
arrays. (1 mark)

Total 10 Marks

Page 16 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 9

Answer the following questions related to sorting algorithms and recursion:

a) Which sorting algorithm works by repeatedly swapping adjacent elements until 1


the array is sorted?

i) Bubble Sort
ii) Quick Sort
iii) Merge Sort
iv) Insertion Sort

Mark scheme

i) Bubble Sort. (1 mark)

b) Recursion is a programming technique where a function calls itself with a smaller 1


set of data. This process continues until a __________ condition is met.

Mark scheme

termination (1 mark)

c) Write pseudocode for a function that uses the Bubble Sort algorithm. You should 6
assume the existence of a function called length(arr) which returns the number
of elements in the array arr.

Page 17 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Mark scheme

function bubbleSort(array)
n = length(array)
for i from 0 to n-1
for j from 0 to n-i-1
if array[j] > array[j+1]
temp= array[j]
array[j]= array[j+1]
array[j+1] = temp
end for
end for
return array
End function

Criteria:
• 1 mark for function keyword and parameter
• 1 mark for defining n
• 1 mark for the first for loop
• 1 mark for the nested for loop
• 1 mark for correct if statement and condition
• 1 mark for swapping array elements

d) Provide two examples of problems that can be solved using recursion. 2

Mark scheme

• Fibonacci sequence generation (1 mark)


• Computing the factorial of a number. (1 mark)

Total 10 Marks

Page 18 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Question 10

Answer the following questions related to tree data structures:

a) Which of the following best describes a tree data structure? 1

i) A structure where elements are arranged in a linear sequence.


ii) A hierarchical structure composed of nodes connected by edges.
iii) A data structure that stores elements in a hash table.
iv) A structure where elements are stored in a stack.

Mark scheme

ii) A hierarchical structure composed of nodes connected by edges. (1


mark)

b) A binary tree is a tree data structure in which each node has at most __________ 1
children.

Mark scheme

two (2) (1 mark)

c) Construct a binary search tree from the following sequence of numbers: 10, 5, 4
15, 3, 7, 12, 20.

Mark scheme
10 (1 mark)
/ \
5 15 (1 mark)
/\ / \
3 7 12 20 (2 marks)

Page 19 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
d) Using the provided binary search tree (BST) below, demonstrate the steps 4
involved in searching for the value 16. Begin the search at the root node and
describe each comparison and movement until the value is found or determined
to be absent.

15
/ \
10 20
/\ /\
5 12 17 25
/ \ / \
3 7 16 30
Mark scheme

• To search for the value 16 in the provided binary search tree (BST), we
start at the root node, which contains the value 15. Since 16 is greater
than 15, we move to the right subtree. (1 mark)
• Next, we compare 16 with the value at the current node, which is 20.
Since 16 is less than 20, we move to the left subtree of the current node.
(1 mark)
• In the left subtree, we encounter the node with the value 17. Since 16 is
less than 17, we move to the left subtree again. (1 mark)
• Finally, we arrive at the node with the value 16, which is the target value
we are searching for. Therefore, the search for the value 16 is
successful in the provided BST. (1 mark)

Total 10 Marks

End of paper

Page 20 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Learning Outcomes matrix

Task Learning Outcomes Marker can differentiate


assessed between varying levels of
achievement
1 LO1 Yes
2 LO5 Yes
3 LO2, LO3 Yes
4 LO4, LO6 Yes
5 LO9 Yes
6 LO7 Yes
7 LO7 Yes
8 LO8 Yes
9 LO8 Yes
10 LO7, LO8 Yes

Page 21 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
Grade descriptors.

Learning Fail Referral Pass Merit Distinction


Outcome
Explain and use Demonstrates Provides a Discusses Applies Provides
Computational no basic specific Computational critical
Thinking understanding explanation of examples of Thinking to analysis and
of Computational Computational solve complex innovative
Computational Thinking. Thinking in problems approaches to
Thinking and various effectively. Computational
its role. contexts. Thinking.
Explain and Unable to Provides a Draws logic Applies Offers critical
apply Boolean explain basic diagrams and Boolean analysis and
algebra concepts Boolean explanation of writes Boolean algebra optimizations
and notation. algebra Boolean expressions concepts of Boolean
concepts and algebra accurately. proficiently in algebra
notation. concepts and various operations.
notation. computing
scenarios.
Explain and use Demonstrates Provides a Uses truth Applies Offers critical
propositional no basic tables propositional evaluation of
logic concepts understanding explanation of proficiently to logic propositional
and notation of propositional evaluate effectively in logic
propositional logic concepts propositions. analysing limitations and
logic concepts and notation. complex implications.
and notation. statements.
Explain and use Unable to Provides a Writes and Applies Provides
simple predicate explain simple basic interprets predicate logic innovative
logic statements predicate logic explanation of predicate logic statements applications
statements. simple statements effectively in and thorough
predicate logic involving real-world analysis of
statements. quantifiers scenarios. predicate logic
accurately. statements.
Understand and Unable to Provides a Performs Applies Offers
explain number understand or basic conversions number-based advanced
based system explain explanation of and arithmetic systems insights and
number-based number-based operations proficiently in applications of
systems. systems. accurately in solving number-based
different computational systems.
number bases. problems.
Explain and use Unable to Provides a Uses set Applies set Offers
set theory and explain set basic notation theory advanced
notation theory explanation of proficiently to concepts interpretations
concepts and set theory and perform effectively in and
notation. notation. operations and analysing applications of
interpret Venn complex set theory
diagrams. relationships. concepts.
Identify and use Demonstrates Provides a Applies Demonstrates Offers
common data no basic common data advanced innovative
structures understanding explanation of structures understanding applications
of common common data proficiently in and and
data structures. solving optimization of optimizations
structures. computational data structure of common
problems. usage. data
structures.
Explain and use Unable to Provides a Explains Applies Offers critical
common explain basic efficiency common analysis and
algorithms
Page 22 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024
common explanation of criteria used to algorithms optimizations
algorithms for common evaluate proficiently in of algorithm
searching & algorithms for algorithms solving efficiency.
sorting. searching & effectively. computational
sorting. problems.
Understand the Unable to Provides a Calculates and Applies Offers
fundamental understand or basic uses statistical advanced
concepts on explain key explanation of descriptive concepts insights and
statistics statistical key statistical statistics proficiently in applications of
measures and measures and effectively. analysing real- statistical
concepts. concepts. world data. concepts

Page 23 of 23
Algorithms and Mathematical Concept © NCC Education Limited 2024

You might also like