About

I love to counsel people.......I have a strongly believe in "Sharing your knowledge will enhance it, but hiding is a pathway to devils home "

Role

Alma Mater:

Not updated.

Experience:

Not updated.
Tud
Doubt
3 years 3 months ago

At the end of it's 5th Successful season,The siruseri Permier league is planning to give an award to most improved bowler over 5 years . For this an important Index will be computed for each bowler,This is defined as the longest Subsequence of strictly decreasing economy rate's by the bowler among all his matches over 5 season's.For example seasons are (10.0,5.0,8.9,6.7,4.2,5.5,2.2,3.4,6.0,2.3,2.0) so his improvement index is 7 based on sequence (10.0 ,8.9, 6.7, 5.2, 3.4, 2.3, 2.0)  

Now let E[1...........N] Donates a sequence of n economy rates for which improvement index is to be calculated 
for 1 \(\leq\) j \(\leq\) n,Let I[j] denotes the improved index for the prefix of score E[1.......j ] ending at E[j] 

 

Which of the following is correct recursive formulation of I(j) ?
a) I(1)=1
for j \(\in\) 2,3,......,n I(j) = 1+ max {I(k)/ 1\(\leq\)K<j, E[k] > E[j]}

b) I(1)=1
for j  \(\in\)  2,3,......,n I(j) = 1+E(j-1) if E(j-1)<E(j)
1 otherwise 

C) I(1)=1
for j \(\in\) 2,3,......,n I(j) = 1+ max {I(k)/ 1\(\leq\)K<j, E[k] < E[j]}

d)I(1)=1
for j \(\in\)2,3,......,n I(j) = 1+E(j-1) if E(j-1) > E(j)
1 otherwise 
How to evaluate this Recursive definition Using Dynamic programming?
a) A 2-D table T of Size N X N to be filled row wise from T[1][1] to T[n][n]

b) A 1-D table T of Size N  to be filled from T[n] to T[1] 

C) A 2-D table T of Size N X N to be filled row wise from T[n][n] to T[1][1]

d) A 1-D table T of Size N  to be filled from T[n] to T[1] 

What is the Time complexity in Dynamic programming ? 

a) O(n)

b) O(nLog n)

c) O(n2)

d) O(n3)

morelessAdd your answer
Tud
Doubt
3 years 3 months ago

How to solve ? Clarity about unit productions

 

morelessAdd your answer
kiranvaibhav's picture
Bhupathi Vaibhav
imrishabhsharma's picture
Rishabh Sharma
dhrupitdave's picture
Dhrupit Dave
vivek14's picture
Vivek Vikram Singh
pritam's picture
Pritam Prasun
techtud's picture
Techtud Admin
pritam's picture
Pritam Prasun
905
asinghrana's picture
Avdhesh Singh Rana
2297
shiveshroy's picture
Shivesh Kumar Roy
12578
yash's picture
YASH
13725
coolmalhotra's picture
Abhishek Malhotra
14096
meet's picture
meet
16358
sougatamoy's picture
Sougatamoy Biswas
16633
rfzahid's picture
ZAHID WAKEEL
20088
Diptom Saha
23259
Kuldeep pal
25922
21 Mar 2015 - 10:01pm

ill suggest you should be able to recognize all such languages answer by arul is correct for more such type of questions refer 
http://gatecse.in/wiki/Identify_the_class_of_the_language

more less

Ans will be B

A->BC

B->aa

C->bb

now suppose string is aabb

then 

A->BC(reduction 3)

->aaC(reduction 2)

->aabb (reduction 1)

n = 4 

and number of reductions are 3 so n-1

more less

one of my friend converted this question into combinatorics question check thi url for correct answer ie 54(1+53)
none of the above answer is correct 
http://math.stackexchange.com/questions/1104629/arrangements-of-symbols-...

more less

yes dear 100% bcz if its reachable then it will surely find it ....

more less

Yes you are right it Both P and Q are True ...and it dont give you how may -ve weight cycles ...it can just tell you their is -ve weight cycle or not ...and if not it will give shortest path from a source to all vertices of graph 

more less