# June 2014 Paper 3 (Page 1 of 2)

1. Beam-penetration and shadow-mask are the two basic techniques for producing color displays with a CRT. Which of the following is not true ?
I. The beam-penetration is used with random scan monitors.

(A) I and II (B) II and III
(C) III only (D) IV only

Explanation:
There are two ways to display an object on the screen: Raster Scan and Random Scan.
Raster Scan: The electron beam from the electron gun is bombarded on the screen from left to right irrespective of the existence of a part of an image at a particular spot.
Random Scan: The electron beam is casted on that portion only where there is a need for illumination instead of scanning the whole line unnecessarily. Courtesy: https://kamaleclass.wordpress.com/2014/01/16/color-crt-monitors/

2. Line caps are used for adjusting the shape of the line ends to give them a better appearance. Various kinds of line caps used are
(A) Butt cap and sharp cap
(B) Butt cap and round cap
(C) Butt cap, sharp cap and round cap
(D) Butt cap, round cap and projecting square cap

Explanation:
No explanation.

3. Given below are certain output primitives and their associated attributes. Match each primitive with its corresponding attributes :
List – I List – II
a. Line i. Type, Size, Color
b. Fill Area ii. Color, Size, Font
c. Text iii. Style, Color, Pattern
d. Marker iv. Type, Width, Color
Codes :
a b c d
(A) i ii iii iv
(B) ii i iii iv
(C) iv iii ii i
(D) iii i iv ii

Explanation:
No explanation.

4. Consider a window bounded by the lines : x = 0; y= 0; x = 5 and y = 3. The line segment joining (–1, 0) and (4, 5), if clipped against this window will connect the points
(A) (0, 1) and (2, 3)
(B) (0, 1) and (3, 3)
(C) (0, 1) and (4, 3)
(D) (0, 1) and (3, 2)

Explanation:
This problem can be solved using Cohen-Sutherland algorithm. The figure is drawn below according to the given data. The algorithm:
A pair of the binary codes of the two end points of a line will determine one of the following cases:
1: Bitwise ORed yields 0000 i.e., both the codes when 0000s, create this ensuring both the end points are lying inside the window, so no clipping is required – Trivially Accepted
2: Bitwise ANDed yields Non 0000 i.e., 1 in the same bit position of the pair of codes creates this ensuring that the whole line is lying outside the window – Trivially Rejected
3: Bitwise ANDed yields 0000 – Clipping to be done

We have the line from p1 to p2 that intersects the window at p1’(0,y1’) and p2’(x2’,3).
The point p1 is on the border of the two region codes 0101 and 0001 according to TBRL format, so any one of them may be considered. The point p2 lies in the region 1000. When these region codes are logically ANDed, they yield all 0s. Now there may arise any one of the two situations:
1. The line partially touches the window
2. The line does not touch the window at all
Let us find out the co-ordinates of the points p1’ and p2’.
The slope of the line is .

In the line section p1p1′, Therefore, y1’=1 that is between 0 and 3. This signifies that p1’(0,1) cuts the window .
In the line section p2p2′, Therefore, x2’=2 that is between 0 and 5. This signifies that p2’(2,3) cuts the window .

5. Which of the following color models are defined with three primary colors ?
(A) RGB and HSV color models
(B) CMY and HSV color models
(C) HSV and HSL color models
(D) RGB and CMY color models

Explanation:
RGB: Red, Green, Blue
CMY: Cyan, Magenta, Yellow, Black
HSV: Hue, Saturation, Value (also known as HSB: Hue, Saturation, Brightness)
HSL: Hue, Saturation, Lightness/Luminance
Brightness means the brightness of white while lightness means lighness of medium gray.

6. In a digital transmission, the receiver clock is 0.1 percent faster than the sender clock. How many extra bits per second does the receiver receive if the data rate is 1 Mbps ?
(A) 10 bps (B) 100 bps
(C) 1000 bps (D) 10000 bps

Explanation:
0.1% faster means per 1000 bits transmitted, 1 bit extra can be received by the receiver.
Now 1 Mbps = 1,000,000 bps.
So, to transmit 1 Mbps data, the number of extra bits will be 1000000/1000 = 1000 bits.

7. Given U = {1, 2, 3, 4, 5, 6, 7} A = {(3, 0.7), (5, 1), (6, 0.8)}, then A~ will be : (where ~ ® complement)
(A) {(4, 0.7), (2, 1), (1, 0.8)}
(B) {(4, 0.3), (5, 0), (6, 0.2) }
(C) {(1, 1), (2, 1), (3, 0.3), (4, 1), (6, 0.2), (7, 1)}
(D) {(3, 0.3), (6.0.2)}

Explanation:
µA'(x) = c(µA(x)) = 1- µA(x) for all x ∈U.
The given set A will be seen as A = {(1,0), (2,0), (3, 0.7), (4,0), (5, 1), (6, 0.8), (7,0)}.
So, the compelment of A will be {(1,1), (2,1), (3, 0.3), (4,1), (6, 0.2), (7,1)}.
Please note that the entry for the element 5 is excluded since the membership of its complement is 0.

8. Consider a fuzzy set old as defined below
Old = {(20, 0.1), (30, 0.2), (40, 0.4), (50, 0.6), (60, 0.8), (70, 1), (80, 1)}
Then the alpha-cut for alpha = 0.4 for the set old will be
(A) {(40, 0.4)}
(B) {50, 60, 70, 80}
(C) {(20, 0.1), (30, 0.2)}
(D) {(20, 0), (30, 0), (40, 1), (50, 1), (60, 1), (70, 1), (80, 1)}

Explanation:
An α-cut (or α-level set) of a fuzzy set A is a crisp set Aα that contains all the elements of the universal set U that have a membership grade in A greater than or equal to α.
A α={x ∈ U | µA(x) ≥ α}, α ∈ (0,1].
If A α = {x ∈ U | µA(x) > α} then Aα is called a strong α-cut.
The set of all levels α ∈ (0,1] that represents distinct α-cuts of a given fuzzy set A is called a level set of A.
ΛA ={α | µA(x) = α, for some x ∈ U}.

9. Perceptron learning, Delta learning and LMS learning are learning methods which falls under the category of
(A) Error correction learning – learning with a teacher
(B) Reinforcement learning – learning with a critic
(C) Hebbian learning
(D) Competitive learning – learning without a teacher

Explanation:
Hebb learning: The Hebb learning is based on the premise that if two neurons were active simultaneously, then the strength of the connection between them should be increased. This was later extended to include increasing the weights when two neurons simultaneously disagreed too.
Perceptron learning rule: The perceptron is also called the Rosenblatt neuron. This is considered to be more powerful than Hebb training. One can show that the perceptron weights will converge if a solution exists. Perceptrons use a threshold output function. The updates occur only when there is an error.
Widrow-Hoff Learning Rule: Also known as the LMS, Delta or batch learning rule. The delta rule adjusts the weights to reduce the difference between s to the output unit and the desired output. This results in the smallest mean square error. This improvement ensures that the training gives you a more generalized system (inputs which are similar but not exact to the training vectors).

10. Code blocks allow many algorithms to be implemented with the following parameters :
(A) clarity, elegance, performance
(B) clarity, elegance, efficiency
(C) elegance, performance, execution
(D) execution, clarity, performance

A code block is a logically connected group of program statements that is treated as a unit. In C, a code block can be created by placing a sequence of statements between opening and closing curly braces. Consider the following example:

if (x < 10)
{
printf ( “x is less than 10”);
x=15;
}

The two statements after the if and between the curly braces are both executed if x is less than 10. These two statements together with the braces represent a code block. They are a logical unit: one of the statements cannot execute without the other executing also. Code blocks allow many algorithms to be implemented with clarity, elegance, and efficiency. Moreover, they help the programmer better conceptualize the true nature of the algorithm being implemented.

11. Match the following with respect to the jump statements :
List – I List – II
a. return i. The conditional test and increment portions
b. goto ii. A value associated with it
c. break iii. Requires a label for operation
d. continue iv. An exit from only the innermost loop
Codes :
a b c d
(A) ii iii iv i
(B) iii iv i ii
(C) iv iii ii i
(D) iv iii i ii

Explanation:
(a) return: Returns the content of a variable after completion of the function body.
(b) goto: The control jumps from one statement to another by following the label.
(c) break: Stops looping where the break statement appears.
(d) continue: Increments the loop controlling variable without executing the body of the loop.

12. The control string in C++ consists of three important classifications of characters
(A) Escape sequence characters, Format specifiers and Whitespace characters
(B) Special characters, White-space characters and Non-white space characters
(C) Format specifiers, White-space characters and Non-white space characters
(D) Special characters, White-space characters and Format specifiers

Explanation:
No explanation.

13. Match the following with respect to I/O classes in object oriented programming :
List – I List – II
a. fopen() i. returns end of file
b. fclose() ii. return for any problem report
c. ferror() iii. returns 0
d. feof() iv. returns a file pointer
Codes :
a b c d
(A) iv i ii iii
(B) iii i iv ii
(C) ii iii iv i
(D) iv iii i ii

Explanation:
fopen():
(i) Creates a new file
(ii) Opens an existing file
Syntax:
FILE *fp;
fp = fopen(“<file_name>”,”<mode>”);
Here the variable fp is a pointer of the data type FILE, file_name is the name of the file to be opened and mode can be any one of the following:
r – Opens the file for reading only
w – Opens the file for writing only
a – Opens the file for appending data to it
Example:
FILE *p1, *p2, *p3;
p1 = fopen(“data”,”r”);
p2 = fopen(“results”,”w”);
p3 = fopen(“final”,”a”);
fclose():
Closes a file
Syntax:
fclose(<file_pointer>);
This would close an opened file associated with the FILE type pointer file_pointer.
Example:
FILE *p1;
p1 = fopen(“Input”,”w”);
… … … …
… … .. …
fclose(p1);
… … … …
… … .. …

ferror():
int ferror(FILE *stream) – Returns a non-zero value in case an error occurs else returns 0.

14. Which one of the following describes the syntax of prolog program ?
I. Rules and facts are terminated by full stop (.)
II. Rules and facts are terminated by semicolon (;)
Codes :
(A) I, II (B) III, IV
(C) I, III (D) II, IV

Explanation:
No explanation.

15. Let L be any language. Define even (W) as the strings obtained by extracting from W the letters in the even-numbered positions and even(L) = {even (W) | W Î L}. We define another language Chop (L) by removing the two leftmost symbols of every string in L given by Chop(L) = {W | n W Î L, with | n | = 2}.
If L is regular language then
(A) even(L) is regular and Chop(L) is not regular.
(B) Both even(L) and Chop(L) are regular.
(C) even(L) is not regular and Chop(L) is regular.
(D) Both even(L) and Chop(L) are not regular.