Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

7. In biological systems it is very common to deal with networks, especially in

ID: 3786535 • Letter: 7

Question

7. In biological systems it is very common to deal with networks, especially in neuroscience, where neurons represent the vertices and axons represent the edges of a network. The load and the pattern of motion of the electrical signals across this biological web determine how well and healthy the brain might be. These ideas can be explored also by looking at traffic networks, which share a lot in common with neural networks. The network in the figure below shows the traffic flow (in vehicles per hour) over several one-way. streets in downtown Baltimore during a typical early afternoon. Determine the general flow pattern for the network (with MATLAB). Hint: set up the system of linear equations and solve it, a negative flow corresponds to flow in the direction opposite to that shown on the model.

Explanation / Answer

We have given four labelled nodes (A,B,C,D). The In-Flow and Out-Flow for these four nodes are shown in the table below. In the figure (shown above in the question), we don't have the label for the flow going out of the node D (So, let's call it x6).

Now, from the table we can have the following linear equations:

-x1 - x2 + 800 = 0        (as x1 + x2 = 500+300)

Similarlily, we have the following equations:

x2 - x3 + x4 = -300    

-x4 - x5 = -500

x1 + x5 - x6 = 600

Now, in form of matrix, we can write it as following:

A =

X=

B =

These vectors can be easily used in the MATLAB to solve for the linear equation using linsolve function that takes matrix A (n x m) and Matrix B (n x 1) as parameter. The result of linsolve is matrix X (m x 1). The result matrix X gives the value of variable x1,x2,...,x6.

----------------------------------------------------------------------------------------------------------

MATLAB CODE:

A=[-1 -1 0 0 0 0; 0 1 -1 1 0 0; 0 0 0 -1 -1 0; 1 0 0 0 1 -1];
B=[-800; -300; -500; 600];

X=linsolve(A,B);

----------------------------------------------------------------------------------------------------------

General flow pattern: (output of matlab code)

x1=600

x2=200

x3=1000

x4=500

x5=0

x6=0

This shows that most of the traffic is going out through x3 (1000).

Node (In-flow and Out-flow) Node Flow IN Flow OUT A 300+500 x1+x2 B x2+x4 x3+300 C 100+400 x4+x5 D x1+x5 600+x6 Total 1300 900+x3+x6
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote