No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
you have a coin bias so that each toss produces heads with probability P and tail with complementry probability Q=1-P. Assume that each toss of a coin is independent from previous tosses: the probability of getting head at any given tosses is exactly P, regardless of previous outcomes. unfortunately we … |
|
function C(fl, k) if k 0 or 1< = n then return 1 elsereturn C(fl—1,k—1)+C(fl—1,k) Analyse the time taken by this algorithm under the (unreasonable) assumption that the addition C(fl — 1, k — 1)+C(fl —1, k) can be carried out in constant time once both C(fl —1, k —1) … |
|
how much time this algoritham takes in theta notation a <---- 0 for i <------1 to n do for J <........ 1 to i do for k <-------j to n do a = a+1 |