国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫G6017 Program Analysis

時間:2024-01-14  來源:合肥網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 &#***3; 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 &#***3; 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 &#***3; 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 &#***3; 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 程序設計
  • 下一篇:TEMU FUND海外拼多多是什么?一篇文章告訴你
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    亚洲专区在线视频| 超碰97国产在线| 色综合天天狠天天透天天伊人| 91精品国产一区| 91九色视频在线观看| 91av中文字幕| 国产成+人+综合+亚洲欧美丁香花| 亚洲中文字幕久久精品无码喷水 | 久久99精品久久久久久久久久| 97精品国产97久久久久久免费| 国产日韩欧美在线| 国产精品一区免费观看| 成人免费网站在线| 99国产视频| 久久精品香蕉视频| 久久精品视频播放| 久久躁狠狠躁夜夜爽| 欧美久久精品一级黑人c片| 欧美精品videos性欧美| 午夜精品一区二区三区在线| 日日骚一区二区网站| 欧美一区亚洲二区| 国产午夜精品一区| 久久久免费在线观看| 国产精品视频久久| 中文字幕一区二区三区四区五区六区| 日韩一区免费观看| 欧美xxxx黑人又粗又长精品| 久久久久一区二区| 黄在线观看网站| 色黄久久久久久| 欧美日本国产精品| 国产精品2018| 日韩中文字幕av| 色在人av网站天堂精品| 五月天在线免费视频| 精品欧美国产一区二区三区不卡| 国产又黄又爽免费视频| 国产脚交av在线一区二区| 国产成人无码a区在线观看视频 | 久久精品电影网站| 亚洲综合小说区| 欧美亚洲黄色片| 91久久国产综合久久91精品网站| 日韩在线播放av| 亚洲一区高清| 国产日韩在线播放| 久久久久久久久国产| 中文字幕一区二区三区四区五区 | 免费一级特黄特色毛片久久看| 国产美女网站在线观看| 久久精品magnetxturnbtih| 国产精品国产三级国产专播精品人 | 日产国产精品精品a∨| 狠狠色综合一区二区| 久久久免费在线观看| 久久久久国产一区二区三区| 精品一区二区国产| 国产不卡一区二区三区在线观看 | 亚洲精品一区国产精品| 国产综合久久久久| 国产成人精品免费视频| 伊人婷婷久久| 国模精品娜娜一二三区| www.日韩av.com| 日韩中文字幕在线免费| 91精品视频观看| 宅男一区二区三区| 国产一区二区三区黄| 国产精品无码av在线播放| 日本亚洲欧美成人| www..com日韩| 在线日韩av永久免费观看| 国产午夜精品在线| 国产精品秘入口18禁麻豆免会员| 日韩中文字幕在线免费| 91麻豆桃色免费看| 亚洲精品欧洲精品| 91精品久久久久久久久久久 | 欧美人与性动交a欧美精品| 精品嫩模一区二区三区| 日韩视频―中文字幕| 日本一区二区精品视频| 2019日本中文字幕| 少妇人妻在线视频| 91精品国产自产在线观看永久| 一本色道久久88亚洲精品综合 | 日韩中文字幕在线看| 日本一区二区免费高清视频| 久久久亚洲国产天美传媒修理工| 亚洲一区二区三区777| 成人av影视在线| 一区不卡视频| 91精品国产高清久久久久久| 亚洲av综合色区| 国产成人福利网站| 日韩精品第1页| 色噜噜国产精品视频一区二区 | 午夜久久资源| 久久久国产精品一区二区三区| 日韩一级片一区二区| 国产第一页视频| 日本一区二区高清视频| 日韩在线中文视频| 欧美日韩亚洲一| 欧美成人免费在线观看| 成人精品视频一区二区| 午夜美女久久久久爽久久| 久久资源av| 欧美日本亚洲| 一区二区三区我不卡| 91久久精品久久国产性色也91| 午夜肉伦伦影院| 久久久久久久影院| 国产一区亚洲二区三区| 中文字幕在线观看一区二区三区| 久久日韩精品| 黄色一级一级片| 一本久道高清无码视频| 久久精品第九区免费观看| 加勒比成人在线| 亚洲一区二区高清视频| 国产av人人夜夜澡人人爽麻豆| 青青草视频在线免费播放| 精品高清视频| 国产盗摄xxxx视频xxx69| 狠狠久久综合婷婷不卡| 亚洲色成人一区二区三区小说 | 国产精品久久..4399| 成人一区二区在线| 日本久久亚洲电影| 另类美女黄大片| 国产精品av电影| 黄色录像特级片| 亚洲精品国产精品久久| 国产精品日韩在线一区| 国产精品一区二区不卡视频| 欧美一区二区三区电影在线观看| 久久九九有精品国产23| 91精品国产综合久久香蕉| 欧美 国产 精品| 日本一区免费在线观看| 欧美人成在线视频| 久久精品视频在线观看| 91精品久久久久久久久久入口| 欧美精品欧美精品系列c| 亚洲人成人77777线观看| 国产精品日韩精品| 91av在线精品| 国产伦精品一区二区三毛| 欧美一性一乱一交一视频| 宅男一区二区三区| 国产精品日本精品| 九九九九九精品| 91国产精品视频在线| 国产尤物99| 欧美日韩在线成人| 日本a级片电影一区二区| 亚洲国产日韩欧美| 中文字幕一区二区三区四区五区 | 99久久精品久久久久久ai换脸| 精品日本一区二区三区| 欧美一区二区三区四区夜夜大片| 欧美成人免费va影院高清| 久久精品视频亚洲| 久久观看最新视频| 91精品久久久久久久久久 | 精品午夜一区二区三区| 青草青草久热精品视频在线观看 | 正在播放国产精品| 麻豆乱码国产一区二区三区| 日韩中文字幕av| 久久99久久精品国产| 久色视频在线播放| 99免费视频观看| av一区二区三区四区电影| 国产日韩精品在线| 美媛馆国产精品一区二区| 欧美日韩一级在线| 欧美日韩黄色一级片| 秋霞久久久久久一区二区| 日本精品视频在线观看| 色婷婷精品国产一区二区三区| 亚洲欧美国产精品桃花| 欧美日本啪啪无遮挡网站| 精品久久一二三| 欧美日本高清一区| 又粗又黑又大的吊av| 制服诱惑一区| 亚洲精品欧美精品| 日韩av片免费在线观看| 日本一本中文字幕| 欧洲亚洲免费视频| 黄色一级片播放| 国产伦精品一区二区三区照片91| 精品网站在线看| 国产一区在线免费| 高清在线观看免费| 91国产视频在线播放| 久久国产日韩欧美|