Quiz Space

Advanced Algorithms Quiz 1: 7 July 2024 (May 2024 term)

Question 1

+2 marksNumerical answer

There are 2n2n positive integers written on a whiteboard. Here is a one-player game with these numbers: You start with a score of 0 . You will increase your score by performing the following move exactly nn times:

  • Choose two integers xx and yy that are written on the whiteboard.
  • Add min⁡(x,y)\min(x, y) to your score.
  • Erase xx and yy from the whiteboard.

Note that after performing the move nn times, there will be no more integers written on the whiteboard. In general, our goal is to find the maximum final score you can achieve if you optimally perform the nn moves.

We will refer to this value as the answer.

Based on the above data answer the given subquestions.

What is the answer if the input is 1 1 2 1?

Question 2

+2 marksNumerical answer

There are 2n2n positive integers written on a whiteboard. Here is a one-player game with these numbers: You start with a score of 0 . You will increase your score by performing the following move exactly nn times:

  • Choose two integers xx and yy that are written on the whiteboard.
  • Add min⁡(x,y)\min(x, y) to your score.
  • Erase xx and yy from the whiteboard.

Note that after performing the move nn times, there will be no more integers written on the whiteboard. In general, our goal is to find the maximum final score you can achieve if you optimally perform the nn moves.

We will refer to this value as the answer.

Based on the above data answer the given subquestions.

What is the answer if the input is 1 2 3 4 5 6 7 8 9 10?

Question 3

+2 marksNumerical answer

There are 2n2n positive integers written on a whiteboard. Here is a one-player game with these numbers: You start with a score of 0 . You will increase your score by performing the following move exactly nn times:

  • Choose two integers xx and yy that are written on the whiteboard.
  • Add min⁡(x,y)\min(x, y) to your score.
  • Erase xx and yy from the whiteboard.

Note that after performing the move nn times, there will be no more integers written on the whiteboard. In general, our goal is to find the maximum final score you can achieve if you optimally perform the nn moves.

We will refer to this value as the answer.

Based on the above data answer the given subquestions.

What is the answer if 2n = 50 and the input is the set of all even numbers between 1 and 100? (Hint: you might want to use the fact that the sum of the first n odd numbers is n².)

23 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Advanced Algorithms Quiz 1 7 Jul 2024 paper

The IIT Madras BS Advanced Algorithms (Advanced Algorithms) Quiz 1 paper sat on 7 Jul 2024, in the May 2024 term: 26 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureAdvanced Algorithms Quiz 1 7 Jul 2024 at a glance
TermMay 2024 term
SubjectAdvanced Algorithms
Course codeBSCS4021
Questions26
Marks50
Duration120 min
Numerical9
MSQ1
MCQ16
Official paperIIT M DEGREE AN EXAM QDB2 7 July 2024
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More Advanced Algorithms