Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
Đang tạo bản xem trước...
Tài liệu thảo luận về Big O, Big Omega, Big Theta, các kỹ thuật phân tích thời gian chạy và cây tìm kiếm nhị phân (BST).
Mô tả
Discussion 7: Asymptotics II, Search Trees Christine Zhou Announcements Homework 2 due today, March 6! Homework 3 will be released on Thursday morning ○ Due Monday, March 11 Midterm 1 Regrade Requests due by this Friday at 11:59pm! SIgn up to meet with me if you’re interested! Resources: tinyurl.com/cs61b-christine-zhou Survey: tinyurl.com/cz-disc7-sp19 Notation: Big O, Big Omega, Big Theta Goal: Look at program complexity for large input Notations: ○ Big O - upper bound ○ Big Omega - lower bound ○ Big Theta - upper and lower bound O (Big O) Let f(n) and g(n) be positive real numbers on inputs of size n f ∈ O(g) if there is a constant c > 0 s.t. f(n) <= c g(n) Upper bounded by g(n) when n gets significantly large. Bound does not have to be tight. True or false? ○ ○ ○ ○ N2 ∈ O(N2) N2 ∈ O(N500) N log N ∈ O(N) log N ∈ O(N2) Ω (Big Omega) Let f(n) and g(n) be positive real numbers on inputs of size n f ∈ Ω(g) if there is a constant c > 0 s.t. f(n) >= c g(n) Lower bounded by g(n) when n gets significantly large. Bound does not have to be tight. True or false? ○ N2 ∈ Ω(N2) ○ N ∈ Ω(1) ○ N2 ∈ Ω(N3) Θ (Big Theta) Let f(n) and g(n) be positive real numbers on inputs of size n f ∈ Θ(g) if there is a constant c1 > 0 and c2 > 0 s.t. ○ C1 g(n) <= f(n) <= c2 g(n) for all c1 <= c2 Tightly bounded by g(n) when n gets significantly large. • f ∈ Ω(g) and f ∈ O(g) Introduction to Algorithms, Cormen, Leiserson, Rivest, Stein Conventions: No Constants Drop multiplicative constants and lower order terms ○ If our runtime is actually 2N^2 + N, we say the runtime is Theta(N^2) Any exponential dominates any polynomial Any polynomial dominates any logarithm Common Asymptotic Sets O(1): constant O(log n): logarithmic O(sqrt(n)): square root O(n): linear O(n log n): linearithmic O(n^2): quadratic O(n^3): cubic O(2^n): exponential O(n!): factorial Techniques for Analyzing Runtime Annotate your code ○ Write
Tóm tắt AI
- Tên tài liệu
- Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
- Trường / Môn
- University of California, Berkeley · Lập trình Java
- Tác giả (trong tài liệu)
- Christine Zhou
- Nội dung
- Tài liệu giới thiệu ký hiệu Big O, Big Omega, Big Theta để phân tích độ phức tạp thuật toán. Sau đó, nó phân tích hiệu suất của cây tìm kiếm nhị phân (BST) và đưa ra bài tập về kiểm tra tính hợp lệ của BST.
- Mục lục
- Announcements
- Notation: Big O, Big Omega, Big Theta
- O (Big O)
- Ω (Big Omega)
- Θ (Big Theta)
- Introduction to Algorithms, Cormen, Leiserson, Rivest, Stein
- Conventions: No Constants
- Common Asymptotic Sets
- Techniques for Analyzing Runtime
- Problem 1.1
- Problem 1.2
- Problem 1.3
- Problem 1.4
- Binary Search Tree
- BST Runtimes
- 2) Is This a BST?
- Số trang
- 27 trang
- Người đăng
- Uni24h
Câu hỏi thường gặp
Tài liệu này có miễn phí không?
Có. “Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou” miễn phí — bạn chỉ cần đăng nhập rồi bấm Tải xuống để lấy file gốc.
Tài liệu dài bao nhiêu trang?
Tài liệu gồm 27 trang, thuộc môn Lập trình Java. Bạn có thể xem trước online trước khi tải.
Tôi có thể xem trước trước khi tải không?
Có. Bạn xem trước tài liệu ngay trên trang này bằng trình đọc online, rồi quyết định tải về.
Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
Đang tạo bản xem trước...
Discussion 7: Asymptotics II, Search Trees Christine Zhou Announcements Homework 2 due today, March 6! Homework 3 will be released on Thursday morning ○ Due Monday, March 11 Midterm 1 Regrade Requests due by this Friday at 11:59pm! SIgn up to meet with me if you’re interested! Resources: tinyurl.com/cs61b-christine-zhou Survey: tinyurl.com/cz-disc7-sp19 Notation: Big O, Big Omega, Big Theta Goal: Look at program complexity for large input Notations: ○ Big O - upper bound ○ Big Omega - lower bound ○ Big Theta - upper and lower bound O (Big O) Let f(n) and g(n) be positive real numbers on inputs of size n f ∈ O(g) if there is a constant c > 0 s.t. f(n) <= c g(n) Upper bounded by g(n) when n gets significantly large. Bound does not have to be tight. True or false? ○ ○ ○ ○ N2 ∈ O(N2) N2 ∈ O(N500) N log N ∈ O(N) log N ∈ O(N2) Ω (Big Omega) Let f(n) and g(n) be positive real numbers on inputs of size n f ∈ Ω(g) if there is a constant c > 0 s.t. f(n) >= c g(n) Lower bounded by g(n) when n gets significantly large. Bound does not have to be tight. True or false? ○ N2 ∈ Ω(N2) ○ N ∈ Ω(1) ○ N2 ∈ Ω(N3) Θ (Big Theta) Let f(n) and g(n) be positive real numbers on inputs of size n f ∈ Θ(g) if there is a constant c1 > 0 and c2 > 0 s.t. ○ C1 g(n) <= f(n) <= c2 g(n) for all c1 <= c2 Tightly bounded by g(n) when n gets significantly large. • f ∈ Ω(g) and f ∈ O(g) Introduction to Algorithms, Cormen, Leiserson, Rivest, Stein Conventions: No Constants Drop multiplicative constants and lower order terms ○ If our runtime is actually 2N^2 + N, we say the runtime is Theta(N^2) Any exponential dominates any polynomial Any polynomial dominates any logarithm Common Asymptotic Sets O(1): constant O(log n): logarithmic O(sqrt(n)): square root O(n): linear O(n log n): linearithmic O(n^2): quadratic O(n^3): cubic O(2^n): exponential O(n!): factorial Techniques for Analyzing Runtime Annotate your code ○ Write
Đọc toàn bộ tài liệu
- Tên tài liệu
- Asymptotics II, Search Trees (Discussion 7) (Kỹ thuật phân tích thời gian chạy, cây tìm kiếm nhị phân) - Christine Zhou
- Trường / Môn
- University of California, Berkeley · Lập trình Java
- Tác giả (trong tài liệu)
- Christine Zhou
- Nội dung
- Tài liệu giới thiệu ký hiệu Big O, Big Omega, Big Theta để phân tích độ phức tạp thuật toán. Sau đó, nó phân tích hiệu suất của cây tìm kiếm nhị phân (BST) và đưa ra bài tập về kiểm tra tính hợp lệ của BST.
- Mục lục
- Announcements
- Notation: Big O, Big Omega, Big Theta
- O (Big O)
- Ω (Big Omega)
- Θ (Big Theta)
- Introduction to Algorithms, Cormen, Leiserson, Rivest, Stein
- Conventions: No Constants
- Common Asymptotic Sets
- Techniques for Analyzing Runtime
- Problem 1.1
- Problem 1.2
- Problem 1.3
- Problem 1.4
- Binary Search Tree
- BST Runtimes
- 2) Is This a BST?
- Số trang
- 27 trang
- Người đăng
- Uni24h
Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!
Misc.onclusion (Discussion 14-END) (Ôn tập cấu trúc dữ liệu) - Christine Zhou
Final Review Solutions (Cấu trúc dữ liệu heap, hàng đợi ưu tiên và duyệt đồ thị) - Ching and Christines
Giáo trình Lập trình Java
Inheritance (Discussion 4) (Kế thừa trong Java) - Christine Zhou
Asymptotic Analysis (Discussion 7) (Phân tích tiệm cận) - Christine Zhou
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 5.Thuyết tương đối - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 4. Tán xạ ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 3.Phân cực ánh sáng - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!