my_digital_garden/4a1s/CP/PL - Aula 2.md

29 lines
816 B
Markdown
Raw Normal View History

2023-09-26 15:33:55 +01:00
---
dg-publish: true
---
2023-09-25 11:26:29 +01:00
20 de Setembro 2023 - #CP
> [!note]
> As resoluções dos exercícios aqui contidos podem conter erros. Se detetares um problema (e se o souberes resolver) por favor contacta-nos.
> [!note]
> These resolutions are using the file ***mmult.c*** available and developed by the professors.
## Ex. 1
a)
2023-09-25 11:31:29 +01:00
> [!help]- What is the complexity of the MM (i.e., in big O notation, where N is the problem size and NxN is the matrix size)?
2023-09-25 13:14:01 +01:00
> O()
2023-09-25 11:31:29 +01:00
>[!hint]- Big O Notation Cheat Sheet
>- Constant: O(1)
2023-09-25 13:14:01 +01:00
>- Linear time: O(n)
>- Logarithmic time: O(n log n)
>- Quadratic time: O(n^2)
>- Exponential time: O(2^n)
>- Factorial time: O(n!)
2023-09-25 11:31:29 +01:00
>[!help]- What increase in execution time is expected when the N doubles?
>[!help]- Which component of the performance equation is affected (e.g., \#I, CPI or Tcc)?
>
2023-09-25 11:26:29 +01:00