Question
WL Question: You are given a tree T = (V, E) alongside an assigned root hub r V . The parent of any hub v
WL
Question:
You are given a tree T = (V, E) alongside an assigned root hub r V . The parent of any hub v 6 = r, signified p(v), is characterized to be the hub contiguous v in the way from r to v. By show,? p(r) = r. For k > 1, characterize pk (v) = pk1(p(v)) and p1(v) = p(v) (so pk(v) is the kth precursor of v). Every vertex v of the tree has a related non-negative whole number mark l(v). Give a direct time? calculation to refresh the marks of all the vertices in T as per the accompanying guideline: lnew (v) =? l(pl(v)(v)). 3.21. Give a straight time calculation to find an odd-length cycle in a coordinated diagram. (Here's a clue: First tackle this issue under the suspicion that the chart is firmly associated.) 3.22. Give a proficient calculation which takes as info a coordinated diagram G = (V, E), and decides whether there is a vertex s V from which any remaining vertices are reachable.? 3.23. Give a proficient calculation that takes as information a coordinated non-cyclic diagram G = (V, E), and two vertices s, t V , and yields the quantity of various guided ways from s to t in G. 3.24. Give a direct time calculation for the accompanying assignment. Input: A coordinated non-cyclic diagram G Question: Does G contain a coordinated way that contacts each vertex precisely once?
Settle this LP utilizing the simplex calculation. Indicate the related essential arrangement after every cycle. [4 marks] (c) We consider the Steiner Tree Problem characterized as follows. We are given an undirected, associated chart G = (V, E) with a non-negative expense work c : E R+. Further, we are given a set S V of terminals. The objective is to find a base expense subgraph of G that interfaces all terminals, where the cost of a subgraph is the amount of the expenses of its edges. Think about the accompanying calculation: Let H = (V, E0 ) be the metric finish of G, where E 0 = {{u, v}: u, v V } and c({u, v}) is the expense of the most brief way from u to v in G. Process a Minimum Spanning Tree T on the subgraph H[S] actuated by the arrangement of terminals S. Supplant each edge {u, v} in T by the edges of a briefest way from u to v in G, and return the arrangement. (I) Prove an upper bound of 2(1 1 |S| ) on the guess proportion of this calculation. [Here's a clue: You can utilize a methodology like the examination of Approx-TSPTour.] [6 marks] (ii) Construct a model which gives a matching lower bound on the guess ratio.(a) Explain what is implied by the Kolmogorov Complexity K(n) of a whiz number n. [5 marks] (b) Consider a chart of the capacity K(n) plotted against n: (I) Show that it is smooth, as in for any n and tiny worth of k the worth of K(n + k) will be very near the worth of K(n). [3 marks] (ii) Show that it is harsh, as in for any N there are two upsides of n1 and n2 among N and 2N with the end goal that K(n1) is around 2K(n2) , for example one has an intricacy dramatically greater than the other. [3 marks] (iii) Explain why the diagram is limited above by some straight line of the structure n + c and remark on what the steady addresses. [3 marks] (iv) Explain why for any consistent k there will be a worth N to such an extent that n > N suggests that K(n) > k. [3 marks] (v) Demonstrate that there is no steady N with the end goal that n > N infers K(n) > log log n. [3 marks](a) Explain how to check an enormous number for primality utilizing a probabilistic strategy that provides you with a bound of the likelihood of getting an inaccurate judgment. [7 marks] (b) Give an asymptotic equation anticipating the quantity of PC tasks expected to check that a number with n pieces is prime, assuming that increase, division and remaindering are finished utilizing O(n 2 ) techniques and that you need to accomplish a likelihood of mistake limited by 1 out of 260. You try not to have to demonstrate that the calculation you depict works, yet you ought to by the by make sense of it cautiously and totally. [7 marks]i) A uniform cubic NURBS bend dened by six control focuses. (ii) Similar to (I) however going through the two endpoints. (iii) Similar to (I) yet going through the third control point, perhaps with lower coherence by then. (iv) The cubic Bezier bend dened by four control focuses. [8 marks] (b) Give the progression class for each of: (I) bend (a)(i) between the bunches; (ii) bend (a)(ii) at the bunches; (iii) bend (a)(iii) at the third control point. [The coherence class is the most noteworthy subordinate which is desti
A small financial services company has approached AustralisSoft to develop a program that will assist them in keeping in contact with their clients. Based on when the client was last in contact and the client's preferences they want to know if they should message, email, or call the client to see how they are getting on. They want to be able to use a desktop application on their machines rather than a web application to ensure that the data is stored and processed locally. You have been tasked with selecting an appropriate programming language for developing the new application.
Select a programming language from the list below and justify why it should be selected for use ahead of other programming languages in the above scenario. Explain any drawbacks for using programming language in the given scenario. Can you consider a range of aspects including client requirements, software complexity etc when giving your response?
Python Kotlin Scala JavaScript Swift
Golang Java Ruby C++
C Note that there are not necessarily any incorrect choices in this list. What is important is that you justify your selection.
There is no initial reference for this task. It is recommended that you instead find appropriate articles to justify your arguments through 'Google Scholar.
Access Google Scholar (you find it via any search engine)
Search using the term 'choosing a programming language'
To only return recent articles, select the link 'Since 2021' from the left side of the page
You may assume current status messages are lost if the server is restarted and you do not need to handle exceptions. [8 marks] (b) One housemate suggests the server and client should communicate by serialising Java objects rather than sending messages as text. (i) Describe in words the changes you would make to your server implementation to send messages as serialised Java objects. [3 marks] (ii) List two advantages and two disadvantages of an implementation based on serialised Java objects versus sending messages as text. [4 marks] (c) Another housemate suggests that the server should not close the client's connection after answering the request. Instead the connection should remain open until the client sends another request or closes the connection. Describe in words what changes you would need to make to your implementation in part (a) to achieve this and comment on the advantages and disadvantages of this idea.
(a) Describe the main lessons learned from the report into the collapse of the London (b) To what extent have the developments in software tools and management practices of the last twenty years improved the situation, and which of the lessons do we still have to be careful of today?
N. Wirth's textbook Algorithms + data structures = programs (1976) contains the following story. I married a widow (call her W) who has a grown-up daughter (D). My father (F), who visited us quite often, fell in love with my step-daughter and married her. Hence my father became my son-in-law and my step-daughter became my mother. Some months later, my wife gave birth to a son (S1), who became the brother-in-law of my father, as well as my uncle. The wife of my father - that is, my step-daughter - also had a son (S2). Using Prolog, create a list of facts that represents the situation in the above story. [5 marks] Add rules defining the family relationships (such as father-in-law) described in the story. [5 marks] Show how a Prolog system would use your program to prove the goal "I am my own grandfather". [10 marks] 8 Databases Explain the ANSI/SPARC architecture for Data Base Management Systems, and show how it supports data independence. [5 marks] Describe the relational model of data introduced by E.F. Codd in 1970. [4 marks] What are its strengths and weaknesses? [7 marks] What factors have led to its dominant position in the market place today?
(a) Write C function revbits() which takes a single 8-bit char parameter and returns a char result by reversing the order of the bits in the char. [4 marks] (b) Write C function revbytes() taking two parameters and returning no result. The first parameter is a pointer to memory containing n contiguous bytes (each of type char), and the second is the number of bytes. The function should have the side effect of reversing the order of the bits in the n contiguous bytes, seen as a bitstring of length 8n. For example, the first bit of the first char should be swapped with last bit of the last char. [6 marks] (c) You have been assigned the following seemingly working C code, which processes files controlling the behaviour of a system. You observe that, after obtaining several ERR_MALFORMED errors, subsequent calls to fopen fail due to too many files being open: int process_file(char *name) { FILE *p = fopen(name, "r"); if (p == NULL) return ERR_NOTFOUND; while (...) { ... if (...) return ERR_MALFORMED; process_one_option(); ... } fclose(p); VRe members of the club. The applicant ought to be aged between 18 and 30 years of age (inclusive). Each proposer should have been a member for at least years. Each
proposer need to now not be a figure of the applicant. Write a Prolog software that consists of a rule for deciding whether or not an applicant is acceptable for membership, illustrating with a sample database. [20 marks] 5 [TURN OVER CST.98.6.6 eight Databases Explain what is meant through a referential integrity constraint in a relational records model. [4 marks] The University of Cambridge is decided to keep its requirements below increasing economic strain. The authorities maintains league tables of numerous types: teaching excellent, research rating, unit value of every scholar place. The university still enjoys a high popularity worldwide, however it's far in competition with establishments along with MIT and Stanford whose unit fees are plenty greater. The most effective manner to offer facilities along with new research laboratories, graduate accommodation, a much-wanted swimming pool, is by public appeal. It is important that there's close liaison among the university improvement workplaces and
schools in order that prospective donors do now not grow to be alienated by using simultaneous needs. You have been invited with the aid of the college to assist in recording info of its fund-elevating. The major reason is to coordinate the sports of companies together with thecollege and university improvement workplaces of their dealings with prospects. The latter can be alumni of a few university, charitable foundations or important agencies with an educational dedication; it's far critical to record their pastimes (bioscience, pupil welfare, game) so that they can be approached in a beneficial context; also their capability resources, which will maximise the viable gain to the university. At any time a number of initiatives need
funding: every might be developed by a unmarried corporation, requiring that a target sum be raised through a given date; projects will have one or more purposes which can be linked with the hobbies of possibilities. The different major use of the database is to preserve a diary of interplay with prospects; which will preserve their goodwill it is critical to know who has been invited where and while, and in what context. Design the schema for a relational database so one can document this statistics. State sincerely any assumptions which you want to make so as to finish the layout, and indicate any problems that you foresee in maintaining the database. [16 marks] 6 CST.Ninety eight.6.7 SECTION C 9 Foundations of Functional Programming The binary timber, denoted by using B, whose department nodes contain herbal numbers, are generated by way of the grammar B ::= Leaf in which n tiers over natural numbers. Although this question concerns the encoding of binary timber as -terms, you could use the encodings of other famous facts structures, inclusive of booleans and pairs, supplied you kingdom the properties assumed. Give an encoding of binary timber as -phrases with the aid of defining as -phrases (a) Leaf and Br, used to construct the -phrases corresponding to binary timber; (b) isLeaf, which tests whether a -time period corresponds to a leaf or a department node; (c) price, fstsubtree and sndsubtree, used to pick out respectively the herbal variety and the two subtrees at a department node. Justify your answer via describing the behaviour of isLeaf, value, fstsubtree and sndsubtree: as an instance, the discount isLeaf(Leaf) real describes part of the behaviour of isLeaf. [8 marks] Consider the feature treeadd described inductively on the structure of binary timber with the aid of treeadd (m, Leaf) = Leaf treeadd (m, Br (n, B1, B2)) = Br (m + n,treeadd (m, B1),treeadd (m, B2)) Give and justify a -term which encodes treeadd, using the -term Y f.(x.F(xx))(x.F(xx)). [6 marks] Give the -time period for the countless binary tree whose branch nodes include zeros at even depths and ones at odd depths, as pictured underneath: 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 . . . [6 marks] 7 [TURN OVER CST.Ninety eight.6.8 10 Logic and Proof Outline the standards in the back of modal logic. Illustrate your answer by way of explaining the meaning of the axiom A tu A. [6 marks] Attempt to prove, using policies for S4, the following sequents: tu(A B) (tuA) (tuB) (tuA) (tuB) tu(A B) For each sequent, in short explain why it's miles legitimate (or is not, as the case may be). [4 + 4 marks] Use decision to derive a contradiction from this set of clauses: P(x, x), P(x, a) P(x, x), P(x, f(a)) P(y, f(x)), P(y, x) [6 marks] eight CST.Ninety eight.6.Nine eleven Complexity Theory Here are a few informally expressed evaluations approximately computational complexity. They may be accurate, incorrect, deceptive or meaningless..RK
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