2014oct FE PM Question
2014oct FE PM Question
Question Nos. Q1 – Q6 Q7 , Q8
Question Selection Compulsory Select 1 of 2
Examination Time 13:30 - 16:00 (150 minutes)
Instructions:
1. Use a pencil. If you need to change an answer, erase your previous answer completely
and neatly. Wipe away any eraser debris.
2. Mark your examinee information and test answers in accordance with the instructions
below. Your answer will not be graded if you do not mark properly. Do not mark or
write on the answer sheet outside of the prescribed places.
(1) Examinee Number
Write your examinee number in the space provided, and mark the appropriate space
below each digit.
(2) Date of Birth
Write your date of birth (in numbers) exactly as it is printed on your examination
admission card, and mark the appropriate space below each digit.
(3) Question Selection
For Q7 and Q8, mark the of the question you select to answer in the “Selection
Column” on your answer sheet.
(4) Answers
Mark your answers as shown in the following sample question.
[Sample Question]
In which month is the autumn Fundamental IT Engineer Examination conducted?
Answer group
a) September b) October c) November d) December
Since the correct answer is “ b) October ”, mark your answer sheet as follows:
[Sample Answer]
Sample b
-1-
Notations used for pseudo-language
In questions that use pseudo-language, the following notations are used unless otherwise
stated.
[Logical constants]
true, false
-2-
[Operators and their priorities]
Type of operation Operator Priority
Unary operation +, −, not High
Multiplication, division ×, ÷, %
Addition, subtraction +, −
Relational operation >, <, ≥, ≤, =, ≠
Logical product and
Logical sum or Low
Note: With division of integers, integer quotient is returned as a result.
The % operator indicates a remainder operation.
___________________________________________________________________________
In questions that use E-R diagrams, the following notations are used unless otherwise
stated.
(Relationship name)
Entity name Entity name one-to-one
(Relationship name)
Entity name Entity name one-to-many
(Relationship name)
Entity name Entity name many-to-many
___________________________________________________________________________
Company names and product names appearing in the test questions are trademarks or registered
trademarks of their respective companies. Note that the ® and ™ symbols are not used within.
-3-
Questions Q1 through Q6 are all compulsory. Answer every question.
Q1. Read the following description concerning electronic circuits, and then answer
Subquestions 1 and 2.
Flip-flop circuits are used for designing computer hardware such as CPU, memory, counter
etc. J-K flip-flop is one of the most commonly used such type of flip-flop circuits.
Figure 1 shows the block diagram of J-K flip-flop, and Table 1 shows the characteristic
table of J-K flip-flop.
The outputs Q and Q’ varies according to the values of J and K. Q and Q’ are always
inverse of each other. Toggle means the value is inversed, that is, if the value of Q is 0
then after toggle it becomes 1, and vice versa. Reset and Set means the value becomes 0
and 1 respectively.
Clock supplies the values 0 and 1 alternately and cyclically. When Clock rises (goes 0 to
1), the J-K flip-flop obtains the values of J and K. When Clock falls (goes 1 to 0), the J-K
flip-flop outputs Q and Q’ according to the last-obtained values of J and K.
If P=1 and C=0, or if P=0 and C=1, the value of Q is set as shown in Table 1, regardless of
the values of J and K.
-4-
Subquestion 1
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the following description.
(1) Assuming that, at the last clock rise, the input values were P=1, C=1, J=0 and K=1.
Then, at the subsequent clock fall, the output values will be ___A___ .
(2) Figure 2 shows an example of the input and output wave forms of the J-K flip-flop.
In Figure 2, the wave form in shaded part (1) is ___B___ , and the wave form
in shaded part (2) can be either ___C___ or ___D___ .
Here, P and C will have the values P=1 and C=1 throughout the given clock cycles.
time →
J 1
0
K 1 (2)
0
Clock 1
0
Q 1 (1)
0
c) 1 d) 1
0 0
-5-
Subquestion 2
From the answer groups below, select the correct answer to be inserted into the blank
_______ in Table 2.
P C P C P C P C
1 1 Q 1 1 Q 1 1 Q 1 1 Q
J J J J
1 1 1 1
K FF1 Q’ K FF2 Q’ K FF3 Q’ K FF4 Q’
1 1 1 1
Clock
1 W X Y Z
0
Assuming that, at the clock cycle c, the initial values of W, X, Y and Z are 1, 0, 0 and 0
respectively. Table 2 shows how the output values change on and after the clock cycle c.
Answer group
a) 0 0 0 1 b) 0 0 1 0
c) 0 1 0 1 d) 1 0 1 0
-6-
Q2. Read the following description concerning a virtual memory system, and then answer
Subquestion. In this question, “…h” denotes a hexadecimal value. For example, 100h
denotes a hexadecimal value 100 (decimal value 256).
The basic idea behind virtual memory is to run a program whose size may exceed the
physical memory size available for it. The operating system keeps those parts of the
program currently in use in the physical memory, and the rest on the disk, by swapping
pieces of the program between the physical memory and the disk as needed.
In a typical virtual memory system, a virtual address is split into a virtual page number
(high-order bits) and a byte offset (low-order bits). Figure 1 shows an example of a simple
virtual memory system. In this example, a 16-bit virtual address and a 4k-byte page size is
used. Therefore, the virtual addresses range from 0 to ___A___ , and the high-order 4
bits could specify one of the ___B___ virtual pages, and the low-order 12 bits would
then specify the byte offset (0 to FFFh) within the virtual page.
-7-
Figure 2. Snapshot of the page table
The relation between virtual addresses and physical addresses is given by the page table.
Assuming a case in which program A is running on the virtual memory system shown in
Figure 1. The size of program A is C000h bytes. A snapshot of the page table during the
program execution is shown in Figure 2. At this point, 8 virtual pages are loaded into the
physical memory, and the virtual address B300h corresponds to the physical address
___C___ .
There are two major page replacement algorithms used for paging:
(1) FIFO (First In First Out)
When a page fault occurs, page-out the page whose page-in time was the oldest, and
page-in the required page.
(2) LRU (Least Recently Used)
When a page fault occurs, page-out the page that has been unused for the longest time,
and page-in the required page.
-8-
Consider the case of program A again.
(1) Before the program starts, no virtual pages are loaded into the physical memory.
(2) After the program starts, the virtual pages are accessed in the following sequence:
3 → 1 → 0 → 5 → 4 → 9 → 1 → 2 → 3 → 11 → 6
(▲)
Figure 2 shows the snapshot of the page table at the point (▲) in the above sequence.
(3) After the point (▲), when the virtual page 6 is accessed, a page fault occurs. If the
virtual memory system uses FIFO algorithm, the page ___D___ is paged-out, and
the virtual page 6 is paged-in. If the virtual memory system uses LRU algorithm, the
page ___E___ is paged-out, and the virtual page 6 is paged-in.
Subquestion
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the above description.
-9-
Q3. Read the following description concerning a relational database, and then answer
Subquestions 1 and 2.
(1) The system records each subject with the subject name, text description of objectives,
list of text books and lecture slides, and the list of contents. Each subject has many
exercises to evaluate the students’ competence.
(2) The system records information about each lecturer, such as the name, home address,
home phone number, mobile phone number, e-mail address.
(3) Each text book and lecture slide has the title, author name, published year, the
summary of content, and file name and its path where the content is stored.
(4) The system records information about each exercise, such as the lecturer who created
it, created date, time for doing (in hours, days, or weeks), type of exercise (individual
homework, individual test, team assignment, team project), list of questions and
answers. Each exercise corresponds to one subject.
(5) Each subject has different courses. The system records information about each course,
such as the start date, end date, the number of students who attended the course, and
the number of passed students.
(6) During the course, the main lecturer can make the new exercises or use the old ones.
The history of exercises used for each course is recorded. In order to evaluate the
difficulty level of each exercise, the average grade of students of each course are also
recorded.
Subquestion 1
From the answer group below, select the correct answer to be inserted into each blank
_______ in the following description.
Based on the above requirements, Ms. A is planning to create a database for the system.
She first created the E-R Diagram of the database (incomplete) as shown in Figure 1.
To complete the E-R Diagram, the attribute LecturerID should be added to the entity
___A___ and entity ___B___ , as a foreign key.
- 10 -
Course Lecturer
CourseID LecturerID
SubjectID LectureName
Subject StartDate Address
SubjectID EndDate HomePhone
SubjectName NumberStudent MobilePhone
ObjectiveDesc NumberStudentPass EmailAddress
Answer group
a) BookSlide b) Content
c) Course d) Exercise
e) QuestionAnswer f) Subject
Subquestion 2
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the following SQL statement.
Based on the E-R Diagram completed in Subquestion 1, a database is created for the
material management system.
Recently, the lecturers requested of Ms. A to provide an SQL statement that lists all
exercises used for a specified subject, as shown below. The list includes the exercise name,
average grades of students, and use count (the number of courses which use that exercise).
- 11 -
Exercise Name Average Grades Use Count
Class Diagram 65 3
E-R Diagram 79 2
SQL coding 84 5
Ms. A first creates a new table CourseExercise that contains the average grades of students
by course and exercise, as shown below.
CourseExercise
CourseID
ExerciseID
AverageGrade
Ms. A then creates the following SQL statement. Here, SubjectID of the specified subject
is given by the host variable :SubjectID.
SELECT Exercise.ExerciseName,
AVG( _____C_____ ) AS AverageGrades,
COUNT(*) AS UseCount
FROM Exercise, CourseExercise
WHERE _____D_____
AND _____E_____
GROUP BY Exercise.ExerciseID, ExerciseName
- 12 -
Q4. Read the following description concerning a network for a small office, and then answer
Subquestion.
A simple IP network using private IP addresses (192.168.1.0/24) is setup for a small office
as shown in Figure 1. Some computers in the office IP network access the Internet through
an ADSL router with Network Address Translation (NAT) function and Packet Filtering
Firewall enabled. The IP Routing table, NAT table, and Packet Filtering Firewall table of
ADSL router are correctly configured according to the setup guideline provided by the
Internet Service Provider (ISP).
The network settings are checked according to the following three steps.
The first step is to verify the routing table entry of each computer in the office IP network.
Table 1 shows a part of the routing table entries. In Table 1, the entry “Local access” is for
direct communication within the office IP network, and the entry “Internet access” is for
communication with computers on the Internet.
- 13 -
The second step is to monitor the Internet usage whether it complies with the office
Internet usage policy or not. The information in the NAT table of ADSL router can be used
to simply track current Internet usage. A snapshot of the NAT table of ADSL router is
shown in Table 2.
From Table 2, it is found that the number of computers that is accessing external HTTP
Web servers is ___C___ , because the default protocol and port number of HTTP Web
server are TCP and port 80 respectively.
In case of the access to the external server 203.151.20.61 from the computer 192.168.1.10,
the source port, destination port, source IP, and destination IP seen by the external server
are 1005, 80, ___D___ , and ___E___ respectively.
The last step is to set firewall rules in ADSL router to block or allow Internet usage traffic
according to the office Internet usage policy. Table 3 shows the structure of firewall table
of ADSL router.
• “Arrive on Interface” field should specify either “IN” or “OUT”. “IN” is the
interface connecting to the Internet, and “OUT” is the interface connecting to the
office IP network.
• “Protocol” field should specify the transport (or other) protocol the rule is applied to
(if relevant).
• “Action” field should specify either “Drop” or “Accept”.
• For any field in the table, “*” can be used to indicate “any value”. For example, if
the rule is independent of the protocol, specify “*” in Protocol field.
- 14 -
The last record in Table 2 reveals that the direct access to external email server running at
port 25 is currently opened. Thus any virus-infected program within the office IP network
can easily send spam mail through this security hole. Since all email accesses in the office
are done via Web-based email services using HTTP port 80, it is not necessary to open the
direct email server access at port 25. To block such outbound traffic from any computer
within the office IP network, a packet filtering rule should be added to the firewall table.
The rule should contain the field values ___F___ (each value corresponds to each field
in Table 3, from left to right).
Subquestion
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the above description and Table 1.
- 15 -
Q5. Read the following description concerning wireless network security, and then answer
Subquestion.
After the renovation, the employees requested that they want to use their own portable
computers and smart devices at work. Mr. A, the owner of Company X, agreed with the
employees and installed a wireless access point (hereinafter, AP) in the company instead of
upgrading the client computers. The current network configuration of Company X is
shown in Figure 1.
Web
Initially, ___A___ filtering was deployed as the primary security measure. It is an access
control mechanism available to allow only pre-registered devices to connect to the network.
Unlike an IP address where the user can manually change easily, ___A___ is embedded
in the network interface card makes it more difficult to change without proper utilities.
Furthermore, Mr. A decided to hide the name of the network from the public. Normally, an
AP sends beacon frames to provide information for other devices to join the network. This
process is called beaconing.
- 16 -
An important information necessary to initiate the connection is ___B___ , which
represents the network name. If the ___B___ beaconing is turned off, the users are
required to enter the network name manually and will be able to connect to the network
only if it is matched with the one previously entered on the AP.
Since these mechanisms do not provide encryption, it is possible that the communication
may be intercepted and interpreted easily by attackers. To maintain confidentiality, Mr. A
decided to enable ___C___ on the Web server to secure the HTTP connections between
the Web server and the browsers. When used in conjunction with plain HTTP, the secure
version of the protocol called HTTPS, which uses port 443 instead of port 80, is available.
Despite the implemented security measures, it turned out that unauthorized users have
gained access to the network and use the network as a free Wi-Fi. Although the network
name is not broadcasted by the AP and is invisible to the public, it is revealed whenever a
legitimate user trying to associate with the AP. Figure 2 shows parts of the information
captured from the wireless networks near Company X.
As shown in Figure 2, there are 4 APs available near Company X. Two of them have
hidden network names, and those names are revealed as “Office” and “WLAN” with the
___A___ of xx:xx:xx:C3:5F:AC and xx:xx:xx:2C:46:80 respectively.
Since the wireless network of Company X has no encryption enabled, it is obvious that the
AP with the network name ___D___ belongs to Company X.
- 17 -
Furthermore, from Figure 2, it is most likely that an unauthorized user will be able to
connect to Company X’s network later on, by inappropriately changing his/her computer’s
___A___ to ___E___ , which is actually allowed to connect to the AP.
Mr. A realized that encryption should be enabled in order to prevent unauthorized access.
Among the APs in Figure 2, the network name of the most secure AP is ___F___ . Mr. A
is now studying the encryption method WPA2, that is better than the ones used in Figure 2,
and he may choose it at a later time.
Subquestion
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the above description.
- 18 -
Q6. Read the following description of a merge sort algorithm and the flowcharts themselves,
and then answer Subquestion.
[Program Description]
Conceptually, a merge sort works as follows:
(1) If the list is of length 0 or 1, then it is already sorted.
(2) Otherwise, divide the unsorted list into two sub-arrays of about half the size.
(3) Sort each sub-array recursively by re-applying merge sort.
(4) Merge the two sub-arrays back into one sorted list.
Figure 1 shows an example of merge sort to sort a list of integers contained in an array. It
shows how the elements [38, 27, 43, 3, 9, 82, 10] are sorted in ascending order to get the
result [3, 9, 10, 27, 38, 43, 82] using merge sort algorithm.
38 27 43 3 9 82 10
38 27 43 3 9 82 10
38 27 43 3 9 82 10
38 27 43 3 9 82 10
38 27 43 3 9 10 82
27 38 43 3 9 10 82
3 9 10 27 38 43 82
Generally, when an array A with n elements (ranging from A[1] to A[n]) is to be sorted,
apply merge sort to 2 sub-arrays (A[l]: l = 1, 2, ..., c) and (A[r]: r = c+1, c+2, ..., n), where
c is the integer part of n ÷ 2. When the 2 sub-arrays are returned, they will have been
sorted. They can now be merged together to form a sorted array.
- 19 -
Figure 2 shows the flowchart of the function Merge_sort(m). The function sorts the data in
array m in ascending order.
left ß NULL
right ß NULL - - - - NULL means “empty array”
result ß NULL
Yes
A ≤1
length(m)
No
middle ß length(m) / 2
Left_Merge_sort
Right_Merge_Sort
n: middle+1,1,
B length(m)
Right_Merge_Sort
End
- 20 -
Explanation:
• All variables in Figure 2 are integer type.
• k is a temporary variable.
• left, right and result are temporary arrays to keep the elements during sorting process.
They are initialized as empty arrays at the beginning.
• left ß left + m[k] denotes that array m[k] is appended to left array.
• right ß right + m[k] denotes that array m[k] is appended to right array.
• Function length(m) returns the number of elements of array m (returns 0 if m is NULL).
Figure 3 shows the flowchart of the function Merge(left, right) called from the function
Merge_sort(m). This function merges 2 sub-arrays left and right.
result ß NULL
Merge
Loop condition in the form - - - - - - - - C
ending_cond
(terminate the loop if
ending_cond is satisfied)
No
length(left) > 0 and
length(right) > 0
Yes
length(left) > 0
No
Yes No
first(left) ≤Dfirst(right)
Yes
result ß result
E + first(right) result ß result + first(left) result ß result + first(left)
right ß rest(right) F rest(left)
left ß left ß rest(left)
Merge
Note:
(1) The function first(list) returns first element of the list.
(2) The function rest(list) returns the rest of the list from second element. return result
(3) The function length(list) returns the length of the list.
End
- 21 -
Subquestion
From the answer groups below, select the correct answer to be inserted into each blank
_______ in Figure 2 and Figure 3.
- 22 -
Concerning questions Q7 and Q8, select one of the two questions.
Then, mark the in the selection area on the answer sheet, and answer the question.
If two questions are selected, only the first question will be graded.
Q7. Read the following description of a C program and the program itself, and then answer
Subquestions 1 and 2.
[Program Description]
A word or a character sequence is called a “palindrome”, if it remains the same when
written backwards (right to left). For example, the word “MADAM” is a palindrome,
because it is the same when it is written backwards.
A word is called a “mirrored word”, if each character of the word has its mirror character
and the word written backwards gives the original word. For example, the word “2TOTS”
is a mirrored word, because “T” and “O” are mirror character of their own, and “2” and
“S” are the mirror character of each other.
Some words are palindrome as well as mirrored. Such kind of words are called “mirrored
palindrome”. The word “XOYOX” is a mirrored palindrome, because it is a palindrome as
well as a mirrored word. Here, “X”, “O” and “Y” are all their own mirror character.
Table 1 shows the acceptable characters and their mirror characters. Acceptable characters
consist of upper case alphabets, digits and space. ‘\0’ (null) represents there is no mirror
character for that character. Here, “0” (zero) and “O” (oh) will be considered as the same
character, and hence only the character “O” is given in Table 1.
- 23 -
Input character string contains words to check and each separated by exactly one space.
The length of input character string should not exceed 100. The last character in input
character string must not be a space.
The function gets() reads input character string, and adds ‘\0’ after the last character.
For each word in the input character string, the program prints one of the following
message according to the conditions.
Message Condition
XXX is an ordinary word. If XXX is neither a palindrome nor a mirrored word
XXX is an ordinary palindrome. If XXX is a palindrome and is not a mirrored word
XXX is a mirrored word. If XXX is not a palindrome and is a mirrored word
XXX is a mirrored palindrome. If XXX is a palindrome as well as a mirrored word
Example of an input character string and its output messages are as follows:
(Input character string)
ITPEC MADAM 2TOTS XOYOX
(Output messages)
ITPEC is an ordinary word.
MADAM is an ordinary palindrome.
2TOTS is a mirrored word.
XOYOX is a mirrored palindrome.
- 24 -
[Program]
#include <stdio.h>
#include <string.h>
char reverse[128];
- 25 -
void main() {
int i, j, sIndex = 0, eIndex;
char str[101], s[101];
gets(str);
- 26 -
Subquestion 1
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the above program.
Subquestion 2
From the answer group below, select the correct answer to be inserted into the blank
_______ in the following description.
The function getEndIndex(char str[], int i) will return the value _______ , if the
value of str[] is "MADAM ADAM PALINDROME", and the value of i is 6.
Answer group
a) 6 b) 7 c) 8
d) 9 e) 10
- 27 -
Q8. Read the following description of Java programs and the programs themselves, and then
answer Subquestions 1 and 2.
[Program Description]
The programs implement the operation of electronic device for measuring blood pressure.
(1) The device automatically measures systolic and diastolic blood pressure reading in
mmHg, and displays the measurement results. Table 1 is used to determine the
measurement results.
(2) If systolic BP and diastolic BP fall into different categories, the higher value should be
taken for classification. For example, 160/92 should be classified as “Moderate
Hypertension” and 180/92 should be classified as “Severe Hypertension”.
- 28 -
[Program 1]
import java.util.InputMismatchException;
import java.util.Scanner;
[Program 2]
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
- 29 -
public static Tension fromOrdinal(int ordinal) {
return lookup.get(ordinal);
}
}
[Program 3]
public class Pressure {
private static String newline = "\n";
static String advices[] = {
"Practice a healthy lifestyle." + newline
+ "Consult your doctor only" + newline
+ "if suffering symptoms of low BP (e.g. fainting).",
public Pressure() {
this.sbp = 0;
this.dbp = 0;
}
- 30 -
public int getHValue() {
return this.sbp;
}
[Program 4]
public class Device {
enum Indicators {
WHITE,
GREEN,
YELLOW,
ORANGE,
RED
};
Pressure pressures;
Indicators indication;
private int sbp; //pressure's high value
private int dbp; //pressure's low value
- 31 -
private Indicators getIndicator() {
switch (pressures.getStatus().ordinal()) {
case 0:
indication = Indicators.WHITE;
break;
case 1:
indication = Indicators.GREEN;
break;
case 2:
indication = Indicators.YELLOW;
break;
case 3:
indication = Indicators.ORANGE;
break;
case 4:
indication = Indicators.RED;
break;
}
return indication;
}
[Program 5]
class InvalidPressuresException extends Exception {
public InvalidPressuresException (String msg) {
super(msg);
}
}
- 32 -
Subquestion 1
From the answer groups below, select the correct answer to be inserted into each blank
_______ in the above programs.
Subquestion 2
From the answer group below, select the correct answer to be inserted into each blank
_______ in Table 2.
In the program testing phase, various test cases are prepared and tested. Each test case has
a pair of high (systolic) and low (diastolic) BP values.
Table 2 shows the test cases (1), (2) and (3), with their test data and output results.
- 33 -
Answer group (Note: shaded parts ___ are not shown.)
a) BLOOD PRESSURE MONITOR
------------------------
SBP: ___ | DBP: ___
Your blood pressure is MODERATE_HYPERTENSION
Practice a healthy lifestyle.
Re-measure BP monthly over next 4 months.
If high levels (>=160/100) persist, consult doctor.
------------------------
- 34 -