Lab 4: Distribution & Streaming
Lab 4: Distribution & Streaming
NetID:
Link to your published notebook:
In this lab, we will take a look at how networks are shared, and how hamming codes work.
Part 1: Simultaneous Network Usage
Part 1: Simultaneous Network Usage
Network Representation using Graphs
Network Representation using Graphs
We will use circles to represent nodes, and lines between these circles (called "edges") to represent connections between nodes. These diagrams containing nodes and edges are called "graphs". The number inside the edges represents the network capacity of the connection (also called "bandwidth" of the edge). Source nodes are in orange, and destination nodes are in purple.
In[]:=
Graph{sa,ad},EdgeWeight{30,10},VertexLabelsAutomatic,EdgeLabels"EdgeWeight",
Out[]=
Network Capacity
Network Capacity
Let’s look at how networks behave when two or more nodes are simultaneously using common links to communicate.
Here is a toy network. S1 and S2 are source nodes, and D1 and D2 are destination nodes . All network traffic has to share the link between P and Q .
Out[]=
Problem 1:
Problem 1:
Let's say that S1 is trying to send a large file to D1. What is the speed at which S1 can send the file to D1? Note: S2 is not using the link at all.
Answer
Answer
Problem 2:
Problem 2:
Now, let's say that S1 is sending a large file to D1, and S2 is also sending a large file to D2 simultaneously. At what speed can S1 send the file to D1? At what speed can S2 send its file to D2?
Answer
Answer
Problem 3:
Problem 3:
Now, let’s reduce the capacity of the link between Q and D1.
Out[]=
Let’s say that S1 is sending a large file to D1, and S2 is also sending a large file to D2 simultaneously. At what speed can S1 send the file to D1? At what speed can S2 send its file to D2?
Answer
Answer
Problem 4
Problem 4
Next, let’s look at a network where there are several internet customers in a neighborhood, that connect to the same ISP’s network.
Out[]=
The ISP has promised “up to 10 Mbps” for all customers in the neighborhood. Can the ISP keep up that promise at all times? If not, can it meet this promised speed sometimes? Does the ISP need to make changes to its network? Please explain your answer in one or two sentences.
Answer
Answer
Problem 5
Problem 5
Three new houses were built in the neighborhood, and everyone paid the same ISP for their home internet service. Let’s see what this looks like:
Out[]=
Again, the ISP has promised “up to 10 Mbps” for all customers in the neighborhood. Can the ISP keep up that promise at all times? If not, can it meet this promised speed sometimes? Does the ISP need to make changes to its network? Please explain your answer in one or two sentences.
Answer
Answer
Before we move on to the next part of the lab, let’s take a look at what real-world network performance looks like. We can use this website to take a quick internet speed test: speedtest.net.
Part 2: Hamming Code
Part 2: Hamming Code
Hamming Code is a method of encoding data. In our examples, we will encode 4 bits of data into a sequence of 7 total bits, and observe the properties of the resulting 7-bit sequence.
Message = {1,0,1,0}
Out[]=
Problem 6:
Problem 6:
Now, let’s say that we only received 6 of the 7 bits of the message:
receivedMessage1="10X0101";
Out[]=
Can you still recover the original message from this sequence? If so, what is m3? If not, why is it not possible to recover the original message?
Answer
Answer
Problem 7:
Problem 7:
Now, let' s say that we only received 5 of the 7 bits of message :
Can you still recover the original message from this sequence? If so, what is m3? If not, why is it not possible to recover the original message?
Answer
Answer
Problem 8:
Problem 8:
Now, let’s say that we only received 4 of the 7 bits of message:
Can you still recover the original message from this sequence? If so, what are m3, e2, and e3? If not, why is it not possible to recover the original message?
Answer
Answer
Problem 9:
Problem 9:
Is this a valid received message? Why or why not?
Answer
Answer
Submitting your work
Submitting your work
1
. Publish your notebook
1
.1
.From the cloud notebook, click on “Publish” at the top right corner.
1
.2
.From the desktop notebook, use the menu option File -> Publish to Cloud
2
.Copy the published link
3
.Add it to the top of the notebook, below your netID
4
.Print to PDF
5
.Upload to Gradescope
6
.Just to be sure, maybe ping your TA Sattwik on Slack that you have submitted.