Sie sind auf Seite 1von 3

Introduction to Computers and Programming Final (2011)

Student id:

Name:

Total 3 pages, including problem set (A, B, C), or 20 problems totally 105 points.

A. Blank-filling problems [27%, 3% for problem 1-7, 6% for problem 8]


1. An internet needs an internet-wide addressing system that assigns a unique identifying address to each computer in the system. In the Internet these address are known as __________. In order to locate and retrieve documents on the World Wide Web, each document is given a unique address called a __________ for browser to contact the proper server and request the desired document. A __________ is software that infects a computer by inserting itself into programs that already reside in the machine. An is an ordered set of unambiguous, executable steps that defines a terminating process. A _________ is a list in which the entries are removed only at the head and new entries are inserted only at the tail. There we also learned that it is a first-in, first-out, or FIFO structure The various cells in a machines main memory are identified by numeric addresses. Being numeric values, these addresses themselves can be encoded and stored in memory cells. A __________ is a storage area that contains such an encoded address. The ability to change the organization of the database itself without changing the application software is called . [6%] Listed below are some common types of data miming. a. tries to identify data entries that do not comply with the norm. b. can often be used to find properties of data items that lead to the discovery of grouping. c. looks for links between data groups.

2.

3. 4. 5.

6.

7. 8.

B. Short answer problems [47%]


9. What is hidden terminal problem? [4%] 10. List two popular protocols that may be used for accessing email that has arrived and accumulated at a user's mail server. [4%] 11. What is XML? [4%] 12. What is proxy server? [4%] 13. The following algorithm describes the procedure PrimeChecker. We can use PrimeChecker to check whether a positive integer n is a prime number. If n is 10, 25, 17, and 137, how

many times does the statement, i i+1, execute respectively? [8%, each n 2 %] procedure PrimeChecker n a positive integer i 2 while( i * i n and n cannot be divided by i ) do ii+1 if( i * i > n) then print n is a prime else print n is not a prime 14. Binary tree problems [8%] a. What is a binary tree? [2%] b. Please draw all possible binary trees that consist of three nodes.[2%] c. Given a non-empty binary tree (the number of nodes is larger than 0), how many root node in this tree [2%]? And how many sibling nodes each node has? [2%] 15. [5%] Identify the level within a database system(user, programmer of application software, designer of the DBMS software) at which each of the following concerns or activities occur: Hint: Match both Table P15a and P15b listed below to find answers for each of the sub-problems. That is, you are to find the values for the tuple (a, b c, d, e) = (?,?,?,?,?).

Figure P15: The conceptual layers of a database implementation Table P15a: Questions about Databases Question a. How should data be stored on a disk to maximize efficiency? b. How many times should a user be allowed to mistype a password before the conversation is terminated? c. Is there a vacancy on flight 243? d. How should a relation be organized in mass storage? e. How can the PROJECT operation be implemented? Table P15b: Human Involved Type of People (1). Ordinary user (2). Programmer of application software (3). Designer of the DBMS software

16. [10%] Using the commands SELECT, PROJECT and JOIN, write a sequence of instructions to answer each of the following questions about airlines, flights (for a particular day), and passengers in a relational database: (Note A: Airline, F: Flight, P:Passenger, S:Seat ) X relations A F Air Sky AS205 Air Sky AS37 Air Hop AH89 Air Sky AS37 Air Hop AH67 Air Top AT331 Y relation P F John John John Ray Tim Tim AS205 AS37 AH89 AS37 AH67 AT331

S 22B 28C 14A 18B 15A 4B

a. Obtain a list of the flights that John takes reservations. [4%] b. Obtain a list of the names of the Airlines that Tim takes reservations. [6%]

C. General Questions [31%]


17. Please describe Bus and Star network topology by drawing a graph [5%] 18. What's the difference between Bridge, Switch, and Router? [5%] 19. Stack problems. [10%] a. A stack has two main operations: push and pop. Please describe their behavior. [4%] b. Assuming that a stack can contain a set of integers. After a serial of operations listed as follows, what is the final state of the stack? You shall label which data is the top. [6%] Push 1; Push 2; Pop; Push 3; Push 4; Pop; Pop; Push 5; Push 6; Pop; Push 6; Push 3; Push 4; Pop; Push 5; Push 2; Pop; Push 1; Push 3. 20. [11%] In terms of the relation shown below, what is the appearance of the relation RESULT after executing each of these instructions: a. b. c. RESULT1 PROJECT V and W from X RESULT2 SELECT from X where W=30 RESULT3 JOIN X and Y where Y relation W 20 50 R S 30 JJ 40 KK X.W < Y.R [3%] [3%] [5%]

X relation U V AA LL CC KK

BB MM 30

Das könnte Ihnen auch gefallen