.answer approproately An undirected network is an undirected graph…

Question Answered step-by-step .answer approproately An undirected network is an undirected graph… .answer approproatelyAn undirected network is an undirected graph in which each edge u ↔ v has an associated capacity c(u ↔ v) > 0. Let there be a source vertex s and a sink vertex t. We wish to find the maximum flow from s to t such that on every edge u ↔ v either there is flow u → v, or there is flow v → u, or there is no flow at all. It is not allowed to have flow in both directions simultaneously. The flow on an edge, whichever direction it is in, must not exceed capacity. We can write the flow constraints in mathematical notation as min f(u → v), f(v → u) = 0 and max f(u → v), f(v → u) ≤ c(u ↔ v) where f(u → v) is the flow from u to v on edge u ↔ v. Note that this differs from the conventional Ford-Fulkerson setup, in which each directed edge has a capacity constraint. (a) Define the value of a flow. State the flow conservation equation. [2 marks] (b) Give an algorithm for finding a maximum flow. [6 marks] (c) Prove that your algorithm returns a valid flow. [4 marks] (d) Prove that your algorithm returns a maximum flow. [4 marks] (e) Define the capacity of a cut in an undirected network. Show that the maximum flow value is equal to the minimum cut capacity. [4 marks] [Hint: You may refer to code from lecture notes without repeating it in your answer. You may quote without proof any theorems from lecture notes.]A na¨ıve user translates the following C code: extern int h(int *x, int flag); int f(int *x) { return h(x, x[0]); } int g(int *x) { return h(x + 2, (x[5]+x[6]) | 1); } into the following assembly code for the MIPS R2000: .set noreorder .globl f,g ; export f,g (implicitly import ‘h’) f: lw $5,0($4) ; r4 holds ‘x’, load *x as 2nd argument j h ; tail-call to h g: add $4,$4,8 ; r4 holds ‘x’, load &x[2] as 1st argument lw $5,12($4) ; r4 holds ‘x+2’, load x[5] as 2nd argument lw $6,16($4) ; r4 holds ‘x+2’, load x[6] to a temporary add $5,$5,$6 ; do the ‘+’ … or $5,$5,1 ; … and the ‘|’. j h ; tail-call to h Each line of the above assembler program is individually a legal instruction or pseudo-instruction with valid comment. Explain in detail the effect of calling the assembler version of f with a suitable argument including a C function which exactly corresponds to the effect of the assembler version of f. [5 marks] State the purpose of the .set noreorder directive. [2 marks] Explain how the programmer has failed to understand the R2000 instructions and give a correct translation of the C code into assembly code (do not suggest removing the .set noreorder as part of the answer). [5 marks] Explain briefly the origins of the errors (in both f and g) in terms of MIPS R2000 architecture. [5 marks] How might knowing the first instruction of the compilation of h() affect your answer? [3 marks](a) Compare and contrast the problems experienced in developing the London Ambulance control system with those of the Cambridge University financial accounting system (CAPSA). [6 marks] (b) For each of these systems, describe software engineering techniques that might have been used to avoid the problems. Identify advantages and disadvantages of these techniques.(i) Why would an IPv6 based provider allocate four /64 networks for yourpremises when each /64 represents 264 addresses? [2 marks](ii) A colleague has IPv6 with another provider; they only allow one /64 foreach domestic installation. In the past your colleague has used a NAT andmany IPv4 private address blocks, but keenly adopted IPv6 permittingthem to upgrade their home network. They are now using blocks of theallocated /64 and a router in their home to interconnect the subnets.Not everything is working as they hoped; for example, sometimes IoTdevices can’t connect to the Internet to update and your colleague cannot connect to their front-door camera when at work.Explain what sort of problems your colleague may face along with methodsby which they could verify the root cause. [6 marks](iii) Explain to your colleague why you might not be able to lend them one ofyour /64 allocations, even though the /64 blocks (provided to you by yourISP) are each globally routable addresses. [2 marks](b) A local area network may carry several different LANs simultaneously; such anetwork would be designated for known sets of HomePlug devices.Describe a physical line coding approach for the HomePlug devices that: allowstwo or more simultaneous virtual local area networks to fairly share the samephysical channel, but does not permit trivial interception of network traffic.Outline your approach along with its benefits and drawbacks, comparing it withthe simplest use of VLAN tags in EthernetThe network illustrated above represents an Ethernet Layer-2 network that usesspanning-tree to compute forwarding tables. Assume all links have a link-weight ofone.[Note: Tie-breaking/leader-elections use the switch identifier from this diagram.](a) Compute the steady state routing/forwarding table for Switch 3.[4 marks](b) Noting which switches recompute a solution, enumerate the changed forwardingtables in switches of this network resulting from the complete failure and removalof link D.[9 marks](c) Following the removal of Link D, a new link H is added between Switch 1 and4; however, this link fails frequently.Denied access to monitor the network-traffic, outline a diagnostic strategy toidentify the faulty Link H, making clear how the network-operator might useinterrogation of network switch forwarding tables.[4 marks](d) Now suppose the switches do not permit interrogation of switch forwardingtables and that the link status information is untrustworthy. Outline othertechniques that might be used to identify the failed link.For each e ∈ N, let ϕe denote the partial function N * N computed by the registermachine with index e.(a) What is meant by a universal register machine for computing partial functionsNk * N of any number of arguments k. [3 marks](b) How would you modify the machine from Part (a) to compute the partialfunction u : N2 * N satisfying u(e, x) ≡ ϕe(x) for all e, x ∈ N? [2 marks](c) Given a register machine computable partial function g : N2 * N, show thatthere is a total function ¯g : N → N which is register machine computable andwhich satisfies u(¯g(x), y) ≡ g(x, y) for all x, y ∈ N. [7 marks](d) Suppose h : N → N is a total function which is register machine computable.Show that there exists a number n ∈ N such that ϕn and ϕh(n) are equal partialfunctions.[Hint: let g be the computable partial function defined by g(x, y) ≡u(h(u(x, x)), y) and consider ¯g(e) where ¯g is the function obtained from g asin Part (c) and e is the index of some register machine that computes it.](a) Explain an efficient method to find the k-th smallest number in a set of nnumbers (output: one number), without first sorting the n numbers, and discussits complexity in terms of n and k. [4 marks](b) Explain an efficient method to find the k smallest numbers in a set of n numbers(output: k numbers), without first sorting the n numbers, and discuss its complexity in terms of n and k. How much extra work is needed comparedto (a)? [4 marks](a) Although the following code compiles and executes without error, give four reasons why it is a poor test. @Test public void testIt() { long time = System.currentTimeMillis(); double r = solve(40229321L); if (r < 1000.0) { assertThat(r == 430.6).isTrue(); } long elapsed = System.currentTimeMillis() - time; assertThat(elapsed).isLessThan(3000); } [8 marks] (b) You are running a project to develop the next version of an operating system that supports mandatory access control and limits the covert-channel bandwidth that a process at security level High can use to signal down to a process at security level Low. Discuss the relative contribution of unit testing, integration testing and regression testing in checking that the covert-channel bandwidth is still acceptably low. [8 marks] (c) The operating system is now going to be used in a different environment so that the load pattern will change. How might this affect covert-channel bandwidth? [4 marks] Computer Science Engineering & Technology C++ Programming COM 105 Share QuestionEmailCopy link Comments (0)