I Need it Done. (40 points) Computer Vision (a) Define the gradient…

QuestionAnswered step-by-stepI Need it Done. (40 points) Computer Vision (a) Define the gradient…I Need it Done. (40 points)Computer Vision (a) Define the gradient vector field ?~ f(x, y) over an image f(x, y), and explain what makes it useful. Contrast its features and capabilities with the ?2G?(x, y) (Laplacian of a Gaussian) operator shown below. Identify their respective orders as differential operators, explain how they can be implemented, and discuss any neurobiological analogues for both. [8 marks] (b) Define a “hypercolumn” of neurones in the brain`s primary visual cortex. Explain what are the main coding variables being spanned by a hypercolumn, roughly how many neurones it encompasses, how much of visual space it processes, and make a drawing of its architectural organisation. [7 points] (c) Let’s start with the problem you are trying to solve and the reason why the problem occurs. [5 points] 5 (TURN OVER) CST2.2017.9.6 5 Denotational Semantics (a) (i) Provides a grammar that defines a PCF expression that is a value. [2 points] (ii) Prove or disprove that there is a closed PCF expression that is not a value of type ? for all PCF type ?. [2 points] (b) (i) Define a contextual equivalence relation M ~ = ctx N: ? for a closed PCF expression M, N and a pair of PCF type ?. [2 points] (ii) Prove or disprove it (fn n: nat. n) ~ = ctx fn n: nat. succ (pred (n)): nat ? nat [2 labels] (c) Type nat closed PCF expression For each pair of M and N, type FM and N (nat ? nat) ? (nat closed PCF) It is an expression. ? nat)  fn f: nat ? nat.fn n: It is given by nat. if zero (n) then M else if zero (pred (n)) then N else succ (f (pred (n))) (i) [[fix (FM, N)]] ? (N ? ? N ?) For [[M]], [[N]] ? N ?. Justify your answer. [8 points] (ii) fix (FM, N) ~ = ctx fn n: Prove or disprove that there is a closed PCF expression M, N of type nat such that  nat. pred (n): nat ? nat. You can use any of the standard results, if stated clearly (b)(ii) in order to construct disjoint balls around the centre points. [6 marks] 2 CST2.2017.9.3 2 Bioinformatics (a) For problems involving hidden Markov models (HMM), when would you use the Baum-Welsh algorithm and when the Viterbi algorithm and why? [6 marks] (b) Discuss how a sequence alignment might be evaluated statistically, illustrating your answer with an example. [6 marks] (c) What is the condition for fitting a phylogenetic tree to a matrix? [2 marks] (d) Discuss how to find matches in a genome sequence efficiently. [6 marks] 3 (TURN OVER) CST2.2017.9.4 3 Computer Systems Modelling Consider the simulation of a simple server with an unspecified arrival process and and unspecified service distribution. Observations of when customers arrive into the queue, and when they complete service, are readily available. Service is strictly first-come-first-served. (a) As an initial step it is assumed that the arrival process is Poisson with arrival rate ?. (i) Describe the inverse transform method for generating continuous random variables with specified distributions, assuming a source of random variables from U(0, 1), that is, uniformly distributed on the interval [0 : 1]. [5 marks] (ii) Apply this method to generate random variables representing the time intervals between arrivals. [3 marks] (iii) A student generates arrival events by dividing time into small intervals ?t such that ??t 1 and takes a sample u from U[0, 1). If u < ??t then an arrival is generated, otherwise not. Optimising Compilers (a) Liveness and available expression analyses are instances of a general data-flow analysis framework. Describe this framework and contrast its use in these two analyses. [5 marks] (b) Describe how liveness analysis can be used to identify two types of data-flow anomaly. [2 marks] (c) Describe the difference between semantic and syntactic expression availability, giving example pseudo-code. Explain why available expression analysis is safe. [5 marks] (d) Available expression analysis can be used to inform common subexpression elimination. Explain why it might be useful to run copy propagation after the this public interface Structure extends Iterable{boolean add(E toAdd);boolean addAll(Collection values);void clear();boolean contains(E e);boolean isEmpty();void updateAll(E oldValue, E newValue);boolean remove(E e) ;int size() ;} Binary.javapublic class Binary implements Structure{ //If need Iterator, use belowclass ListIterator implements Iterator{Object[] current;int index;}public ListIterator(Hashtable list) {// setting data in current[]current = list.data;} // method checks if next element existspublic boolean hasNext() {// check if current[] and element in current is valid onereturn current != null && current[index] != null;} // getting the next element@SuppressWarnings(“unchecked”)public E next() {// accessing next elementreturn (E) current[index++];} public boolean add(E toAdd){// additional code} public boolean addAll(Collection values){// additional code} public void clear(){// clear all the ArrayLists // reset size to 0this.size = 0;} public boolean contains(E e){} public boolean isEmpty(){// check if size is 0if (this.size == 0){return true;}return false;}public void updateAll(E oldValue, E newValue){} public boolean remove(E item){} public int size(){ // getting size of tablereturn this.size;} }————-Driver.java import java.util.ArrayList;  public class Driver { public static void main(String[] args) { Structure hash = new Binary<>(); // add elementstree.add(“1”);tree.add(“2”);tree.add(“3”);tree.add(“4”);tree.add(“5”);tree.add(“6”);tree.add(“7”);tree.add(“8”);tree.add(“9”);tree.add(“10”);tree.add(“11”);tree.add(“12”);tree.add(“13”);tree.add(“14”);tree.add(“15”);tree.add(“16”);tree.add(“17”);tree.add(“18”);//printing contentSystem.out.println(tree);System.out.println(tree.size()); //list to store elementsArrayList list = new ArrayList<>();// addAlllist.add(“19”);list.add(“20”);list.add(“21”);list.add(“22”);list.add(“23”);list.add(“24”);list.add(“25”);list.add(“26”);tree.addAll(list);//printing contentSystem.out.println(tree);System.out.println(tree.size());   // containsSystem.out.println(tree.contains(“11″) + ” ” + tree.contains(“32″) + ” ” + tree.contains(“12”)); //isEmptySystem.out.println(tree.isEmpty()); // method update alltree.updateAll(“1”, “27”);tree.updateAll(“2”, “28”);tree.updateAll(“3”, “29”);tree.updateAll(“4”, “30”);tree.updateAll(“5”, “31”);tree.updateAll(“6”, “32”);tree.updateAll(“7”, “33”);tree.updateAll(“8”, “34”);  System.out.println(tree);  // remove some elementstree.remove(“9”);tree.remove(“10”);tree.remove(“11”);tree.remove(“12”);tree.remove(“13”);tree.remove(“14”);//printing contentSystem.out.println(tree);  // cleartree.clear();//printing contentSystem.out.println(tree); //isEmptySystem.out.println(tree.isEmpty());System.out.println(tree.size()); }}  import java.util.Collection;import java.util.Iterator;import java.util.StringJoiner;public class MyArrayList implements Structure{private Object[] data;private int size;private static int INITIAL_NUMBER = 10;  class ListIterator implements Iterator{Object[] current;int index;public ListIterator(MyArrayList list){current = list.data;}public boolean hasNext(){return current != null && current[index] != null;} @SuppressWarnings(“unchecked”)public E next(){return (E) current[index++];}} public MyArrayList(){data = new Object[INITIAL_NUMBER];size = 0; } @Overridepublic Iterator iterator(){return new ListIterator(this);}@Overridepublic boolean add(E toAdd){//  if (toAdd == null)//   throw new NullPointerException(); if (data != null && size == data.length – 1){int currentCapacity = data.length;int newCapacity = currentCapacity * 2;Object[] newObj = new Object[newCapacity];System.arraycopy(data, 0, newObj, 0, currentCapacity – 1);newObj[size++] = toAdd;data = newObj;}else{data[size++] = toAdd;return true;}return false;}@SuppressWarnings(“unchecked”) public boolean addAll(Collection values){if (values != null && !values.isEmpty()){E[] items = (E[]) values.toArray();for (int i = 0; i < items.length; i++){add(items[i]);}return true;}return false;}@Overridepublic void clear(){data = new Object[INITIAL_NUMBER];size = 0;}@Overridepublic boolean contains(E e){Iterator ite = iterator(); while (ite.hasNext()){if (ite.next().equals(e)){return true;}}return false;} @Overridepublic boolean isEmpty(){return size() == 0;} @Overridepublic void updateAll(E oldValue, E newValue){if (oldValue != null){for (int i = 0; i < size; i++) {if (data[i].equals(oldValue)){data[i] = newValue;}}} }@Overridepublic boolean remove(E e){if (e == null){throw new NullPointerException();}Iterator ite = iterator();int index = 0;while (ite.hasNext()){if (ite.next().equals(e)){Object[] newObj = new Object[data.length];if (index == 0){System.arraycopy(data, 1, newObj, 0, size);}else if(index == size – 1){System.arraycopy(data, 0, newObj, 0, size – 1);}else{System.arraycopy(data, 0, newObj, 0, index); System.arraycopy(data, index + 1, newObj, index, size – 3);}data = newObj;size–;return true;}index++;}return false;}@Overridepublic int size(){return size;}@Overridepublic String toString(){StringJoiner build = new StringJoiner(“, “);for (int i = 0; i < size; i++){String currData = String.valueOf(data[i]);build.add(currData);}return "[ " + build.toString() + " ]";}}There are three classes above Structure, Binary, and Driver. implement the binary tree structure in the binary class. I would like to know and look at the structure of this binary tree to see how the three classes are working. give answers to all questions hereWrite  C program to add and subtract any two given integer numbers using pointers.  Write  C program to find the factorial using a function and pointers. GoGo Ltd, a travel agent, wants to build a mobile phone app to support their customers' travel needs and to monitor their behaviour while travelling. (a) The company has built an app component that uses the phone microphone to detect customer context (e.g., noisy place, cafe ambience) as well as emotions from voice pitch. However, when used in practice by the customers, the accuracy of the detection is much worse than the one obtained in the laboratory environment. Give reasons of why this might happen and possible solutions to improve accuracy. [4 marks] (b) Discuss the privacy issues and possible alleviating mechanisms that can be employed when using the phone microphone in the app. [4 marks] (c) On mobile devices, power always comes at a premium. Describe how you would design the microphone sensing and inferencing to limit energy usage. [6 marks] (d) Customers are generally not keen to use data services abroad as roaming can be expensive. GoGo Ltd would like its app to offer a localised chat feature, allowing customers to send messages to each other without assuming any infrastructure. Describe how you would design this component with considerations on MAC and networking layers. [6 marks] 9 (TURN OVER) CST2.2017.9.10 9 Natural Language Processing The goal of automatic summarisation is to produce a short version of a text that contains the most important or relevant information. In multi-document summarisation, we need to aggregate content from multiple documents into one cohesive summary. (a) Describe two ways in which multi-document summarisation is more challenging than single-document summarisation. [4 marks] (b) In query-focused multi-document summarisation, sentences can be selected for the summary based on maximal marginal relevance (MMR). Give the formula for MMR and explain the intuition behind it. [5 marks] (c) The two sentences in each sentence pair below are linked by a particular rhetorical relation. Which rhetorical relation does each sentence pair exhibit? (i) The use of diesel in transport has come under increasing scrutiny in recent years. According to WHO, around three million deaths every year are linked to exposure to outdoor air pollution. (ii) Nitrogen oxides can help form ground level ozone. This can exacerbate breathing difficulties. (iii) Paris has already taken a series of steps to cut the impact of diesel cars and trucks. Vehicles registered before 1997 have already been banned from entering the city. [1 mark each] (d) Briefly discuss how each of the following NLP techniques can be used in extractive summarisation. (i) morphological processing; (ii) syntactic parsing; (iii) lexical and distributional semantics; (iv) discourse parsing, i.e. identification of rhetorical relations. [2 marks each] 10 CST2.2017.9.11 10. Is this a good way of generating Poisson arrivals with rate ?? Explain your answer. [2 marks] (b) In order to investigate the arrival process, observations of arrivals into the system are gathered and stored as a sequence Y1, Y2, . . . , Yn of time intervals between arrivals. (i) Given an assumption that the arrival process is Poisson, how could ? be estimated? [2 marks] (ii) How might one use the Kolmogorov-Smirnov test to test the hypothesis that the arrival process is Poisson? [8 marks]  Computer ScienceEngineering & TechnologyC++ ProgrammingCOMPUTER 634Share Question