Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

(i) Define a recurrence relation using Divide and Conquer technique and describe its

elements

(ii) Solve the following recurrence relation using Recurrence Tree Method.

T(𝑛) = {1 𝑇(𝑛/2 ) + n

𝑖𝑓 n=1

𝑖𝑓 n> 1

Show all the steps.


(i) Identify two problems in each category of the following time complexities and derive the

complexity of these identified problems.

O(n log n), and O(n2).

(ii) Suppose you are given n sets: S1, S2…..Sn.. Each set is having n elements. The problem is

to find whether some pairs of these sets are disjoint, i.e. there are no common elements

in these sets. Write pseudo code and calculate its time complexity.


Calculate the time complexity of the following program fragments.

(a) π‘“π‘œπ‘Ÿ (𝑖 = 1; 𝑖 ≀ 𝑛; 𝑖 βˆ— = 2)

{

π‘₯ = π‘₯ + 1

}

(b) π‘“π‘œπ‘Ÿ (𝑖 = 1; 𝑖 ≀ 𝑛; 𝑖 + +)

π‘“π‘œπ‘Ÿ (𝑗 = 1; 𝑗 ≀ 𝑛; 𝑗 = 𝑗 βˆ— 2)

{

… .

… .

}


(a) Write a brute force method and Horner’s algorithm to evaluate a polynomial expression

and compute their complexities

(b) Evaluate the following polynomial expression using Horner’s rule. Assume the value of x

is 3.

p(π‘₯) = 10π‘₯5 + 6x4 + 3π‘₯3 βˆ’ 6π‘₯2 + 8π‘₯ + 15

Show all the intermediate steps.


create a parent class "Account" with three variables num, title and bal with two functions withdraw and deposit. Create a child class "Saving Account" with a function calculate Profit (that applies 7.5% profit on current balance). Finally create the class "TestApp" that creates the object of saving account and call withdraw, deposit functions and public data memebers of account clas. Override withdraw function in savingAccount to deduct Rs:250 if the balance after withdrawal of amount is less than 10000. In javascript


Create a flowchart that display numbers from 100-1

As ICT/CSS student,what can you say about the use of VMware in these trying times?

If you will become a Systems Administrator someday,how will you secure the server for your clients?

Listdown at least 5 important roles of a server in business,education,governance and communications.

#include<stdio.h>

#include<conio.h>

void main(){

int num1, num2;

int temp=0;

printf("Enter two numbers");

scanf("%dΒ %d" ,&num1,&num2);

Β 

while(((num1 + num2) % 5) !=0)

Β Β {

Β Β Β temp=num1+num2;

Β Β Β num1=num2;

Β Β Β num2= temp;

Β Β Β printf("%d",temp);

}

getch();

}


LATEST TUTORIALS
APPROVED BY CLIENTS