Skip to content
Snippets Groups Projects
Commit 6ce9b293 authored by Kevin Lin's avatar Kevin Lin
Browse files

Add image-processing/algorithm-bounds

parent d11747d4
No related branches found
No related tags found
No related merge requests found
Pipeline #396532 passed with stages
in 48 seconds
Showing with 123 additions and 1 deletion
......@@ -36,4 +36,4 @@ Feb 18
: **Section**{: .label .label-purple }**Sorting Algorithms**
Feb 19
: **Algorithm Bounds**
: [**Algorithm Bounds**]({{ site.baseurl }}{% link image-processing/algorithm-bounds.md %})
---
title: Algorithms lower bounds
nav_order: 4
---
How can we apply the sorting lower bound to other problems in data structures and algorithms?
{% capture question %}
Consider a priority queue implementation that guarantees worst-case *Θ*(1) runtime for all methods. Without knowing anything about the optimization, give a runtime argument for why this optimization is impossible. (What does this suggest about heap sort?)
{% endcapture %}
{% include question.html question=question number=1 %}
{% capture question %}
Earlier, we learned that the problem of finding duplicates in an array reduces to sorting. If we know that comparison-based sorting algorithms must be in *Ω*(*N*log *N*), is it true that any duplicate-finding algorithm must also be in *Ω*(*N*log *N*)?
{% endcapture %}
{% capture explanation %}
A reduction to sorting is just one approach to detecting duplicates! Learning something about one algorithm for solving a problem doesn't preclude other possible algorithms.
We could alternatively use a `HashSet`. Instantiate an empty HashSet. For each element in the (unsorted) input array, first check if it is in the `HashSet`. If the element is already in the `HashSet`, return true. Otherwise, add it to the `HashSet` and continue to the next element.
{% endcapture %}
{% include question.html question=question explanation=explanation number=2 %}
---
title: Algorithms for change
nav_order: 5
---
<div style="--aspect-ratio: 720 / 405"><iframe src="https://www.youtube.com/embed/318pfexvV0A" frameborder="0" width="720" height="405" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
---
title: How far we've come
nav_order: 6
---
Starting with search trees, we designed faster data structures and algorithms: **design as optimization**.
[DNA Indexing]({{ site.baseurl }}{% link dna-indexing/index.md %})
: Comparing tree search structures against array search algorithms.
But beyond understanding the past, algorithms are about shaping the future: **design as engineering**.
[Content Moderation]({{ site.baseurl }}{% link content-moderation/index.md %})
: Optimizing algorithms with a composition of data structures.
Beyond data structures, how we model problems determines social outcomes: **design as philosophy**.
[Image Processing]({{ site.baseurl }}{% link image-processing/index.md %})
: Comparing graph abstractions and algorithms for DAG shortest paths.
---
title: Puppy, cat, dog
nav_order: 2
---
<div style="--aspect-ratio: 720 / 405"><iframe src="https://www.youtube.com/embed/ByjmA0x_D2A" frameborder="0" width="720" height="405" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
---
title: Some math problems
nav_order: 0
---
<div style="--aspect-ratio: 720 / 405"><iframe src="https://www.youtube.com/embed/MwGXh1gIZVA" frameborder="0" width="720" height="405" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
---
title: Sorting lower bound
nav_order: 3
---
<div style="--aspect-ratio: 720 / 405"><iframe src="https://www.youtube.com/embed/h7TK_-sWsxY?end=478" frameborder="0" width="720" height="405" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
---
title: Ulimate Comparison Sort
nav_order: 1
---
<div style="--aspect-ratio: 720 / 405"><iframe src="https://www.youtube.com/embed/lO-K6fjj-lY" frameborder="0" width="720" height="405" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
---
title: What's next?
nav_order: 7
---
Learning about data structures and algorithms opens the door to the broader field of computer science. What interests you?
CSE 374: Intermediate Programming Concepts and Tools
: Learn popular tools used by professional programmers and exactly how hardware and code interact inside a physical computer.
CSE 413: Programming Languages
: Learn new ways of thinking about problems through studying different programming languages as well as how they work under the hood.
CSE 414: Database Systems
: Learn how to store, access, and query huge amounts of data in databases---more than what you can store in memory-backed data structures.
CSE 416: Machine Learning
: Learn how to apply machine learning algorithms to solve some of the hardest problems that we faced this quarter.
CSE 163: Intermediate Data Programming
: Learn programming concepts, libraries, and tools to help people answer complicated questions and make informed decisions.
CSE 154: Web Programming
: Learn the foundations and fundamentals of web development and web technologies to develop websites and web apps.
The entire field of computer science is now accessible to you: the research project is one way to start digging into all of the online learning resources with help from your project team. You've learned the fundamentals of algorithm design, analysis, and critique from three perspectives: design optimization, engineering, and philosophy. And in today's lesson, we learned about what algorithms can and can't do: **design alone as insufficient**.
[Research Project]({{ site.baseurl }}{% link research-project/index.md %})
: Exploring possibilities and limits of data structures and algorithms.
---
title: Algorithm Bounds
parent: Image Processing
nav_order: 19
---
# {{ page.title }}
{% assign slides = site.slides | where_exp: "slide", "slide.url contains page.url" | sort: "nav_order" %}
{% if slides != empty %}
## Table of contents
{: .text-delta }
{% for slide in slides %}
1. [{{ slide.title }}](#{{ slide.title | slugify }}){% endfor %}
---
{% for slide in slides %}
## {{ slide.title }}
{{ slide.content }}
{% endfor %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment