GATE 2007
184 questions
MCQ 1841-mark 184
Questions 171–175 of 184
Which one of the following uses UDP as the transport protocol?
Answer: (C)
DNS uses UDP (port 53) for its normal queries and replies. A query and its answer are each one small message, so UDP's low overhead (no connection set-up) suits it. TCP is used for DNS only for large replies and zone transfers.
HTTP, Telnet and SMTP need reliable, ordered delivery of a byte stream, so they run over TCP.
Answer: (C)
HTTP, Telnet and SMTP need reliable, ordered delivery of a byte stream, so they run over TCP.
Answer: (C)
You are given the following four bytes :
Which of the following are substrings of the base 64 encoding of the above four bytes?
Which of the following are substrings of the base 64 encoding of the above four bytes?
Answer: (B)
Write all 32 bits and cut them into groups of 6 bits. The last group has only 2 bits, so pad it with four 0 bits:
These are the values 40, 51, 31, 41, 42, 48. In the base 64 table (A to Z is 0 to 25, a to z is 26 to 51) they are:
Since the 4 bytes do not fill a whole number of 3-byte groups, the encoding ends with the padding , so the full string is .
Now check the options: zdp is not in it. fpq is (letters 3 to 5). qwA is not, because after qw comes = and not A. oze is not, because o and z are followed by f.
Answer: (B)
These are the values 40, 51, 31, 41, 42, 48. In the base 64 table (A to Z is 0 to 25, a to z is 26 to 51) they are:
Since the 4 bytes do not fill a whole number of 3-byte groups, the encoding ends with the padding , so the full string is .
Now check the options: zdp is not in it. fpq is (letters 3 to 5). qwA is not, because after qw comes = and not A. oze is not, because o and z are followed by f.
Answer: (B)
A firewall is to be configured to allow hosts in a private network to freely open TCP connections and send packets on open connections. However, it will only allow external hosts to send packets on existing open TCP connections or connections that are being opened (by internal hosts) but not allow them to open TCP connections to hosts in the private network. To achieve this the minimum capability of the firewall should be that of
Answer: (D)
(A) A combinational circuit has no memory, but the firewall must remember which connections are open. So it fails.
(B) A finite automaton has only a fixed number of states, but the number of open connections has no upper limit. So it fails.
(C) A pushdown automaton with one stack has unbounded memory, but it can read only the top of the stack. To look at a connection stored lower down, it must pop the ones above, and popping destroys that information, because it has no other unbounded place to keep it. So it cannot check an arbitrary connection when a packet arrives.
(D) With two stacks, the popped items can be pushed on the second stack and put back later, so any stored connection can be reached without losing the rest. A two-stack pushdown automaton is as powerful as a Turing machine, so it can do the job.
Answer: (D)
(B) A finite automaton has only a fixed number of states, but the number of open connections has no upper limit. So it fails.
(C) A pushdown automaton with one stack has unbounded memory, but it can read only the top of the stack. To look at a connection stored lower down, it must pop the ones above, and popping destroys that information, because it has no other unbounded place to keep it. So it cannot check an arbitrary connection when a packet arrives.
(D) With two stacks, the popped items can be pushed on the second stack and put back later, so any stored connection can be reached without losing the rest. A two-stack pushdown automaton is as powerful as a Turing machine, so it can do the job.
Answer: (D)
The minimum positive integer p such that is
Answer: (D)
We need the smallest with .
Since 17 is prime and 17 does not divide 3, Fermat's little theorem gives . So the smallest such divides 16, and it can only be 1, 2, 4, 8 or 16.
Compute by repeated squaring:
None of 1, 2, 4, 8 gives 1. In particular , so option (B) 8 fails. Options (A) 5 and (C) 12 do not divide 16, so they cannot be the smallest power either.
So the smallest is 16.
Answer: (D)
Since 17 is prime and 17 does not divide 3, Fermat's little theorem gives . So the smallest such divides 16, and it can only be 1, 2, 4, 8 or 16.
Compute by repeated squaring:
None of 1, 2, 4, 8 gives 1. In particular , so option (B) 8 fails. Options (A) 5 and (C) 12 do not divide 16, so they cannot be the smallest power either.
So the smallest is 16.
Answer: (D)
Consider the following two statements:
i.A hash function (these are often used for computing digital signatures) is an injective function.
ii. An encryption technique such as DES performs a permutation on the elements of its input alphabet.
Which one of the following options is valid for the above two statements?
i.A hash function (these are often used for computing digital signatures) is an injective function.
ii. An encryption technique such as DES performs a permutation on the elements of its input alphabet.
Which one of the following options is valid for the above two statements?
Answer: (C)
Statement (i) is false. A hash function maps a message of any length to a fixed-length value, so many different messages must give the same hash. It is many-to-one, not injective.
Statement (ii) is true. DES must be reversible, so that decryption can recover the plain text. For a fixed key, it maps each 64-bit input block to a different 64-bit output block, so it is a bijection, that is, a permutation of the set of 64-bit blocks.
So only (ii) is true.
Answer: (C)
Statement (ii) is true. DES must be reversible, so that decryption can recover the plain text. For a fixed key, it maps each 64-bit input block to a different 64-bit output block, so it is a bijection, that is, a permutation of the set of 64-bit blocks.
So only (ii) is true.
Answer: (C)