CS计算机代考程序代写 scheme chain algorithm 21/06/2021 Quiz: COMP3221 Final Exam 2021

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 1/21

COMP3221 Final Exam 2021
Started: Jun 21 at 13:00

Quiz Instructions
Answer all the questions:
There are 30 questions including multiple choices questions and essay type questions

Time Limit: 2 hours (plus 10 min reading time)

Note: 1 attempt only

6 ptsQuestion 1

The closed-form solution to L2-regularized linear regression is as follows:

where

a) What is the meaning of n and k ?

b) What is the meaning of ?

c) What are the big-O computation and storage complexities in terms of n and k to
compute as above.

= ( 𝑋 + 𝜆𝐼 𝑦𝑤∗ 𝑋𝑇 )−1𝑋𝑇

𝑋 ∈ , 𝑦 ∈𝑅𝑛×𝑘 𝑅𝑛

𝜆

𝑤∗

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 2/21

p 0 words

4 ptsQuestion 2

p 0 words

When n and k (i.e., the dimension in linear regression) are large, what are two
methods/algorithms that can reduce the complexities (e.g., linear in time and
space)?

4 ptsQuestion 3

How should we leverage distributed computing while mitigating network
communication?

Edit View Insert Format Tools Table

12pt Paragraph

Edit View Insert Format Tools Table

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 3/21

p 0 words

4 ptsQuestion 4

In FedAvg algorithm, where and how the “global” model is updated? Name two FL
algorithms.

12pt Paragraph

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 4/21

p 0 words

4 ptsQuestion 5

p 0 words

What are key differences/challenges of Federated Learning compared with
distributed machine learning in data centers ?

3 ptsQuestion 6

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 5/21

C :: 7.1 -> 7

C :: 7.3 -> 7

B :: 6.1 -> 6

C :: 7.2 -> 7

A :: 6.3 -> 7

B :: 6.1 -> 7

A :: 7.3 -> 8

A :: 7.3 -> 7

B :: 7.1 -> 7

In the distributed execution of the totally ordered multicast represented in this
figure, where a circle
represents message reception and a square represents reception of the last ack,
write the corresponding
timestamp for the three red events on the diagram.

2 ptsQuestion 7

A 51% attack is possible even if the Blockchain uses a cryptopuzzle

A 51% attack can perform a double-spend, meaning attackers issue two (conflicting)
transactions

Select which one of the following is NOT correct

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 6/21

If a coalition of processes reunite more than half of the mining power, they can attack the
Blockchain

A 51% attack can remove transactions that took place before the attack

4 ptsQuestion 8

(0,0,1) ; (0,0,2) ; (3,0,0)

(1,0,0) ; (0,0,2) ; (0,0,1)

(1,1,0) ; (1,2,2) ; (3,0,3)

(2,0,0) ; (0,0,1) ; (3,0,3)

Consider the system in the previous question uses vector clocks. What are the
vector clock values (p, q, z) after the execution of each event in the figure below?

Vector clocks

Assume that the initial vector clock value for each process is zero.

2 ptsQuestion 9

For each of the following distributed execution of operations in which all variables
have an initial value zero;

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 7/21

T3, T2, T1

T1, T2, T3

T3, T1, T2

Not Serializable

Indicate whether each execution is serializable at the transaction level and write
the execution order

2 ptsQuestion 10

Non of them

Creating blocks

Creating transactions

Validating transactions

What are not the main tasks of a miner?

2 ptsQuestion 11

Outline characteristics of TCP

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 8/21

TCP does not care about reliability

TCP connection requires response from each packet it sends

TCP is connectionless

TCP does not need to establish a connection

2 ptsQuestion 12

UDP is connectionless

UDP is not concerned about reliability, just throughput

UDP requires synchronisation between both processes

Each UDP packet requires a response to the origin, signalling that it has received the
packet

Select characteristics of a UDP Connection

2 ptsQuestion 13

(3, 5)

(3, 3)

(3, 6)

(3, 4)

Considering RSA algorithm, suppose we choose p = 3 and q = 5, which means n =
15. What could be the pair of values (e,d) as follows?

2 ptsQuestion 14

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 9/21

p 0 words

In Authentication, what are categories, and their examples, of Corroborative
Evidence?

3 ptsQuestion 15

Encrypt messages

Share publicly with everyone else

Decrypt messages

User credentials

Select the purposes of a public key

2 ptsQuestion 16

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 10/21

p 0 words

What is the difference between symmetric and asymmetric encryption?

Provide an example of both schemes as part of your answer.

2 ptsQuestion 17

True

False

A hash function is a one-way function, you cannot decrypt a hash.

3 ptsQuestion 18

Explain how hashes are used to provide assist with integrity of a data between two
endpoints.

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 11/21

p 0 words

2 ptsQuestion 19

Decrypt messages

To authenticate other users

Encrypt messages

To verify message integrity

Select the purposes of a private key

3 ptsQuestion 20

In the header of a block in Blockchain of Bitcoin, which header field contains the
information of “Proof-of-Work” ?

Edit View Insert Format Tools Table

12pt Paragraph

Edit View Insert Format Tools Table

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 12/21

p 0 words

4 ptsQuestion 21

Which figure shows the most desired convergence behavior of gradient
descent? Why (explain by comparing it with the other two) ?

Edit View Insert Format Tools Table

12pt Paragraph

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 13/21

p 0 words

4 ptsQuestion 22

p 0 words

We denote GD for Gradient Descent. What are:

a) Cons of mini-batch GD over Stochastic GD

b) Pros of mini-batch GD over GD.

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 14/21

8 ptsQuestion 23

p 0 words

In Logistic Regression given the following cost function

where , feature vector of the i-th sample, and there are n
data samples.

1. What is the name of the cost function above? Can we find directly the solution
to ? Why?

2. Assume that the Gradient Descent update for above cost function is:
and the dataset includes only 2

examples: . If the initial weight
vector , what is (assume that )?

3. What is the difference of gradient update when using Stochastic Gradient
Descent instead of Gradient Descent?

𝑓(𝐰) = − { log[𝜎( )] + (1 − ) log[1 − 𝜎( )]}∑
𝑛

𝑖=1
𝑦𝑖 𝐰

𝑇
𝐱𝑖 𝑦𝑖 𝐰

𝑇
𝐱𝑖

𝜎(𝑧) =
1

1+𝑒−𝑧
∈𝐱𝑖 𝑅

𝑑

∇𝑓(𝐰) = 0

:= − 𝜂 {𝜎( ) − }𝐰(𝑡+1) 𝐰(𝑡) ∑
𝑛

𝑖=1
𝐰

𝑇
𝐱𝑖 𝑦𝑖 𝐱𝑖

( = [1, 2], = 1), ( = [−2, 3], = 0)𝑥1 𝑦1 𝑥2 𝑦2
= [0, 0]𝑤(0) 𝑤(2) 𝜂 = 0.1

4 ptsQuestion 24

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 15/21

p 0 words

For properties of distributed machine learning and computing, fill the missing
words below:

a) Parallelism makes computation …..

b) Network makes communication …..

c) Therefore, we should design algorithms that compute …., communicate ….

4 ptsQuestion 25

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 16/21

p 0 words

In parallel gradient descent for least square example above. What is the local
computation and storage at each worker? What is the computation of the server
which do “reduce” operation (i.e., sum over n gradients)?

4 ptsQuestion 26

Execute the RIP protocol on the graph below. Provide the routing table for each
node. Assume that each edge has the weight of 1

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 17/21

p 0 words

4 ptsQuestion 27

Given the following execution and the starting value of x is 5 and y is 5.

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 18/21

p 0 words

Determine if execution is linearizable, outline your reason why/why no.

4 ptsQuestion 28

Let process p2 try to synchronize with process p1 by running Cristian’s
algorithm. Assume that both clocks increase at the same rate and that initially (at
time T1 to T3)

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 19/21

p 0 words

when the query message is sent) the clock of p1 is Cp1(T1) = 1h2mn25s850ms
while the clock of p2 is Cp2(T1) = 1h2mn26s500ms.

What is the round trip time?

What is the offset of p1 relative to p2?

4 ptsQuestion 29

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 20/21

p 0 words

Find the shortest path between a and z, provide the contents of your priority queue
and minimum cost on each step.

2 ptsQuestion 30

The hashes

What guarantees the integrity of stored transactions in a Blockchain?

Edit View Insert Format Tools Table

12pt Paragraph

21/06/2021 Quiz: COMP3221 Final Exam 2021

https://canvas.sydney.edu.au/courses/33507/quizzes/142313/take 21/21

Saved at 13:00

The miner

Transaction signatures

The blocks

Submit Quiz