WYSE Academic Challege Sectioal Computer Sciece 2005 SOLUTION SET 1. Correct aswer: a. Hz = cycle / secod. CPI = 2, therefore, CPI*I = 2 * 28 X 10 8 istructios = 56 X 10 8 cycles. The clock rate is 56 X 10 8 cycles / 7 secods = 8 X 10 8 Hz (= cycles / secod) = 800 X 10 6 MHz 2. Correct aswer: e. The CRC is oe of the most used techiques for error detectio i data commuicatios, it is used i modems, it is a type of hash fuctios based o polyomials. 3. Correct aswer: a. NOT(NOT(X OR Y) OR NOT(X OR NOT Y)) = (X OR Y) AND (X OR NOT Y). Clearly this is equal to the value of X. 4. Correct aswer: a. Iheritace - Orgaizes ad facilitates polymorphism ad ecapsulatio by permittig objects to be defied ad created that are specialized types of already-existig objects - these ca share (ad exted) their behavior without havig to reimplemet that behavior. This is typically doe by groupig objects ito classes, ad defiig classes as extesios of existig classes, thus ad groupig classes ito trees or lattices reflectig behavioral commoality Polymorphism - Refereces to ad collectios of objects may refer to objects of differet types, ad ivokig a operatio o a referece will produce behavior depedig o the actual type of the referet. Ecapsulatio - Also called iformatio hidig: Esures that objects caot chage the iteral state of other objects i uexpected ways; oly the object's ow iteral methods are allowed to access its state. Each type of object exposes a iterface to other objects that specifies how other objects may iteract with it. This prevets users from breakig the ivariats of the program. Abstractio - The ability for a program to igore some aspects of the iformatio it's maipulatig, i.e. the ability to focus o the essetial. Each object i the system serves as a model of a abstract "actor" that ca perform work, report o ad chage its state, ad "commuicate" with other objects i the system, without revealig how these features are implemeted. Processes, fuctios or methods may also be so abstracted, ad whe they are, a variety of techiques are required to exted a abstractio: 5. Correct aswer: e. All the statemets are true for XML.
Computer Sciece 6. Correct aswer: a. i f() = ( k + 1) = (k+1)((k+1) -1)/k = (1+1/k)(k+1) (1+1/k) i= 1 Here k is costat ad k is a iteger greater tha 1. Igorig the costat terms i (1+1/k), yields f() = ( k + 1) = Θ ((1 + 1/ k )( k + 1) ) = Θ (( k + 1) ) i= 1 Formally, we take the costats c 1 = 1, c 2 = 1+1/k, 0 = 1, 0<= c 1 *(k+1) (1+1/k)(k+1) (1+1/k) c 2 *(k+1) for all 0 Therefore, f() = Θ (( k + 1) ) By def. f() = T(g()) iff f() = O(g()) ad g() = O(f())). 7. Correct aswer: b. After 1 st roud, X=4, Y=2; After 2 d roud, X=20, Y=3; After 4 th roud, X=2 20 + 8 > 1000, Y=4 8. Correct aswer: c. Postorder traversal: leftchild, rightchild, root 9. Correct aswer: d. For hold ad wait: To prevet deadlock avoid hold ad wait. Need to be sure a process does ot hold oe resource while requestig aother. For mutual exclusio: oly oe process may use a resource at a time. To prevet deadlock do ot require mutual exclusio. For pagig: Pagig has othig to do with deadlock. It does ot fall uder the coditios for deadlock. For preemptio: To prevet deadlock allow preemptio. If a process holdig certai resources is deied a further request, that process must release its origial resources. For circular wait: To prevet deadlock do t go ito a circular wait situatio! 10. Correct aswer: a. Loss-less joi is oly performed o primary key ad foreig key attributes. Joi o ay other commo attributes will geerate spurious tuples. 11. Correct aswer: b. (NOT ((X OR Y) AND ((NOT (Y AND Z)) AND X))) =(NOT ((T OR F) AND ((NOT (F AND F)) AND T))) =(NOT (T AND ((NOT F) AND T))) =(NOT (T AND (T AND T))) =(NOT (T AND T)) =(NOT T) =FALSE
Computer Sciece 12. Correct aswer: d. Each task is assumed to sped 1 uit of time. For four processors system S, Graph 4, T1 ad T2, T3 ad T4, T5 ad T6, T7 ad T8 ca be executed o the four processes simultaeously. Total time is 2 uits. Graph 1: time is 8 uits. Graph 2: time is 5 uits. Graph 3: time is 4 uits. Graph 5: time is 4 uits. 13. Correct aswer: c. CPU register is the fastest memory. The order is CPU register, Cache, Ram, Magetic disk, Magetic Tape. 14. Correct aswer: b. 101001111 = 14F, as takig from the right 4 bits each, 1111=F, 0100=4, 1=1 15. Correct aswer: d. The seek time is, time eeded to mechaically positio the read/write head o the correct track. 16. Correct aswer: c. Graph is used for layig electric cable or to put cable i house. Graph helps to fid differet poits, for example to fid earest poits, or to cover all the poits. 17. Correct aswer: b. QUEUE is First i first out (FIFO). Put 6 i queue S, remove 6 from queue S, put 2 i queue T, put 9 i queue 1 2 3 4 5 6 2 9 2 5 9 2 5 9 6 S S T T T T 7 8 9 3 1 3 4 5 9 S S T 18. Correct aswer: d. FAT is file allocatio table, which idicates the physical locatio of hard disk (secodary storage). 19. Correct aswer: a. Job cotrol laguage (JCL) is used for iteractio amog the hardware. For example: Assembly laguage. It is ot java, c or fortra.
20. Correct aswer: c. Computer Sciece 21. Correct aswer: e. Add(4) = 4 + Add(3) + Add(2) Add(3) = 3 + Add(2) + Add(1) Add(2) = 2 + Add(1) + Add(0) Add(0) = 0 Add(1) = 0 Add(2) = 2 Add(3) = 5 Add(4) = 11 22. Correct aswer: e. I sequece e, K would be iserted prior to P, hece it would ot be a child of P, but rather P would be a child of K. 23. Correct aswer: e.
First build the biary tree. 15 / \ 12 27 / \ / \ 3 14 18 33 \ 10 Computer Sciece Postorder traversal: leftchild, rightchild, root. 24. Correct aswer: c. Assume A=11, B=10, C=10, (A>B) && (C<=B) = TRUE I,!(A<B) &&!(C>=B) = FALSE II, (A>B) && (B>C) = FALSE III,!((A<=B) (B<C)) = TRUE 25. Correct aswer: c. Whe >1, Strage()=Strage(-2)+1=Strage(-2*2)+1*2=Strage(- 2*3)+1*3= =Strage(-2*/2)+1*/2=Strage(0)+/2=1+/2 26. Correct aswer: c. TDMA: Time Divisio Multiple Access, a techology for deliverig digital wireless service usig time-divisio multiplexig (TDM). TDMA works by dividig a radio frequecy ito time slots ad the allocatig slots to multiple calls. I this way, a sigle frequecy ca support multiple, simultaeous data chaels. TDMA is used by the GSM digital cellular system. FDMA: Frequecy Divisio Multiple Access, is the oldest ad most importat of the three mai ways for multiple radio spectrum. CDMA: Short for Code-Divisio Multiple Access, a digital cellular techology that uses spreadspectrum techiques. GSM: Short for Global System for Mobile Commuicatios, oe of the leadig digital cellular systems. GSM was first itroduced i 1991. As of the ed of 1997, GSM service was available i more tha 200 coutries ad has become the de facto stadard i Europe ad Asia. Referece: http://www.gsmworld.com/techology/gsm.shtmlhttp://www.gsmworld.com/techology/g sm.shtml 27. Correct aswer: d. The cocept of public-key cryptography was itroduced i 1976 by Whitfield Diffie ad Marti Hellma i order to solve the key maagemet problem. I their cocept, each
Computer Sciece perso gets a pair of keys, oe called the public key ad the other called the private key. Each perso s public key is published while the private key is kept secret. The eed for the seder ad receiver to share secret iformatio is elimiated; all commuicatios ivolve oly public keys, ad o private key is ever trasmitted or shared. No loger is it ecessary to trust some commuicatios chael to be secure agaist eavesdroppig or betrayal. The oly requiremet is that public keys are associated with their users i a trusted (autheticated) maer (for istace, i a trusted directory). Ayoe ca sed a cofidetial message by just usig public iformatio, but the message ca oly be decrypted with a private key, which is i the sole possessio of the iteded recipiet. Furthermore, public-key cryptography ca be used ot oly for privacy (ecryptio), but also for autheticatio (digital sigatures). 28. Correct aswer: d. I is true sice the graph is directed graph ad oe edge is oly represeted with oe ode s adjacecy list. So the sum of legths of all the adjacecy lists should be E II is wrog sice the sum of legths of all the adjacecy lists is E from above reaso, ot 2 E III is true sice the graph G is a fiite directed acyclic graph. If G has ot ay vertex with o icomig edge, that is all vertices must have icomig edge, G must be a cyclic graph. 29. Correct aswer: c. The output of left-top: (NOT A) AND (NOT B) The output of left-bottom: NOT (A AND C AND (NOT D)) 30. Correct aswer: d. 10*16+3=163 7*8+7=63 1*2 7 +1*2 5 +1*2 3 +1*2 1 =128 +32+8+2=170 10*16+15=175 99