Algorithm MCQ

Algorithm GATE 2022 Solved Questions

Ques 1:Which one of the following statements is TRUE for all positive functions f(n)? GATE 2022 Q no 11 (A) f(n2)=θ(f(n)2), when f(n) is a polynomial (B) f(n2)=o(f(n)2) (C) f(n2)=O(f(n)2), when f(n) is an exponential function (D) f(n2)=Ω(f(n)2) Ans: (A) f(n2)=θ(f(n)2), when f(n) is a polynomial Solution: Analyse, f(n2) versus f(n)2 asymptomatically Take f(n)=log n f(n2)= log n2 = 2 log n  f(n)2=(log n)2 Here f(n2)<f(n)2 Take f(n)=en   f(n2)=en2 f(n)2=enen=e2n. Here f(n2)>f(n)2 because n2>2n …

Algorithm GATE 2022 Solved Questions Read More »

Algorithm GATE 2018 Solved Questions

Ques 1:Assume that multiplying a matrix G1 of dimension 𝑝 × 𝑞 with another matrix G2 of dimension 𝑞 × 𝑟 requires 𝑝𝑞𝑟 scalar multiplications. Computing the product of n matrices G1G2G3…Gn can be done by parenthesizing in different ways. Define Gi Gi+1 as an explicitly computed pair for a given paranthesization if they are …

Algorithm GATE 2018 Solved Questions Read More »

error: You can only copy the programs code and output from this website. You are not allowed to copy anything else.