Question
Implement a Prolog predicate bfs/2 which effects a breadth-first traversal of a tree passed as the first argument and unifies the resulting list with its
Implement a Prolog predicate bfs/2 which effects a breadth-first traversal of a tree passed as the first argument and unifies the resulting list with its second argument. For a transaction model based on objects and object operation time-stamps: (v) (iv) Define how conflict may be specified in terms of object operation semantics. (vi) Give an example of conflicting operations. (vii) Give an example of non-conflicting operations that would be defined as conflicting under read-write semantics. [3 marks] (vii) Define the necessary and sufficient condition for two transactions to be serialisable. Give an example of a non-serialisable execution of a pair of transactions. Hint: It may be useful to note that X r=1 rxr1 = 1 (1 x) 2 if 0 36 x < 1 4 CST.2001.2.5 35 Probability Candidates for a certain first-year University Examination offer four subjects. At their first meeting the Examiners agree that, within each subject, they will sort the candidates into descending order of marks and those ranked in the top third will be awarded informal Firsts for that subject. To save effort, the Examiners agree to mark each subject simply by throwing a fair die once for each candidate and awarding the outcome, a mark in the range 1 to 6. They reason, correctly, that 53 should be the threshold mark for a First since approximately one-third of the candidates are likely to score 35 or 36. Noting that 5 is the threshold mark for a First in an individual subject and that each candidate offers four subjects, the Examiners agree further that 20 marks (34 35) should be the threshold mark for a First overall in the Examination. They reason, incorrectly, that using 20 as the threshold about one-third of the candidates will gain Firsts overall. When they meet after the Examination, the Examiners are astonished to discover that, using a threshold of 20 marks, considerably fewer than one-third of the candidates gain Firsts. (a) Assuming that dice throws are independent, what is the probability that a candidate obtains 230 or more marks overall? [12 marks] (b) To what value should the Examiners lower the threshold mark for a First overall to ensure that approximately one-third of the candidates gain Firsts? [5 marks] (c) What is the probability that a candidate obtains or exceeds this lower threshold? [1 mark] (d) Suppose the candidates were assessed more conventionally (on perceived ability) but still awarded integer marks in the range 31 to 36 for each subject. 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] Jot 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.
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