WOLFRAM NOTEBOOK

Lab 4: Distribution & Streaming

NetID:
Link to published notebook:
In this lab, we will take a look at how networks are shared, and how hamming codes work.

Part 1: 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 green, and destination nodes are in red.
Out[]=

Simultaneous Network Usage

Let’s look at how networks behave when two or more nodes are simultaneously using common links to communicate.
Here is the same network we saw in the lecture . 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:

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

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

Problem 3:

Now, let’s reduce the capacity of the link between Q and D1. Also add in a third node S2 connected to P.
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

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

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

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.

Extra Credit

How would you change the part of the network between nodes P and ISP (either make changes to the links or to the nodes) so that the ISP is able to honor their promise of 10mbps to each home at all times?
Out[]=

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. Remember the Hamming Code requires that each circle contains an even number of 1 bits.
If the data bits are {m1, m2, m3, m4}, 3 extra bits are added to the sequence {e1, e2, e3} and
the message is transmitted as: {m1, m2, m3, m4, e1, e2, e3}
For the message = {1,1,0,0},
transmitted bit sequence = {1, 1, 0, 0, 0, 1, 1}
Out[]=

Problem 6:

Now, let’s say that we only received 6 of the 7 bits of a transmitted 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

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

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

Problem 9:

Is this a valid received message? Why or why not?

Answer

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.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.