date: 2024-03-04
title: DAA-Assignment-0
author:
- AllenYGY
status: DONE
tags:
- DAA
- Assignment
created: 2024-03-09
updated: 2024-05-31T00:44
publish: True
DAA-Assignment-0
For Euclidean Algorithm to find GCD
Algorithm Euclidean Algorithm
while B=0 do
temp←B
B←amodb
A←temp
end while
return A
Algorithm Task Work Procedure
if atomic(t) then
return accomplishable(t)
end if
subtasks← destruct(t)
for each subtask in subtasks do
if work(subtask) == ‘‘No'' then
return ‘‘No''
end if
end for
return ‘‘Yes''
...
The main goal of algorithm analysis is to understand the rate at which an algorithm's running time or space requirement grows with input size. Although multiplication has a slower running time than addition, it does not affect the overall time complexity in general.