Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

networsksss [4 marks] (c) Write down a HOPLA term realising the parallel composition of PCCS. Use this to give an encoding of PCCS into HOPLA,

networsksss [4 marks] (c) Write down a HOPLA term realising the parallel composition of PCCS. Use this to give an encoding of PCCS into HOPLA, specifying a HOPLA term JPK for every PCCS term P. [Hint: The realisation of parallel composition should be the same as that of the encoding of pure CCS into HOPLA.] [5 marks] (d) Use the rules of HOPLA to show how a derivation establishing JP1 k P2K . ould show that if P P 0 in PCCS then JPK JP 0 K in HOPLA. In what part of the proof would the derivation that you have constructed be useful?

For each of the following software project phases, suggest a design model or representation that would be a helpful aid in the design process. For each of these, sketch an example to show what this model looks like, based on some part of the above design brief. (i) Inception phase (ii) Elaboration phase (iii) Construction phase (iv) Transition phase [12 marks] (b) For each of the sketched examples in part (a), describe how the design work so far could be evaluated before proceeding to the next phase. [4 marks] (c) Choose two of the above design models, representations or evaluation methods, and explain how they would be done differently if the project plan was following an agile rather than spiral project management approach. [4 marks] 6 CST.2016.2.7 6 Software and Interface Design Imagine you have been commissioned to design a system that will help students learn how to test and debug software in a typical classroom situation. (a) Explain the difference between testing and debugging. [2 marks] (b) Name four different approaches to testing, giving a brief definition of each. [8 marks] (c) Prepare a preliminary design, as suited to the inception phase of a project, that could be presented to the client who has commissioned this educational testing application. You should include two different kinds of diagram, so that the client understands the overall structure of the proposed user interaction, and also the kinds of data that will be processed and stored when the system is operational You may use standard results provided that you mention them clearly. (a) (i) State a sufficient condition on a pair of positive integers a and b so that the following holds: x, y Z. x y (mod a) x y (mod b) x y (mod ab) [2 marks] (ii) Recall that, for a positive integer m, we let Zm = {n N | 0 n < m} and that, for an integer k, we write [k]m for the unique element of Zm such that k [k]m (mod m). Let a and b be positive integers and let k and l be integers such that k a+l b = 1. Consider the functions f : Zab ZaZb and g : ZaZb Zab given by f(n) = [n]a , [n]b , g(x, y) = [k a (y x) + x]ab Prove either that g f = idZab or that f g = idZaZb

(a) There are several different types of ambiguity in natural language. For each of the following cases, briefly describe how ambiguity may arise, illustrating your answer with examples: (i) morphological ambiguity; (ii) lexical ambiguity; (iii) syntactic ambiguity; (iv) ambiguity in rhetorical relations (discourse relations). [12 marks total] (b) Explain what is meant by "packing" in parsing and discuss its relevance to the treatment of ambiguity.

(a) Why do we use dynamic programming algorithms for pairwise sequence alignment problems but not for multiple pairwise alignment? [5 marks] (b) Compare the use of the affine gap penalty with the constant gap penalty. [3 marks] (c) Discuss the properties and assumptions of the Jukes-Cantor and the Kimura 2-parameter models of DNA evolution. [5 marks] (d) Describe the UPGMA algorithm. [4 marks] (e) What does the ultrametric property of a tree tell us about the evolutionary process?

C program to find Cartesian product of two sets.

Write program to print all Prime numbers between 1 to n.

write program to calculate the average of elements in odd positions 10 elements.

write program to calculate the average of odd elements in array of 10 elements.

(a) Explain the method of Active Contours. What are they used for, and how do they work? What underlying trade-off governs the solutions they generate? How is that trade-off controlled? What mathematical methods are deployed in the computational implementation of Active Contours? [10 marks] (b) When trying to detect and estimate visual motion in a scene, why is it useful to relate spatial derivatives to temporal derivatives of the image data? Briefly describe how one motion model works by these principles. [5 marks] (c) Provide a 3 3 discrete filter kernel array that approximates the Laplacian operator. Explain what the Laplacian might be used for, and what is the significance of the sum of all of the taps in the filter. [3 marks] (d) When visual sequences are encoded into an .mpeg video stream, typically about what percentage of the compression achieved is intra-frame (compression within individual still frames), and what percentage is inter-frame? Name a key feature that is extracted and estimated for purposes of prediction and, therefore, compression. [2 marks] The Needham-Schroeder protocol is defined as 1. A S : A, B, NA 2. S A : {NA, B, KAB, {KAB, A}KBS }KAS 3. A B : {KAB, A}KBS 4. B A : {NB}KAB 5. A B : {NB 1}KAB (a) Explain the symbolism, and the purpose of the messages. [5 marks] (b) Explain the "bug" in the protocol. [5 marks] (c) Is the bug actually a vulnerability if one can assume (as the Needham- Schroeder paper does) that all principals execute the protocol faithfully? If not, why is it important? [5 marks] (d) Describe how one modern protocol derived from Needham-Schroeder deals with the issue. [5 marks] 5 (TURN OVER) CST.2006.8.6

(a) Consider a software routine that converts and records the audio samples received in a digital telephone network call (8 kHz sampling frequency, 8 bit/sample) into a WAV file (8 kHz sampling frequency, 16 bit/sample, uniform quantisation). Your colleague attempted to write a very simple conversion routine for this task, but the resulting audio is very distorted. (i) Name two variants of the method used for quantising the amplitude of audio samples in digital telephone networks and explain one of them. [4 marks] (ii) Your colleague's routine right-pads each 8-bit data word from the telephone network with eight additional least-significant zero bits to obtain 16-bit values. Explain how this distorts the signal by discussing which frequencies could appear at the output when the incoming telephone signal consists of a pure 1 kHz sine tone. [4 marks] (b) A real-valued discrete random sequence {xi} is fed into a linear time-invariant filter with impulse response h0 = 1, h3 = 1, and hi = 0 for all other i. We observe for the resulting output sequence {yi} the expected value E(yi+k xi) = 1 for k = 1 2 for k = 0 1 for k = 1 1 for k = 2 2 for k = 3 1 for k = 4 0 otherwise What is the value of the autocorrelation sequence {xx(k)}? [4 marks] (c) The Y CrCb colour encoding is used in many image compression methods. (i) How is it defined and why is it used? [4 marks] (ii) Is the conversion from 3 8-bit RGB to 3 8-bit Y CrCb coordinates fully reversible? Why?

(a) Summarise the idea of a basic block and explain why it is useful in intermediate representations for optimising compilers. [3 marks] (b) Construct the flowgraph (in which every node is a basic block consisting of one or more 3-address instructions) for the C function: int f(int x, int y) { int r = x + 1; if (y == 0) { r = r * r; } else { y = y - 1; r = r * y; } return r + 1; } [4 marks] (c) Define static single assignment (SSA) form, and explain the changes you would have to make to your flowgraph from part (b) in order for it to be in SSA form. [3 marks] (d) Consider a flowgraph in which every node contains a single 3-address instruction. Each node whose instruction assigns some value to a variable is considered a "definition" of that variable; we are interested in discovering, for each node n in the flowgraph, which definitions reach n. A definition m is considered to reach n if the variable to which m assigns a value may still have that value at entry to n.

(a) When distributed systems are designed and engineered, certain fundamental properties have to be taken into account, including: 1. concurrent execution of components 2. independent failure modes 3. communication delay 4. no global time Give three examples of the implications of these properties (separately or in combination) on the engineering of large-scale, widely distributed systems.

(b) (i) Define role-based access control (RBAC). (ii) Outline how RBAC could be used for a national healthcare system comprising many administration domains such as primary care practices, hospitals, specialist clinics, etc. Principals may, from time to time, work in domains other than their home domain, and must be authorised to do so. (iii) A national Electronic Health Record (EHR) service must be accessible from all domains. It is required by law that access control policy should be able to capture exclusion of principals and relationships between them. How could this requirement be met in an RBAC design?

taclle all

Answer from your tutor:

Report this answer

EarlBookTarsier28Answered19 hours ago

import java.util.Arrays; import java.util.Scanner;

public class Chegg123 { public static String[][] CartesianProduct(int[] x , int[] y) //function to return cartesian product of two sets { String[][] s=new String[x.length][y.length]; //declaring new set containing ordered pairs of elements for (String[] row : s) Arrays.fill(row, "");

//Resulted set will be a matrix of size m X n where m is size of set x and n is size of set y for (int i = 0; i < x.length; i++) { for (int j = 0; j < y.length; j++) { s[i][j]+="{ "+Integer.toString(x[i])+","+Integer.toString(y[j])+" }"; } } return s; //here, s is the required set containing ordered pairs after cartesian product } public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("Enter size of first set as x"); //Size of 1st set is entered int sizex=sc.nextInt(); System.out.println("Enter size of second set as y"); //Size of second set is entered int sizey=sc.nextInt(); int[] x=new int[sizex]; //1st set of elements is x int[] y=new int[sizey]; //2nd set of elements is y System.out.println("enter element of x set after entering press enter"); for (int i = 0; i < x.length; i++) //Enter the element one bye one for set x { x[i]=sc.nextInt(); } System.out.println("enter element of y set after entering press enter"); for (int i = 0; i < y.length; i++) //Enter the element one bye one for set y { y[i]=sc.nextInt(); } String[][] s = CartesianProduct(x,y); //function call to give Cartesian Product for (int i = 0; i < x.length; i++) //Print the output set after cartesian product { for (int j = 0; j < y.length; j++) { System.out.print(s[i][j] + " "); } System.out.println(); } } }

Explanation:

#include

int main() { int i, n, sum = 0, num; printf("Enter a positive inger for n: "); scanf("%d", &n); printf("Enter %d integers: ",n); for (i = 0; i < n; ++i) { scanf("%d", &num); if (num > 0) { sum += num; } } printf("Sum of all non-negative integers is %d ", sum); return 0; }

#include using namespace std;

int MinToFind(int a[],int n) //function to find smallest integer { int i, min; min = a[0];// thinking that first number is minimum for(i=1;i

cout<<"Enter four integers "; for(i=0;i>array[i];

min = MinToFind(array,size); //min function is being called where we declared it

// max element is printed cout<<"Smallest integer is " << min << " ";

return 0; }

#include #include int r(int *n){//basic reverse code int reverse=0; char str[1000]; itoa(*n, str, 10); while (*n != 0) { reverse = reverse * 10; reverse = reverse + *n%10; *n = *n/10; } return(reverse); } int main() { char n[1000], reverse = 0;

printf("Enter a number to reverse "); scanf("%s", &n);//taking a number but in the form of a string int i=0,res = 0; while(n[i]=='0'){//if the string starts with zeros res+=1;//count that zeros' number i+=1; } int *val = atoi(n);//converting the string to number int output; output = r(&val);//passing the address of that number to the function if(res==0){//if the input string does not have staring 0's printf("%d", output); } else{//if the input

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

Step: 3

blur-text-image

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

Computer Networks

Authors: Andrew S. Tanenbaum, David J. Wetherall

5th edition

132126958, 978-0132126953

More Books

Students also viewed these Computer Network questions

Question

=+6. In pure competition there are sellers.

Answered: 1 week ago