Re: [algogeeks] Re: google paper/...plz help..its urgent
thanks very much. On Sun, Jan 16, 2011 at 5:04 PM, Lakhan Arya lakhan.a...@gmail.com wrote: @pacific Sets of size 2 can have 2 elements common with set of size greater than 2. for example if set is (1,2) than it is adjacent to sets like (1,2,3) (1,2,4), (1,2,3,4...n) etc. So (1,2) is adjacent to (1,2,3), (1,2,4) etc. On Jan 16, 1:04 pm, pacific pacific pacific4...@gmail.com wrote: @Lakhan Why are you not considering sets of size 2 ? Because two sets of size two cannot have both of the elements as same. On Sat, Jan 15, 2011 at 9:39 PM, Lakhan Arya lakhan.a...@gmail.com wrote: @bittu I don't think answer of 6th question to be a) No. of vertices of degree 0 will be those who didnot intersect with any set i exactly 2 points. All sets of size greater than equal 2 must intersect with any other set having exactly 2 common elements between them in exactly 2 points. e.g if a set is (1,2) then it will be adjacent to (1,2,3) , (1,2,3,4) etc.. The sets of size 0 and 1 cannot intersect in 2 points so they all will be of degree 0. Number of Sets of size 0 --- 1 Number of Sets of size 1 --- n so Total number of vertices n+1. In the similar way number of connected components will be n+2. On Jan 15, 8:44 pm, bittu shashank7andr...@gmail.com wrote: 1.c U Can verify by putting n =I where I is positive integer value say n=5 try it out its so easy 2 a...what i have understood. as we know that formal grammar is defined as (N, Σ, P, S) so For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules S → aA A → Sb S → ε generates { a^ib^i : =0} so answer is A. 3 expected value doe discrete distributional is defined as E(i)=sum(pi * xi); so from my points of view ans is 1/n ...Really Gud Question one has think..still thinking 4.b -Explaination Informally the NP-complete problems are the toughest problems in NP in the sense that they are the ones most likely not to be in P. NP- complete problems are a set of problems that any other NP-problem can be reduced to in polynomial time, but retain the ability to have their solution verified in polynomial time. In comparison, NP-hard problems are those at least as hard as NP-complete problems, meaning all NP- problems can be reduced to them, but not all NP-hard problems are in NP, meaning not all of them have solutions verifiable in polynomial time. (A) is incorrect because set NP includes both P(Polynomial time solvable) and NP-Complete . (B) is incorrect because X may belong to P (same reason as (A)) (C) is correct because NP-Complete set is intersection of NP and NP- Hard sets. (D) is incorrect because all NP problems are decidable in finite set of operations. 5. The Most Typical..Still Need Time 6 a zero degree means vertex is not connected from any other vertex in graph 7.a 8.No Answer Answer Comes to Be 252 15c10,14c9,10c5,10*9*8*7*6 all are greater then from output so say No Answer Correct Me if I am Wrong Next Time I will Try to provide the solution of 2nd, 5th problem ..explanations from-others are appreciated Thanks Regards Shashank Mani Don't B Evil U Can Earn while U Learn Computer Science Engg. BIT Mesra -- 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.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regards, chinna. -- 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.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regards, chinna. -- 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.
Re: [algogeeks] Re: google paper/...plz help..its urgent
@Lakhan Why are you not considering sets of size 2 ? Because two sets of size two cannot have both of the elements as same. On Sat, Jan 15, 2011 at 9:39 PM, Lakhan Arya lakhan.a...@gmail.com wrote: @bittu I don't think answer of 6th question to be a) No. of vertices of degree 0 will be those who didnot intersect with any set i exactly 2 points. All sets of size greater than equal 2 must intersect with any other set having exactly 2 common elements between them in exactly 2 points. e.g if a set is (1,2) then it will be adjacent to (1,2,3) , (1,2,3,4) etc.. The sets of size 0 and 1 cannot intersect in 2 points so they all will be of degree 0. Number of Sets of size 0 --- 1 Number of Sets of size 1 --- n so Total number of vertices n+1. In the similar way number of connected components will be n+2. On Jan 15, 8:44 pm, bittu shashank7andr...@gmail.com wrote: 1.c U Can verify by putting n =I where I is positive integer value say n=5 try it out its so easy 2 a...what i have understood. as we know that formal grammar is defined as (N, Σ, P, S) so For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules S → aA A → Sb S → ε generates { a^ib^i : =0} so answer is A. 3 expected value doe discrete distributional is defined as E(i)=sum(pi * xi); so from my points of view ans is 1/n ...Really Gud Question one has think..still thinking 4.b -Explaination Informally the NP-complete problems are the toughest problems in NP in the sense that they are the ones most likely not to be in P. NP- complete problems are a set of problems that any other NP-problem can be reduced to in polynomial time, but retain the ability to have their solution verified in polynomial time. In comparison, NP-hard problems are those at least as hard as NP-complete problems, meaning all NP- problems can be reduced to them, but not all NP-hard problems are in NP, meaning not all of them have solutions verifiable in polynomial time. (A) is incorrect because set NP includes both P(Polynomial time solvable) and NP-Complete . (B) is incorrect because X may belong to P (same reason as (A)) (C) is correct because NP-Complete set is intersection of NP and NP- Hard sets. (D) is incorrect because all NP problems are decidable in finite set of operations. 5. The Most Typical..Still Need Time 6 a zero degree means vertex is not connected from any other vertex in graph 7.a 8.No Answer Answer Comes to Be 252 15c10,14c9,10c5,10*9*8*7*6 all are greater then from output so say No Answer Correct Me if I am Wrong Next Time I will Try to provide the solution of 2nd, 5th problem ..explanations from-others are appreciated Thanks Regards Shashank Mani Don't B Evil U Can Earn while U Learn Computer Science Engg. BIT Mesra -- 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.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regards, chinna. -- 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.
[algogeeks] Re: google paper/...plz help..its urgent
@pacific Sets of size 2 can have 2 elements common with set of size greater than 2. for example if set is (1,2) than it is adjacent to sets like (1,2,3) (1,2,4), (1,2,3,4...n) etc. So (1,2) is adjacent to (1,2,3), (1,2,4) etc. On Jan 16, 1:04 pm, pacific pacific pacific4...@gmail.com wrote: @Lakhan Why are you not considering sets of size 2 ? Because two sets of size two cannot have both of the elements as same. On Sat, Jan 15, 2011 at 9:39 PM, Lakhan Arya lakhan.a...@gmail.com wrote: @bittu I don't think answer of 6th question to be a) No. of vertices of degree 0 will be those who didnot intersect with any set i exactly 2 points. All sets of size greater than equal 2 must intersect with any other set having exactly 2 common elements between them in exactly 2 points. e.g if a set is (1,2) then it will be adjacent to (1,2,3) , (1,2,3,4) etc.. The sets of size 0 and 1 cannot intersect in 2 points so they all will be of degree 0. Number of Sets of size 0 --- 1 Number of Sets of size 1 --- n so Total number of vertices n+1. In the similar way number of connected components will be n+2. On Jan 15, 8:44 pm, bittu shashank7andr...@gmail.com wrote: 1.c U Can verify by putting n =I where I is positive integer value say n=5 try it out its so easy 2 a...what i have understood. as we know that formal grammar is defined as (N, Σ, P, S) so For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules S → aA A → Sb S → ε generates { a^ib^i : =0} so answer is A. 3 expected value doe discrete distributional is defined as E(i)=sum(pi * xi); so from my points of view ans is 1/n ...Really Gud Question one has think..still thinking 4.b -Explaination Informally the NP-complete problems are the toughest problems in NP in the sense that they are the ones most likely not to be in P. NP- complete problems are a set of problems that any other NP-problem can be reduced to in polynomial time, but retain the ability to have their solution verified in polynomial time. In comparison, NP-hard problems are those at least as hard as NP-complete problems, meaning all NP- problems can be reduced to them, but not all NP-hard problems are in NP, meaning not all of them have solutions verifiable in polynomial time. (A) is incorrect because set NP includes both P(Polynomial time solvable) and NP-Complete . (B) is incorrect because X may belong to P (same reason as (A)) (C) is correct because NP-Complete set is intersection of NP and NP- Hard sets. (D) is incorrect because all NP problems are decidable in finite set of operations. 5. The Most Typical..Still Need Time 6 a zero degree means vertex is not connected from any other vertex in graph 7.a 8.No Answer Answer Comes to Be 252 15c10,14c9,10c5,10*9*8*7*6 all are greater then from output so say No Answer Correct Me if I am Wrong Next Time I will Try to provide the solution of 2nd, 5th problem ..explanations from-others are appreciated Thanks Regards Shashank Mani Don't B Evil U Can Earn while U Learn Computer Science Engg. BIT Mesra -- 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.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- regards, chinna. -- 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.
[algogeeks] Re: google paper/...plz help..its urgent
1.c U Can verify by putting n =I where I is positive integer value say n=5 try it out its so easy 2 a...what i have understood. as we know that formal grammar is defined as (N, Σ, P, S) so For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules S → aA A → Sb S → ε generates { a^ib^i : =0} so answer is A. 3 expected value doe discrete distributional is defined as E(i)=sum(pi * xi); so from my points of view ans is 1/n ...Really Gud Question one has think..still thinking 4.b -Explaination Informally the NP-complete problems are the toughest problems in NP in the sense that they are the ones most likely not to be in P. NP- complete problems are a set of problems that any other NP-problem can be reduced to in polynomial time, but retain the ability to have their solution verified in polynomial time. In comparison, NP-hard problems are those at least as hard as NP-complete problems, meaning all NP- problems can be reduced to them, but not all NP-hard problems are in NP, meaning not all of them have solutions verifiable in polynomial time. (A) is incorrect because set NP includes both P(Polynomial time solvable) and NP-Complete . (B) is incorrect because X may belong to P (same reason as (A)) (C) is correct because NP-Complete set is intersection of NP and NP- Hard sets. (D) is incorrect because all NP problems are decidable in finite set of operations. 5. The Most Typical..Still Need Time 6 a zero degree means vertex is not connected from any other vertex in graph 7.a 8.No Answer Answer Comes to Be 252 15c10,14c9,10c5,10*9*8*7*6 all are greater then from output so say No Answer Correct Me if I am Wrong Next Time I will Try to provide the solution of 2nd, 5th problem ..explanations from-others are appreciated Thanks Regards Shashank Mani Don't B Evil U Can Earn while U Learn Computer Science Engg. BIT Mesra -- 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.
[algogeeks] Re: google paper/...plz help..its urgent
@bittu I don't think answer of 6th question to be a) No. of vertices of degree 0 will be those who didnot intersect with any set i exactly 2 points. All sets of size greater than equal 2 must intersect with any other set having exactly 2 common elements between them in exactly 2 points. e.g if a set is (1,2) then it will be adjacent to (1,2,3) , (1,2,3,4) etc.. The sets of size 0 and 1 cannot intersect in 2 points so they all will be of degree 0. Number of Sets of size 0 --- 1 Number of Sets of size 1 --- n so Total number of vertices n+1. In the similar way number of connected components will be n+2. On Jan 15, 8:44 pm, bittu shashank7andr...@gmail.com wrote: 1.c U Can verify by putting n =I where I is positive integer value say n=5 try it out its so easy 2 a...what i have understood. as we know that formal grammar is defined as (N, Σ, P, S) so For instance, the grammar G with N = {S, A}, Σ = {a, b}, P with start symbol S and rules S → aA A → Sb S → ε generates { a^ib^i : =0} so answer is A. 3 expected value doe discrete distributional is defined as E(i)=sum(pi * xi); so from my points of view ans is 1/n ...Really Gud Question one has think..still thinking 4.b -Explaination Informally the NP-complete problems are the toughest problems in NP in the sense that they are the ones most likely not to be in P. NP- complete problems are a set of problems that any other NP-problem can be reduced to in polynomial time, but retain the ability to have their solution verified in polynomial time. In comparison, NP-hard problems are those at least as hard as NP-complete problems, meaning all NP- problems can be reduced to them, but not all NP-hard problems are in NP, meaning not all of them have solutions verifiable in polynomial time. (A) is incorrect because set NP includes both P(Polynomial time solvable) and NP-Complete . (B) is incorrect because X may belong to P (same reason as (A)) (C) is correct because NP-Complete set is intersection of NP and NP- Hard sets. (D) is incorrect because all NP problems are decidable in finite set of operations. 5. The Most Typical..Still Need Time 6 a zero degree means vertex is not connected from any other vertex in graph 7.a 8.No Answer Answer Comes to Be 252 15c10,14c9,10c5,10*9*8*7*6 all are greater then from output so say No Answer Correct Me if I am Wrong Next Time I will Try to provide the solution of 2nd, 5th problem ..explanations from-others are appreciated Thanks Regards Shashank Mani Don't B Evil U Can Earn while U Learn Computer Science Engg. BIT Mesra -- 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.
[algogeeks] Re: google paper/...plz help..its urgent
Answer for question 6 maybe b) also for question 7 maybe b) On Jan 12, 2:14 pm, snehal jain learner@gmail.com wrote: 1. Quick-sort is run on two inputs shown below to sort in ascending order (i) 1,2,3, ….,n (ii) n, n - 1, n - 2, …., 2, 1 Let C1 and C2 be the number of comparisons made for the inputs (i) and (ii) respectively. Then, a) C1 C2 b) C1 C2 c) C1 = C2 d) We cannot say anything for arbitrary n 2. Which of the following languages over {0, 1} is regular? a) 0i1j such that i ≤ j b) 0iw1j such that w ∈ {0, 1}∗ and i ≥ 0 c) All strings of 0s and 1s such that every pth character is 0 where p is prime d) None of the above 3. We are given a set X = {x1, x2, ..., xn} where xi = 2i. A sample S (which is a subset of X) is drawn by selecting each xi independently with probability pi = 1 / 2. The expected value of the smallest number in sample S is: a) 1 / n b) 2 c) sqrt(n) d) n 4. Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of the following statements is true? a) R is NP-complete b) R is NP-hard c) Q is NP-complete d) Q is NP-hard 5. For any string s ∈ (0 + 1)*, let d(s) denote the decimal value of s (eg: d(101) = 5, d(011) = 3). Let L = {s ∈ (0+1)* | d(s) mod 5 = 2 and d(s) mod 7 = 4}. Which of the following statements is true? a) L is recursively enumerable, but not recursive b) L is is recursive, but not context-free c) L is context-free, but not regular d) L is regular Common data for questions 6 and 7 The 2n vertices of a graph G corresponds to all subsets of a set of size n. Two vertices of G are adjacent if and only if the corresponding sets intersect in exactly 2 elements 6. The number of vertices of degree zero in G is: a) 1 b) n c) 2n - 1 d) None 7. The number of connected components in G is: a) 2n b) n + 2 c) n C 2 d) None 8. There are 5 nested loops written as follows, int counter = 0; for (int loop_1=0; loop_1 10; loop_1++) { for (int loop_2=loop_1 + 1; loop_2 10; loop_2++) { for (int loop_3=loop_2 + 1; loop_3 10; loop_3++) { for (int loop_4=loop_3 + 1; loop_4 10; loop_4++) { for (int loop_5=loop_4 + 1; loop_5 10; loop_5++) { counter++;} } } } } What will be the value of counter in the end (after all the loops finished running)? a) 15C5 b) 14C5 c) 10C5 d) 10 * 9 * 8 * 7 * 6 * 5 -- 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.