首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
COMP 5416编程讲解、辅导R编程设计、R留学生程序讲解 辅导R语言程序|讲解数据库SQL
项目预算:
开发周期:
发布时间:
要求地区:
COMP 5416 Assignment 2
Due: 16 November 2020, 23:59. Sydney time
Question 1 (TCP, 20%). In the following network, node A transmits packets that pass through B and C, and arrive at the
destination D. The bit rate of all links is R = 1 Mbit/sec. The maximum packet size in the network is 500 Bytes. Ignore the
header size. The one-way propagation delay on each link is 4 msec.
How long does it take to transmit 100 + s packets if TCP Reno is used, where s is the last two digits of your student number.
At the beginning, ssthresh is 8 segment size (4000 bytes). B and C use Store-and-Forward. No packet is lost. There is no
bit-error in transmission. The size of ACK packets is negligible. The size of TCP header is negligible.
$ % & '
2
Question 2 (Queueing Theorem: Simulation, Analysis, and Application, 20%). In this task, you need to simulate and analyze
an M/M/m/n queue with arbitrary m and n. You can reuse the codes in Week 6 Lab to simulate an M/M/m/n queue. You
Python code must be submitted as supplementary material. You also need to theoretically compute the stationary distribution to
verify your simulation. Finally, you will understand how queueing theorem will help design and install real-world telephone and
cellular networks.
Throughout this question, let the arrival rate be λ. Let the service rate of each server be µ.
(1) Let λ = 2 and µ = 3. What is the stationary distribution of an M/M/1/10 queue. Please figure out this result by both
simulation and analysis.
(2) Let λ = 5 and µ = 1. What is the stationary distribution of an M/M/5/10 queue. Please figure out this result by both
simulation and analysis.
(3) Use theoretical analysis only. What is the stationary distribution of an M/M/m/m queue (now n = m). What is the
probability that a new arrival is blocked (dropped) by the system? This probability is defined as pb.
(4) Follow (3). Let µ = 1 and m = 10. If the blocking probability pb must be limited to 0.001, what is the maximum value of
λ?
(5) Follow (3). Let λ = 10 and µ = 1. If the blocking probability pb must be limited to 0.001, what is the minimum value of
m, i.e., the number of servers?
(6) Telecom/cellular companies usually use methods in (4) and (5) to design their telephone/cellular networks. In (4), given
the required blocking probability pb and the number of telephone lines m, they want to know the maximum possible traffic
intensity λ they can accommodate. In (5), given the required blocking probability pb and the traffic intensity λ, they want to
know how many telephone lines they shall install. The method to compute pb is also well known as Erlang Formula. Google
Erlang Formula and answer the following questions.
(a) What are Erlang-B and Erlang-C Formulas? When are they used? What is the difference between them?
(b) In (4) and (5), do you use Erlang-B or Erlang-C Formula? Why?
(7) Use the Erlang table provided, and find the solution to the following question. A base station in a cellular network has 50 +s
channels, where s is the last digit of your student number. Each user uses one channel. On average, each user uses a channel
for 0.5 minutes. The blocking probability must be limited to 0.5%, what is the maximum user arrival rate λ (units/minute) that
can be supported by the base station? Which row/column in the table do you use to find the result?
3
Question 3 (Multi-thread Server: Implementation, 20%). You are given the complete code for the client in Lab in Week 8. Your
task is to write the TCP server. The client code is in client.py. You must not modify this code. (However, you are allowed
to change ServerName and ServerPort). Only Python 3 is allowed.
Different from the server in the lab, the new server must be able to serve multiple clients simultaneously. Please note that the
server code in Week 8 can only accept one client! In order to serve multiple clients simultaneously. The server should run multiple
threads. The server will establish a new connection socket to communicate with one new client, and each new connection socket
will be managed by a new thread. You should self-study the following function: _thread.start_new_thread().
The following figure shows an example of server when two clients are sending images at the same time. The two connections
are closed in the end, demonstrating that there are two concurrent transmissions before the first “Connection closed”.
You also need to capture the concurrent data transmission by Wireshark. In the example in the next page, we can see that the
two clients are running at 192.168.0.3, with port numbers 60458 and 60462. The server is running at 192.168.0.4, with port
number 12011. The throughputs of the two connections are both positive at around the 4th second.
Tasks and submissions:
(1) Build up a multi-thread server which can serve multiple clients at the same time. Submit your server-side Python code.
Submit your server code as Lastname_Firstname_Server.py. We will use the client in Week 8 to test against your server.
(2) Test your server with three clients sending images at the same time. Capture the packets by Wireshark at the server side.
You are allowed to run the server and clients in one computer using localhost. Submit your Wireshark capture. Your capture
file must be smaller than 10MB. Your capture will be ignored and will not be marked if it is greater than 10MB. Submit your
capture as Lastname_Firstname_Capture.pcapng (or .pcap).
(3) In the main submission file, based on your capture in (2), plot the throughput vs. time of the three connections (similar to
the figures in the next page). Show that they are operated in parallel. In the main file, you also need to give the three clients’
IP addresses, clients’ port numbers, server’s IP address, and server’s port number.
4
You overall mark will be zero if you do not submit code in (1), no matter if you submit (2) or (3).
You submission in (2) and (3) will be ignored and will not be marked if your submission in (1) does not work.
You overall mark will be zero if your Wireshark capture in (2) does not match the throughput plots in (3).
5
Question 4 (BER vs SNR with different modulation schemes, 20%). We aim to plot BER vs SNR curves of two modulation
schemes in this question.
(1) BPSK. In wireless communication, we can transmit 0 and 1 through signals −1 and 1 respectively. Both −1 and 1 signals
have power of 1, so that the mean signal power is 1. This is called Binary Phase Shift Keying (BPSK). Due to the existence of
noise, the received signal is −1+n or 1+n respectively, where n is the noise term. n follows Gaussian distribution n ∼ N(0, σ2
).
σ
2
is the power of the noise, and thus 1
σ2 is SNR. If the received signal is ≥ 0, it is decoded as 1; if the received signal is < 0,
it is decoded as 0. We assume that 0 and 1 are sent with equal probabilities. Compute average BER vs SNR of BPSK when
SNR = [0,5,10,15,20,25] dB. Hint: What is dB?
(2) 4PAM. Now we consider another modulation scheme, where each signal can represent two bits. We can transmit 00, 01, 11,
10 through signals −3, −1, 1, and 3 respectively. The mean signal power of the signal is 3
2+12+12+32
4 = 5. This is called 4
pulse-amplitude modulation (4PAM). Still, due to the existence of noise, the received signal is −3 + n, −1 + n, 1 + n, or 3 + n
respectively, where n is the noise term. Still, n follows Gaussian distribution n ∼ N(0, σ2
). σ
2
is the power of the noise, and
thus 5
σ2 is SNR. If the received signal is in (−∞, −2], (−2, 0], (0, 2], and (2, ∞), it is decoded as 00, 01, 11, and 10 respectively.
We assume that 00, 01, 11, and 10 are sent with equal probabilities. Compute average BER vs SNR of 4PAM when SNR =
[0,5,10,15,20,25] dB. Note that if 00 is decoded as 01, it is regarded as one bit error; if 00 is decoded as 11, it is regarded as
two bit errors.
To compute Q function, you can use Python math.erfc() function. math.erfc() returns result of erfc function, and Q(x) =
1
2
erfc( √x
2
).
(3) Plot the BER vs SNR curves of BPSK and 4PAM. You should derive a figure like Page 45 in the slides of Week 8. Discuss
why improved data rate can cause higher BER.
6
Question 5 (VoIP, 20%). A VoIP trace is included in A2Q5trace.xlsx. The trace includes VoIP data packets. Each line in the
trace shows the sending timestamp, sequence number, and receiving timestamp of a VoIP packet. At the beginning, the delay
estimation di
is 100ms, and the deviation of delay vi
is 10ms. Find the right place in the slides to review how di and vi values
are updated. Let α = 0.1 and β = 0.1. The playout time is set as follows.
playouttimei = ti + di + xvi
, (1)
where x = 2 + s/10, and s is the last digit of your student number. For example, if your student number is 490123456, x = 2.6
in your case. Please answer the following questions.
(1) What are the playout times of all packets? List all of them in a table.
(2) How many packets missed the playout time?
7
Question 6 (Bonus Question, optimization, additional 10%). In this question, we aim to solve the following optimization problem.
min
x
kAx − bk
2
,
subject to Gx = h.
x is an n-dimension vector, A is an m × n matrix, G is a p × n matrix. Give the KKT conditions, and derive expression and
values for the optimal solution x
∗
. m ≥ n, p ≤ n.
Please unzip A2Q6input.zip. The values of A, b, G, h are stored in the SIDX.txt, where X is the last digit of your SID. In
the file, the first part is 10 × 8 matrix of A; the second part is 10-dimension b; the third part is 5 × 8 matrix of G; and the
fourth part is 5-dimension h. k · k indicates the L2-norm of a vector. Please note that you will get zero if you do not use your
own SID.
8
Submission Instructions: You should submit one main file and several supplementary files. You should include your answers
to Q1–Q6 and explanations of your answers in the main file. You should submit your main file at “main file submission”. The
main file is in the format of pdf. For Q2, you must submit your queue simulator at “Q2 code submission”. For Q3, you must
submit your Python code at “Q3 code submission” and Wireshark capture at “Q3 capture submission”. Your code and capture
will be examined against your answers in the main file. Penalty would be incurred if your code/capture does not match your
answer in the main file. For Q4, you may upload Python code to calculate Q-function in “Q4 Q-function calculation”. For Q5,
you may use Python or Excel to process the raw data. You may upload Python code or excel file in “Q5 data processing”. Please
note that, files uploaded in Q4 and Q5 will be marked as intermediate steps. Wrong answers in Q4 and Q5 without file uploads
will incur heavier penalties.
File upload File format Must upload?
main file submission pdf Yes
Q2 code submission Python 3 code Yes
Q3 code submission Python 3 code Yes
Q3 capture submission Wireshark capture Yes
Q4 Q-function calculation Python 3 code No
Q5 data processing Python 3 code or Excel file No
TABLE I
FILE UPLOAD
All your submissions will be checked by plagiarism examination tools.
This is one assignment with multiple pieces to submit. Your submission time is equal to the submission time of the last piece.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写math 1151, autumn 2024 w...
2024-11-14
代做comp4336/9336 mobile dat...
2024-11-14
代做eesa01 lab 2: weather an...
2024-11-14
代写comp1521 - 24t3 assignme...
2024-11-14
代写nbs8020 - dissertation s...
2024-11-14
代做fin b377f technical anal...
2024-11-14
代做ceic6714 mini design pro...
2024-11-14
代做introduction to computer...
2024-11-14
代做cs 353, fall 2024 introd...
2024-11-14
代做phy254 problem set #3 fa...
2024-11-14
代写n1569 financial risk man...
2024-11-14
代写csci-ua.0202 lab 3: enco...
2024-11-14
代写econ2226: chinese econom...
2024-11-14
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!