You are given a directed graph with (probably bad) weighted edges,… You are given a directed graph with (probably bad) weighted edges, whe

You are given a directed graph with (probably bad) weighted edges,… You are given a directed graph with (probably bad) weighted edges, wherein the shortestroute among any  vertices is guaranteed to have at most okay edges. Give an set of rules thatreveals the shortest direction between two vertices u and v in O(okEfour.Eleven. Give an algorithm that takes as input a directed graph with fine aspect lengths, and returnsthe period of the shortest cycle in the graph (if the graph is acyclic, it should say so). Youralgorithm need to take time at maximum O(3).FourV algorithm for the subsequent project.Input: An undirected graph G = (V, E); edge lengths le > 0; an edge e ? E.Output: The duration of the shortest cycle containing side e.    Four.Thirteen. You are given a hard and fast of towns, at the side of the pattern of highways between them, within the form of anundirected graph G = (V, E). Each stretch of highway e ? E connects two of the towns, and yourecognize its length in miles, le. You want to get from town s to metropolis t. There’s one problem: your carcan simplest maintain sufficient gas to cover L miles. There are fuel stations in every metropolis, but now not amongcities. Therefore, you could most effective take a route if every certainly one of its edges has period le ? L.    (a) Given the problem to your car’s gas tank ability, display a way to determine in linear timewhether or not there is a feasible path from s to t.(b) You are now planning to buy a brand new vehicle, and you want to realize the minimum gas tankcapability that is needed to journey from s to t. Give an O((algorithm todetermine this Circumstances that mitigate minor infractions of the guidelines promulgatedby using the Information Technology Syndicate include, amongst other matters,inebriation.(iii) Appropriate use of the Cambridge University Data Network (CUDN)means bona fifide instructional activity plus a low stage for private functions.(iv) Small quantities of commercial activity are perfect so long as the Useris appearing in a private potential.[4 marks](c) The IT enterprise is more and more aware about its personal environmental effect.Describe at the least one environmental hassle to which the industry contributesand the way, as an IT professional, you could help to resolve this trouble. [4 marks](d) “Social engineering is a extra hazard to laptop safety than laptopcracking software program.” What is social engineering and what measures may betaken to defend in opposition to it? [2 marks](e) What is copyleft and how is it used to shield free, open-source, software program?(a) Write quick notes on polymorphism in ML, using lists and popular listing featureswhich includes @ (append) and map. [4 marks](b) Explain the meaning of the following statement and describe the correspondinginformation structure, which includes the function of polymorphism.Datatype ‘a se = Void may be represented using this datatype via writing thecapabilities encode_list of type ‘a list -> ‘a se and decode_list of kind’a se -> ‘a listing, such that decode_list (encode_list xs) = xs for eachlisting xs. [3 marks](d) Consider the subsequent feature declaration:amusing lovely p Void = false cute p (Unit x) = p xadorable p (Join(u,v)) = adorable p u orelse lovable p v;What does this characteristic do, and what is its kind? [4 marks](e) Consider the subsequent expression:fn p => lovable (lovely p)What does it imply, and what is its kind? Justify your solution carefully.[5 marks]2CST.2014.1.32Foundations of Computer Science(a) Write quick notes on the queue information structure and the way it could be carried outeffiffifficiently in ML. In a specific experience, what is the price of the primary queueoperations? (It is not required to offer ML code.) [6 marks](b) Run-length encoding is a way of compacting a list wherein certain elementsare repeated frequently in a row. For instance, a listing of the shape [a, a, a, b, a, a]is encoded as [(3, a),(1, b),(2, a)]. Write a polymorphic feature rl_encode toperform this encoding. What is the sort of rl_encode? [6 marks](c) The simple assignment of trying out whether or not  lists are identical can be generalised to permita sure range of errors. We bear in mind three styles of mistakes:• element mismatch, as in [1,2,3] versus [1,9,3] or [1,2,3] as opposed to [0,2,3]• left deletion, as in [1,3] versus [1,2,3] or [1,2] as opposed to [1,2,3]  31194501          Image transcription textQUESTION 4 (a) Explain thedifferences between a Tree, Binary,rTree and Binary Search Tr… Show more… Show more  Computer Science Engineering & Technology Information Security CMPE MISC Share QuestionEmailCopy link