91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

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

代寫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海外拼多多是什么?一篇文章告訴你
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

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

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

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    激情图片小说一区| 久久久久久久久久美女| 精品999久久久| 亚洲精品亚洲人成人网| 久久av资源网| 国产综合视频| 欧美日韩精品电影| 亚洲色大成网站www久久九九| 青草国产精品久久久久久| 91影视在线播放| 欧洲生活片亚洲生活在线观看| 国产欧美日韩精品一区| 麻豆国产91在线播放| 狠狠综合久久| 欧美mv日韩mv亚洲| 三级在线观看一区二区| 国产精品啊v在线| 91精品国产一区二区三区蜜臀| 亚洲最大成人综合| 91丨九色丨国产丨porny| 在线免费不卡视频| 一区二区三区免费看视频| av电影一区二区| 欧美日韩国产欧美日美国产精品| 亚洲女子a中天字幕| 97国产一区二区| 91麻豆精品国产91久久久久久 | 欧美理论在线| 日韩一区二区麻豆国产| 日韩精品国产欧美| 一区二区精品在线| 中文字幕成人av| 不卡电影一区二区三区| 欧美三区在线观看| 亚洲成人动漫在线观看| 极品日韩av| 中文字幕的久久| 91美女福利视频| 欧美白人最猛性xxxxx69交| 久久国产精品72免费观看| 国产精品一区二区在线观看| 国产精品视频在线看| 99re成人精品视频| 日韩精品中文字幕在线不卡尤物| 韩国欧美国产一区| 在线观看一区二区视频| 婷婷夜色潮精品综合在线| 一区二区三区久久网| 亚洲视频中文字幕| 欧美一区二区三区另类| 欧美电视剧在线看免费| 国产成人一区二区精品非洲| 欧美日韩和欧美的一区二区| 精品一区免费av| 欧美日韩大陆一区二区| 青青草国产精品亚洲专区无| 色哦色哦哦色天天综合| 青青青爽久久午夜综合久久午夜 | 国产一区二区三区日韩| 欧美日韩久久久久久| 精品在线你懂的| 欧美日韩视频在线观看一区二区三区| 日韩成人一级大片| 91成人免费在线| 国产在线视视频有精品| 91精品国产综合久久福利软件| 国产一区二区三区四区五区美女| 5月丁香婷婷综合| 国产成人99久久亚洲综合精品| 3d动漫精品啪啪一区二区竹菊| 国产99精品国产| 日韩午夜av一区| 91丨九色丨尤物| 亚洲欧美视频在线观看视频| 国产精品色网| 久久91精品久久久久久秒播| 欧美一区二区成人6969| 99久久久无码国产精品| 国产精品成人午夜| 色哟哟欧美精品| 国产乱妇无码大片在线观看| 日韩欧美一二区| 韩国一区二区三区美女美女秀| 亚洲丝袜精品丝袜在线| 色中色一区二区| 精品一区二区免费视频| www国产成人免费观看视频 深夜成人网| 99久久精品99国产精品| 亚洲人一二三区| 欧美亚洲日本一区| 国产999精品久久| 综合欧美亚洲日本| 色8久久人人97超碰香蕉987| 不卡一二三区首页| 亚洲欧美在线视频观看| 一本到高清视频免费精品| 国产精品一区二区三区四区| 欧美国产欧美综合| 久久亚洲欧美| 99久久夜色精品国产网站| 18成人在线视频| 欧美日韩午夜精品| 欧美日韩免费观看一区| 亚洲第一成年网| 精品国产髙清在线看国产毛片| 亚洲精品一级| 国产精品一区二区久激情瑜伽| 中文字幕一区二区在线播放| 欧美日韩精品福利| 韩国在线一区| 精品亚洲国产成人av制服丝袜| 国产精品无遮挡| 欧美午夜影院一区| 黄色成人在线网址| 久久成人免费网| 亚洲青青青在线视频| 91精品久久久久久蜜臀| 国产一区二区高清视频| 成人免费看视频| 五月激情六月综合| 国产欧美一区二区在线| 精品视频免费在线| 99在线|亚洲一区二区| 国产成人在线看| 日韩高清在线电影| 综合久久国产九一剧情麻豆| 日韩免费性生活视频播放| 久久亚洲国产精品日日av夜夜| 欧美在线三区| 国产成a人无v码亚洲福利| 舔着乳尖日韩一区| 中文字幕字幕中文在线中不卡视频| 91精品久久久久久久久99蜜臂| 美玉足脚交一区二区三区图片| 91麻豆视频网站| 久久99久久99小草精品免视看| 国产精品久久久久久久久婷婷| 影音先锋日韩资源| 日韩欧美123| av中文字幕不卡| 久久丁香综合五月国产三级网站| 亚洲日本在线看| 久久精品亚洲乱码伦伦中文| 欧美肥妇bbw| 91极品美女在线| 亚洲欧美视频| 夜久久久久久| 精品二区视频| 国产精品v欧美精品∨日韩| bt7086福利一区国产| 国产精品正在播放| 久久福利资源站| 蜜桃精品视频在线| 性久久久久久久久| 亚洲一区二区三区中文字幕| 专区另类欧美日韩| 国产精品久久久久久久久免费樱桃| 久久综合色播五月| 亚洲精品一区二区三区香蕉 | 免费亚洲电影在线| 午夜在线精品偷拍| 精品亚洲aⅴ乱码一区二区三区| 欧美午夜电影在线观看| 欧美国产乱子伦| 成人黄色软件下载| 国产精品久久久久久久裸模| 久久久久久婷| 免费在线观看成人av| 亚洲欧美日韩国产| 久久成人一区| 久久久久国产精品午夜一区| 噜噜噜在线观看免费视频日韩| 亚洲综合好骚| 一本久久a久久免费精品不卡| 久久久久天天天天| 在线精品亚洲一区二区不卡| 欧美性猛交xxxxxxxx| 欧美男人的天堂一二区| 欧美一区二区三区白人| 精品国产乱码久久久久久久久 | 成人毛片视频在线观看| 粉嫩绯色av一区二区在线观看| 成人av免费在线| 精品欧美黑人一区二区三区| 午夜在线视频观看日韩17c| 亚洲一区二区三区精品动漫| 久久99这里只有精品| 欧美xfplay| 欧美xx69| 丁香婷婷综合激情五月色| 精品少妇一区二区三区| 老司机午夜精品视频| 99久久久久免费精品国产| 日韩女优av电影在线观看| 久久婷婷综合激情| 亚洲欧美激情在线| 免费成人在线观看| 国产成人自拍网| 欧美精品一级| 久久综合中文字幕|