Update
This commit is contained in:
parent
3baebd77d6
commit
cce9ab1229
18 changed files with 96 additions and 14 deletions
12
exercises.md
12
exercises.md
|
@ -6,6 +6,7 @@ Here let be listed exercises for the readers of this wiki. You can allow yoursel
|
|||
2. Say we have an algorithm that finds all pairs of equal numbers in an array of numbers of length *N* and adds all of these (unordered) pairs to a set *S*. The algorithm is (pseudocode): `for i := 0 to N: for j := 0 to N: if numbers[i] == numbers[j]: add(S,pair(i,j))`. How can we optimize the algorithm in terms of its execution speed (i.e. make it perform fewer operations while keeping its results the same)? How did the asymptotic time complexity ("big O") class change?
|
||||
3. In computer graphics, what is the difference between ray casting, ray tracing and path tracing?
|
||||
4. Why are manhole lids round and not square?
|
||||
5. Give one real-life example of each of the following binary [relation](relation.md) types: [transitive](transitivity.md) but not equivalence, non-transitive, [antisymmetric](antisymmetric.md) and symmetric at the same time, [asymmetric](asymmetry.md), non-trivial [equivalence](equivalence.md).
|
||||
|
||||
## Solutions
|
||||
|
||||
|
@ -37,4 +38,13 @@ They are all image-order methods of 3D [rendering](rendering.md). [Ray casting](
|
|||
|
||||
**solution 4**:
|
||||
|
||||
Round lid can't fall into the hole.
|
||||
Round lid can't fall into the hole.
|
||||
|
||||
**solution 5**:
|
||||
|
||||
- transitive, not equivalence: *A* is a descendant from *B*.
|
||||
- non-transitive: *A* is a friend of *B*.
|
||||
- symmetric: *A* had sex with *B*.
|
||||
- antisymmetric and symmetric: *A* is *B*.
|
||||
- asymmetric: *A* is a mother of *B*.
|
||||
- non-trivial equivalence: *A* is of same age as *B*.
|
Loading…
Add table
Add a link
Reference in a new issue