1. O(n) 2. b 4 c On Mon, Aug 8, 2011 at 8:08 PM, programming love < love.for.programm...@gmail.com> wrote:
> 1. O(n) > 2.b > 4.c > > > On Mon, Aug 8, 2011 at 7:24 PM, ankit sambyal <ankitsamb...@gmail.com>wrote: > >> Plz give the answers ... >> >> 1. In a binary max heap containing n numbers, the smallest element can be >> found in time ?? >> >> >> 2. The number of total nodes in a complete balanced binary tree with n >> levels is, >> a)3^n + 1 >> b)2^(n+1) - 1 >> c) 2^n + 1 >> d) none of above >> >> 3. In a country where everyone wants a boy, each family continues having >> babies till they have a boy. After some time, what is the proportion of boys >> to girls in the country? (Assuming probability of having a boy or a girl is >> the same) >> a) 1:2 >> b) 2:1 >> c)1:1 >> d)1:4 >> >> >> 4. A parallel program consists of 8 tasks – T1 through T8. Each task >> requires one time step to be executed on a single processor. Let X -> Y >> denote the fact that task X must be executed before task Y is executed. >> Suppose only the tasks X, Y are to be executed. On any multiprocessor >> machine it would require at least 2 time steps since in the first step X >> could be executed, and Y could be executed in the next time step (since it >> requires X to complete first). Now, suppose the following dependencies exist >> between the tasks T1 – T8: >> >> T1 -> T2 >> >> T2 -> T3 >> >> T3 -> T6 >> >> T2 -> T4 >> >> T4 -> T7 >> >> T2 -> T5 >> >> T5 -> T8 >> >> What is the minimum number of time steps required to execute these 8 tasks >> on a 2 processor machine and a 4 processor machine? >> >> >> a)4 & 2 >> >> b)5 & 2 >> >> c)5 & 4 >> >> d)6 & 2 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- **Regards SAGAR PAREEK COMPUTER SCIENCE AND ENGINEERING NIT ALLAHABAD -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.