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 - 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 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...