Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2.1 Introduction Definition 1 (Graph). A graph is a finite set of objects called nodes, together with patles Letween some of the nodes, as illustrated

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
2.1 Introduction Definition 1 (Graph). A graph is a finite set of objects called nodes, together with patles Letween some of the nodes, as illustrated below. A path of become is path that directly consect one mode to enter. A path of length & is a path made up of consecutive patles of Jeton Definition 2 (Adjnoetry Matrix). When the nodes have been thered from 1 ton, the adjacency nutrix A of the graph is defund be lettin = 1 if there is a path of length between urtices fundjad - Botha For example, the graph in Figure I las the matrix. A shown an itu mjesey matrix 01 000 07 dinct path from modelo de 2 10100 direct path from node 210 1:2103 2106 0101 001011 0001 01011 Girect path from node 610 26465 Figure Is A graph representation of a network along with its associated adjarsky matrix A Theorem 1 (Interpretation of the power of an adjacicy matrix). If A is the next of agraph, then the (13) entry of Ais a monegative integer which is the of patholength k from male i to mode in the graph To understand what the theorems for the example above, let's carefully the (63)stry of A of the graph in Figure 1 The (6,3) entry of obtained by its product but the wow and the 3 columns of A. That (6.3) entry of A+++++ 11 (0)(0) + (1)(1)-(0)(0) + (13(1) + (1)(0) +010) Explain what each term in the above tells about pathes of th 2 from me to be is clear that there are two paths of length two that link sode 6 to mode 3 (e. the first path is 6-2-3 and the second path is 6-4-3), which is equal to (6.3) try of AF Isparta there are two terms in the expression in 1) that contribute to obtain the wal 2. These two terms are 24 and Each one of these two steps be patie Temple, le 22 (1)(I) = 1: this says that the the path 6 + 2 and 2-3 appear in the grap wa topether they give one path from node 6 totode 3, of length 2 ste, 6-2-3). Similarly, = (1)(L) = 1; this says that the length one patlas 6 and 4 - 3 appear in the gapland together they give one path from node 6 to bode 3, of length 2 ie 6-1-3) Te following Matlabs code define the sceney matrix A of Figure 1 and competes 3 = C4 Define the day A010000 101001 010100 De the w A=0 10000: 101001: 010100 001011 000 101 0101101: . Compte the B=A2 cm Art C-13 come ABA AB The obtained and matrices are as follows 101001 030210 10 2012 020311 011121 BS 1030 1051 050521 215 216 1 2 24 24 0616 It is worth to reemphasize that each on-zero ter to the expression that calculates the stry in A is corresponding to the path of length that canets mode i to odej Below examples that help further understanding the interpretation of the power of the adjacy matrix The (1.2) entry of Bo there ae opathes of length to from 1 to make 2. Verity this boy studying the graph 3 five paths are The (3.2) entry of CA 6s5, so there are 5 paths of length 3 from me 3 to mode 2 These Path: 3+2-1+2 Path 2: 3--2--3--2 Puth 13-2-76-42 Path: 3-4-6-1 To illostrate how we obtain these 5 patir. Again, the (3.2) entry of C="bted by multiplying the row of B by the column of . This yield the Swingers bbw + + + + 2) paar - : - IS PE What are the pattes of length two from mode 2 to its This is equivalent to the (22) entry of B. That in boga= 3. What are the path of length three from node 3 to node? This in quivalent to the (34) entry of That is Definition 3 (Contact level). When we have a graph w will say that the bacte between rode i and node ; if there is a path of length less than or equal to fom mode toode : Suppe A is the adjacency matrix of a graph. To decide which nodes we contact led with each other requires Galegating the sum A+ A++ 2 Part 2-Network Application: The Adjacency Matrix of a Graph 2.1 Introduction Definition 1 (Gruplu). A graph is a finite set of objects called odis, topelt with a putea between some of the modes, as illustrated below. A path of length is a path that directly connecta con node to another. A path of Lithi is puts made up of consecutive patlat Tenth one Definition 2 (Adjuertory Matrix). When the noden have been sumbered from 1 ton, the matrix of the trap is defined by letting = 1 if there is a path of the between the and janday - otherwise For example, the graph in Figure has the matrix Ashown as itu adjuny matrix 01000 direct path from modelo sode 2 10100 direct path from code 21:23:2606 010100 A= 001011 000101 01011e direct path freenode 63 26465 Figure 1. A graph representation of a network along with its mociated widjacency atrix Theorem 1 (Interpretation of the ports of an autocracy matrix). A la the way matrix ! traph, then the entry of Aisa megather toiteger which is the number of paths of best k from model to node in the ph. To understand what the theoren say for the example abowe, let's carefully camine the (6.3) catry of A of the graph in Figures The (63) entry of it is obtained by intes product between the row and the 3 column of A. Tlusti (1) CO(0) + (131) +0100)+(1)(1)-(100) (0,0) = 2 Explain what echter in the sum above tels about path of th 2 free to is clear that there are two paths of length two that link mode to node 3 lie, the fint path as 6-2-3 and the second this 6-1-3), which is alto (6.) to . In particular there are two tate in the expansion in that contribute to obtain the al 2. These two tom aren and Each one of these two the Forecamp 60 = (1)(1) = 1; this way that the home path 6-2 and 2+3 appear in the graph and together they give e puth from sode 6 to bode 3, of length 26-2-1 Similarly 464(1)(1)-1; this says that the length ane puths 6 - 4 and 4-appear in the prapa together they give ee path from node to nodes of leagth 2 e. 6-4+3) To following Matlab code detine the adjaceny mutrix of Figure and competes Band C- Define the Adjacency matrix A-10 1 0 0 0 0 . . Define the day trix + A-1010000 101001: OLO 100 001011 000 101 010110): Compute the powers of BA2 comptes C-13 computer AAA = AB The obtained and matrices are as follows 101001 030210 10.2012 0 20 31 1 011121 102113 12 B3 0302 3051 OSOS 21524 1 2 2 2 It is worth to reemphasize that each onemo term in the expresion that calculates the entry in A is corresponding to one path of length that the bode i to des Bewe samples that helps further understanding the interpretation of the power of the joy The (1.2) entry of B - A is zero, so there are no pots of length two from 1 to bude 2. Verify this by swing the graphi 2 . The (3.2) entry of CAS, so there are potlas of length from toda 30 de 2 These five patls are Path 1: 3+2-1+2 Path 2:1-2-3-1 Path 3:34+4+3+2 Path 3+2-6-2 Path 3-4-6-2 To illustrate w we obtain these 5 puta. Again, the (3.2) entry of C= obtained by tultiplying the row of B by the column of A. This yielde the Site 62 ++ - dette . What are the patter of length two from bode 2 to its This is equivalent to the (22) entry of B. That is b=3 What are the patter of length three from mode to model? This is yivalent to the (3.4) rnity of C. That is Definition 3 Contact level). When we love a graph, we will say that there is a come between mode i and none if there is a path of length than or equal to from weito de Suppone is the crux matrix of a graph. Tu decide which nodes have contact bud with each other requires calculating the A+++. Definition 3 (Contact level). When we wegraph, we will say that there is a contato between nodi and nodej if there is a path of length less than or equal to from sode i to Support A is the adjacency matrix of a graph. To decibe which nodes hacer contact level ik with ench other requires calculating the sum A+ A++ A 2.2 Task Exercise 1. In a mamicture, there are wurkets doted in ... It is known that if worker becomes infected with COVID-19, he/she could read this through contact with wock sp to contact level. In particular, let me that the indetin e prap to 2 That is it got infected and be/she is in direct contact with Then, all wees who are in direct contact with Ware in buch risk to be dete Consider the following graph in Figure that shows the level or contact between the work Write a matlab code that is composed of the main script and function called Employee tactlevel" described below: (a) Main script Define the many matrix Asls the toute the required contact level (in) . call the function Employee Contactlevel" Print the returned output from the function "EmployeeContactlevel" in a proper format. (b) Employee Contact Level function Input: . Adjacency matrix (le, A). Infection speed contact level (A) Output: . The mumber and indices of the worloers who have a contact level with each worker . The index of the most dangers were the cor who will send the di others if he/she pot infected more than any other employe) WS W4 W20 W3 W8 W7 W6 WI Figure 2: A graph representation of love con contact between the work 2.1 Introduction Definition 1 (Graph). A graph is a finite set of objects called nodes, together with patles Letween some of the nodes, as illustrated below. A path of become is path that directly consect one mode to enter. A path of length & is a path made up of consecutive patles of Jeton Definition 2 (Adjnoetry Matrix). When the nodes have been thered from 1 ton, the adjacency nutrix A of the graph is defund be lettin = 1 if there is a path of length between urtices fundjad - Botha For example, the graph in Figure I las the matrix. A shown an itu mjesey matrix 01 000 07 dinct path from modelo de 2 10100 direct path from node 210 1:2103 2106 0101 001011 0001 01011 Girect path from node 610 26465 Figure Is A graph representation of a network along with its associated adjarsky matrix A Theorem 1 (Interpretation of the power of an adjacicy matrix). If A is the next of agraph, then the (13) entry of Ais a monegative integer which is the of patholength k from male i to mode in the graph To understand what the theorems for the example above, let's carefully the (63)stry of A of the graph in Figure 1 The (6,3) entry of obtained by its product but the wow and the 3 columns of A. That (6.3) entry of A+++++ 11 (0)(0) + (1)(1)-(0)(0) + (13(1) + (1)(0) +010) Explain what each term in the above tells about pathes of th 2 from me to be is clear that there are two paths of length two that link sode 6 to mode 3 (e. the first path is 6-2-3 and the second path is 6-4-3), which is equal to (6.3) try of AF Isparta there are two terms in the expression in 1) that contribute to obtain the wal 2. These two terms are 24 and Each one of these two steps be patie Temple, le 22 (1)(I) = 1: this says that the the path 6 + 2 and 2-3 appear in the grap wa topether they give one path from node 6 totode 3, of length 2 ste, 6-2-3). Similarly, = (1)(L) = 1; this says that the length one patlas 6 and 4 - 3 appear in the gapland together they give one path from node 6 to bode 3, of length 2 ie 6-1-3) Te following Matlabs code define the sceney matrix A of Figure 1 and competes 3 = C4 Define the day A010000 101001 010100 De the w A=0 10000: 101001: 010100 001011 000 101 0101101: . Compte the B=A2 cm Art C-13 come ABA AB The obtained and matrices are as follows 101001 030210 10 2012 020311 011121 BS 1030 1051 050521 215 216 1 2 24 24 0616 It is worth to reemphasize that each on-zero ter to the expression that calculates the stry in A is corresponding to the path of length that canets mode i to odej Below examples that help further understanding the interpretation of the power of the adjacy matrix The (1.2) entry of Bo there ae opathes of length to from 1 to make 2. Verity this boy studying the graph 3 five paths are The (3.2) entry of CA 6s5, so there are 5 paths of length 3 from me 3 to mode 2 These Path: 3+2-1+2 Path 2: 3--2--3--2 Puth 13-2-76-42 Path: 3-4-6-1 To illostrate how we obtain these 5 patir. Again, the (3.2) entry of C="bted by multiplying the row of B by the column of . This yield the Swingers bbw + + + + 2) paar - : - IS PE What are the pattes of length two from mode 2 to its This is equivalent to the (22) entry of B. That in boga= 3. What are the path of length three from node 3 to node? This in quivalent to the (34) entry of That is Definition 3 (Contact level). When we have a graph w will say that the bacte between rode i and node ; if there is a path of length less than or equal to fom mode toode : Suppe A is the adjacency matrix of a graph. To decide which nodes we contact led with each other requires Galegating the sum A+ A++ 2 Part 2-Network Application: The Adjacency Matrix of a Graph 2.1 Introduction Definition 1 (Gruplu). A graph is a finite set of objects called odis, topelt with a putea between some of the modes, as illustrated below. A path of length is a path that directly connecta con node to another. A path of Lithi is puts made up of consecutive patlat Tenth one Definition 2 (Adjuertory Matrix). When the noden have been sumbered from 1 ton, the matrix of the trap is defined by letting = 1 if there is a path of the between the and janday - otherwise For example, the graph in Figure has the matrix Ashown as itu adjuny matrix 01000 direct path from modelo sode 2 10100 direct path from code 21:23:2606 010100 A= 001011 000101 01011e direct path freenode 63 26465 Figure 1. A graph representation of a network along with its mociated widjacency atrix Theorem 1 (Interpretation of the ports of an autocracy matrix). A la the way matrix ! traph, then the entry of Aisa megather toiteger which is the number of paths of best k from model to node in the ph. To understand what the theoren say for the example abowe, let's carefully camine the (6.3) catry of A of the graph in Figures The (63) entry of it is obtained by intes product between the row and the 3 column of A. Tlusti (1) CO(0) + (131) +0100)+(1)(1)-(100) (0,0) = 2 Explain what echter in the sum above tels about path of th 2 free to is clear that there are two paths of length two that link mode to node 3 lie, the fint path as 6-2-3 and the second this 6-1-3), which is alto (6.) to . In particular there are two tate in the expansion in that contribute to obtain the al 2. These two tom aren and Each one of these two the Forecamp 60 = (1)(1) = 1; this way that the home path 6-2 and 2+3 appear in the graph and together they give e puth from sode 6 to bode 3, of length 26-2-1 Similarly 464(1)(1)-1; this says that the length ane puths 6 - 4 and 4-appear in the prapa together they give ee path from node to nodes of leagth 2 e. 6-4+3) To following Matlab code detine the adjaceny mutrix of Figure and competes Band C- Define the Adjacency matrix A-10 1 0 0 0 0 . . Define the day trix + A-1010000 101001: OLO 100 001011 000 101 010110): Compute the powers of BA2 comptes C-13 computer AAA = AB The obtained and matrices are as follows 101001 030210 10.2012 0 20 31 1 011121 102113 12 B3 0302 3051 OSOS 21524 1 2 2 2 It is worth to reemphasize that each onemo term in the expresion that calculates the entry in A is corresponding to one path of length that the bode i to des Bewe samples that helps further understanding the interpretation of the power of the joy The (1.2) entry of B - A is zero, so there are no pots of length two from 1 to bude 2. Verify this by swing the graphi 2 . The (3.2) entry of CAS, so there are potlas of length from toda 30 de 2 These five patls are Path 1: 3+2-1+2 Path 2:1-2-3-1 Path 3:34+4+3+2 Path 3+2-6-2 Path 3-4-6-2 To illustrate w we obtain these 5 puta. Again, the (3.2) entry of C= obtained by tultiplying the row of B by the column of A. This yielde the Site 62 ++ - dette . What are the patter of length two from bode 2 to its This is equivalent to the (22) entry of B. That is b=3 What are the patter of length three from mode to model? This is yivalent to the (3.4) rnity of C. That is Definition 3 Contact level). When we love a graph, we will say that there is a come between mode i and none if there is a path of length than or equal to from weito de Suppone is the crux matrix of a graph. Tu decide which nodes have contact bud with each other requires calculating the A+++. Definition 3 (Contact level). When we wegraph, we will say that there is a contato between nodi and nodej if there is a path of length less than or equal to from sode i to Support A is the adjacency matrix of a graph. To decibe which nodes hacer contact level ik with ench other requires calculating the sum A+ A++ A 2.2 Task Exercise 1. In a mamicture, there are wurkets doted in ... It is known that if worker becomes infected with COVID-19, he/she could read this through contact with wock sp to contact level. In particular, let me that the indetin e prap to 2 That is it got infected and be/she is in direct contact with Then, all wees who are in direct contact with Ware in buch risk to be dete Consider the following graph in Figure that shows the level or contact between the work Write a matlab code that is composed of the main script and function called Employee tactlevel" described below: (a) Main script Define the many matrix Asls the toute the required contact level (in) . call the function Employee Contactlevel" Print the returned output from the function "EmployeeContactlevel" in a proper format. (b) Employee Contact Level function Input: . Adjacency matrix (le, A). Infection speed contact level (A) Output: . The mumber and indices of the worloers who have a contact level with each worker . The index of the most dangers were the cor who will send the di others if he/she pot infected more than any other employe) WS W4 W20 W3 W8 W7 W6 WI Figure 2: A graph representation of love con contact between the work

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions