countries have moved to using smart cards. What effect would you…

Question Answered step-by-step countries have moved to using smart cards. What effect would you… countries have moved to using smart cards. What effect would you expect such amove to have on the incidence of card-based fraud? [5 marks]5 [TURN OVERCST.98.12.67 Compiler ConstructionExplain how a parse-tree representation of a program may be converted into astack-based intermediate language giving sketches of code to translate expressions,assignments and the if-then-else command; you should also explain howoccurrences of a variable in an expression or assignment are translated.The program may be assumed to conform to the following syntax:E -> n | x | E + E | f(E,E)D -> let f(x,x) = {Dseq; Cseq; E} | let x = EC -> x := E; | if E then C else CCseq -> C | C CseqDseq -> D | D Dseqwith start symbol Dseq. Here n corresponds to integer constants, x corresponds toidentifiers used as variable names and f corresponds to identifiers used as functionnames (you may assume these are disjoint). The function declaration constructhas the effect of defining a function which, when called, makes declarations,performs commands and then returns the result of its expression; note that thereforefunctions may be defined within functions, but the above restriction on identifiersmeans that they cannot be returned as results. [20 marks]8 Prolog for Artificial IntelligenceWrite Prolog programs that define the following predicates. Your programs shouldensure that backtracking does not produce spurious alternative solutions.(a) The nth element of a list: nth(X,N,L) instantiates X to the Nth element oflist L. Assume that list elements are numbered increasing from 1. [4 marks](b) The last element of a list: last(X,L) instantiates X to the last element of list L.[4 marks](c) Remove an element from a list: remove(X,L,M) instantiates M to a listcontaining all the elements of list L except for every occurrence of term X.[6 marks](d) Substitute one element for another: subst(L,X,Y,M) instantiates M to a listcontaining all the elements of list L except that every occurrence of term X inL is replaced by term Y in M. Write  program to print your name on the screen.Write  program to print “Welcome to C++” on the screenWrite to program to calculate the area of a square.Write  program to find sum of all even numbers between 1 to n.Write  program to print all natural numbers from 1 to n. A majority gate with three inputs signals logic one on its output if two or more ofits inputs are one, and zero otherwise. A minority gate is its complement.(a) Give the boolean equation for a minority gate as a sum of products.(b) Sketch the circuit diagram for a minority gate using NAND gates and inverters.(c) Sketch the transistor-level circuit diagram for an alternative implementationas a single stage of CMOS logic. [3 marks](d) Calculate the number of transistors required for each implementation.(e) Assuming that a conducting p-channel has a resistance twice that of a similarlysized n-channel, use logical effort to compare the performance of the twoimplementations.3 Digital Communication II(a) The Transmission Control Protocol (TCP) employs a transmit windowand cumulative acknowledgement and timeout system, as well as sequencenumbering of packets, to achieve reliable delivery of data.(i) Outline the procedure for round-trip time estimation and the calculationof the retransmission timer.(ii) Explain the function of buffering at the sender and receiver.(iii) How do fast retransmit and fast recovery improve performance afterpacket loss?(b) In a wireless network, delay to access the channel due to scheduling of themedia access control protocol, and random packet loss due to interference,may be non-negligible.(i) Explain how this can interfere with the round-trip time estimation processabove.(ii) Explain how this can interfere with the congestion control scheme thatTCP employs. Information retrieval systems vary in the expressivity of the query languages theyemploy. For instance, some systems support proximity search: if two query termsare connected by the “Next” operator, then only those documents are retrievedwhere the query terms appear close together (i.e., within a certain number of wordsof each other).(a) List and briefly describe other ways in which the syntax and the interpretationof query languages may vary.(b) Describe with an example how the “Next” operator described above isimplemented efficiently in modern information retrieval systems. Your answershould include a description of the data structure(s) necessary to support it.(c) A search engine supports error correction in the following way: If an error issuspected in a query term, the system provides a link labelled “Did you meanX?”, where X is the corrected term, in addition to its normal results. Thelink leads to a list of retrieved documents, corresponding to a variant of theoriginal query, with X replacing the misspelled term.(i) Explain why it is non-trivial to implement this feature efficiently.(ii) Discuss methods for implementing this feature in a realistic setting.Image transcription text1. (5 points) Define static binding anddynamic binding. 2. (18 points) Definewhat binding time is. List f… Show more… Show moreImage transcription text4.3 Using switch statements, write aprogram to simulate a simple calculator.The program must perform… Show more… Show more  Computer Science Engineering & Technology Java Programming CSCI MISC Share QuestionEmailCopy link Comments (0)