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

Covid 19 : My Journey - The Finale

I received mixed reactions when I informed my situation to the extended friend circle. Some were not convinced and pushed me to go for a retest. Some criticized the doctors and hospital for covid deaths of their close friends. Some were thankful to me for sharing my experiences. Either way, I felt there is a huge lack of awareness and that's what motivated me to write this series. Hoping that it reaches further and helps some confused soul like me on my day 1. There are definitely some pros and cons on home quarantine vs hospital. It's up to us to weigh it out and balance it and take a judicial decision considering our well being. Also, tomorrow is the day I can officially tear out the poster stuck outside my house. There is light after all at the end of the tunnel. P.S: Please don't carry your work to the hospital. Leave it at home. It's an opportunity to rejuvenate yourself. Take it gladly and go ahead. After Care: 1. Make sure you sanitize your residence well. 2. Was

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