Study Viral (Java Tutorials For Beginners - Step By Step)
  • Home
  • Java Tutorials
    • Core Java
    • Java Swing
    • MS Access JDBC Java Application
  • Facebook Page
  • Programs
    • C Programs
    • C++ Programs
    • Java Programs
    • Python Programs
  • UGC NET
  • Home
  • Java Tutorials
    • Core Java
    • Java Swing
    • MS Access JDBC Java Application
  • Facebook
  • Programs
    • C Programs
    • C++ Programs
    • Java Programs
    • Python Programs
  • UGC NET

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 21)

 October 14, 2018     Computer Science And Applications Paper-II, UGC NET JULY 2018     No comments   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 21)

 Q21. The solution of the recurrence relation

            T(m) = T(3m/4) + 1 is:
(1). θ (lg m)                                                  (2). θ (m)
(3). θ (mlg m)                                               (4). θ (lglg m)


Answer : (1). θ (lg m)    

Master theorem (analysis of algorithms)

The master theorem sometimes yields asymptotically tight bounds to some recurrences from divide and conquer algorithms that partition an input into smaller sub-problems of equal sizes, solve the sub-problems recursively, and then combine the sub-problem solutions to give a solution to the original problem. The time for such an algorithm can be expressed by adding the work that they perform at the top level of their recursion (to divide the problems into sub-problems and then combine the sub-problem solutions) together with the time made in the recursive calls of the algorithm. If T(n) denotes the total time for the algorithm on an input of size n and f(n)  denotes the amount of time taken at the top level of the recurrence then the time can be expressed by a recurrence relation that takes the form: 

 So, according to master theorem the run-time of the above algorithm can be expressed as:

T(n) = aT(n/b) + f(n) 
 
where  n = size of the problem

     a = number of sub-problems in the recursion and a >= 1

     n/b = size of each sub-problem

     f(n) = cost of work done outside the recursive calls like dividing into sub-problems 
                 and cost of combining them to get the solution. 
T(n) = aT(n/b) + θ (nk logp n)

where n = size of the problem
a = number of sub-problems in the recursion and a >= 1
n/b = size of each sub-problem
b > 1, k >= 0 and p is a real number.
Then,
  1. if a > bk, then T(n) = θ(nlogba)

  2. if a = bk, then
    (a) if p > -1, then T(n) = θ(nlogba logp+1n)
    (b) if p = -1, then T(n) = θ(nlogba loglogn)
    (c) if p < -1, then T(n) = θ(nlogba)

  3. if a < bk, then
    (a) if p >= 0, then T(n) = θ(nk logpn)
    (b) if p < 0, then T(n) = θ(nk) 
 Solution:

where         a = 1,           b = 4/3,        k = 0,    p = 0

Here k = 0 and p = 0 , p > -1
from a = bk  , where k = 0,  So   a = 1,  also b = 1 Therefore a = b
Now we have p > -1

then T(m) = θ(mlog b a log p+1 m)

 We also have b = 4/3,  a = 1, p = 0

T(m) = θ(m(log4/3)0 log0+1 m)

T(m) =  θ(mlog 4/3 0 log0+1 m)

T(m) =  θ(m0 log1m)

T(m) =  θ( log m )


  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Facebook

StudyViral

Labels

Alphabet Pattern Binary Tree BLOB (Binary Large Object) Computer Networks Computer Science And Applications Paper-II Data Structure DBMS Digital Clock Digital Watch Extra Tutorials File Upload Find Age from Date of Birth Graph-Algorithms Java and J2EE web applications JAVA JDK 12 Java Mail API Java MySQL Java Programs Java Programs List Java Servlets Java Swing Java Swing With MySQL Database Java Tutorials JCalender KVS Compuer Science - January 2017 Question Paper MS Access JDBC Java Application Multiuser Login NETBEANS 11 IDE Occurrence of Digits in Number Operation System Pattern Program Reverse of String Sending Email Servlet Servlet Tutorial Software Engineering Star Struts 2 FrameWork Struts 2 Registration Form UGC NET JULY 2018 Windows Commands

Popular Posts

  • Program 01: Write a program to display/print your name.
     Program 01 - Write a program to display/print your name. This is a very basic and introductory program in Java. You might see similar p...
  • Install NetBeans 11 IDE on Windows 10 - Study Viral
    Install NetBeans 11 IDE on Windows 10 - Study Viral How to Install NetBeans 11 IDE on Windows 10. Download Link : https://netbeans...
  • Create CON, AUX, NUL name folder and files in Windows - Study Viral
    Create CON, AUX, NUL name folder and files in Windows - Study Viral Most of you may be aware of many MS-DOS commands but still n...

Categories

  • Alphabet Pattern (13)
  • Binary Tree (2)
  • BLOB (Binary Large Object) (1)
  • Computer Networks (2)
  • Computer Science And Applications Paper-II (40)
  • Data Structure (6)
  • DBMS (1)
  • Digital Clock (1)
  • Digital Watch (1)
  • Extra Tutorials (3)
  • File Upload (1)
  • Find Age from Date of Birth (1)
  • Graph-Algorithms (1)
  • Java and J2EE web applications (3)
  • JAVA JDK 12 (1)
  • Java Mail API (3)
  • Java MySQL (5)
  • Java Programs (44)
  • Java Programs List (3)
  • Java Servlets (3)
  • Java Swing (16)
  • Java Swing With MySQL Database (4)
  • Java Tutorials (37)
  • JCalender (1)
  • KVS Compuer Science - January 2017 Question Paper (6)
  • MS Access JDBC Java Application (6)
  • Multiuser Login (1)
  • NETBEANS 11 IDE (1)
  • Occurrence of Digits in Number (1)
  • Operation System (4)
  • Pattern Program (8)
  • Reverse of String (2)
  • Sending Email (1)
  • Servlet (3)
  • Servlet Tutorial (3)
  • Software Engineering (4)
  • Star (7)
  • Struts 2 FrameWork (2)
  • Struts 2 Registration Form (1)
  • UGC NET JULY 2018 (40)
  • Windows Commands (2)

Pages

  • Java Tutorials
  • ASP.NET (in Hindi)
  • Java Programs List

Blog Archive

  • ►  2021 (3)
    • ►  April 2021 (3)
  • ►  2019 (7)
    • ►  June 2019 (1)
    • ►  May 2019 (2)
    • ►  March 2019 (4)
  • ▼  2018 (111)
    • ►  November 2018 (7)
    • ▼  October 2018 (20)
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • UGC NET JULY 2018 (Computer Science And Applicatio...
      • KVS PGT Computer Science Question Paper - January ...
      • KVS PGT Computer Science Question Paper - January ...
      • KVS PGT Computer Science Question Paper - January ...
    • ►  September 2018 (10)
    • ►  August 2018 (3)
    • ►  July 2018 (19)
    • ►  June 2018 (5)
    • ►  May 2018 (2)
    • ►  April 2018 (3)
    • ►  March 2018 (11)
    • ►  February 2018 (18)
    • ►  January 2018 (13)
  • ►  2017 (36)
    • ►  December 2017 (10)
    • ►  November 2017 (9)
    • ►  October 2017 (7)
    • ►  September 2017 (10)

About Me

Rohit Basra
Hello guys my name Rohit Basra. I love to code and teach java language.
View my complete profile

Followers

Copyright © Study Viral (Java Tutorials For Beginners - Step By Step) | Powered by Blogger