Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
正在生成预览...
Slide thảo luận về ký hiệu tiệm cận (Big O, Big Theta, Big Omega) và các phép toán bit, bao gồm bài tập phân tích thời gian chạy và thao tác bit.
描述
Discussion 6: Intro to Asymptotics And Bits Christine Zhou Agenda Announcements And time to fill out surveys Asymptotics Review Problem 1,2 Bits and Bitwise Operators Problem 3 Announcements Midterm grades have been released! Place to Vent (ANONYMOUS): tinyurl.com/placetovent HW3 due yesterday TLDR: Make sure everything works on the instructional account Start Project 1 if you haven’t already! (PLEASE FILL OUT TODAY) Discussion survey: tinyurl.com/disc6cz Asymptotics: Big Ө(...) Called “big theta notation” R(N) = runtime, f(N) = function, k’s = constants The runtime can be both upper and lower bounded by the function Let’s say R(N) = 3n3 + 2n2 + 1 What is a good f(N), k1, k2? f(N) = n3, k1 = 2, k2 = 4 Asymptotics: Big O(...) Called “big oh notation” R(N) = runtime, f(N) = function, k = constant The function is an upper bound on the runtime DOES NOT MEAN WORST CASE True or false? N2 ∈ O(N2) N2 ∈ O(N500) N log N ∈ O(N) log N ∈ O(N2) Asymptotics: Big Ω(...) Called “big omega notation” R(N) = runtime, f(N) = function, k = constant The function is a lower bound on the runtime DOES NOT MEAN BEST CASE True or false? N2 ∈ Ω(N2) N ∈ Ω(1) N2 ∈ Ω(N3) 1 Basic Algorithmic Analysis Solutions: 1. f ∈ 𝛳(g) 2. f ∈ O(g) 3. f ∈ O(g) 4. f ∈ Ω(g) 5. f ∈ 𝛳(g) 2 Practice with Runtime 2 Practice with Runtime Bits Each number has a bit representation 01110 = 0*24 + 1*23 + 1*22 + 1*21 + 0*20 = 14 Bitwise Operators OR (|) 0 __ 0 0 0 0 __ 1 0 1 1 __ 1 1 1 x << y: shift the bit representation of x by y to the left (rest are filled with 0’s) AND (&) If x is 10011 and y is 2 x << y is 01100 x >> y: shift the bit representation of x by y to the right (rest are filled with 0’s) If x is 10011 and y is 2 3 A Bit with some Bits Let’s figure out what this question is asking first... Complete the following method such that it does what it is intended to do: given a list of integers, it returns an i
AI 摘要
- 文档名称
- Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
- 学校 / 课程
- University of California, Berkeley · Lập trình Java
- 作者(文档中)
- Christine Zhou
- 内容
- Tài liệu này cung cấp kiến thức nền tảng về giới hạn tiệm cận (Big Theta, Big O, Big Omega) và các toán tử bitwise. Nó bao gồm các ví dụ thực hành và một bài tập để áp dụng các khái niệm đã học.
- 目录
- Agenda
- Announcements
- Asymptotics Review
- Problem 1,2
- Bits and Bitwise Operators
- Problem 3
- Asymptotics: Big Θ(...)
- Asymptotics: Big O(...)
- Asymptotics: Big Ω(...)
- 1 Basic Algorithmic Analysis
- 2 Practice with Runtime
- Bits
- Bitwise Operators
- 3 A Bit with some Bits
- 页数
- 12 页
- 上传者
- Uni24h
常见问题
此文档免费吗?
是的。“Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou”是免费的 — 只需登录并点击“下载”即可获取原始文件。
这份文档有多少页?
该文档共有 12 页,适用于课程 Lập trình Java。您可以在下载前进行在线预览。
我可以在下载前预览吗?
是的。您可以通过在线阅读器直接在本页面预览此文档,然后再决定是否下载。
Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
正在生成预览...
Discussion 6: Intro to Asymptotics And Bits Christine Zhou Agenda Announcements And time to fill out surveys Asymptotics Review Problem 1,2 Bits and Bitwise Operators Problem 3 Announcements Midterm grades have been released! Place to Vent (ANONYMOUS): tinyurl.com/placetovent HW3 due yesterday TLDR: Make sure everything works on the instructional account Start Project 1 if you haven’t already! (PLEASE FILL OUT TODAY) Discussion survey: tinyurl.com/disc6cz Asymptotics: Big Ө(...) Called “big theta notation” R(N) = runtime, f(N) = function, k’s = constants The runtime can be both upper and lower bounded by the function Let’s say R(N) = 3n3 + 2n2 + 1 What is a good f(N), k1, k2? f(N) = n3, k1 = 2, k2 = 4 Asymptotics: Big O(...) Called “big oh notation” R(N) = runtime, f(N) = function, k = constant The function is an upper bound on the runtime DOES NOT MEAN WORST CASE True or false? N2 ∈ O(N2) N2 ∈ O(N500) N log N ∈ O(N) log N ∈ O(N2) Asymptotics: Big Ω(...) Called “big omega notation” R(N) = runtime, f(N) = function, k = constant The function is a lower bound on the runtime DOES NOT MEAN BEST CASE True or false? N2 ∈ Ω(N2) N ∈ Ω(1) N2 ∈ Ω(N3) 1 Basic Algorithmic Analysis Solutions: 1. f ∈ 𝛳(g) 2. f ∈ O(g) 3. f ∈ O(g) 4. f ∈ Ω(g) 5. f ∈ 𝛳(g) 2 Practice with Runtime 2 Practice with Runtime Bits Each number has a bit representation 01110 = 0*24 + 1*23 + 1*22 + 1*21 + 0*20 = 14 Bitwise Operators OR (|) 0 __ 0 0 0 0 __ 1 0 1 1 __ 1 1 1 x << y: shift the bit representation of x by y to the left (rest are filled with 0’s) AND (&) If x is 10011 and y is 2 x << y is 01100 x >> y: shift the bit representation of x by y to the right (rest are filled with 0’s) If x is 10011 and y is 2 3 A Bit with some Bits Let’s figure out what this question is asking first... Complete the following method such that it does what it is intended to do: given a list of integers, it returns an i
阅读全文
- 文档名称
- Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
- 学校 / 课程
- University of California, Berkeley · Lập trình Java
- 作者(文档中)
- Christine Zhou
- 内容
- Tài liệu này cung cấp kiến thức nền tảng về giới hạn tiệm cận (Big Theta, Big O, Big Omega) và các toán tử bitwise. Nó bao gồm các ví dụ thực hành và một bài tập để áp dụng các khái niệm đã học.
- 目录
- Agenda
- Announcements
- Asymptotics Review
- Problem 1,2
- Bits and Bitwise Operators
- Problem 3
- Asymptotics: Big Θ(...)
- Asymptotics: Big O(...)
- Asymptotics: Big Ω(...)
- 1 Basic Algorithmic Analysis
- 2 Practice with Runtime
- Bits
- Bitwise Operators
- 3 A Bit with some Bits
- 页数
- 12 页
- 上传者
- Uni24h
评论 (0)
暂无评论。快来抢沙发吧!
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
评论 (0)
暂无评论。快来抢沙发吧!