Skip to main content

Survival : BITS_Mtech_DataScience_DSAD_Quiz _2020

Quiz-1 

This Question is based on the following topic and there are no negative marks, the are total 10 Question for 5 marks 

  • Analyzing Algorithms 
  • Theoretical Foundation 
  • Algorithms and its Specification
  • Random Access Machine Model
  • Counting Primitive Operations
  • The notion of best case, average case and worst case
  • Characterizing Run Time
  • Use of asymptotic notation
  • Big-Oh Notation, Little-Oh, Omega and Theta Notations
  • Analyzing Recursive Algorithms
  • Recurrence relations
  • Master's Theorem 
Question 1
0.5 / 0.5 pts

The concept of order (Big O) is important because 

[hint: This is a multi answer question]

  
  
  
  
 
Question 2
0.5 / 0.5 pts

Deducing time complexity using master’s theorem T(n) = 3T(n/4) +nlogn

  
  
  
  
 
IncorrectQuestion 3 -In Correct
/ 0.5 pts

What is the time complexity of the following code:       

int i, j, k = 0;

for (i = n / 2; i<= n; i++) {

            for (j = 2; j <= n; j = j * 2) {

                        k = k + n / 2;

            }

}

  
  
  
  
 
Question 4
0.5 / 0.5 pts

What does it mean when we say that an algorithm X is asymptotically more efficient than Y?

  
  
  
  
 
IncorrectQuestion 5
/ 0.5 pts

Deducing time complexity using master’s theorem T(n) = 4T(n/2) +n

  
  
  
  
 
Question 6
0.5 / 0.5 pts

If T(n) =9T(n/3)+n, then by master method T(n) =

  
  
  
  
 
Question 7
0.5 / 0.5 pts

For the following recurrences T(n) =2T(n/4) +n0.51, give an expression for the runtime T(n) if the recurrence can be solved with the master theorem.

[Hint: you can use T(n) =aT(n/b)+f(n) master theorem to solve the problem]

  
  
  
  
 
Question 8
0.5 / 0.5 pts

For the following recurrences T(n) = 3T(n/4) + O(logn) give an expression for the runtime.

  
  
  
  
 
Question 9
0.5 / 0.5 pts

Give a tight asymptotic upper bound to the following recurrences T(n) = T(n/5)+log2

  
  
  
  
 
Question 10
0.5 / 0.5 pts

Deducing time complexity using master’s theorem T(n) = 4T(n/2)+n2

  
  
  
  

Comments

Popular posts from this blog

Covid 19 : My Journey - Part 1

 11 August 2020 Tired of my dad's uninterrupted coughing for over a week,  I finally managed to convince both my Mom & Dad to go to the hospital. My dad asked me to check on viral fever clinics, I nonchalantly said, 'there is no such thing as a viral fever clinic, but there are hospitals and we should be heading towards that'! [Young blood, too adamant to even listen to a piece of advice] Then I googled, and he was right, just that it wasn't being called a 'Viral fever clinic', but BBMP fever clinic and apparently they take up COVID test for free. I was embarrassed for opposing to my dad, but then I quickly found the nearest center, and we headed towards that. Leaving the house after being locked down forever was refreshing, and I could see some color in my dad and mom too. We reached the Hosahalli Ufwc Uphc [Upper Primary health care ]. There wasn't much of a crowd. But there were some people waiting to get tested. We waited in the queue, and we were as...

The Eternal Wait

A large house with comfortable furniture, a home  theater , a six seater dining table, two balconies, three bedrooms and a tiny kitchen where the coffee was brewing. The perfect view of setting sun through an elongated diwan placed at the corner of a balcony. Life sounds so safe through these materials! The house walls were filled with pictures of kids and grandkids , their stages of growth recorded so beautiful right from their baby steps to their school uniforms!  The pictures look happy with two couples smiling with their kids, the phrase “Family” inscribed on the corner! The refrigerator had too many magnets stuck, with miniature worlds in it. In the center of all the magnets lied the naughty smile of a 1-year-old! On the corner was a wooden heart stuck with a quote "I love you Mom”. The bedrooms had neatly made beds, waiting forever!  Yet, not a speck of dust was seen anywhere. The kitchen had a limited number of vessels, for the sake of just two...

Covid 19 : My Journey - Part 2

Gently absorbing what we had just heard, I picked my phone to inform my team-lead about the reports. He gave me words of assurance. When someone repeatedly says not to worry, the fact is that they are panicking more than you. I called my sister to inform her that her whole family is tested COVID positive. I could sense that she was scared and crying a bit. My sister is really strong, she never cries.  My dad made a couple of calls to inform the near ones. His voice was croaking by now with all that coughing. He was tired. BBMP had informed us that they will give us a second call by the next day. We had lost all the hope by now. My mom wasn't ready to believe it at all, and arguments broke frequently if BBMP faked the tests, with counter-arguments on what benefit will they get on faking the tests. My mom is a huge fan of TV9 (local news channel), so she was gathering the inputs from there. As suggested by the lady doctor, we took our medicines promptly now with more seriousness and ...