{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C++_HW9_Solutions

# C++_HW9_Solutions - Eng101W07 Sec 100 Homework 9 Graphs...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. [10 pts.] Computing powers of the adjacency matrix Write a general-purpose function that multiplies two square matrices. Feel free to use code we’ve already written, but note your function should be able to handle any size matrix. Test this function as follows: using the star matrix you created in 1, multiply the star matrix by itself (that is, compute A 2 ). Include your multiplication function and main code below, along with the console output for A 2 . (If all goes well, your squared matrix should have a 5 in the upper left corner, 0’s otherwise along the top row and left-most column, and a 5x5 submatrix of 1’s below and to the right of the top row and left-most column.) Solution .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

C++_HW9_Solutions - Eng101W07 Sec 100 Homework 9 Graphs...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online