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 5

My parents and relatives were worried a lot about how the society will react. I came in quietly and closed the door. I was the happiest to reach home. The first thing I did was to check on my beautiful plants. Nature had indeed nourished them, but some were on the verge of death. I watered them well. I looked at them and wondered, together we will heal and recover.  In the next few days, I focused on sanitizing my home, replacing the bedsheets, washing the utensils thoroughly,  sanitizing everything I carried to the hospital. Aftercare is very important.  I made sure to take breaks in between the humongous tasks. The disease does take a toll on your body and makes you tired and weak frequently.  On the 9th day, my parents were back home. It will definitely take some time for all of us to come back to our normal. The BBMP SPOC promptly called us and enquired about our well being. I truly appreciate the govt and the BBMP for handling this so well.  Some pointers b...