<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;CE8FR3g-fCp7ImA9WhRaFEg.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135</id><updated>2012-02-17T09:56:56.654+05:30</updated><category term="microprocessor" /><category term="die" /><category term="suites" /><category term="logic" /><category term="matrix algebra" /><category term="conversion" /><category term="propositional logic" /><category term="puzzle" /><category term="group theory" /><category term="algorithms" /><category term="gate2009" /><category term="binary" /><category term="cs" /><category term="determinant" /><category term="compsci" /><category term="matrix" /><category term="analysis" /><category term="resources" /><category term="coin tossing" /><category term="dice" /><category term="gate2002" /><category term="search" /><category term="number systems" /><category term="expectation" /><category term="gate1998" /><category term="mathematics" /><category term="singularity" /><category term="gate" /><category term="linkedlist" /><category term="rank" /><category term="decimal" /><category term="cards" /><category term="probability" /><category term="gateindia" /><title>GATE India (CS)</title><subtitle type="html">I wrote GATE 2009 and scored 99.01 percentile. This is a blog where I share things I learnt and learn, problems I solved and solve, methods I use, etc.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/GateIndiacs" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="gateindiacs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">GateIndiacs</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;CEUASH05fCp7ImA9WxNUEUk.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-6191549386636721833</id><published>2009-10-31T03:03:00.001+05:30</published><updated>2009-11-02T11:40:49.324+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-02T11:40:49.324+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="probability" /><category scheme="http://www.blogger.com/atom/ns#" term="mathematics" /><category scheme="http://www.blogger.com/atom/ns#" term="expectation" /><title>GATE 1999 CS question 1.1 (Probability)</title><content type="html">&lt;blockquote&gt;1.1 Suppose the expectation of a random variable X is 5. Which of the following is true? &lt;br /&gt;
(a) There is a sample point at which X has a value 5.&lt;br /&gt;
(b) There is a sample point at which X has a value greater than 5.&lt;br /&gt;
(c) There is a sample point at which X has a value greater than or equal to 5.&lt;br /&gt;
(d) None of the above&lt;br /&gt;
&lt;/blockquote&gt;First of all, what is this ‘expectation of a random variable’ business?&lt;br /&gt;
Well, an ‘expectation’ is a sort of sum – it’s&amp;nbsp; a ‘weighted’ sum. As a formula, it is &lt;br /&gt;
&lt;div style="text-align: center;"&gt;E = summation of xi*pi&lt;br /&gt;
&lt;/div&gt;where xi are the sample points (different values taken) of the random variable, and pi are the probabilities of each value in turn.&lt;br /&gt;
Imagine you were a gambler and also happened to know a dice maker. You tell him to make the dice such that numbers 1 to 4 appear with probability 1/12 each, while 5 and 6 appear with probability 1/3 each (verify that this adds up to a total probability of 1). Now, what is the ‘expected value’ of this dice? Well, as I said, expectation is a weighted sum, with the weights being the probabilities. So here, it would be&lt;br /&gt;
&lt;div style="text-align: center;"&gt;E = 1*1/12 + 2*1/12 + 3*1/12 + 4*1/12 + 5*1/3 + 6*1/3&lt;br /&gt;
&lt;/div&gt;&lt;div style="text-align: center;"&gt;E = 4.5&lt;br /&gt;
&lt;/div&gt;Ha, what is this, the expected value of the dice roll is 4&lt;i&gt;.5? &lt;/i&gt;How can a dice roll a non-integer value? &lt;br /&gt;
Well, this mathematical expected value isn’t really the expected value of the dice. Yeah, that’s how strange math is. :)&lt;br /&gt;
Intuitively, it’s actually a value we try to find such that the difference between the actual value of the random variable and this value is minimum. Now, since we don’t really know the actual value of the random variable beforehand, we keep this value close to the most probable values while not getting too distant from the other values. That is why we got a 4.5 above – it’s a compromise between the high probability of 5 and 6 and the low probabilities of 1,2,3 and 4.&lt;br /&gt;
Ok, that’s about the basics of expectation, now let’s dive into this problem. Here, they say that the expectation of a random variable is 5. Well now, let’s think through the options. &lt;br /&gt;
Consider (a). Do we really need one of the sample points to be 5 to get an expectation of 5? What about the expectation of an RV (random variable) that takes values 3,4,6,7 with equal probabilities? By now you must be able to calculate and tell that it’s 5. So, (a) is false.&lt;br /&gt;
What about (b) then? Well, that appears about right, doesn’t it? A variable which takes only values 1, 2, 3, and 4 can never have an expectation of 5. Even a variable which takes values 4 and 5 with non-zero probabilities for each can’t have an expected value of 5: 4*(something less than 1) + 5*(something less than 1) can never give you 5, only 5*1.0 gives 5. So, is (b) the answer? &lt;br /&gt;
But wait, I said 5*1.0 at the last there, can we make the expectation equal to that? Ah, clever idea. What do we need for that? The ‘summation of xi*pi’ should be just 5*1.0 which means there is only one sample point ‘5’ with probability 1.0. In this case, the expectation is of course 5.&lt;br /&gt;
So, it's not &lt;i&gt;necessary&lt;/i&gt; that there is a sample point greater than 5 - a single sample point at 5 itself also gives that same expectation.&amp;nbsp; &lt;br /&gt;
So, the answer is &lt;b&gt;(c) There is a sample point at which X has a value greater than or equal to 5.&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-6191549386636721833?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NAFDEux9-aSvovlbvpRx2fQhbP8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NAFDEux9-aSvovlbvpRx2fQhbP8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NAFDEux9-aSvovlbvpRx2fQhbP8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NAFDEux9-aSvovlbvpRx2fQhbP8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=iXNFv9QQkQU:MItSuyW9gtU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=iXNFv9QQkQU:MItSuyW9gtU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=iXNFv9QQkQU:MItSuyW9gtU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=iXNFv9QQkQU:MItSuyW9gtU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/6191549386636721833/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=6191549386636721833" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/6191549386636721833?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/6191549386636721833?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/10/gate-1999-cs-question-11-probability.html" title="GATE 1999 CS question 1.1 (Probability)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CE8HR3gyfSp7ImA9WxVaFkQ.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-1931208796252635181</id><published>2009-04-09T22:07:00.010+05:30</published><updated>2009-04-14T12:37:16.695+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-14T12:37:16.695+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="matrix algebra" /><category scheme="http://www.blogger.com/atom/ns#" term="matrix" /><category scheme="http://www.blogger.com/atom/ns#" term="singularity" /><title>GATE 2001 CS question 1.1 (Matrix Algebra)</title><content type="html">&lt;blockquote style="font-family: georgia;"&gt;1.1 Consider the following statements:&lt;br /&gt;S1: The sum of two singular n X n matrices may be non-singular.&lt;br /&gt;S2: The sum of two n X n non-singular matrices may be singular.&lt;br /&gt;Which of the following statements is correct?&lt;br /&gt;(a) S1 and S2 are both true.        (b) S1 is true, S2 is false.&lt;br /&gt;(c) S1 is false, S2 is true.       (d) S1 and S2 are both false.&lt;br /&gt;&lt;/blockquote&gt; &lt;span style="font-family:verdana;"&gt;This is one problem where getting too theoretical can get you stuck. Instead, let's try to come up with simple examples.&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;  &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;The one I immediately thought of for S1 was:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;and&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;-1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Both these matrices are singular. What does 'singular' mean? It simply means that the &lt;/span&gt;&lt;a style="font-family: georgia;" href="http://gatesolutions.blogspot.com/2008/12/gate-2000-cs-question-13.html"&gt;determinant &lt;/a&gt;&lt;span style="font-family:verdana;"&gt;of the matrix is zero (if you don't remember how the determinant of a matrix is found, please see &lt;/span&gt;&lt;a style="font-family: georgia;" href="http://gatesolutions.blogspot.com/2008/12/gate-2000-cs-question-13.html"&gt;this post&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;).&lt;/span&gt;&lt;span style="font-family:georgia;"&gt;  &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Now, what is their matrix sum? It is:&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;2&lt;br /&gt;&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;0&lt;br /&gt;&lt;/td&gt;&lt;td&gt;2&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;Now quick, what is the determinant value of this one? &lt;/span&gt; &lt;span style="font-family:verdana;"&gt;It's 2 X 2 - 0 X 0 = 4. Clearly, this sum is not 0, so the resulting matrix is non-singular. So, we've proved that S1 is true. &lt;/span&gt;  &lt;span style="font-family:verdana;"&gt;The second case is still easier. Let's take the matrices&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;and&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;-1&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;-1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;Now, both of them have a determinant value of 1, and so they are not singular. What's their matrix sum then?&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Wow! That's very clearly a singular matrix - it's determinant can't be anything other than 0. So, two non-singular matrices can also give a singular matrix on addition. &lt;/span&gt; &lt;span style="font-family:verdana;"&gt;This means that S2 is also true.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;So, the answer is: &lt;/span&gt;&lt;strong&gt;(a) S1 and S2 are both true&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-1931208796252635181?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Lb4k2_El_5qTUNwiImIT0O6DgPY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Lb4k2_El_5qTUNwiImIT0O6DgPY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Lb4k2_El_5qTUNwiImIT0O6DgPY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Lb4k2_El_5qTUNwiImIT0O6DgPY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=rkHpxmnKCKQ:qfcdj6YOnSI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=rkHpxmnKCKQ:qfcdj6YOnSI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=rkHpxmnKCKQ:qfcdj6YOnSI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=rkHpxmnKCKQ:qfcdj6YOnSI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/1931208796252635181/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=1931208796252635181" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/1931208796252635181?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/1931208796252635181?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/04/gate-2001-cs-question-11.html" title="GATE 2001 CS question 1.1 (Matrix Algebra)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DU8FRX86cCp7ImA9WxVaE0g.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-4344501710214583057</id><published>2009-03-23T08:17:00.004+05:30</published><updated>2009-04-10T15:33:34.118+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-10T15:33:34.118+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="probability" /><category scheme="http://www.blogger.com/atom/ns#" term="coin tossing" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2002" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><title>GATE 2002 CS question 2.16 (Probability)</title><content type="html">&lt;blockquote&gt;2.16 Four fair coins are tossed simultaneously. The probability that atleast one head and one tail turn up is&lt;br /&gt;(a) 1/16        (b) 1/8         (c) 7/8         (d) 15/16&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;   This question is somewhat similar to the &lt;a href="http://gatesolutions.blogspot.com/2008/12/gate-1998-cs-question-11.html"&gt;1998 GATE paper's 1.1&lt;/a&gt; question. Please read that one if you haven't yet.&lt;br /&gt;&lt;br /&gt;   Like there, the total number of combinations consisting of {tail, tail, tail, tail}, {tail, tail, tail, tail, head}, ... {head, head, head, head} comes to 2X2X2X2 = 16.&lt;br /&gt;&lt;br /&gt;   In case you didn't get how, there are two values for the first toss - head or tail. For each of these values, the second toss can give a head or a tail. So now we have 2X2 = 4 combinations. Extend this to 4 tosses and you can see how 16 came up.&lt;br /&gt;&lt;br /&gt;   Of these 16 combinations, how many satisfy the condition given in the question? To find that, we have to first understand clearly what the question says.&lt;br /&gt;&lt;br /&gt;   It asks for "the probability that at least one head and one tail turn up". That means in our result set, all the combinations must have at least one head and one tail.&lt;br /&gt;&lt;br /&gt;   With a little bit of thought, we'll see that there are many more combinations which do have one head and one tail than those which don't have. So, instead of asking what all combinations &lt;span style="font-style: italic;"&gt;have&lt;/span&gt; that property, let's now try to find which combinations &lt;span style="font-style: italic;"&gt;don't have&lt;/span&gt; that property.&lt;br /&gt;&lt;br /&gt;   Let's take some combination out of the pool: say a combination that has one head alone. When we say it has only one head, it immediately means that the others are all tails. So, it has 'atleast' one head and one tail, so it satisfies the condition. Similar to this case of combinations having only one head, any other combinations that have two heads or three heads also have at least one tail, so they also satisfy the condition.&lt;br /&gt;&lt;br /&gt;   The case of the combinations having four heads is a curious one. Actually, I must have said combination, not combinations, because there is only one: {head, head, head, head}. In this case, there's no 'at least one tail', which means it does not satisfy the condition. So we have one combination where the condition fails.&lt;br /&gt;&lt;br /&gt;   So, that's it? Out of 16, one doesn't satisfy it, so 15 satisfy it, so the answer is 15/16.&lt;br /&gt;&lt;br /&gt;   NO! The condition in the question was symmetric - 'at least one head &lt;span style="font-weight: bold;"&gt;and &lt;/span&gt;tail' - which means the answer will also be symmetric. We talked about the all heads combination, what about the all tails one?&lt;br /&gt;&lt;br /&gt;   Oooh.. Seems we were about to miss something. The all tails combination too fails the condition. Any other combination has a mixture of heads and tails, so will satisfy the condition.&lt;br /&gt;&lt;br /&gt;   So, the number of combinations that do satisfy the condition is 16 - 2  = 14. To find the probability of the condition being satisfied, divide the number of cases where the condition is satisfied by the total number of cases. Here it is 14/16  = 7/8.&lt;br /&gt;&lt;br /&gt;And so, the answer is: &lt;span style="font-weight: bold;"&gt;(c) 7/8&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-4344501710214583057?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/z3seT2O-y7wK6eMoACUfRUzQvC4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z3seT2O-y7wK6eMoACUfRUzQvC4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/z3seT2O-y7wK6eMoACUfRUzQvC4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z3seT2O-y7wK6eMoACUfRUzQvC4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=512vLZyzIG0:2WSSB88jQQI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=512vLZyzIG0:2WSSB88jQQI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=512vLZyzIG0:2WSSB88jQQI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=512vLZyzIG0:2WSSB88jQQI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/4344501710214583057/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=4344501710214583057" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/4344501710214583057?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/4344501710214583057?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/03/gate-2002-cs-question-216.html" title="GATE 2002 CS question 2.16 (Probability)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEcCRnczcSp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-786336739337982542</id><published>2009-03-23T00:59:00.005+05:30</published><updated>2009-03-23T08:11:07.989+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:11:07.989+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="conversion" /><category scheme="http://www.blogger.com/atom/ns#" term="decimal" /><category scheme="http://www.blogger.com/atom/ns#" term="binary" /><category scheme="http://www.blogger.com/atom/ns#" term="number systems" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2002" /><title>GATE 2002 CS question 1.14 (Number systems)</title><content type="html">&lt;blockquote&gt;1.14 The decimal value of 0.25&lt;br /&gt;(a) is equivalent to the binary value 0.1&lt;br /&gt;(b) is equivalent to the binary value 0.01&lt;br /&gt;(c) is equivalent to the binary value 0.00111...&lt;br /&gt;(d) cannot be represented precisely in binary&lt;br /&gt;&lt;/blockquote&gt;This question must take only half a second if you know how to approach it.&lt;br /&gt;The usual way of converting a decimal fraction to a binary one is to multiply it by 2, take the integer part, rinse and repeat.&lt;br /&gt;&lt;br /&gt;Well, here we are not going to use that. Instead, we're going to be clever and use the meaning of number systems.&lt;br /&gt;What is the value of 10 binary? It is 1 * 2^1 + 0 * 2^0. That is, we use decreasing powers of 2 as we move right.&lt;br /&gt;&lt;br /&gt;Now, what is 0.1 binary? It is 1 * 2^(-1) which is 1/2.  Similarly, 0.01 is 1 * 2^(-2) = 1/4 = 0.25.&lt;br /&gt;&lt;br /&gt;Hey, haven't we arrived at the answer then? If 0.01 binary is 0.25 decimal, the answer we need is 0.01.&lt;br /&gt;&lt;br /&gt;Yes, but there's something more we can learn here: if you manage to write any fractional value as the sum of 1/(powers of 2), you can directly write down its binary value. In some cases this might prove to save a lot of time. For example, if you asked to find the binary value of say 0.375, we see that it can be written as 0.25 + 0.125, so the answer is 0.011.&lt;br /&gt;&lt;br /&gt;In this case, no such splitting was necessary. So, the answer to this question is:&lt;span style="font-weight: bold;"&gt; (b) is equivalent to the binary value 0.01&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-786336739337982542?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uKpEuhH_MZE7LXAWv8jT9jKHdYk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uKpEuhH_MZE7LXAWv8jT9jKHdYk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uKpEuhH_MZE7LXAWv8jT9jKHdYk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uKpEuhH_MZE7LXAWv8jT9jKHdYk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=AssS8sC75z8:4Ujw1F78CO4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=AssS8sC75z8:4Ujw1F78CO4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=AssS8sC75z8:4Ujw1F78CO4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=AssS8sC75z8:4Ujw1F78CO4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/786336739337982542/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=786336739337982542" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/786336739337982542?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/786336739337982542?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/03/gate-2002-cs-question-114.html" title="GATE 2002 CS question 1.14 (Number systems)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEcNR3kzeyp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-7945317511231869908</id><published>2009-03-23T00:45:00.004+05:30</published><updated>2009-03-23T08:11:36.783+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:11:36.783+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="propositional logic" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2002" /><category scheme="http://www.blogger.com/atom/ns#" term="logic" /><title>GATE 2002 CS question 1.8 (Propositional logic)</title><content type="html">&lt;blockquote&gt;1.8 "If X then Y unless Z" is represented by which of the following formulae in propositional logic?&lt;br /&gt;(a) (X ^ ¬Z) → Y        (b) (X^Y)→ ¬Z         (c) X → (Y^ ¬Z)      (d) (X →Y) ^ ¬Z&lt;br /&gt;&lt;/blockquote&gt;Ok, let's first be clear what that statement means: If X then Y &lt;span style="font-weight: bold;"&gt;unless&lt;/span&gt; Z.&lt;br /&gt;In English, A &lt;span style="font-weight: bold;"&gt;unless &lt;/span&gt;B means that A will be true provided B is not true.&lt;br /&gt;So here, the unless means that X being true implies Y also being true, except when Z is true.&lt;br /&gt;So, for Y to be true, we need both X to be true &lt;span style="font-weight: bold;"&gt;and &lt;/span&gt;Z to be false.&lt;br /&gt;This is best expressed by (a) - it literally reads as (X AND NOT(Z)) implies Y.&lt;br /&gt;So, the answer is&lt;span style="font-weight: bold;"&gt; (a) (X ^ ¬Z) → Y&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-7945317511231869908?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WdqR4r1W3v2jlmJGuveKG_91p8o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WdqR4r1W3v2jlmJGuveKG_91p8o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WdqR4r1W3v2jlmJGuveKG_91p8o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WdqR4r1W3v2jlmJGuveKG_91p8o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=LYaBNU95dNg:jVX29l-c_N0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=LYaBNU95dNg:jVX29l-c_N0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=LYaBNU95dNg:jVX29l-c_N0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=LYaBNU95dNg:jVX29l-c_N0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/7945317511231869908/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=7945317511231869908" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/7945317511231869908?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/7945317511231869908?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/03/gate-2002-cs-question-18.html" title="GATE 2002 CS question 1.8 (Propositional logic)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DEYBSX07eSp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-6974627340784585175</id><published>2009-03-23T00:13:00.004+05:30</published><updated>2009-03-23T08:12:38.301+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:12:38.301+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="matrix algebra" /><category scheme="http://www.blogger.com/atom/ns#" term="group theory" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2002" /><category scheme="http://www.blogger.com/atom/ns#" term="matrix" /><title>GATE 2002 CS question 1.6 (Group theory)</title><content type="html">&lt;blockquote&gt;1.6 Which of the following is true?&lt;br /&gt;(a) The set of all rational negative numbers forms a group under multiplication&lt;br /&gt;(b) The set of all non-singular matrices forms a group under multiplication&lt;br /&gt;(c) The set of all matrices forms a group under multiplication&lt;br /&gt;(d) Both B and C are true&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;To answer this question, we must know what a 'group' is.&lt;br /&gt;In maths, a &lt;a href="http://en.wikipedia.org/wiki/Group_%28mathematics%29"&gt;group&lt;/a&gt; is a set of things along with an 'operation' on them that are in such a way that:&lt;br /&gt;&lt;br /&gt;(i) whenever you apply the operation to any element (or elements) of the set, you get another element of the same set.&lt;br /&gt;For eg., let's take the set of integers and the operation of multiplication. Whenever you multiply two integers, you always end up with another integer. So this group (which consists of the set of integers and multiplication) satisfies this property. And the property is called '&lt;span style="font-weight: bold;"&gt;closure&lt;/span&gt;'.&lt;br /&gt;&lt;br /&gt;(ii) when the same operation is applied in an expression more than one time, the order in which you do the operations doesn't matter.&lt;br /&gt;For eg., in the same group as above, let's say we have a*b*c (a,b,c being integers and * representing multiplication). Then, we all know that it doesn't matter whether we do (a*b)*c or a*(b*c), the result will be the same. This property is fancily known as '&lt;span style="font-weight: bold;"&gt;associativity&lt;/span&gt;'.&lt;br /&gt;&lt;br /&gt;(iii) there's a particular element, say 'i', such that doing the operation on any other element, say 'x', with this 'i' will again return 'x'. That just means that the operation leaves the element 'x' unchanged, when the other operand is 'i'.&lt;br /&gt;If that seems complicated, after the example you'll see it's a very simple thing. In the same group as above, take any element of the set of integers, multiply it by 1, you'd get the same element right? That is what this property says. It tries to generalize it by saying that for any group, there must be an element in the set which leaves the other element unchanged when the operation is applied on them both. This element is called the 'identity element' and the property is aptly called the '&lt;span style="font-weight: bold;"&gt;identity&lt;/span&gt;' property.&lt;br /&gt;&lt;br /&gt;(iv) for any element 'x' in the set, there exists another element say 'y', such that when the operation is applied on these two, we get the identity element. This 'other element' y is called the &lt;span style="font-weight: bold;"&gt;inverse &lt;/span&gt;of x, and the property is called &lt;span style="font-weight: bold;"&gt;invertibility&lt;/span&gt;.&lt;br /&gt;Let's try this property in the same old group: what is the inverse of 6? Oops... It is 1/6 (since 6 * 1/6 = 1), and that surely isn't in the set of integers. So, this doesn't satisfy the invertibility property, so what we've been calling a group all along is not a group at all! (it's a &lt;a href="http://en.wikipedia.org/wiki/Monoid"&gt;monoid&lt;/a&gt;, in case you're interested)&lt;br /&gt;&lt;br /&gt;Now that we have an idea of what a group is, let's attack the original question:&lt;br /&gt;&lt;br /&gt;In (a), multiplying a negative number with another gives us a positive number which is outside the set. Hence closure itself isn't satisfied, so it's not a group.&lt;br /&gt;&lt;br /&gt;Let's analyze (b). Multiplying two matrices gives another matrix, so &lt;span style="font-weight: bold;"&gt;closure &lt;/span&gt;is there. (A*B)*C is the same as A*(B*C) in matrices too, so &lt;span style="font-weight: bold;"&gt;associativity &lt;/span&gt;also works. You'd have heard of this I matrix which has 1's in the diagonal and 0's everywhere else, and gives the same matrix when multiplied i.e. A*I = A for all A. So that's our &lt;span style="font-weight: bold;"&gt;identity &lt;/span&gt;element. And given that the matrices are non-singular (which means their determinant is not zero), inverse exists for all of them. Hence &lt;span style="font-weight: bold;"&gt;invertibility&lt;/span&gt; too holds. So, it seems this is the group we want.&lt;br /&gt;&lt;br /&gt;So, what's wrong in (c)? Well, by saying 'all matrices', it has included singular matrices too, which do not have an inverse. So, it cannot form a group.&lt;br /&gt;&lt;br /&gt;Hence, &lt;span style="font-weight: bold;"&gt;(b) The set of all non-singular matrices forms a group under multiplication &lt;/span&gt;is&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;the answer.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-6974627340784585175?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/p8LqAYJ1q7HMzs0Ii9yCcxGQRHA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/p8LqAYJ1q7HMzs0Ii9yCcxGQRHA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/p8LqAYJ1q7HMzs0Ii9yCcxGQRHA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/p8LqAYJ1q7HMzs0Ii9yCcxGQRHA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=4gr6ly52Eb8:j_icYEZLH44:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=4gr6ly52Eb8:j_icYEZLH44:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=4gr6ly52Eb8:j_icYEZLH44:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=4gr6ly52Eb8:j_icYEZLH44:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/6974627340784585175/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=6974627340784585175" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/6974627340784585175?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/6974627340784585175?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/03/gate-2002-cs-question-16.html" title="GATE 2002 CS question 1.6 (Group theory)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUESXc4eSp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-3936312356670135535</id><published>2009-03-23T00:01:00.005+05:30</published><updated>2009-03-23T08:13:28.931+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:13:28.931+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="algorithms" /><category scheme="http://www.blogger.com/atom/ns#" term="search" /><category scheme="http://www.blogger.com/atom/ns#" term="linkedlist" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2002" /><title>GATE 2002 CS question 1.5 (Algorithm Analysis)</title><content type="html">&lt;blockquote&gt;1.5 In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is:&lt;br /&gt;(a) log n     (b) n/2     (c) log2(n) - 1     (d) n&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Here, we need to search for the element in a singly linked list. So, we can't use a search such as binary search, as we have no way of directly 'jumping' to the middle element. &lt;br /&gt;Hence, log(n) is not possible. &lt;br /&gt;n/2 would be the answer &lt;span style="font-style:italic;"&gt;if&lt;/span&gt; they had asked for the &lt;span style="font-weight:bold;"&gt;average case&lt;/span&gt;.&lt;br /&gt;However, here they're asking for the 'worst case'. The worst case in a singly linked list is when what we want to search for happens to be at the &lt;span style="font-style:italic;"&gt;last&lt;/span&gt; of the list: then, we'd have to travel through the entire list to get to that element. &lt;br /&gt;Hence, in the worst case, we'd have to do n comparisons - with each of the n elements of the list, before we finally find it. &lt;br /&gt;So the answer is &lt;span style="font-weight:bold;"&gt;(d) n&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-3936312356670135535?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4zK10XIjz8Ans_wE4v9ohdVgg4o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4zK10XIjz8Ans_wE4v9ohdVgg4o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4zK10XIjz8Ans_wE4v9ohdVgg4o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4zK10XIjz8Ans_wE4v9ohdVgg4o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=mFpBsiIJ3Eg:S_C9l7Om-Vo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=mFpBsiIJ3Eg:S_C9l7Om-Vo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=mFpBsiIJ3Eg:S_C9l7Om-Vo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=mFpBsiIJ3Eg:S_C9l7Om-Vo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/3936312356670135535/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=3936312356670135535" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/3936312356670135535?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/3936312356670135535?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/03/gate-2002-cs-question-15.html" title="GATE 2002 CS question 1.5 (Algorithm Analysis)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUBQX45fCp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-7699361334678976338</id><published>2009-03-22T23:42:00.004+05:30</published><updated>2009-03-23T08:14:10.024+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:14:10.024+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="matrix algebra" /><category scheme="http://www.blogger.com/atom/ns#" term="rank" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2002" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><category scheme="http://www.blogger.com/atom/ns#" term="matrix" /><title>GATE 2002 CS question 1.1 (Matrix Algebra)</title><content type="html">&lt;blockquote&gt;1.1 The rank of the matrix &lt;table&gt;&lt;tr&gt;&lt;td&gt; 1 &lt;/td&gt; &lt;td&gt; 1&lt;/td&gt; &lt;/tr&gt;&lt;br /&gt;                                               &lt;tr&gt;&lt;td&gt; 0  &lt;/td&gt; &lt;td&gt; 0&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt; is:&lt;br /&gt;(a) 4         (b) 2        (c) 1        (d) 0&lt;br /&gt;&lt;/blockquote&gt;What's this 'rank' of a matrix? Well, it's the count of how many rows of the matrix can stand independently. What that means is: how many rows there are such that they cannot be formed just by multiplying other rows by something and adding them up.&lt;br /&gt;Here, it is obvious that the second row can be obtained by multiplying the first row by 0. So, the rank is 1.&lt;br /&gt;Another, maybe clearer, way to arrive at the same answer is: the row rank of any matrix (what we found above) is equal to its column rank. Here, we see that the two columns are equal. So, the second column is 'dependent' on the first column (or you may take it the reverse way). Either way, there's only one 'independent' column, hence the column rank is 1.&lt;br /&gt;Here the answer is &lt;span style="font-weight: bold;"&gt;(c) 1&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-7699361334678976338?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1Nt61LYGSWLM9U4Pa8t-Szcy6w0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1Nt61LYGSWLM9U4Pa8t-Szcy6w0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1Nt61LYGSWLM9U4Pa8t-Szcy6w0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1Nt61LYGSWLM9U4Pa8t-Szcy6w0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=hObeF_Y-AuE:x_2sHEnqrE8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=hObeF_Y-AuE:x_2sHEnqrE8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=hObeF_Y-AuE:x_2sHEnqrE8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=hObeF_Y-AuE:x_2sHEnqrE8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/7699361334678976338/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=7699361334678976338" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/7699361334678976338?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/7699361334678976338?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2009/03/gate-2002-cs-question-11.html" title="GATE 2002 CS question 1.1 (Matrix Algebra)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUNQHw4eSp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-2506498622964247932</id><published>2008-12-31T10:57:00.006+05:30</published><updated>2009-03-23T08:14:51.231+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:14:51.231+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="gate1998" /><category scheme="http://www.blogger.com/atom/ns#" term="dice" /><category scheme="http://www.blogger.com/atom/ns#" term="die" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2009" /><category scheme="http://www.blogger.com/atom/ns#" term="probability" /><category scheme="http://www.blogger.com/atom/ns#" term="gateindia" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><title>GATE 1998 CS question 1.1 (Probability)</title><content type="html">&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;1.1&lt;/span&gt;. A die is rolled three times. The probability that exactly one odd number turns up among the three outcomes is:&lt;br /&gt;(a) 1/6    (b) 3/8     (c) 1/8    (d) 1/2&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;h4&gt;Explanation (answer at the end):&lt;/h4&gt;Hah, probability!&lt;br /&gt;Ok, let that not deter you, this problem is quite easy.&lt;br /&gt;First of all, what are the numbers on a die? Ok, repeat after me, 1, 2, 3, 4, 5, and 6. :)&lt;br /&gt;How many is that? 6&lt;br /&gt;Now, how many of those are odd? 3&lt;br /&gt;So, when you roll a die once, what is the probability that you get an odd number? (getting one of 3 odd numbers/ getting any one of the 6 numbers on the die) = 3choose1 / 6choose1 = 1/2.&lt;br /&gt;Now, the die does not have any 'memory', so repeated rollings also have the same probability. So now, the probability that you get an odd num in the first rolling is 1/2, and the probability that you get an odd num in the second rolling is also 1/2.&lt;br /&gt;Combining the first and second rollings, the possible combinations are:&lt;br /&gt;(odd, even), (even, odd), (even, even), (odd, odd)&lt;br /&gt;Let's say you wanted it such that &lt;span style="font-style: italic;"&gt;both&lt;/span&gt; the first &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; the second rolling must give odd numbers.&lt;br /&gt;That is, you want the combination (odd, odd). Given that odd and even are equally probable, and the rollings of independent of each other, we can see that all the 4 combinations above must have equal probability i.e. 1/4. Therefore, the probability of getting (odd,odd) is 1/4.&lt;br /&gt;Now, extend this to 3 rollings. The combinations go like:&lt;br /&gt;(odd, odd, odd), (odd, odd, even), (odd, even, odd), ...&lt;br /&gt;There are 8 combinations like this (try and count if you don't believe me.. :) ). Using the same argument as above, all 8 are equally probable, so the probability of getting any of them is 1/8.&lt;br /&gt;&lt;del&gt;&lt;strike&gt;In particular, we want (odd, odd, odd), and the probability of getting that is also &lt;span style="font-weight: bold;"&gt;1/8&lt;/span&gt;.&lt;br /&gt;Answer: (c)&lt;/strike&gt;&lt;/del&gt;&lt;br /&gt;I probably got carried away explaining things and forgot the original question while writing that stroked out content. Sorry for the messup, and thanks to the anonymous commenter. &lt;br /&gt;What we actually want is cases where exactly one odd comes up among the rollings. This one odd can come in one of three places as in (odd, even, even), (even, odd, even), and (even, even, odd). So out of the possible 8 combinations, 3 are favourable to us. &lt;br /&gt;So the answer is &lt;span style="font-weight:bold;"&gt;(b) 3/8&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-2506498622964247932?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TK8JqJONa8RdNdDxxoD82lBMgJQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TK8JqJONa8RdNdDxxoD82lBMgJQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TK8JqJONa8RdNdDxxoD82lBMgJQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TK8JqJONa8RdNdDxxoD82lBMgJQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=jK-2hYjCTTQ:f3hVSrfy9vM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=jK-2hYjCTTQ:f3hVSrfy9vM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=jK-2hYjCTTQ:f3hVSrfy9vM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=jK-2hYjCTTQ:f3hVSrfy9vM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/2506498622964247932/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=2506498622964247932" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/2506498622964247932?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/2506498622964247932?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2008/12/gate-1998-cs-question-11.html" title="GATE 1998 CS question 1.1 (Probability)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;A0QARHgyfip7ImA9WxBTE0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-855830149300580261</id><published>2008-12-30T15:17:00.005+05:30</published><updated>2009-12-09T22:52:25.696+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-09T22:52:25.696+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="determinant" /><category scheme="http://www.blogger.com/atom/ns#" term="matrix algebra" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2009" /><category scheme="http://www.blogger.com/atom/ns#" term="gateindia" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><title>GATE 2000 CS question 1.3 (Matrix Algebra)</title><content type="html">&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;1.3&lt;/span&gt;. The determinant of the matrix:&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;8&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;1&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;7&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;9&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;6&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;1&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;is:&lt;br /&gt;
(a) 4    (b) 0     (c) 15    (d) 20&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;h4&gt;Explanation (answer at the end):&lt;/h4&gt;The method for finding the determinant of any nXn matrix is:&lt;br /&gt;
Multiply each element of a main row by the determinant of the matrix formed by removing its row and column from the original matrix.&lt;br /&gt;
Ok, that might not have been very clear. I'll explain...&lt;br /&gt;
Take one row or column as the 'main' row (or column) for calculation (from here on I'll call it the 'main row', though in some problems choosing a column might be better and so we must do that.)  For each element of the main row, find the (n-1)X(n-1) matrix formed by removing the row and column of the current element.&lt;br /&gt;
For example, let's choose the first row here. In it, the first element is 2. We now form a 3X3 matrix by removing the row and column in which 2 is present. So, we end up with:&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;7&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;6&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;1&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Now, we have to find the determinant of this matrix. The method is again the same, choose a row or column, find the smaller matrix. Now, since we're going to multiply, we can save ourselves some work if we find a row or column with many zeros, because multiplication by them is gonna give only 0's anyway, so we can avoid those calculations.&lt;br /&gt;
Here, the first column has all but one element as 0's. So, we choose that one.&lt;br /&gt;
The smaller matrix we get now is:&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;2&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;0&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;6&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;1&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
The value of this is, 2X1 - 0X6 = 2. Now, we must multiply this by the element of the 3X3 matrix we chose, which is 1. So, 2X1 gives 2 again. Since the other elements of the column are 0, our calculation for this 3X3 matrix ends here.&lt;br /&gt;
Now, we have to multiply this 3X3 matrix's determinant value by the element we chose in the original 4X4 matrix. We chose 2 once upon a time, remember?&lt;br /&gt;
So, the value now is: 2X2 = 4.&lt;br /&gt;
Now, in this case, we were just lucky, and the first row of the original matrix has 0's for all other elements. So, our calculations end here and the answer is &lt;span style="font-weight: bold;"&gt;4&lt;/span&gt;.&lt;br /&gt;
In general, an important rule for solving determinant problems is: &lt;span style="font-weight: bold;"&gt;choose the row or column that has the maximum number of 0's, in order to minimize calculations.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Answer: (a) 4&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-855830149300580261?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AM1bZIBY5H1DUNvwef_XNlWc--Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AM1bZIBY5H1DUNvwef_XNlWc--Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AM1bZIBY5H1DUNvwef_XNlWc--Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AM1bZIBY5H1DUNvwef_XNlWc--Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=T1MkOdL35U8:YtZn5yg5DS8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=T1MkOdL35U8:YtZn5yg5DS8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=T1MkOdL35U8:YtZn5yg5DS8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=T1MkOdL35U8:YtZn5yg5DS8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/855830149300580261/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=855830149300580261" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/855830149300580261?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/855830149300580261?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2008/12/gate-2000-cs-question-13.html" title="GATE 2000 CS question 1.3 (Matrix Algebra)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DEcHQnk-eip7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-730433628819666916</id><published>2008-12-30T14:06:00.007+05:30</published><updated>2009-03-23T08:10:33.752+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:10:33.752+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="microprocessor" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2009" /><category scheme="http://www.blogger.com/atom/ns#" term="gateindia" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><title>GATE 1995 CS question 1.1 (8085 Assembly)</title><content type="html">&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;1.1&lt;/span&gt;. A single instruction to clear the lower four bits of the accumulator in 8085 assembly language?&lt;br /&gt;(a) XRI FOH    (b) ANI FOH     (c) XRI FOH    (d) ANI OFH&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;h4&gt;Explanation (answer at the end):&lt;/h4&gt;Quite very very easy, if you know the functions of XRI and ANI.&lt;br /&gt;XRI stands for XOR Immediate. It tells the processor "I'll give you an operand immediately now, XOR it with the Accumulator and put the result in Accumulator itself".&lt;br /&gt;ANI is similar, it says: "I'll give you an operand immediately now, do an AND operation between it and the Accumulator and put the result in Accumulator itself".&lt;br /&gt;Here, we want to &lt;span style="font-style: italic;"&gt;clear &lt;/span&gt;some bits. Since XOR operation's output always depends on both the operands, it can't be the answer. So, we're left with (b) and (d).&lt;br /&gt;Now, in the AND operator, if one of the operands is a 1, the result is the value of the other operand.&lt;br /&gt;And if one of the operands is 0, the result is 0, whatever the value of the other operand.&lt;br /&gt;From this, we can see that in order to &lt;span style="font-style: italic;"&gt;clear&lt;/span&gt; some bits (i.e., set them to 0), we have to AND them with 0.&lt;br /&gt;In the question, they say 'lower four bits', which mean the bits to the right hand side (bits in the right hand side have less value, so are considered 'lower'.) So, in order to clear those bits, the 0's in the operand should also be in the right hand side.&lt;br /&gt;Hence, &lt;span style="font-weight: bold;"&gt;ANI FOH&lt;/span&gt; is the answer. Here, each hexadecimal digit corresponds to four bits, so the operand is actually 1111 0000 in binary. Because of this, the lower four bits get cleared.&lt;br /&gt;&lt;br /&gt;Answer: (b)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-730433628819666916?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4eCaOz8bza7fiKUWR4A9-baS-Zs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4eCaOz8bza7fiKUWR4A9-baS-Zs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4eCaOz8bza7fiKUWR4A9-baS-Zs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4eCaOz8bza7fiKUWR4A9-baS-Zs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=S7zLILAOU28:S8TPoWcyCGo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=S7zLILAOU28:S8TPoWcyCGo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=S7zLILAOU28:S8TPoWcyCGo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=S7zLILAOU28:S8TPoWcyCGo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/730433628819666916/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=730433628819666916" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/730433628819666916?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/730433628819666916?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2008/12/gate-1995-question-11.html" title="GATE 1995 CS question 1.1 (8085 Assembly)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEMBQnw-cSp7ImA9WxVUF0o.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-4102746830109744217</id><published>2008-12-26T09:58:00.007+05:30</published><updated>2009-03-23T08:17:33.259+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-23T08:17:33.259+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="puzzle" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2009" /><category scheme="http://www.blogger.com/atom/ns#" term="cards" /><category scheme="http://www.blogger.com/atom/ns#" term="gateindia" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><category scheme="http://www.blogger.com/atom/ns#" term="suites" /><category scheme="http://www.blogger.com/atom/ns#" term="logic" /><title>GATE 2000 CS question 1.1 (Probability)</title><content type="html">&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;1.1&lt;/span&gt;. The mininum number of cards to be dealt from an arbitrarily shuffled deck of 52 cards, to guarantee that three cards are from some same suite is:&lt;br /&gt;(a) 3    (b) 8    (c) 9    (d) 12&lt;/blockquote&gt;&lt;h4&gt;Explanation (answer at the end):&lt;/h4&gt;This is a standard cards problem, and the solution is quite easy. First of all, there are 4 suites in a deck of cards (usually called Spades, Clubs, Hearts and Diamonds, though &lt;a href="http://en.wikipedia.org/wiki/Suit_%28cards%29#Traditional_Western_playing_cards"&gt;several other names &lt;/a&gt;also have been given to them). Each suite has 13 cards in it.&lt;br /&gt;&lt;br /&gt;We want a guarantee that three cards from the same suite come to us, we shall assume the worst case and ensure 3 cards of same suite occur even in that case.&lt;br /&gt;&lt;br /&gt;The worst case here is that, as we pick cards, each card is of a different type. In that case, with the first 4 picks, we'd have taken one card of each suite. With the next 4 cards, we'd have 2 cards of each suite. Now, if we pick another card, whatever suite it may be, we have 2 other cards of that suite already. So, we now have 3 cards of the same suite, which was our objective!!&lt;br /&gt;&lt;br /&gt;So, from the above, it's clear that to &lt;span style="font-weight: bold;"&gt;guarantee that three cards are from some same suite, &lt;/span&gt;we have to pick &lt;span style="font-weight: bold;"&gt;9 cards &lt;/span&gt;from the deck.&lt;br /&gt;&lt;br /&gt;Answer: (c)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-4102746830109744217?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gZVeoVGwv0PQ50ju--jMLidDvgA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gZVeoVGwv0PQ50ju--jMLidDvgA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gZVeoVGwv0PQ50ju--jMLidDvgA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gZVeoVGwv0PQ50ju--jMLidDvgA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=bKmtd7XaXX0:yoPaK5cTjGs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=bKmtd7XaXX0:yoPaK5cTjGs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=bKmtd7XaXX0:yoPaK5cTjGs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=bKmtd7XaXX0:yoPaK5cTjGs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/4102746830109744217/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=4102746830109744217" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/4102746830109744217?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/4102746830109744217?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2008/12/gate-2000-cs-question-11.html" title="GATE 2000 CS question 1.1 (Probability)" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkIDR3s-fip7ImA9WxBQFUs.&quot;"><id>tag:blogger.com,1999:blog-2549376508784606135.post-4845858915241783001</id><published>2008-12-04T18:29:00.003+05:30</published><updated>2010-01-15T20:46:16.556+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-15T20:46:16.556+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="resources" /><category scheme="http://www.blogger.com/atom/ns#" term="algorithms" /><category scheme="http://www.blogger.com/atom/ns#" term="gate2009" /><category scheme="http://www.blogger.com/atom/ns#" term="gateindia" /><category scheme="http://www.blogger.com/atom/ns#" term="cs" /><category scheme="http://www.blogger.com/atom/ns#" term="gate" /><category scheme="http://www.blogger.com/atom/ns#" term="compsci" /><title>Previous year GATE paper and GATE resources</title><content type="html">I'm a student preparing for the GATE 2009 exam. I'm taking the exam in the CS stream, and I thought it would benefit a lot of people if I shared what I learn with everyone. So, as and when I learn things, solve new problems, find new ways to do things, I'll share it with you.&lt;br /&gt;
&lt;br /&gt;
There are a lot of excellent resources on the net for preparing for the GATE exam, especially if you are preparing for the exam in CS (Computer Science).&lt;br /&gt;
&lt;br /&gt;
I've found a few, and thought of sharing them with you:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Previous years' GATE question papers (papers for all streams are available for download here):&lt;br /&gt;
&lt;a href="http://www.gateforum.com/gate_papers.php"&gt;http://www.gateforum.com/gate_papers.php&lt;/a&gt;&lt;br /&gt;
For each year, right click on the Open link near CS, and choose 'Save page as...' to save the pdf which contains the question paper.&lt;/li&gt;
&lt;li&gt;A LOT of resources for preparing for GATE in the CS stream. The page says resources for CS, EE, etc., but atleast 75% are for the computer science stream: &lt;br /&gt;
&lt;a href="http://www.gateforum.com/resources.html"&gt;http://www.gateforum.com/resources.html&lt;/a&gt; (UPDATE: This page unfortunately seems to have vanished now, kindly comment if you know its current location)&lt;br /&gt;
&lt;br /&gt;
There are subjectwise  links at the beginning, but very useful links are present far below these in the 'Downloads Section'. For example, there is a &lt;a href="http://gatementor.com/resources/csformulae.pdf"&gt;Formulae quick reference&lt;/a&gt; that lists almost all formulae you might need for GATE problems.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="http://video.google.com/videoplay?docid=-2333306016564732003&amp;amp;hl=en"&gt;MIT's Introduction to algorithm lecture videos&lt;/a&gt;. These give an excellent preparation for the algorithm sections.&lt;/li&gt;
&lt;li&gt;A student who listened to the above lectures has put up a blog explaining some of the material and given out his notes. An excellent supplement to the videos (and those who cannot access the videos due to slow connections can get atleast part of the benefit from reading these).&lt;br /&gt;
&lt;a href="http://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one/"&gt;http://www.catonmat.net/blog/mit-introduction-to-algorithms-part-one/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;I'll keep posting more resources as and when I find them.&lt;br /&gt;
Keep in touch. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2549376508784606135-4845858915241783001?l=gatesolutions.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/z822R-9y59ZZPNdX4DvKxVzoxQc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z822R-9y59ZZPNdX4DvKxVzoxQc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/z822R-9y59ZZPNdX4DvKxVzoxQc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z822R-9y59ZZPNdX4DvKxVzoxQc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=sScWggdBuI4:gQTk156t288:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=sScWggdBuI4:gQTk156t288:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/GateIndiacs?a=sScWggdBuI4:gQTk156t288:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/GateIndiacs?i=sScWggdBuI4:gQTk156t288:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://gatesolutions.blogspot.com/feeds/4845858915241783001/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2549376508784606135&amp;postID=4845858915241783001" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/4845858915241783001?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2549376508784606135/posts/default/4845858915241783001?v=2" /><link rel="alternate" type="text/html" href="http://gatesolutions.blogspot.com/2008/12/previous-year-gate-paper-and-gate.html" title="Previous year GATE paper and GATE resources" /><author><name>Sundar</name><uri>http://www.blogger.com/profile/00415039983973239001</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_pTfAhByxcnA/SezTHrIw8JI/AAAAAAAAAOk/UFcT30vLq9M/S220/xkcd+profile.png" /></author><thr:total>0</thr:total></entry></feed>

