# Computer Science Engineering (Test 1)

## Tancet Anna University : Cse, It Computer Science Engineering And Information Technology

| Home | | Tancet Anna University | | Cse, It Computer Science Engineering And Information Technology | | Computer Science Engineering |

Computer Science Engineering
| Digital Logic | | Computer Organization and Architecture | | Programming and Data Structures | | Algorithms | | Theory of Computation | | Compiler Design | | Operating System | | Databases | | Computer Networks |
Q.1
Given the following state table of an FSM with two states A and B, one input and one output:

If the initial state is A = 0, B = 0, what is the minimum length of an input string which will take the machine to the state A = 0, B = 1 with Output = 1?
A. 3
B. 4
C. 5
D. 6
Explaination / Solution:
No Explaination.

Workspace
Report
Q.2
The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are
A. TCP, UDP, UDP and TCP
B. UDP, TCP, TCP and UDP
C. UDP, TCP, UDP and TCP
D. TCP, UDP, TCP and UDP
Explaination / Solution:

Real time multimedia needs connectionless service, so under lying transport layer protocol used is UDP File transfer rums over TCP protocol with port no-21 DNS runs over UDP protocol within port no-53 Email needs SMTP protocol which runs over TCP protocol within port no – 25

Workspace
Report
Q.3
Which one of the following hash functions on integers will distribute keys most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to 2020?
A. h(i) = i2 mod 10
B. h(i) = i3 mod 10
C. h(i) = (11*i2) mod 10
D. h(i) = (12*i) mod 10
Explaination / Solution:

If we take first 10 elements, number of collisions taken by the hash function given by option (B) is less when compared to others.

Workspace
Report
Q.4
Which one of the following is not a client server application?
A. Internet chat
B. Web browsing
C. E-mail
D. Ping
Explaination / Solution:
No Explaination.

Workspace
Report
Topic: Databases Tag: CS GATE 2009
Q.5
Consider the following relational schema: Suppliers (sid:integer, sname: string, city:string, street: string) Parts (pid:integer, pname: string, color:string) Catalog (sid:integer, pid:integer, cost: real)
Consider the following relational query on the above database:
SELECT S.sname
FROM Suppliers S
WHERE S.sid NOT IN (SELECT C. sid
FROM Catalog C
WHERE C.pid NOT IN (SELECT P.pid
FROM Parts P
WHERE P.color<> ‘blue’))
Assume that relations corresponding to the above schema are not empty. Which one of the following is the correct interpretation of the above query?
A. Find the names of all suppliers who have supplied a non-blue part
B. Find the names of all suppliers who have not supplied a non-blue part
C. Find the names of all suppliers who have supplied only blue parts
D. Find the names of all suppliers who have not supplied only blue part
Explaination / Solution:
No Explaination.

Workspace
Report
Topic: Databases Tag: CS GATE 2012
Q.6
Suppose R1  are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constrains, which of the following is ALWAYS TRUE?
A. ΠB(r1) − ΠC (r2) =∅
B. ΠC (r2 ) − ΠB (r1) =∅
C. ΠB (r1) = ΠC (r2)
D. ΠB (r1) − ΠC (r2) ≠∅
Explaination / Solution:
No Explaination.

Workspace
Report
Q.7
What is the optimized version of the relation algebra expression  where A1, A2 are sets of attributes in with A⊂ Aand F1, F2 are Boolean expressions based on
A.
B.
C.
D.
Explaination / Solution:
No Explaination.

Workspace
Report
Q.8
A database of research articles in a journal uses the following schema. (VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, YEAR, PRICE)
The primary key is (VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional dependencies exist in the schema.
(VOLUME, NUMBER, STARTPAGE, ENDPAGE)  → TITLE
(VOLUME, NUMBER                                              → YEAR
(VOLUME, NUMBER, STARTPAGE, ENDPAGE)  → PRICE
The database is redesigned to use the following schemas.
(VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, PRICE) (VOLUME, NUMBER, YEAR)
Which is the weakest normal form that the new database satisfies, but the old one does not?
A. 1NF
B. 2NF
C. 3NF
D. BCNF
Explaination / Solution:

candidate key is (volume, number, start page, end page) (Volume number) → year is a partial dependency. So original table is in 1NF but not in 2NF

Workspace
Report
Q.9
Which one of the following is TRUE for any simple connected undirected graph with more than 2 vertices?
A. No two vertices have the same degree
B. At least two vertices have the same degree
C. At least three vertices have the same degree
D. All vertices have the same degree
Explaination / Solution:
No Explaination.

Workspace
Report
Q.10
Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 106 memory accesses, what is the effective access time for the memory?
A. 21ns
B. 30ns
C. 23ns
D. 35ns