Question
Question: This example illustrates a fundamental trade-off in the design and implementation of database applications. Discuss. [4 marks] 6 CST.2014.4.7 6 Databases (a) We are
Question: This example illustrates a fundamental trade-off in the design and implementation of database applications. Discuss. [4 marks] 6 CST.2014.4.7 6 Databases (a) We are given a relational schema R(A, B, C, D, E) and told that the following table represents a legal instance of R. If a set of dependencies cannot hold, then explain why. You can refer to tuple numbers in your explanation. (i) F1 is the set {A D}. [2 marks] (ii) F2 is the set A, B C E B D, E A [2 marks] (iii) F3 is the set A, B C D, E C A D [4 marks] (b) We are given a relational schema R(Z, W, Y). [4 marks] (b) Describe an algorithm (other than thresholding) which will convert a greyscale image (8 bits per pixel) to a bi-level black and white image (1 bit per pixel), with the same number of pixels, while retaining as much detail as possible. Consider finite strings over the alphabet {A, B, C}. Say that a string is valid if it does not contain either of the substrings AA, AB. List the invalid strings of length 3. Let (n) be the number of valid strings of length n. Show that for all n > 0 (n + 2) = 2.(n + 1) + (n). [7 marks] Hence determine a general formula for (n). NOTE: ENSURE YOUR WORK HAS NOT BEEN TAKEN FROM PREVIOUS ANSWERS THAT ONE WILL BE A VIOLATION BECAUSE I WILL CHECK AND REPORT YOU. I ALREADY HAVE THE ANSWERS I NEED A NEW THING. jot down a formula in logic that relates clk, a and r at a level of abstraction
where clock edges are explicitly represented. [4 marks]dD
Jot down a second formula that models only the sequences of values of a and r at successive clock cycles. [4 marks]
Discuss the relationship between the two formulae. [4 marks]
Formalise and prove, using your second formula, that on the n
th cycle the value of r is the sum of the values of a on all the cycles up to the n th.
You may assume that values are natural numbers and ignore the possibility of overflow. [8 marks]
11 Advanced Graphics
Give a parametric definition of a torus centred at the origin and aligned with the coordinate axes. [4 marks] The lasting romance remains, alas, just a dream. His latest obsession is a toasted sandwich-maker called SN0008011666833. In order to win her affections he plans to buy her a chocolate muffin from her favourite shopFat Finbar's World of Cakebefore stealing a bunch of flowers from the local cemetery, giftwrapping the presents, and presenting both gifts to her. Evil Robot's internal systems have been constructed using the situation calculus and a theorem prover. (a) Describe the situation calculus, concentrating on the fundamental elements that you would expect to see independently of any specific problem. [5 marks] (b) Suggest two logical formulae that might appear in Evil Robot's knowledge base in order to describe the initial state for the above problem. [2 marks] (c) Give two examples of a possibility axiom that might appear in the knowledge base. [4 marks] (d) Give two examples of a successor-state axiom that might appear in the knowledge base. One of these should in addition address the ramification problem. Explain how it does this.With the three datasets you have decided to use multiple tools in your Hadoop environment, an external hive table called "Company" in the default database using Company_data.csv , use a separate folder for file in HDFS. After Completing your hive table make sure you can access it, secondly upload the Company_Emp_data.csv and the Sales_data.csv to a HDFS folder. 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 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 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]
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