Question: Jot java program to find if a particular element is present in a multi-dimensional array. Here is the related facts that might help to solve

Jot java program to find if a particular element is present in a multi-dimensional array. Here is the related facts that might help to solve the problem - *************** Consider the function zarg defined below: fun zarg f ([], e) = e | zarg f (x::xs, e) = f(x, zarg f (xs,e)); Show that with the help of this function, it is possible to an expression for the sum of a given list of integers. Then describe what zarg does in general. [4 marks] (c.i) A polymorphic type of branching trees can be declared as follows. Note that the children of a branch node are given as a list of trees, and that only the leaf nodes carry labels. datatype 'a vtree = Lf of 'a | Br of ('a vtree) list; (i.ii) Write function flat t that converts a given tree t of this type to a list of the labels (without eliminating duplicates). Your function should run in linear time in the size of the tree. [4 marks] (ii.ii) Write function counts x t that counts the number of times that x occurs as a label in t, but without first converting t to a list. Specify an exact match (FALSE) for the range lookup. The third calculation Alex wants to make is to determine the total payments for the policy of the client he is looking up, which now appears in cell J6. Calculate the total payments for a policy as follows: In cell K117, begin to enter a formula using the DSUM function. Use structured references to the [#Headers] and [#Data] in the Clients table to specify the formula database. Use a structured reference to the Payment field header to specify the field to summarize. Use the values in the range J5:J6 as the criteria. Alex also wants to identify the number of a policies he has sold of a specified type. Calculate this information as follows: In cell K8, begin to enter a formula using the DCOUNTA function. Scenarion 1.1 If a continuous signal is discretely sampled by multiplying it with a sequence of uniformly-spaced Dirac delta functions, having frequency fs, what happens to the Fourier spectrum of the signal? [3 marks] (b) What is the conditional probability p(x|y), the probability of event x given that event y has occurred, provided that we know the following? p(x), the unconditional probability of event x p(y), the unconditional probability of event y p(y|x), the probability of event y given that event x has occurred [3 marks] (c) Consider a binary symmetric communication channel, whose input source is the alphabet X = {0, 1} with probabilities {0.5, 0.5}; whose output alphabet is Y = {0, 1}; and whose channel matrix is 1 1 where is the probability of transmission error. (i) What is the entropy of the source, H(X)? [1 mark] (ii) What is the probability distribution of the outputs, p(Y ), and the entropy of this output distribution, H(Y )? [3 marks] (iii) What is the joint probability distribution for the source and the output, p(X, Y ), and what is the joint entropy, 2H(2X, 2Y )? [3 marks] (iv) What is the mutual information of this channel, I(X; Y )? [2 marks] Briefly describe the main ideas underlying model checking. What is symbolic model checking? [4 + 4 marks] Compare and contrast the use of a model checker and a theorem prover for formal verification. Then: what issue does grouping endeavor to settle? Let us Assume a processor has two symmetric groups that contain both utilitarian units and an issue cradle. In this processor, directions should be controlled to a specific bunch before they are embedded in an issue cushion. What should the two fundamental objectives of a decent guiding strategy be?(d) In schema normalisation, is Boyce-Codd Normal Form (BCNF) always to be preferred over 3rd Normal Form (3NF)? Explain your answer. [4 marks] 7 (TURN OVER) CST.2014.4.8 7 Economics, Law and Ethics (a) Describe the provisions of the Data Protection Act. [8 marks] (b) You are designing and are about to launch a mobile phone app which will seek to understand the emotional condition of the user, using multiple inputs such as motion sensing, facial expression recognition, voice stress measurement and the analysis of entered text. Its declared purpose is to enable services to interact more empathically with users. You propose to monetize it by serving ads at times when the user is more likely to buy. Indicate how your program might be able to read both legacy- and new-format binary files. [10 marks] (b) (i) Jot a C++ class T which contains a const integer field n. T should also have constructor(s) which initialise n to an integer argument passed as a parameter or to zero if no argument is given; T should also have a destructor. The constructor(s) and destructor should print the value of the n field of the object being constructed or destructed. Indicate why, or why not, any of your fields or methods are qualified with virtual. [3 marks] (ii) Explain how objects of class T are allocated and deallocated, for each of the three areas: heap, stack and static store, noting one case where appropriate use of virtual is essential. What, if any, overlap in programmer convenience is there between stack-allocated objects with destructors and try-finally in Java? a Java program to find the shortest distance using Travelling Salesman Problem (Dynamic Programming Algorithm). (a) If a continuous signal is discretely sampled by multiplying it with a sequence of uniformly-spaced Dirac delta functions, having frequency fs, what happens to the Fourier spectrum of the signal? [3 marks] (c.ii) (b) In image compression we utilise three different mechanisms to compress pixel data: (i) mapping the pixel values to some other set of values (ii) quantising those values (iii) symbol encoding the resulting values Explain each mechanism, describe the way in which it helps us to compress the image, and describe in what way it affects the visual quality of the resulting (decompressed) image when compared with the original. [10 marks] SECTION B 5 Comparative Programming Languages (a) Outline the main innovations that are in Simula 76 but were not in Algol 60, paying particular attention to Simula Classes. [7 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!