SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
Middle East Technical University Department of Computer Engineering
CENG371
Scientific Computing
Fall 2022-2023
Homework 2
Due: December 2nd, 2022
Question 1 (60 points)
Implement the following algorithms recursively
a) (20 pts) LU factorization with Sherman’s march.
(filename: shermans.m, function signature [L,U] = shermans(A))
b) (20 pts) LU factorization with Pickett’s charge.
(filename: picketts.m, function signature [L,U] = picketts(A))
c) (20 pts) LU factorization with Crout’s method.
(filename: crouts.m, function signature [L,U] = crouts(A))
Question 2 (40 points)
Use each of the above algorithms to factorize An = hilb (n) for n ∈ {1, 2, . . . , 300}.
a) (30 pts) Compare the algorithms in terms of their total run times and in terms of the plots of their relative
errors
∥An − LnUn∥2
∥An∥2
.
Note: You can use tic & toc to measure the elapsed time. Use semilogy(.) together with the command
hold on to display your relative error versus matrix size graphs.
b) (10 pts) Do the algorithms you have implemented successfully (up to numerical errors) factorize any square
matrix? Explain.
(hilb is a MATLAB built-in function. It returns the n × n Hilbert matrix.)
Regulations
1. Your submission should include a single PDF and your .m files.
2. Submission will be done via odtuclass.
3. Late Submission: Accepted with a penalty of −5 × (day)2
.

Más contenido relacionado

Similar a testo

MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
Ashutosh Katti
 
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxM166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
infantsuk
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
anhlodge
 
Paper computer
Paper computerPaper computer
Paper computer
bikram ...
 
Paper computer
Paper computerPaper computer
Paper computer
bikram ...
 

Similar a testo (20)

Matlab solved tutorials 2017 june.
Matlab solved tutorials  2017 june.Matlab solved tutorials  2017 june.
Matlab solved tutorials 2017 june.
 
MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
 
Tarea 2 francisco_moya_mena_a74449_grupo02
Tarea 2 francisco_moya_mena_a74449_grupo02Tarea 2 francisco_moya_mena_a74449_grupo02
Tarea 2 francisco_moya_mena_a74449_grupo02
 
Dsp
DspDsp
Dsp
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
Svm soft margin hyperplanes
Svm   soft margin hyperplanesSvm   soft margin hyperplanes
Svm soft margin hyperplanes
 
Quiz
QuizQuiz
Quiz
 
Ee693 questionshomework
Ee693 questionshomeworkEe693 questionshomework
Ee693 questionshomework
 
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docxM166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
M166Calculus” ProjectDue Wednesday, December 9, 2015PROJ.docx
 
Control assignment#2
Control assignment#2Control assignment#2
Control assignment#2
 
Aistats RTD
Aistats RTDAistats RTD
Aistats RTD
 
Ch.02 modeling in frequency domain
Ch.02 modeling in frequency domainCh.02 modeling in frequency domain
Ch.02 modeling in frequency domain
 
Banco de preguntas para el ap
Banco de preguntas para el apBanco de preguntas para el ap
Banco de preguntas para el ap
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
 
36336583 control-systems-lecture-notes
36336583 control-systems-lecture-notes36336583 control-systems-lecture-notes
36336583 control-systems-lecture-notes
 
Ies electronics engineering - control system
Ies   electronics engineering - control systemIes   electronics engineering - control system
Ies electronics engineering - control system
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docxSAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
 
Paper computer
Paper computerPaper computer
Paper computer
 
Paper computer
Paper computerPaper computer
Paper computer
 
Ae11 sol
Ae11 solAe11 sol
Ae11 sol
 

Último

%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Último (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 

testo

  • 1. Middle East Technical University Department of Computer Engineering CENG371 Scientific Computing Fall 2022-2023 Homework 2 Due: December 2nd, 2022 Question 1 (60 points) Implement the following algorithms recursively a) (20 pts) LU factorization with Sherman’s march. (filename: shermans.m, function signature [L,U] = shermans(A)) b) (20 pts) LU factorization with Pickett’s charge. (filename: picketts.m, function signature [L,U] = picketts(A)) c) (20 pts) LU factorization with Crout’s method. (filename: crouts.m, function signature [L,U] = crouts(A)) Question 2 (40 points) Use each of the above algorithms to factorize An = hilb (n) for n ∈ {1, 2, . . . , 300}. a) (30 pts) Compare the algorithms in terms of their total run times and in terms of the plots of their relative errors ∥An − LnUn∥2 ∥An∥2 . Note: You can use tic & toc to measure the elapsed time. Use semilogy(.) together with the command hold on to display your relative error versus matrix size graphs. b) (10 pts) Do the algorithms you have implemented successfully (up to numerical errors) factorize any square matrix? Explain. (hilb is a MATLAB built-in function. It returns the n × n Hilbert matrix.) Regulations 1. Your submission should include a single PDF and your .m files. 2. Submission will be done via odtuclass. 3. Late Submission: Accepted with a penalty of −5 × (day)2 .