Quiz Space

Advanced Algorithms · Quiz 1 · 16 Jul 2023 · May 2023 term

Question 4: Suppose there are M mice out on a field and there are H h…

Question 4

+3 marksOne correct option

Suppose there are M mice out on a field and there are H holes scattered across the ground that the mice can hide in. Each hole 1 ≤ i ≤ H has a capacity Hi. You are given the locations of the mice at time t = 0 and the holes (the locations of the holes are fixed).
Each mouse runs at the same velocity v and remains vulnerable if it does not reach a hole within s seconds when hungry owls arrive and instantaneously catch all the mice that are not in hiding. Consider the following approach to determine the maximum number of mice that can be safe: ● We design a flow network, which consists of a bipartite graph with M “mice nodes”, one representing each mouse, and H “hole nodes”, one representing each hole.
● If a mouse can reach a particular hole, as determined by the distance between the initial position of the mouse and the given position of the hole , then place an edge between the mouse and the hole with capacity = 1.
● Connect a source node with all the Mice nodes with edge capacities = 1.
● Connect all the Hole nodes with a sink node via edges of capacities = capacity of the particular holes .
● Run Ford−Fulkerson max flow algorithm and the most Mice that are safe equal to the maxFlow obtained .

  1. A

    Cannot say! Depends on the velocity v, time s seconds, hole locations and other factors.

  2. B

    Yes, this approach will always work.

  3. C

    This approach will work if the edges from the source to mice nodes have infinite capacity.

  4. D

    This approach will work under some scenarios but not always.

Show answer

Correct answer

  • B

    Yes, this approach will always work.

Question 4 of 16 in the IIT Madras BS Advanced Algorithms (Advanced Algorithms) Quiz 1 paper sat on 16 Jul 2023, in the May 2023 term (IIT M DEGREE AN2 EXAM QPE2 16 JULY 2023). It carries 3 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2A circuit in a matroid is a minimal dependent set. In other words, a subset S of the universe U is a circuit if S is no…
  3. Q3Consider the following set system:\ ● The universe is the set of edges of a graph G\ ● A subset S of U is an independen…
  4. Q5Let L be an array of n integers. Our array indices start from 0.\ Let maxSum[i] denote the largest contiguous sum possi…
  5. Q6Recall the task scheduling problem: suppose you have n tasks to complete in n days; each task requires your attention f…
  6. Q7We have a set of jobs to be performed, and we are given the following information about each job: a job ID, the duratio…
  7. Q8Consider the following tree: What is the size of the maximum-size independent set for this tree?
  8. Q9Consider the following instance of the stable matching problem. Suppose there are 3 women (A, B, C) and 3 men (X, Y, Z)…
  9. Q10Consider the following instance of the stable matching problem. Suppose there are 3 women (A, B, C) and 3 men (X, Y, Z)…
  10. Q11What is the value of f(6)?
  11. Q12Which of the following is a valid recurrence for f(n)?
  12. Q13You have a collection of n elements with weights, which may be positive or negative numbers (but never zero). You want …
  13. Q14You have a collection of n elements with weights, which may be positive or negative numbers (but never zero). You want …
  14. Q15You have a collection of n elements with weights, which may be positive or negative numbers (but never zero). You want …
  15. Q16You have a collection of n elements with weights, which may be positive or negative numbers (but never zero). You want …