Parameterized Algorithms · Instructor: Prof. Neeldhara Misra, Prof. Saket Saurabh
Suppose we have a simple, undirected, connected graph G where all edges have non-negative weights, and in fact, the weight of each edge is either 1 or 20. Consider the following subgraph H of G --- the vertex set of H is the same as the vertex set of G and the edge set of H consists of all the edges from G whose weight is one. Suppose H has three connected components with 10, 15, and 30 vertices. Then the weight of any minimum spanning tree of G is:
When an array is to be sorted, it may happen that some data values start out being in the same position where they should end up. For example, in the array which is originally: 45,-4,32,0 the 32 is right where it will be in the final sorted output: -4,0,32,45 But as a particular sorting algorithm operates, it might (depending on the algorithm) move such an element out of the position where it belongs and move it back eventually. Let's say that a sorting algorithm respects fixedpoints if it never moves an element that is in its proper position, on any input. Which of the following statements are true? In the options below, the implementation of selection sort is based on swapping the minimum element into it's proper place in the current iteration, and does not involve the use heaps. You may also assume that the input array has no duplicate elements.
Mark the correct options.
Assuming P \neq NP, which of the following holds true?
Which of the following holds true? Recall that chromatic number of a graph is the minimum number of colors required for vertex coloring such that no two adjacent vertices have the same color. A cut vertex of a connected graph G is a vertex whose deletion results in a disconnected graph. Similarly, a cut edge is an edge whose deletion results in a disconnected graph.
Given a graph G with edge-weights, question is to find the minimum weight path between any pair of vertices. Choose the correct options from the following.
Which of the following is a stable sorting algorithm that takes the least time when applied to an almost sorted array ? (Recall that a sorting algorithm is stable if two objects with equal keys appear in the same order in sorted output as they appear in the input array to be sorted).
Which of the following holds true?
In a party consisting of 5 couples, people who new each other shook hands (pre-covid era) while who did not know each other just greeted each other. One of them, X, observed: "If you don't count me, then there are no two people present who shook hands the same number of times''. How many times did the wife of X shake hands ? (Nobody shook hands with himself or his spouse!)
If the running time of an algorithm can be represented by the following recurrence, then what is the time complexity of the algorithm? T(n)=\left\{\begin{matrix} 1 & \text{ if } & n = 1 \\ T(n-1)+ n(n-1) & \text{otherwise}& \end{matrix}\right.
Let \{0,1\}^{\star} denote the set of all strings over the alphabet \{0,1\}. Let A,B\subseteq \{0,1\}^{\star}. For every L\subseteq\{0,1\}^{\star}, let L^{c}:= \Big\{x\in\{0,1\}^{\star}~\big|~x\not\in L\Big\}. Let f:\{0,1\}^{\star}\rightarrow \{0,1\}^{\star} be a polynomial-time computable function such that \forall x\in\{0,1\}^{\star}:~~\Bigg(\Big(x\in A\Big)\Leftrightarrow\Big(f(x)\in B\Big)\Bigg) Let C\subseteq\{0,1\}^{\star} such that C is hard for NP under polynomial-time many-one reductions. Which of the following statements is(are) true?
Let G be a simple undirected finite graph such that |V(G)|\geq 3. Let f:E(G)\rightarrow\{0,1\} be a function. Which of the following statements is(are) true?
Let G be a simple undirected finite graph such that |V(G)|\geq 2. Let f: E(G)\rightarrow\mathbb{R}^{+} be a function. For any edge e in G, refer to the value of f(e) as the weight of the edge e. Let \Gamma denote the set of all spanning trees of G. Let \Gamma_{min} be defined as the set of all spanning trees that have the minimum possible total weight with respect to f, that is: \Gamma_{min}:=\Bigg\{T\in\Gamma~\Big|~\forall T'\in\Gamma:~\Bigg(\underset{e'\in E(T')}{\sum}f(e') \geq \underset{e\in E(T)}{\sum}f(e)\Bigg)\Bigg\} For every X\subseteq V(G), let cut(X) be defined as the subset of edges of G that have exactly one of their endpoints in X, that is: cut(X):= E(G)\cap \big\{\{x,y\}~\big|~\big(x\in X\big)\wedge\big(y\in V(G)\setminus X\big)\big\} Let X^{\star}\subseteq V(G). Let e^{\star}\in cut(X^{\star}) such that \forall e\in cut(X^{\star})\setminus\{e^{\star}\}: \big(f(e^*) < f(e)\big) Which of the following statements is(are) true?
Let N\in\mathbb{Z}^{+}. Let X and Y be integer valued random variables such that Pr\Big[0\leq X\leq N\Big] = Pr\Big[0\leq Y\leq N\Big] = 1 Let \mathbb{E}(X) and \mathbb{E}(X\cdot Y) denote the expected values of X and X\cdot Y respectively. Which of the following statements is(are) true?
Let \Gamma denote the set of all functions from \mathbb{Z}^{+} to \mathbb{R}^{+}. Let f_1,f_2,f_3\in\Gamma. For every function g\in\Gamma, let \mathcal{O}(g), \Omega(g), o(g) and \omega(g) be defined as follows: \mathcal{O}(g):=\Bigg\{f\in\Gamma~\Big|~\exists (c,M)\in\mathbb{R}^{+}\times\mathbb{Z}^{+}:\Bigg(\forall n\in\mathbb{Z}^{+}:\Big(\big(n\geq M\big)\Rightarrow\big(f(n)\leq c\cdot g(n)\big)\Big)\Bigg)\Bigg\} \Omega(g):=\Bigg\{f\in\Gamma~\Big|~\exists (c,M)\in\mathbb{R}^{+}\times\mathbb{Z}^{+}:\Bigg(\forall n\in\mathbb{Z}^{+}:\Big(\big(n\geq M\big)\Rightarrow\big(f(n)\geq c\cdot g(n)\big)\Big)\Bigg)\Bigg\} o(g):=\Bigg\{f\in\Gamma~\Big|~\forall c\in\mathbb{R}^{+}:\Bigg(\exists M\in\mathbb{Z}^{+}:\Big(\forall n\in\mathbb{Z}^{+}:\Big(\big(n\geq M\big)\Rightarrow\big(f(n)< c\cdot g(n)\big)\Big)\Big)\Bigg)\Bigg\} \omega(g):=\Bigg\{f\in\Gamma~\Big|~\forall c\in\mathbb{R}^{+}:\Bigg(\exists M\in\mathbb{Z}^{+}:\Big(\forall n\in\mathbb{Z}^{+}:\Big(\big(n\geq M\big)\Rightarrow\big(f(n)>c\cdot g(n)\big)\Big)\Big)\Bigg)\Bigg\} Which of the following statements is(are) true?