- A point P(2, 5) is rotated about a pivot point (1, 2) by 60°. What is the new transformed point P’?
(A) (1, 4) (B) (–1, 4)
(C) (1, – 4) (D) (– 4, 1)
Answer: B
Explanation:
- In perspective projection (from 3D to 2D), objects behind the centre of projection are projected upside down and backward onto the view-plane. This is known as …………..
(A) Topological distortion (B) Vanishing point
(C) View confusion (D) Perspective foreshortening
Answer: C
Explanation:
vanishing point: a vanishing point only represents a direction an object points away from us. everything going in the same direction will converge to the same direction point
View confusion: projects behind the center of projection are projected upside down and backward onto the view plane.
Perspective foreshortening: An object is from the center of projection, the smaller it appears.
the point of the plane that is parrallel to the view plane and also passes through the center of projection are projected ti infinity by the perspective projection:
- The Liang-Barsky line clipping algorithm uses the parametric equation of a line from (x1,y1) to (x2,y2) along with its infinite extension which is given as :
x = x1 + Dx.u
y = y1 + Dy.u
Where Dx = x2 – x1, Dy = y2 – y1, and u is the parameter with 0 ≤ u ≤ 1. A line AB with end points A(–1, 7) and B(11, 1) is to be clipped against a rectangular window with xmin=1, xmax=9, ymin=2, and ymax=8. The lower and upper bound values of the parameter u for the clipped line using Liang-Barsky algorithm is given as:
(A) (0, 2/3) (B) (1/6, 5/6)
(C) (0, 1/3) (D) (0, 1)
Answer: B
- Match the following with reference to Functional programming history:
A Lambda calculus i. Church, 1932 B Lambda calculus as programming language ii. Wordsworth, 1970 C Lazy evaluation iii. Haskel, 1990 D Type classes iv. Mecarthy, 1960
Codes :
a b c d
(A) iv i iii ii
(B) i iv ii iii
(C) iii ii iv i
(D) ii i iv iii
Answer: B
Explanation:
Lambda calculi (λ-calculi) are formal systems describing functions and function application. One of them, the un typed version, is often referred to as the λ-calculus. This exposition will adopt this convention. At its core, the λ-calculus is a formal language with certain reduction rules intended to capture the notion of function application Church, 1932
In 1960 John McCarthy, a computer scientist at the Massachusetts Institute of Technology (MIT), combined elements of IPL with the lambda calculus (a formal mathematical-logical system) to produce the programming language LISP
Lazy evaluation is the technique of not evaluating an expression unless and until the result of the expression is required. The &&, || and ?: operators are the conventional way to do lazy evaluation:
void test(int* p)
{
if (p && p[0])
...
}
The second expression p[0] is not evaluated unless p is not null. If the second expression was not lazily evaluated, it would generate a runtime fault if p was null.
Type Classes: They allow us to declare which types are instances of which class, and to provide definitions of the overloaded operations associated with a class. For example, let’s define a type class containing an equality operator:
class Eq a where
(==) :: a -> a -> Bool
Here Eq is the name of the class being defined, and == is the single operation in the class. This declaration may be read “a type a is an instance of the class Eq if there is an (overloaded) operation ==, of the appropriate type, defined on it.” (Note that == is only defined on pairs of objects of the same type.)
- Aliasing in the context of programming languages refers to:
(A) Multiple variables having the same location
(B) Multiple variables having the same identifier
(C) Multiple variables having the same value
(D) Multiple use of same variable
Answer: A
Explanation:
It is a process by which smooth curves and other lines become jagged because the resolution of the graphics device or file is not high enough to represent a smooth curve. Smoothing and antialiasing techniques can reduce the effect of aliasing.
Aliasing in the context of programming languages refers to Multiple variables having the same location
- Assume that the program ‘P’ is implementing parameter passing with ‘call by reference’. What will be printed by following print statements in P?
Program P()
{
x = 10;
y = 3;
funb (y, x, x)
print x;
print y;
}
funb (x, y, z)
{
y = y + 4;
z = x + y + z;
}
(A) 10, 7 (B) 31, 3
(C) 10, 3 (D) 31, 7
Answer: B
Explanation:
Inside funb(), x will actually refer to y of main(); and y and z will refer to x of main(). The Statement y = y + 4; will result in 14 and statement z = x + y + z will make z = 3 + 14 + 14 = 31 (because y and z point to same variable x of main). Since z refers to x of main(), main will print 31.
- The regular grammar for the language L = {anbm | n + m is even} is given by
(A) S → S1 | S2
S1 → a S1 | A1
A1 → b A1 | λ
S2 → aaS2 | A2
A2 → b A2 | λ
(B) S → S1 | S2
S1 → a S1 | a A1
S2 → aa S2 | A2
A1 → bA1 | λ
A2 → bA2 | λ
(C) S → S1 | S2
S1 → aaa S1 | aA1
S2 → aaS2 | A2
A1 → bA1 | λ
A2 → bA2 | λ
(D) S → S1 | S2
S1 → aa S1 | A1
S2 → aaS2 | aA2
A1 → bbA1 | λ
A2 → bbA2 | b
Answer: D
Explanation:
A) S – -> aSb – -> aS1b –> ab //n=m=1 not even ;
B) S –> aaS –> aaS1 –> aabSb–>aabaaSb –>aabaab // not in a n b m format
C) S – -> aSb – -> aS1b –> ab //n=m=1 not even
D) always make strings in a n b m format ; such that n and m are even
- Let Σ = {a, b} and language L = {aa, bb}. Then, the complement of L is
(A) {λ, a, b, ab, ba} È {w ϵ {a, b}* | |w| > 3}
(B) {a, b, ab, ba} È {w ϵ {a, b}* | |w| ≥ 3}
(C) {w ϵ { a, b}* | |w| > 3} È {a, b, ab, ba}
(D) {λ, a, b, ab, ba} È {w ϵ {a, b}* | |w| ≥ 3}
Answer: D
Explanation:
Σ = {a, b} and language L = {aa, bb}. (given)
complement of L is Σ* – L
so, option D is the answer
- Consider the following identities for regular expressions :
(a) (r + s)* = (s + r)*
(b) (r*)* = r*
(c) (r* s*)* = (r + s)*
Which of the above identities are true ?
(A) (a) and (b) only (B) (b) and (c) only
(C) (c) and (a) only (D) (a), (b) and (c)
Answer: D
Explanation:
These are following identities for regular expressions :
1) R*R* = R*
2) (R*)* = R*
3) RR* = R*R
4)(PQ)*P =P(QP)*
3) (a+b)* = (a*b*)* = (a*+b*)* = (a+b*)* = a*(ba*)*
example simplify ((a*b*)* (b*a*)*)*
= ((a+b)*(b+a)*)*
= ((a+b)*(a+b)*)* //set union is commutative that is a+b = b+a
= (a+b)* //using above 1) and 2)
6) ∅ + R = R
7) Rε = R
Operators used in regular expressions include:
- Union: If R1 and R2 are regular expressions, then R1 | R2 (also written as R1 U R2 or R1 + R2) is also a regular expression.L(R1|R2) = L(R1) U L(R2).
- Concatenation: If R1 and R2 are regular expressions, then R1R2 (also written as R1.R2) is also a regular expression.L(R1R2) = L(R1) concatenated with L(R2).
- Kleene closure: If R1 is a regular expression, then R1* (the Kleene closure of R1) is also a regular expression.L(R1*) = epsilon U L(R1) U L(R1R1) U L(R1R1R1) U …
- Suppose transmission rate of a channel is 32 kbps. If there are ‘8’ routes from source to destination and each packet p contains 8000 bits. Total end to end delay in sending packet P is …………….
(A) 2 sec (B) 3 sec
(C) 4 sec (D) 1 sec
Answer: A
- Consider the following statements : A . High speed Ethernet works on optic fiber. B. A point to point protocol over Ethernet is a network protocol for encapsulating PPP frames inside Ethernet frames. C. High speed Ethernet does not work on optic fiber. D. A point to point protocol over Ethernet is a network protocol for encapsulating Ethernet frames inside PPP frames.
Which of the following is correct ?
(A) a and b are true; c and d are false.
(B) a and b are false; c and d are true.
(C) a, b, c and d are true.
(D) a, b, c and d are false.
Answer: A
EXPLANATION:
Ethernet is the most widely installed local area network (LAN) technology. Ethernet is a link layer protocol in the TCP/IP stack, describing how networked devices can format data for transmission to other network devices on the same network segment, and how to put that data out on the network connection. It works on optic fiber.
It is a point to point protocol over Ethernet is a network protocol for encapsulating PPP frames inside Ethernet frames.
- In CRC checksum method, assume that given frame for transmission is 1101011011 and the generator polynomial is G(x) = x4 + x + 1.
After implementing CRC encoder, the encoded word sent from sender side is ………….
(A) 11010110111110
(B) 11101101011011
(C) 110101111100111
(D) 110101111001111
Answer: A
Explanation:
frame : 1101011011
generator: 10011( x4 + x + 1)
Transmit: 11010110111110
- A slotted ALOHA network transmits 200 bits frames using a shared channel with 200 kbps bandwidth. If the system (all stations put together) produces 1000 frames per second, then the throughput of the system is ……………..
(A) 0.268 (B) 0.468
(C) 0.368 (D) 0.568
Answer: C
Explanation:
It is proven that:
the throughput for slotted is S = G * e ^-G
max. throughput is 0.368 when G = 1
ref: forouzan ( book name : data communication and networking)
- An analog signal has a bit rate of 8000 bps and a baud rate of 1000.
Then analog signal has ………….. signal elements and carry ………… data elements in each signal.
(A) 256, 8 bits (B) 128, 4 bits
(C) 256, 4 bits (D) 128, 8 bits
Answer: A
EXPLANATION:
- The plain text message BAHI encrypted with RSA algorithm using e=3, d=7 and n=33 and the characters of the message are encoded using the values 00 to 25 for letters A to Z. Suppose character by character encryption was implemented. Then, the Cipher Text message is …………
(A) ABHI (B) HAQC
(C) IHBA (D) BHQC
Answer: B
Explanation:
click here for explanation for this answer in video
VIDEO LECTURE ON RSA ALGORITHM EXPLANATION