Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
Génération de l'aperçu...
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.
Description
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
Résumé IA
- Nom du document
- Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
- École / Cours
- University of California, Berkeley · Lập trình Java
- Auteur (dans le document)
- Christine Zhou
- Contenu
- 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.
- Table des matières
- 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
- Pages
- 12 pages
- Téléversé par
- Uni24h
Foire aux questions
Ce document est-il gratuit ?
Oui. « Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou » est gratuit — il suffit de vous connecter et de cliquer sur Télécharger pour obtenir le fichier original.
Combien de pages compte ce document ?
Le document contient 12 pages, pour le cours Lập trình Java. Vous pouvez le prévisualiser en ligne avant de le télécharger.
Puis-je prévisualiser avant de télécharger ?
Oui. Vous pouvez prévisualiser ce document directement sur cette page avec le lecteur en ligne, puis décider de le télécharger ou non.
Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
Génération de l'aperçu...
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
Lire le document entier
- Nom du document
- Intro to Asymptotics and Bits (Discussion 6) (Ký hiệu tiệm cận và các phép toán bit) - Christine Zhou
- École / Cours
- University of California, Berkeley · Lập trình Java
- Auteur (dans le document)
- Christine Zhou
- Contenu
- 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.
- Table des matières
- 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
- Pages
- 12 pages
- Téléversé par
- Uni24h
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !
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
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !