Question
Problem 2: Determinants write code in python, sagemath Grading criteria: correctness of code and explanations. 2a. Implement a function called my_det that calculates the determinant
Problem 2: Determinants
write code in python, sagemath
Grading criteria: correctness of code and explanations.
2a. Implement a function called my_det that calculates the determinant of a matrix recursively using expansion by cofactors. The Matrix methods delete_columns and delete_rows may come in handy. You can assume that your input is a square matrix.
2b. Check that your function agrees with Sage's built-in function on a random 5 by 5 matrix over
2c. Do some timings for random matrices over for comparing your function and Sage Math's built-in function. Make a single plot containing both sets of results.
2d. Explain the results of 2c in terms of the asymptotic complexity of the two methods.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started