Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

hen we contrive an assumption that the existence of primitive recursive functions pair N 2 N, fst N N and snd N N satisfying for

hen we contrive an assumption that the existence of primitive recursive functions pair N 2 N, fst N N and snd N N satisfying for all x, y N fst(pair (x, y)) = x snd(pair (x, y)) = y prove by mathematical induction that any function g N N satisfying g(0) = pair (0, 1) g(x + 1) = pair (snd(g(x)), fst(g(x)) + snd(g(x))) for all x N, also satisfies x N(fst(g(x)) = fib(x) snd(g(x)) = fib(x + 1)). [4 marks] (ii) Deduce that the Fibonacci function fib is in PRIM.

it complete

Momentarily clarify the job of the attest articulation and why this program will trigger a state disappointment when executed. Supply two altered adaptations of the how every one of these areas are utilized by C builds. [8 marks] (d) Briefly clarify what indistinct conduct is in the C norm. Under what circumstance(s) would calling the accompanying C capacity result in unclear conduct? int32_t divide(int32_t a, int32_t b) { return a/b; }

(a) Consider vague conduct in C. (I) Define whaonduct. [3 marks] (ii) Briefly clarify why it is critical to have undefined conduct in the meaning of the C language. [1 mark] (b) Compare and differentiation the struct and association catchphrases in C, providing an illustration of a circumstance where it would be more proper to utilize an association rather than a struct. [4 marks] (c) Explain the accompanying C or C++ language ideas. You might find it supportive to utilize short code sections or outlines to show your response. (I) The virtual catchphrase used to qualify a C++ part work and its sway on produced code. [4 marks] (ii) The job of the C preprocessor in the source-code gathering cycle, and why it is a helpful device for investigating. [4 marks] (iii) Templated capacities in C++, giving one advantage and one downside of utilizing them contrasted and involving a void* work in C.

(a) Assuming that it is mapped to a square with texture co-ordinates from (0, 0) to (1, 1), sketch a picture of the procedural texture map generated by the following Java code. Use textual annotations to indicate the colours of the various parts of the picture. [7 marks] Color BLUE = ...; Color GREEN = ...; Color WHITE = ...; Color parametricTexture(double tu, double tv) { double r1 = 2 * Math.sqrt( (tu - 0.25) * (tu - 0.25) + (tv - 0.5) * (tv - 0.5) ); double r2 = 2 * Math.sqrt( (tu - 0.75) * (tu - 0.75) + (tv - 0.5) * (tv - 0.5) ); double f = f(r1) + f(r2); return (f > 0.45 && f < 0.55) ? WHITE : GREEN.times(f).plus(BLUE.times(1 - f)); } private double f(double r) { if (0 <= r && r < 0.333) { return 1 - 3*r*r; } else if (0.333 <= r && r < 1) { return 1.5*(1-r)*(1-r); } else { return 0; } } (b) Write brief notes that explain the following. (i) Explain Perlin Noise, including how it differs from white noise. [3 marks] (ii) Explain Barycentric Co-ordinates, including how they are calculated. Diagrams are encouraged. [3 marks] (c) Given a ray R(t) = O + Dt and a unit sphere S, initially centred on the origin and subsequently transformed by affine matrix M, where M represents the transformation of the sphere from local to world coordinates: (i) state the centre of the sphere in local co-ordinates and in world co-ordinates; (ii) give an expression in terms of t for the local co-ordinates of the intersections between R and S; (iii) give an expression for the world co-ordinates of the same intersections; and (iv) give an expression for the world co-ordinates of the normal at those intersections.

(a) Describe the differences in complexity and usage between parsimony and distance phylogenetic methods. Give an example of the usage of both methods. [6 marks] (b) Describe the differences in complexity and usage between hierarchical clustering and the Markov clustering (MCL) algorithm. [5 marks] (c) Explain how to identify different gene features using Hidden Markov Model methods such as Genescan. [5 marks] (d) Explain how you could identify a regulatory network involving a set of genes. [4 mark

(a) State the Fermat-Euler theorem, carefully defining any terms that you use. Deduce that 2p 2 (mod p) for any prime p. [5 marks] (b) Explain how this result can be used to show that a number is composite without actually finding a factor. Give an example. [3 marks] (c) Let Mm = 2m 1 be the mth Mersenne number. Suppose that m is composite. Prove that Mm is composite. [3 marks] (d) A composite number m that satisfies 2m 2 (mod m) is known as a pseudo-prime. (i) Suppose that m is prime. Prove that Mm is either prime or a pseudoprime. [3 marks] (ii) Suppose that m is a pseudo-prime. Prove that Mm is a pseudo-prime. [3 marks] (iii) Deduce that there are infinitely many pseudo-primes.

(a) Give the two definitions of the complexity class NP, one using the term Turing machine and one using the term verifier. [4 marks] (b) For each of the following statements, state whether it is true, false or unknown. In each case, give justification for your answer. In particular, if the truth statement is unknown, state any implications that might follow from it being true or false. [2 marks each] (i) 3SAT P CLIQUE (ii) TSP P (iii) NL P (iv) PSPACE 6= NPSPACE (c) Let = {0, 1}. Prove that and {0, 1} are the only languages in P which are not complete for P with respect to polynomial-time reductions.

(a) State precisely what it means for a language (i) to be co-NP-complete, (ii) to be in NL and (iii) to be in PSPACE. [6 marks] (b) Consider the following two decision problems. Problem 1: Given an undirected graph G = (V, E) with |V | even, does G contain a clique with at least |V |/2 vertices? Problem 2: Given an undirected graph G = (V, E), does G contain a clique with at least |V | 3 vertices? (i) Which of the two problems is in P and which one is NPcomplete? [2 marks] (ii) For the problem in P, describe a polynomial-time algorithm. [4 marks] (iii) For the other problem, prove that it is NP-complete. [8 marks] 3 (TURN OVER) CST.2014.6.4 3 Computation Theory (a) Explain how to code register machine programs P as numbers pPq N so that each e N can be decoded to a unique register machine program prog(e). [10 marks] (b) Find a number e1 N for which prog(e1) is a register machine program for computing the function one N N with one(x) = 1 for all x N. [2 marks] (c) Why is it important for the theory of computation that the functions involved in the coding and decoding given in part (a) are themselves register machine computable? (You are not required to prove that they are computable.) [2 marks] (d) Define what it means for a set of numbers S N to be register machine decidable. [2 marks] (e) Let e N*N denote the partial function of one argument computed by the register machine with program prog(e). Prove that {e N | e = one} is register machine undecidable (where one is the function mentioned in part (b)). State carefully any standard results that you use in your proof. [4 marks]

(a) Give the recursion equations for the function n (f, g) N n+1 N defined by primitive recursion from functions f N n N and g N n+2 N. [2 marks] (b) Define the class PRIM of primitive recursive functions, giving exact definitions for all the functions and operations you use. [5 marks] (c) Show that the addition function add(x, y) = x + y is in PRIM. [2 marks] (d) Give an example of a function N 2 N that is not in PRIM. [3 marks] (e) The Fibonacci function fib N N satisfies fib(0) = 0, fib(1) = 1 and fib(x + 2) = fib(x) + fib(x + 1) for all x N. (i) Assuming the existence of primitive recursive functions pair N 2 N, fst N N and snd N N satisfying for all x, y N fst(pair (x, y)) = x snd(pair (x, y)) = y prove by mathematical induction that any function g N N satisfying g(0) = pair (0, 1) g(x + 1) = pair (snd(g(x)), fst(g(x)) + snd(g(x))) for all x N, also satisfies x N(fst(g(x)) = fib(x) snd(g(x)) = fib(x + 1)). [4 marks] (ii) Deduce that the Fibonacci function fib is in PRIM. [4 marks] 5 (TURN OVER) CST.2014.6.6 5 Logic and Proof (a) Proof methods for propositional logic include the sequent calculus, DPLL and BDDs. Describe briefly each of these methods. State, with reasons, which method is to be preferred for a problem that makes heavy use of the and symbols. (Note that denotes exclusive or.) [7 marks] (b) Describe briefly the procedure for constructing a BDD, illustrating your answer using the formula ((P Q) R) (P (Q R)). [7 marks] (c) Consider the following set of n + 1 propositional formulas, where n 0: Pi Pi+1 (for i = 1, . . . , n) P1 Pn+1 Describe a possible execution of the DPLL procedure to determine whether this set is satisfiable or not. [6 marks] 6 CST.2014.6.7 6 Logic and Proof (a) Describe briefly the concept of a decision procedure, listing at least three separate examples of decidable theories. [4 marks] (b) Outline the basic ideas behind Fourier-Motzkin variable elimination, demonstrating them with reference to the following small set of constraints: x + 2y 10 x + z 5 y 3 z 2 0 [6 marks] (c) Call a clause positive if it consists of positive literals only. Negative selection is a refinement of resolution where two clauses can be resolved only if one of them is positive; if a clause contains any negative literals, then only one of those may be resolved with a literal in another (necessarily positive) clause. Negative selection reduces the number of combinations of literals to be compared, thereby improving performance. Consider the following set of clauses: {R(0), R(1)} {P(h(z)), R(z)} {P(x), R(y)}. With negative selection, the first resolution step must involve {R(0), R(1)}, as no other positive clauses are available at the start. (i) If a set of clauses includes no positive clauses, can it be unsatisfiable? Justify your answer.

(a) Write brief notes on functions as values and results in ML, illustrated with the help of the functionals map and exists. What functions can we obtain from these via currying? [6 marks] (b) 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 write an expression for the sum of a given list of integers. Then describe what zarg does in general. [4 marks] (c) 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) Write a 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) Write a function count x t that counts the number of times that x occurs as a label in t, but without first converting t to a list. Note: Minimal credit will be given for solutions that use flat. [5 marks] (iii) What is the type of count? [1 mark] All ML code must be explained clearly and should be free of needless complexity

: Write program to read two strings then concatenate and display them Write the following program to c++.

Write program to read four integer numbers and display the biggest one, i. : Write program to read JSON object array and covert it to ArrayList of strings.

A leisure park has decided to adopt a variety of mobile and sensing technologies to monitor the usage of its attractions. An app is offered to customers willing to install it on their smartphone, which tracks customers' location throughout the park and uses the phone accelerometer to monitor activity. (a) Describe how app developers could make sure the app delivers the best accuracy on location and activity tracking while preserving the phone battery as much as possible through system and sensor sampling optimizations. [6 marks] (b) A customer installs the app on their device. They have two other applications on the phone which monitor their physical activity as well as their location throughout the day for clinical reasons. Describe how the phone operating system could optimize the battery efficiency of the sensing across applications. [5 marks] (c) A variety of wireless sensors are scattered throughout the park to monitor the operation of the attractions by continuously gathering temporal data (e.g., mechanical vibration, load, temperature, humidity). (i) Describe a combination of medium access and network layer protocols for infrastructure-less multi-hop networks to aid the sensor data delivery to the park management servers. Discuss advantages and disadvantages of the solution devised. [5 marks] (ii) Describe a solution which uses protocols from the Internet of Things domain to offer a non multi-hop solution. Discuss the advantages and disadvantages of the solution devised.

(a) There are two main ways in which traffic sources can be controlled: open-loop and closed-loop. Describe the overall operation and use of these two kinds of network system: What are the key components of an open-loop controlled protocol? What are the key components of a closed-loop, or feedback controlled system? What kinds of applications are suited to each class of control loop? [10 marks] (b) Two important approaches to fairness are max-min, and proportional. Describe what properties each of these offer, how they differ in how they can be used, and what happens in each case when demand exceeds supply of network capacity.

(a) In the quantum teleportation protocol, Alice and Bob are each in possession of one qubit of a pair in the joint state 1 2 (|00i + |11i). In addition, Alice has a qubit in an arbitrary state |i. Explain how the protocol works. In particular, show that it involves the transmission of exactly two classical bits of information from Alice to Bob and demonstrate how, at the end of the protocol, Bob is in possession of a qubit in state |i. [10 marks] (b) Suppose now that Alice has two qubits in a state25

Skip Question

Show Comment

Report Issue

Subject:Networking

$16.00

show work please

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Technology Project Management

Authors: Kathy Schwalbe

6th Edition

978-111122175, 1133172393, 9780324786927, 1111221758, 9781133172390, 324786921, 978-1133153726

More Books

Students explore these related General Management questions