99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫G6017 Program Analysis

時間:2024-01-14  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



THE UNIVERSITY OF SUSSEX
BSc and MComp SECOND YEAR EXAMINATION January 2022 (A1)
Program Analysis Assessment Period: January 2022 (A1)
Candidate Number
G6017
 DO NOT TURN OVER UNTIL INSTRUCTED TO BY THE LEAD INVIGILATOR
Candidates should answer TWO questions out of THREE.
If all three questions are attempted only the first two answers will be marked.
The time allowed is TWO hours. Each question is worth 50 marks.
At the end of the examination the question paper and/or answer book, used or unused, will be collected from you before you leave the examination room.

G6017 Program Analysis
1.
(a) Precisely specify the conditions under which the following algorithm returns
true, and then discuss, in detail, the running time of the algorithm. If you think it has different best- and worst-case running times then these should be considered separately, and you should explain the conditions under which best and worst-cases arise.
You must fully explain your answer and use O,  and  appropriately to receive full marks.
  Algorithm Ex1 ((𝑎1, ... 𝑎𝑛), (𝑏1, ... , 𝑏𝑚))
𝑘←0
for 𝑖 ← 1 to 𝑛 do
𝑗←1
while 𝑗 ≤ 𝑚 do
If𝑎 ==𝑏 𝑖𝑗
𝑘←𝑘+1 𝑗←𝑗+1
return 𝑘 > 0
 (b) Precisely specify the conditions under which the following algorithm returns true, and then discuss, in detail, the running time of the algorithm. If you think it has different best- and worst-case running times then these should be considered separately, and you should explain the conditions under which best and worst-cases arise.
You must fully explain your answer and use O,  and  appropriately to receive full marks.
[10 marks]
 Algorithm Ex2 ((𝑎1, ... 𝑎𝑛), (𝑏1, ... , 𝑏𝑛)) w**2; ← w**5;w**3;w**6;Ү**;
for𝑖←1to𝑛 do 𝑗←𝑛
while𝑗>0andw**2; ==w**5;w**3;w**6;Ү**;do If𝑎 ==𝑏
𝑗←𝑗−1 return w**2;
𝑖𝑗
w**2; ← 𝑓𝑎𝑙w**4;Ү**;
 2
[10 marks]

(c) Precisely specify the conditions under which the following algorithm returns true, and then discuss, in detail, the running time of the algorithm. If you think it has different best- and worst-case running times then these should be considered separately, and you should explain the conditions under which best and worst-cases arise.
You must fully explain your answer and use O,  and  appropriately to receive full marks.
 Algorithm Ex3 ((𝑎1, ... 𝑎𝑛), 𝑏)
w**2;←0
w**8; ← 𝑓𝑎𝑙w**4;Ү**;
for 𝑖 ← 1 to 𝑛 − 1 do
𝑧 ← 𝑎𝑖 + 𝑎𝑖+1 If 𝑧 < 𝑏
w**2;←w**2;+1
else
If w**2; < 0 return w**8;
w**2;←w**2;−1 w**8; ← w**5;w**3;w**6;Ү**;
 (d) A data pattern analyser is to be built that can detect and count up the number of occurrences of two and three letter same letter sequences in a sequence (e.g. (a,a) or (b,b,b) ). The analyser should stop if it encounters * in the sequence and return the number of occurrences found up to that point in the form of a 2-tuple (#2𝐿Ү**;w**5;w**5;Ү**;w**3;𝑆Ү**;w**2;w**6;Ү**;𝑛𝑐Ү**;w**4;, #3𝐿Ү**;w**5;w**5;Ү**;w**3;𝑆Ү**;w**2;w**6;Ү**;𝑛𝑐Ү**;w**4;). A 3 letter sequence should only count as a 3 letter sequence, not an occurrence of two 2 letter sequences. No letter in the input sequence ever occurs more than 3 times in a row.
So, for example:
Input string (a,b,a,b,b,a,a,*)
(x,x,x,y,y) (p,q,p,z,z,*) (*,a,a)
(x,x,a,d,*, s,s,s,l)
2 letter sequences found
2 1 1 0 1
3 letter sequences found
0 1 0 0 0
[10 marks]
                     3

Produce a formal statement of this problem, and then write an algorithm to solve the problem using a pseudo code style similar to the one shown in parts (a) to (c). State the bounds on the best and worst case performance of your algorithms using O,  and  appropriately to receive full marks.
[10 marks]
(e) A file is protected by a random password consisting of 𝑛 binary bits. All password combinations are equally probable. To access the file we need the correct password. The process of applying the password to the file takes 10ms regardless of the value of 𝑛. Brute force attack is always a viable basic strategy for guessing a password.
To ensure that the file remains sufficiently secure, we need to ensure that there is no more than a 1% chance over 30 days that the password is guessed by a hacker program utilizing brute force working 24 hours a day, 7 days a week. How many bits should be specified for the password?
2.
(a) A student has been asked to put some parcels on a shelf. The parcels all weigh different amounts, and the shelf has a maximum safe loading weight capacity of 100 Kg. The weight of parcels are as follows (in Kg):
𝒑𝒂𝒓𝒄𝒆𝒍 𝒘𝒆𝒊𝒈𝒉𝒕 (𝑲𝒈)
18 2 50 ** 4 15 54 65 7 20
The student has been asked to load the maximum weight possible parcels on the shelf subject to the maximum safe loading weight.
State two possible approaches for a greedy algorithm solution to solve this problem. In each case, state clearly the result you would get from applying that approach to this problem, stating whether the solution is optimal or not. If
[10 marks]
                  4

your answer does not produce an optimal solution, what algorithm could be employed to find one?
[10 marks]
(b) One example of a greedy algorithm is the Dijkstra algorithm for finding the lowest cost path through a weighted graph. The diagram below shows two weighted graphs that a student wants to investigate using Dijkstra’s algorithm. In each case the task it to find the lowest cost of reaching every node from v1. Each graph has a single negative weight in it.
Graph (a) Graph (b)
One of the graphs will yield a correct analysis of the lowest cost for all vertices, and the other will produce an incorrect analysis. Which of the two graphs will produce the incorrect analysis, and explain why the greedy nature of Dijkstra’s algorithm is responsible for the incorrect analysis. Your answer should include the key concept of an invariant.
[5 marks]
(c) The priority queue is a widely used data structure. Priority queues may be implemented using binary heaps and simple linear arrays. For the basic priority queue operations of:
• Building an initial queue
• Taking the highest priority item off the queue
• Adding a new item to the queue
Compare and contrast the running time complexities (best and worst cases) associated with implementations using binary heaps and simple linear arrays. You may find it helpful to use diagrams to support your answer.
[10 marks]
           5

(d) A recursive algorithm is applied to some data 𝐴 = (𝑎1, ... , 𝑎𝑚) where 𝑚 ≥ 2 and 𝑚 is even. The running time 𝑇 is characterised using the following recurrence equations:
𝑇(2) = 𝑐 when the size of 𝐴 is 2 𝑇(𝑚) = 𝑇(𝑚 − 2) + 𝑐 otherwise
Determine the running time complexity of this algorithm. Note that 𝑚 is even and the problem size reduces by 2 for each recursion.
[10 marks]
(e) Another recursive algorithm is applied to some data 𝐴 = (𝑎1, ... , 𝑎𝑚) where 𝑚 = 2w**9; (i.e. 2, 4, 8,16 ...) where w**9; is an integer ≥ 1. The running time T is characterised using the following recurrence equations:
𝑇(1) = 𝑐 when the size of 𝐴 is 1, and 𝑐 is a constant 𝑇(𝑚) = 2𝑇 (𝑚) + 𝑚 otherwise
2
Determine the running time complexity of this algorithm. You will find it helpful to recall that:
w**9;=∞ 1
∑2𝑘 →1 w**9;=1
And
2𝑙w**0;𝑔2(w**9;) = w**9;
3.
[15 marks]
(a) The subset sum problem can be reliably solved optimally using the dynamic programming algorithm shown below:
   SubsetSum(𝑛, 𝑊)
Let w**;(0,w**8;) = 0 for each w**8; ∈ {0,...,𝑊} for 𝑖 ← 1 w**5;w**0; 𝑛
for w**8; ← 0 w**5;w**0; 𝑊 ifw**8;<w**8;𝑖 then
w**;(𝑖, w**8;) ← w**;(𝑖 − 1, w**8;)
else
w**;(𝑖,w**8;)←max(w**8;𝑖 +w**;(𝑖−1,w**8;−w**8;𝑖),w**;(𝑖−1,w**8;))
 6

Where 𝑛 is the number of requests, 𝑊 is the maximum weight constraint, w**8;𝑖 is the weight associated with request 𝑖, and w**; is the solution space.
You are given a set of requests and their corresponding weights. The maximum weight constraint 𝑊 is 12.
𝒊 𝒘𝒊
11 2** 10 46 53 62
Copy the following solution space table to your answer book (do not write your answer on the question paper) and complete the table to determine the optimal subset sum.
                       𝒊
6 5 4 3 2 1 0
𝒘
0 1 2 3 4 5 6 7 8 9 10 11 12
[10 marks]
     (b) The sequence alignment problem may be solved by the following dynamic programming algorithm:
   SequenceAlignment(X, Y):
Let w**;(𝑖, 0) ← 𝑖 × 𝛾 for each 1 ≤ 𝑖 ≤ 𝑛 Let w**;(0, 𝑗) ← 𝑗 × 𝛾 for each 1 ≤ 𝑗 ≤ 𝑚 For 𝑖 ← 1 w**5;w**0; 𝑛
For 𝑗 ← 1 w**5;w**0; 𝑚
w**;(𝑖, 𝑗) ← min [𝛿(w**9; , 𝑦 ) + w**;(𝑖 − 1, 𝑗 − 1),
𝑖𝑗
𝛾 + w**;(𝑖, 𝑗 − 1),
𝛾 + w**;(𝑖 − 1), 𝑗 ]
 7

Where 𝑋 = (w**9; ,...,w**9; ) and 𝑌 = (𝑦 ,...,𝑦 ) are two sequences to be aligned, 𝛿(w**1;,w**2;) 1𝑛 1𝑚
is a penalty associated with matching symbol w**1; to w**2;, and 𝛾 is a gap penalty. The sequence alignment algorithm is applied using the following data:
𝑋 =(𝑎,𝑏,𝑐)
𝑌 = (𝑎,𝑏,𝑎,𝑏,𝑏)
𝛾=4
The delta function is defined for symbols in the alphabet {𝑎, 𝑏, 𝑐} :
aBc a045 b407 c570
Generate the problem space matrix w**; and thus determine the optimal alignment between 𝑋 and 𝑌.
[15 marks] (c) Draw a Minimum Spanning Tree derived from the graph shown below.
[5 marks]
(d) The Ford-Fulkerson algorithm is used to determine network flow. The diagram below represents a data network that connects a Data Service Provider (DSP)
                         8

connected to w**7;1(w**4;) to a customer connected to w**7;6(w**5;). Each edge represents a single data transmission link.
The notation w**1;/w**2; indicates a current actual forwards flow w**1; measured in Gb/s in a pipe with a maximum capacity of w**2; also measured in Gb/s.
At the outset no data is being sent by the DSP to the customer.
i. Show the residual graph that will be created from the initial empty flow. When drawing the residual graph, show a forward edge with capacity w**9; and a backward edge with flow 𝑦 by annotating the edge w**9;⃗; 𝑦**; .
[2 marks]
ii. What is the bottleneck edge of the path (w**4;, w**7;3, w**7;4, w**5;) in the residual graph you have given in answer to part (a) ?
[2 marks]
iii. Show the residual graph after incorporating the simple path (w**4;, w**7;3, w**7;4, w**5;) that results from augmenting the flow based on the residual graph you have given in answer to part (a).
[4 marks]
iv. Repeat the process outlined above incorporating additionally the simple paths (w**4;, w**7;3, w**7;2, w**7;5, w**5;) , (w**4;, w**7;2, w**7;5, w**7;4, w**5;) and (w**4;, w**7;2, w**7;5, w**5;) showing each residual graph, to determine the maximum flow between w**4; and w**5;, and thus the maximum data bandwidth that can be achieved between the DSP and the customer.
請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:代做SIPA U6500、代寫 java,python 程序設(shè)計
  • 下一篇:TEMU FUND海外拼多多是什么?一篇文章告訴你
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                在线视频你懂得一区二区三区| 成人综合婷婷国产精品久久免费| 蜜桃精品视频在线| 欧美成人国产一区二区| 国产一区中文字幕| 国产精品久久久一本精品| 91小视频在线| 日韩avvvv在线播放| 亚洲精品在线免费观看视频| 丁香婷婷综合色啪| 亚洲精品国产一区二区精华液 | 91精品国产一区二区三区香蕉| 亚洲妇熟xx妇色黄| 久久一区二区三区四区| 色诱视频网站一区| 日韩影院在线观看| 精品国产污污免费网站入口| 91在线码无精品| 日韩中文字幕一区二区三区| 久久久精品综合| 欧美精品aⅴ在线视频| 国产精品影视天天线| 亚洲私人影院在线观看| 日韩一区国产二区欧美三区| 成人黄色电影在线| 亚洲精品久久7777| 国产欧美精品一区aⅴ影院 | 国产精品18久久久久| 中文字幕在线视频一区| 欧美日本韩国一区| 99在线精品视频| 久99久精品视频免费观看| 国产精品无人区| 日韩精品中文字幕一区二区三区| 色婷婷香蕉在线一区二区| 国产一区二区免费看| 一区二区三区四区不卡在线 | 国产精品视频你懂的| 欧美理论电影在线| 91国偷自产一区二区三区成为亚洲经典| 国产一区二区三区日韩| 最新日韩av在线| 国产精品久久久久aaaa| 久久久久久久av麻豆果冻| 欧美日本免费一区二区三区| 99久久免费视频.com| 激情五月激情综合网| 老司机午夜精品| 三级成人在线视频| 亚洲成人免费影院| 日韩国产欧美三级| 亚洲h精品动漫在线观看| 亚洲欧美在线视频观看| 国产欧美一区二区精品性色| 国产亚洲一区二区在线观看| 久久综合色之久久综合| 久久综合九色综合97婷婷女人| 欧美精品一区二区三区在线| 精品久久人人做人人爽| www国产精品av| 国产精品全国免费观看高清| 国产精品福利一区| 一区二区三区四区中文字幕| 午夜影院久久久| 蜜桃精品视频在线| 国产在线国偷精品免费看| 久久精品久久精品| 国产寡妇亲子伦一区二区| 粉嫩久久99精品久久久久久夜| 成人黄色大片在线观看| 99麻豆久久久国产精品免费| 91麻豆精品一区二区三区| 欧美丝袜自拍制服另类| 欧美日精品一区视频| 91精品国产全国免费观看| 日韩午夜电影av| 亚洲精品一区二区三区99| 国产精品久久国产精麻豆99网站| 成人欧美一区二区三区视频网页| 亚洲永久精品大片| 奇米色777欧美一区二区| 日韩精品三区四区| 韩国视频一区二区| 欧美色区777第一页| 蜜桃久久av一区| 国产成人无遮挡在线视频| 91成人在线精品| 日韩一级片在线观看| 欧美日韩国产精选| 久久精品日韩一区二区三区| 亚洲欧美日韩国产综合| 久久精品国内一区二区三区| 91视频在线看| 久久久久久久久久久久久女国产乱| 一色屋精品亚洲香蕉网站| 日韩av在线发布| 亚洲另类一区二区| 国产在线精品免费av| 91在线播放网址| 国产喂奶挤奶一区二区三区| 亚洲一区二区不卡免费| 国产乱码精品一品二品| 91麻豆.com| 日韩免费高清视频| 亚洲免费观看高清| 国产一区二区电影| 在线免费观看不卡av| 久久色视频免费观看| 中文字幕一区二区三区精华液| 天堂蜜桃91精品| 国产成人免费视频 | 成人av影视在线观看| 91久久免费观看| 欧美电影免费观看高清完整版在| 中文字幕久久午夜不卡| 日韩精品视频网| 91香蕉视频污在线| 久久精品一区二区三区不卡牛牛| 五月婷婷激情综合网| 成人一区二区在线观看| 91超碰这里只有精品国产| 一区二区三区国产精品| 99久久99久久综合| 欧美极品美女视频| 国产91综合一区在线观看| 天天综合网 天天综合色| 欧美日韩精品免费| 秋霞午夜av一区二区三区| 日韩一级完整毛片| 韩国精品主播一区二区在线观看 | 婷婷亚洲久悠悠色悠在线播放| 色欲综合视频天天天| 亚洲视频一二三区| 91免费版在线| 亚洲国产美女搞黄色| 欧美久久久一区| 日日夜夜一区二区| 久久蜜桃一区二区| 成人黄页在线观看| 亚洲综合精品自拍| 欧美精品久久一区二区三区| 久久精品国产**网站演员| 国产亚洲一二三区| 99久久久久久| 亚洲久草在线视频| 欧美日韩午夜在线| 舔着乳尖日韩一区| 日韩免费看的电影| heyzo一本久久综合| 国产精品理论在线观看| 成人av片在线观看| 亚洲一区在线播放| 日韩一区二区三区高清免费看看| 免费高清在线一区| 中文字幕高清不卡| av日韩在线网站| 亚洲成人免费视频| 中文字幕精品—区二区四季| 91偷拍与自偷拍精品| 午夜精品一区在线观看| 在线播放91灌醉迷j高跟美女| 六月婷婷色综合| 综合在线观看色| 欧美一区二区视频在线观看2020 | 欧美视频一区二区| 五月天激情小说综合| 亚洲国产精品传媒在线观看| 91影视在线播放| 激情综合色播激情啊| 国产精品久久影院| 日韩精品一区二区在线观看| 国产精品18久久久久久久久久久久 | 国产精品蜜臀在线观看| 成年人国产精品| 日精品一区二区三区| 日韩一区日韩二区| 欧美一区二区三区性视频| 一道本成人在线| 久久99精品国产麻豆不卡| 亚洲欧洲成人自拍| 欧美精品一区二区久久久| 欧美日本一区二区在线观看| 色综合天天天天做夜夜夜夜做| 国产一区在线精品| 久久精品国产免费看久久精品| 亚洲国产日韩精品| 玉米视频成人免费看| 中国av一区二区三区| 精品国产一区二区在线观看| 欧美日韩免费视频| 欧美日韩一二区| 欧美视频精品在线| 欧美在线观看视频在线| 在线亚洲人成电影网站色www| 国产丶欧美丶日本不卡视频| 免费观看久久久4p| 久久99国产精品免费| 蜜桃91丨九色丨蝌蚪91桃色| 男人的j进女人的j一区| 久久国产精品免费|