GATE Overflow for GATE CSE - Recent questions tagged maximum-minimum
https://gateoverflow.in/tag/maximum-minimum
Powered by Question2AnswerAlgorithms
https://gateoverflow.in/252996/algorithms
Minimum no of comparisons required to find the minimum and maximum of n distinct elementsAlgorithmshttps://gateoverflow.in/252996/algorithmsSat, 13 Oct 2018 16:51:01 +0000Minimum Number of Comparisons Required
https://gateoverflow.in/226145/minimum-number-of-comparisons-required
Q.13 The minimum number of comparisons required to find the minimum and the maximum of<br />
100 numbers is _________________.<br />
<br />
(a) 147.1 to 148.1<br />
(b) 140 to 146<br />
<br />
(c)145.1 to 146.1<br />
(d) 140 to 148Algorithmshttps://gateoverflow.in/226145/minimum-number-of-comparisons-requiredSat, 14 Jul 2018 11:35:34 +0000#Algorithms minimum number of comparisons required to find the minimum and the maximum of 101 numbers?
https://gateoverflow.in/210126/%23algorithms-minimum-comparisons-required-minimum-maximum
The minimum number of comparisons required to find the minimum and the maximum of 101 numbers is ________.<br />
<br />
When n is even then it's relatively easy, but how to deal with n is odd?<br />
<br />
My answer is 150 comparisons.Algorithmshttps://gateoverflow.in/210126/%23algorithms-minimum-comparisons-required-minimum-maximumFri, 30 Mar 2018 14:34:18 +0000Number of comparisons (previous gate question)
https://gateoverflow.in/168100/number-of-comparisons-previous-gate-question
Atmost how many comparisons are required to find out min and max in an array of n elements where n is even ?<br />
<br />
Answer is atmost 1.5n - 2 comparisons.<br />
<br />
For n=6, I tried manually and the number of comparisons comes out to be 8 but according to the formula it's 1.5(6) - 2 =7 which is lesser than 8 !<br />
<br />
Where am I going wrong ?Algorithmshttps://gateoverflow.in/168100/number-of-comparisons-previous-gate-questionThu, 09 Nov 2017 11:16:45 +0000doubt
https://gateoverflow.in/153189/doubt
what should be the minimum number of comparisons required to find the minimum and maximum of 100 numbers ?Algorithmshttps://gateoverflow.in/153189/doubtMon, 18 Sep 2017 07:06:48 +0000The minimum number of comparisons required
https://gateoverflow.in/144329/the-minimum-number-of-comparisons-required
The minimum number of comparisons required to find the minimum and maximum of 60 numbers is..............Algorithmshttps://gateoverflow.in/144329/the-minimum-number-of-comparisons-requiredTue, 15 Aug 2017 05:45:42 +0000max min in an array
https://gateoverflow.in/119964/max-min-in-an-array
Consider the problem of computing min-max in an unsorted array where min and max are minimum and maximum elements of array. Algorithm A1 can compute min-max in a1 comparisons without divide and conquer. Algorithm A2 can compute min-max in a2 comparisons by scanning the array linearly. What could be the relation between a1 and a2 considering the worst case scenarios?Algorithmshttps://gateoverflow.in/119964/max-min-in-an-arrayMon, 27 Feb 2017 19:38:38 +0000Test Series
https://gateoverflow.in/95583/test-series
Assume that A be an array of 16 elements. What is the difference between maximum number of inversion and minimum number of inversion for the array with 16 elements?Algorithmshttps://gateoverflow.in/95583/test-seriesThu, 22 Dec 2016 17:33:51 +0000what is "DAC Max-Min algorithm" | ME Basic test algorithms
https://gateoverflow.in/30787/what-is-dac-max-min-algorithm-me-basic-test-algorithms
<div class="solution-detail">
<p>Consider a set of 20 elements.<br>
To find maximum and minimum element in the given set, the minimum number of comparisons required is _________? (using DAC Max-Min algorithm)</p>
</div>Algorithmshttps://gateoverflow.in/30787/what-is-dac-max-min-algorithm-me-basic-test-algorithmsMon, 14 Dec 2015 06:30:53 +0000TIFR CSE 2014 | Part B | Question: 10
https://gateoverflow.in/27198/tifr-cse-2014-part-b-question-10
<p>Given a set of $n$ distinct numbers, we would like to determine both the smallest and the largest number. Which of the following statements is TRUE?</p>
<ol style="list-style-type:upper-alpha">
<li>These two elements can be determined using $O\left(\log^{100}n\right)$ comparisons.</li>
<li>$O\left(\log^{100}n\right)$ comparisons do not suffice, however these two elements can be determined using $n + O(\log n)$ comparisons.</li>
<li>$n+O(\log n)$ comparisons do not suffice, however these two elements can be determined using $3\lceil n/2 \rceil$ comparisons.</li>
<li>$3\lceil n/2 \rceil$ comparisons do not suffice, however these two elements can be determined using $2(n - 1)$ comparisons.</li>
<li>None of the above.</li>
</ol>Algorithmshttps://gateoverflow.in/27198/tifr-cse-2014-part-b-question-10Thu, 19 Nov 2015 13:50:48 +0000TIFR CSE 2014 | Part B | Question: 9
https://gateoverflow.in/27194/tifr-cse-2014-part-b-question-9
<p>Given a set of $n$ distinct numbers, we would like to determine the smallest three numbers in this set using comparisons. Which of the following statements is TRUE?</p>
<ol style="list-style-type:upper-alpha">
<li>These three elements can be determined using $O\left(\log^{2}n\right)$ comparisons.</li>
<li>$O\left(\log^{2}n\right)$ comparisons do not suffice, however these three elements can be determined using $n+O(1)$ comparisons.</li>
<li>$n + O(1)$ comparisons do not suffice, however these three elements can be determined using $n +O(\log n)$ comparisons.</li>
<li>$n+O(\log n)$ comparisons do not suffice, however these three elements can be determined using $O(n)$ comparisons.</li>
<li>None of the above.</li>
</ol>Algorithmshttps://gateoverflow.in/27194/tifr-cse-2014-part-b-question-9Thu, 19 Nov 2015 13:37:54 +0000TIFR CSE 2014 | Part B | Question: 6
https://gateoverflow.in/27183/tifr-cse-2014-part-b-question-6
<p>Consider the problem of computing the minimum of a set of $n$ distinct numbers. We choose a permutation uniformly at random (i.e., each of the n! permutations of $\left \langle 1,....,n \right \rangle$ is chosen with probability $(1/n!)$ and we inspect the numbers in the order given by this permutation. We maintain a variable MIN that holds the minimum value seen so far. MIN is initialized to $\infty$ and if we see a value smaller than MIN during our inspection, then MIN is updated. For example, in the inspection given by the following sequence, MIN is updated four times.</p>
<p> $5$ $9$ $4$ $2$ $6$ $8$ $0$ $3$ $1$ $7$</p>
<p>What is the expected number of times MIN is updated?</p>
<ol style="list-style-type:upper-alpha">
<li>$O (1)$</li>
<li>$H_{n}=\sum ^{n}_{i=1} 1/i$</li>
<li>$\sqrt{n}$</li>
<li>$n/2$</li>
<li>$n$</li>
</ol>Algorithmshttps://gateoverflow.in/27183/tifr-cse-2014-part-b-question-6Thu, 19 Nov 2015 13:11:23 +0000The Number of Comparisons is :
https://gateoverflow.in/26666/the-number-of-comparisons-is
<p><img alt="" height="230" src="https://gateoverflow.in/?qa=blob&qa_blobid=1508510105353350628" width="600"></p>Algorithmshttps://gateoverflow.in/26666/the-number-of-comparisons-isSun, 15 Nov 2015 17:20:54 +0000GATE CSE 2014 Set 1 | Question: 39
https://gateoverflow.in/1917/gate-cse-2014-set-1-question-39
The minimum number of comparisons required to find the minimum and the maximum of $100$ numbers is ________Algorithmshttps://gateoverflow.in/1917/gate-cse-2014-set-1-question-39Sun, 28 Sep 2014 02:31:21 +0000