







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A comprehensive overview of key concepts in computer science, particularly focusing on data structures, algorithms, and cryptography. It covers topics like trees, flow graphs, modular arithmetic, and rsa protocol. Exercises and explanations, making it a valuable resource for students studying computer science.
Typology: Exams
1 / 13
This page cannot be seen from the preview
Don't miss anything!
Basic |!|Properties |!|of |!|Trees |!|- |!|correct |!|answer |!| ✔ Tree's |!|are |!|undirected, |!|connected |!|and |!|acyclic |!| that |!|connect |!|all |!|nodes.
Ford-Fulkerson |!|Algo |!|- |!|correct |!|answer |!| ✔ 1. |!|Start |!|with |!|f_e |!|= |!| 0 |!|for |!|all |!|edges
When |!|does |!|the |!|inverse |!|of |!|x |!|MOD |!|N |!|exist |!|- |!|correct |!|answer |!| ✔ When |!|GCD(x, |!|N) |!|= |!|1. |!|That |!|is |!| x |!|and |!|N |!|don't |!|share |!|a |!|common |!|divisor |!|and |!|are |!|thus |!|"relatively |!|prime" Properties |!|of |!|Modular |!|Inverses |!|- |!|correct |!|answer |!| ✔ - |!|if |!|x^-1 |!|MOD |!|N |!|exists, |!|then |!|it's |!|unique
Fast |!|Modular |!|Exponentiation |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Inputs: |!|x, |!|y |!|>= |!|0, |!|N |!|>= |!| 1 Outputs: |!|x^y |!|MOD |!|N Runtime: |!|O(N^3)* Description: |!|recursively |!|squaring |!|modulus Euclid's |!|GCD |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Inputs: |!|x>= |!|y |!|>= |!| 0 Outputs: |!|GCD |!|of |!|x |!|and |!|y Runtime: |!|O(n^3) Description: |!|Recursively |!|computes |!|gcd(x, |!|y) |!|as |!|gcd(x |!|mod |!|y, |!|y). |!|Can |!|be |!|used |!|to |!|check |!|if |!| two |!|numbers |!|are |!|relatively |!|prime |!|to |!|each |!|other. Extended |!|Euclid's |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Inputs: |!|x>= |!|y |!|>= |!| 0 Outputs: |!|
Post |!|Order |!|Properties: |!|Tree |!|Edges |!|- |!|correct |!|answer |!| ✔ For |!|edge |!|z |!|-> |!|w, |!|post(z) |!|> |!|post(w) Post |!|Order |!|Properties: |!|Back |!|Edge |!|- |!|correct |!|answer |!| ✔ For |!|edge |!|z |!|-> |!|w, |!|post(z) |!|< |!|post(w) Post |!|Order |!|Properties: |!|Forward |!|Edge |!|- |!|correct |!|answer |!| ✔ For |!|edge |!|z |!|-> |!|w, |!|post(z) |!|> |!|post(w) Post |!|Order |!|Properties: |!|Cross |!|Edge |!|- |!|correct |!|answer |!| ✔ - |!|For |!|edge |!|z |!|-> |!|w, |!|post(z) |!|> |!|post(w)
Dijkstra's |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Input: |!|Graph |!|(directed/un-directed), |!|Start |!|vertex. Output: |!|
Prim's |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Runtime: |!|O(m |!|log(m)) |!|or |!|O(m |!|log(n)) Input: |!|Connected, |!|undirected |!|graph. |!|(Must |!|have |!|edge |!|weights... |!|basis |!|of |!|algo) Output: |!|The |!|Minimum |!|Spanning |!|Tree |!|of |!|the |!|graph. How |!|it |!|works: |!|Starts |!|at |!|a |!|vertex |!|and |!|adds |!|the |!|smallest |!|connecting |!|edge |!|to |!|unvisited |!|node. Ford |!|Fulkerson |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Runtime: |!|O(mC) Input: |!|Graph |!|with |!|integer |!|edge |!|weights. |!|(Note: |!|Does |!|not |!|work |!|with |!|Infinity) Output: |!|max |!|flow |!|f* Edmonds-Karp |!|Algorithm |!|- |!|correct |!|answer |!| ✔ Runtime: |!|O(nm^2) Input: |!|Graph |!|with |!|integer |!|edge |!|weights. |!|(Note: |!|Works |!|with |!|Infinity!) Output: |!|max |!|flow |!|f* Orlin |!|Max |!|Flow |!|Algorithm |!|- |!|correct |!|answer |!| ✔ - |!|Current |!|best |!|solution |!|to |!|max |!|flow |!|problem
Adding/Removing |!|an |!|Edge |!|to |!|G^f |!|implies |!|- |!|correct |!|answer |!| ✔ - |!|Add: |!|if |!|add |!|y->z, |!|then |!|edge |!| z->y |!|must |!|be |!|on |!|augmenting |!|path