Question
Specification and Verification II Consider the following Verilog phrases: initial r = 0; always @(posedge clk) r = a + r; Write down a formula
i .Pi
P1 | P2
newa P where each process identifier A is equipped with a defining equation A(a1, . . . , an) def = PA. Give the transition rules from which transitions of the form P P 0(b) Compute the matrix of correlations between the variables.
(c) Perform a multiple linear regression with mpg as the response and all other variables except name as the predictors and print the results. Comment on the output. For instance:
i. Is there a relationship between the predictors and the response?
ii. Which predictors appear to have a statistically significant relationship to the response?
iii. What does the coefficient for the year variable suggest?
(d) Produce diagnostic plots of the linear regression fit. Comment on any problems you see with the fit. Do the residual plots suggest any unusually large outliers? Does the leverage plot identify any observations with unusually high leverage?
(e) Fit linear regression models with interaction effects. ny interactions appear to be statistically significant?
(f) Try a few different transformations of the variables, such as log(X), X, X2. Comment on your findings.
Opional
15. This problem involves the Boston data set, which we saw in the lab for this chapter. We will now try to predict per capita crime rate using the other variables in this data set. In other words, per capita crime rate is the response, and the other variables are the predictors.
(a) For each predictor, fit a simple linear regression model to predict the response. Describe your results. In which of the models is there a statistically significant association between the predictor and the response? Create some plots to back up your assertions.
(b) Fit a multiple regression model to predict the response using all of the predictors. Describe your results. For which predictors can we reject the null hypothesis H0 : j = 0?
(c) How results from (a) compare to your results from (b)? plot displaying the univariate regression coefficients from (a) on the x-axis, and the multiple regression coefficients from (b) on the y-axis. That is, each predictor is displayed as a single point in the plot. Its coefficient in a simple linear regression model is shown on the x-axis, and its coefficient estimate in the multiple linear regression model is shown on the y-axis.
(d) Is there evidence of non-linear association between any of the predictors and the response? To answer this question, for each predictor X, fit a model of the form
program that takes a string and integer as input, and outputs a sentence using those items as below. The program repeats until the input string isquit 0.the output is:
Eating 5 apples a day keeps the doctor away.
Eating 2 shoes a day keeps the doctor away. e: This is a lab from a previous chapter that now requires the use of a loop Threat Modeling Is a Core Element of the Microsoft Security Development Life cycle (SDL). As part of the design phase of the SDL, threat modeling allows software architects to identify and mitigate potential security issues early, when they are relatively easy and cost-effective to resolve.
1)Communicate about the security design of their systems
2)Analyze those designs for potential security issues using a proven methodology
3)Suggest and manage mitigations for security issues
Elevation of Privilege (EoP) Card Game:-Elevation of Privilege (EoP) is the easy way to get started threat modeling, which is a core component of the design phase in the Microsoft Security Development Life cycle(SDL). TheEoP card game helps clarify the details of threat modeling and examines possible threats to software and computer systems.The EoP game focuses on the following threats:
Spoofing
Tampering
Repudiation
Information Disclosure
Denial of Service
Elevation of Privilege
EoP uses a simple point system that allows you to challenge other developers and become your opponent's biggest threat.
1)Spoofing (S):-SpooFng (S) is the First suit of threats in the STRIDE threat enumeration.Spoofing describes any threat that allows an attacker (or accidentally causes a user) to pretend to be someone or something else. Accordingly, the characters on the cards are masked individuals wearing crowns - unknown attackers, pretending to be royalty.
2)Tampering (T):-Tampering is the second suit of threats in the STRIDE threat enumeration. Tampering describes any threat that allows an attacker (or accidentally causes a user) to alter or destroy data which the application has not allowed them to. Accordingly, the characters on the cards are green gremlins whose open mouths and sharp teeth could indicate either shouting or a desire to eat.
3)Repudiation (R):- Repudiation Users may dispute transactions if there is insufficient auditing or record keeping of their activity. For example, if a user says, "But I didn't transfer any money to this external account!", and you cannot track his/her activities through the application, then it is extremely likely that the transaction will have to be written off as a loss.
4)Information Disclosure (I):- Users are rightfully wary of submitting private details to a system. If it is possible for an attacker to publicly reveal user data at large, whether anonymously or as an authorized user, there will be an immediate loss of confidence and a substantial period of reputation loss. Therefore, applications must include strong controls to prevent user ID tampering and abuse, particularly if they use a single context to run the entire application.
can be inferred, where is of the form a, a or . The rules should not use structural congruence (). [5 marks] Enumerate the ways in which a transition of the form P|Q R can be inferred from transitions of P and/or Q, and indicate the form of R in each case. [5 marks] Hence show that if P|Q R1, then there exists R2 such that Q|P R2 and R1 R2. [5 marks] Give an example of P and Q for which newa(P|Q) has a -transition but P|newa Q has no -transition. Now suppose that newa(P|Q) R1; what syntactic condition on P ensures that P|newa Q R2 for some R2 with R1 R2? Justify your answer. [5 marks] 14 Additional Topics List some intrinsic properties of wearable computers and how they may develop in future. [6 marks] What is an Active Badge and how can it be used to locate personnel and equipment? [6 marks] Give four other applications of the Active Badge and write brief notes on each. [4 marks] Choose one of these four applications and explain how the underlying distributed system can ensure that the appropriate quality of service is available to the user.
Justify each of the following statements, with the help of some formal details and examples. "The dynamic behaviour of programs in a programming language can be defined in terms of a formal logical system, in which each sentence which can be inferred in the logic represents the evaluation of a piece of program." "The type discipline of a programming language can be defined in terms of a formal logical system, in which each sentence which can be inferred in the logic represents the assertion that a piece of program obeys the discipline." [15 marks] Give and explain two examples of theorems about the behaviour of Standard ML programs which can be expressed and proved in terms of either or both of the two logical systems described above.
Show how to encode a general register machine program and the initial configuration of one of its computations into a pair of natural numbers. [6 marks] Outline the design of a register machine that simulates a general register machine computation specified by a single natural number. Your machine should take appropriate action for all possible inputs. [6 marks] 6 CST.99.3.7 10 Numerical Analysis I Define absolute error, relative error and machine epsilon m. Although m is defined in terms of absolute error, why is it useful as a measurement of relative error?
For a floating-point implementation with p = 4, = 10, explain the round to even method of rounding using the half-way cases 7.3125, 7.3175 as examples.
(a) You have acquired a C program which declares an array v, populates it, and later writes it to a file in binary: #define NITEMS 100 struct Elem { signed long val; char flags; } v[NITEMS]; ... fwrite(file, 1, sizeof(v), v); When run on a legacy processor (which no longer exists) this produces a file containing 500 bytes, but when re-compiled and executed on three modern desktops using various compilers it produces files containing respectively 800, 1200 and 1600 bytes. On all implementations char is an 8-bit value. (i) Explain what might be happening in the four versions in terms of compiler assumptions of alignment and size, in bits, of type long. Also give the values of sizeof(struct Elem). [3 marks] (ii) You now wish to read a file produced by the legacy processor into a version of the program running on your new desktop machine (one of the three above). Outline the changes, if any, you would need to make to the call to fread, mirroring the call to fwrite above, so that the resulting v may be successfully processed by the rest of the program. You may make any sensible assumptions about the legacy machine and your desktop machine provided you state them explicitly. Indicate how your program might be able to read both legacy- and new-format binary files. [10 marks] (b) (i) Write 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?
Write java program to find if a particular element is present in a multi-dimensional array. 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] (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, H(X, Y )? [3 marks] (iv) What is the mutual information of this channel, I(X; Y )? [2 marks] (v) How many values are there for for which the mutual information of this channel is maximal? What are those values, and what then is the capacity of such a channel in bits? [3 marks] (vi) For what value of is the capacity of this channel minimal? What is the channel capacity in that case? [2 marks] 8 CST.2000.8.9 12 Computer Vision Explain the Bayesian approach to solving problems in computer vision. Explain the notion of an Inverse Problem and how computer vision can be regarded thereby in a formal sense as inverse graphics. Write down Bayes' rule in general form, and explain the interpretation of its terms as: probability of the image, given the object probability of the object, given the image What is the role of the "prior?" Discuss and illustrate the Bayesian approach in terms of 3D surface reconstruction, given the reflectance data in an image. [20 marks] 13 Specification and Verification II Describe the syntax and semantics of Computation Tree Logic (CTL). [4 marks] Write down CTL formulae expressing the following properties: (a) if req goes high then it will stay high until ack goes high and then go low on the next cycle [2 marks] (b) if ever req is high and started is low then eventually error will become permanently high [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.
c. Office C - 1 printer
4. Office A and Office B's meeting rooms shall provide restricted WiFi access to guests coming
for meeting.
5. General employees are not allowed to access Facebook during office hours except few that
are authorized to do so.
6. All company documents and training video are to be stored in a local file server within
Organization XYZ, employees shall have fast access to these files.
7. Organization XYZ is hosting their own company website at their own premise, where the web
server is publishing general company profile information to the public.
D. Tasks:
Your team is required to
1. Suggest and design a practical and cost-effective network solution for Organization XYZ as a
whole, by providing a complete network diagram.
a. All network components in all 3 offices shall be labelled accordingly including the
location of the Internet gateway.
b. Indicate essential technical specifications (type of switches: 8-port Fast Ethernet UTP
Switch, type of cables: UTP CAT5E, etc.) of all network components and transmission
media used. Provide justifications to the essential technical specifications, relate them
to practicality and cost-effectiveness.
c. Indicate the suitable network technology (type of wired or wireless links) to be used
for interbuilding connections in order to link all 3 offices together. Justify your choice
of technology in term of practicality and cost-effectiveness.
2. Suggest and explain where should the file server and web server be located and how to ensure
optimum performance of both servers in serving their functions. Indicate also the location of
both servers in the same network diagram.
3. Suggest and explain how should the overall network be protected against external intruders
or hackers. Protection against unauthorize network access, illegal file server access and DOS
(Denial of Service) attack to the web server.
4. Suggest and explain how the control of Facebook access during office hours, shall be
implemented.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started