Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Tài liệu HOT
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
0
Trang chủ
Công Nghệ Thông Tin
Cơ sở dữ liệu
COMPUTATIONAL COMPLEXITY
TAILIEUCHUNG - COMPUTATIONAL COMPLEXITY
Question 1. Reorder the following efficiencies from the smallest to the largest: a. 2n3 + n5 b. 2000 c. 4n+1 d. n4 e. (n-1)! f. nlog2(n) g. 2klogk(n) (k is a predefined constant) Solution: Efficiency: a measure of amount of time for an algorithm to execute (Time Efficiency) or a measure of amount of memory needed for an algorithm to execute (Space Efficiency). Non-decreasing order: 2000 | Faculty of Computer Science and Engineering Department of Computer Science DATA STRUCTURES ALGORITHMS Tutorial 1 Questions COMPUTATIONAL COMPLEXITY Required Questions Question 1. Reorder the following efficiencies from the smallest to the largest a. 2n3 n5 b. 2000 c. 4n 1 d. n4 e. n-1 f nlog2 n g. 2klogk n k is a predefined constant Solution Efficiency a measure of amount of time for an algorithm to execute Time Efficiency or a measure of amount of memory neededfor an algorithm to execute Space Efficiency . Non-decreasing order 2000 2k logk n n log2 n n4 2n3 n5 4n 1 n-1 Question 2. Determine the big-O notation for the following a. 2n6 b. 100n 3 7 c. 9log2 n d. 5n10 2logn e. n k k is a predefined constant f 100log2 n 5 n 2n Solution a. O n6 b. O n c. O log2 n d. O n10 e. O n f. O n Question 3. Calculate the run-time efficiency of the following program segment 1 i n-1 2 loop i n 2 1 j 1 2 loop j n 2 1 print i j 2 jj j 2 3 end loop 4 i i - 2 3 end loop Solution Note n 2 n 2 rounded down If n 2 is odd the run-time efficiency is n 4 n2 2 O n2 Released on 03 09 2012 10 09 56 1 5 Faculty of Computer Science and Engineering Department of Computer Science If n 2 is even the run-time efficiency is n 4. n 4-1 O n2 Or generally the run-time efficiency of the given program segment is O n2 . Question 4. Calculate the run-time efficiency of the following program segment 1 i n3 2 loop i n 2 1 j 1 2 loop j n 2 1 print i j 2 jj j 2 3 end loop 4 i i 2 3 end loop Solution There are 2 nested loops the iteration of variable i is executed 2log2 n n3 2x n 2 x log2n2 2log2n times j is executed n 4 or n 4 -1 times Therefore the run-time efficiency is 2 log2 n n 4 O nlog2 n . Question 5. If the algorithm dolt has an efficiency factor of 2n calculate the run time efficiency of the following program segment 1 i 1 2 loop i n 1 j 1 2 loop j n 1 k 1 2 loop k n 1 dolt . 2 k k 2 3 end loop 4 j j 1 3 end loop 4 i i 1 3 end loop Solution There are 3 nested loops the iteration of .
Minh Nguyệt
69
5
pdf
Báo lỗi
Trùng lắp nội dung
Văn hóa đồi trụy
Phản động
Bản quyền
File lỗi
Khác
Upload
Tải xuống
đang nạp các trang xem trước
Bấm vào đây để xem trước nội dung
Tải xuống
TÀI LIỆU LIÊN QUAN
200 How to Rescue Damaged Hard Drives
74
121
1
Pro drupal 7 development
721
112
0
Faculty of Computer Science and Engineering Department of Computer Science - LAB SESSION 3 RECURSION
3
135
0
Faculty of Computer Science and Engineering Department of Computer Science Part 1
4
192
1
Faculty of Computer Science and Engineering Department of Computer Science Part 2
10
108
1
Feaculty of Computer Science and Engineering Department of Computer Scienc Tutorial 3 Questions
4
116
0
Feaculty of Computer Science and Engineering Department of Computer Scienc Tutorial 4 Questions
3
110
0
Computer engineering dissertation: Robust signal processing techniques for modern gnss receivers
123
83
0
Study of component based software engineering
5
138
0
Effective approach in making Capstone project a holistic learning experience to students of undergraduate computer science engineering program
19
123
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
461742
55
Giới thiệu :Lập trình mã nguồn mở
14
22075
54
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10740
524
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
9929
445
Phân tích và làm rõ ý kiến sau: “Bài thơ Tự tình II vừa nói lên bi kịch duyên phận vừa cho thấy khát vọng sống, khát vọng hạnh phúc của Hồ Xuân Hương”
3
9427
104
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8134
1122
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8134
421
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7819
2212
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6502
247
Vật lý hạt cơ bản (1)
29
5680
81
TỪ KHÓA LIÊN QUAN
Cơ sở dữ liệu
computer engineering
electrical engineering
computer organization
digital logic design
Computer Architecture
Language Architecture
mainboard
computer assembly
computer hardware
assembly engineering
computer skills
hardware architectures
computer basics
computer architecture computer
computer components
computer security
network security
data security
a virus
computer protection
computer tips
document of Pro drupal 7
Engineering Department
Computer Scienc
Feaculty of Computer Science
remove the median element
Computer engineering dissertation
Signal processing techniques
Modern gnss receivers
International journal of computer science & communication networks
Study of component based software engineering
Component software engineering
Domain engineering and component
Software Engineering encompasses two parallel engineering activities
Journal of technology and science education
Making Capstone project a holistic learning experience
Students of undergraduate computer science engineering program
Undergraduate computer science engineering programs
The stakeholders like companies
Doctor of Philosophy in computer science and engineering
Philosophy in computer science and engineering
Fuzzy based clustering and data gathering
Fuzzy based clustering
Fuzzy rule based systems
Doctoral dissertation
Doctoral dissertation in computer engineering
Deep learning techniques
Recognition with skeleton data
Windows XP Hacks & Mods for Dummies
Converged Network Security for Dummies
Converged Network Security
Lecture Computer Architecture
Bài giảng Kiến trúc máy tính
Computer science
Instruction set architecture
Computer arithmetic
Machine Dynamics in Mechatronic Systems
Mechanical engineering
Telecommunications engineering
Control engineering
Cơ điện tử
Ebook Computer Organization
Ebook Computer design
Ebook Computer science
Ebook Computer engineering
Ebook Electrical engineering
Integrated Assembly
Hệ thống máy tính
Kỹ thuật máy tính
Social engineering là gì
Human based social engineering
Computer based social engineering
Phòng Chống Social Engineering
Engineering mathematics
Engineering notation
Computer numbering systems
Further algebra
Partial fractions
Simple equations
Simultaneous equations
information systems
data programming
computer data
data management
information processing
transaction processing
computer tricks
Pro drupal documentation
computer settings
hardware knowledge
hardware architecture
computer repair
business knowledge
system administration
TÀI LIỆU MỚI ĐĂNG
Giáo án mầm non chương trình đổi mới: Đề tài: Ôn xác định vị trí trên – dưới, trước- sau của đối tượng khác.
8
334
3
29-03-2024
Ebook Quản lý dự án công nghệ thông tin
170
252
4
29-03-2024
Động cơ đốt trong và máy kéo công nghiêp tập 1 part 7
23
245
0
29-03-2024
extremetech Hacking BlackBerry phần 9
31
225
0
29-03-2024
Oreilly learning the vi Editor phần 4
19
220
0
29-03-2024
WHO/HAI Project on Medicine Prices and Availability
50
446
0
29-03-2024
Bibliography on Medieval Women, Gender, and Medicine 1980-2009
82
197
0
29-03-2024
Bơm máy nén quạt trong công nghệ part 1
20
241
2
29-03-2024
Trading Strategies Profit Making Techniques For Stock_8
23
153
0
29-03-2024
Magnetic Bearings Theory and Applications phần 2
14
159
0
29-03-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7819
2212
Ebook Chào con ba mẹ đã sẵn sàng
112
3652
1219
Giáo trình Tư tưởng Hồ Chí Minh - Mạch Quang Thắng (Dành cho bậc ĐH - Không chuyên ngành Lý luận chính trị)
152
5130
1173
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8134
1122
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5037
1084
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3403
638
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3620
524
Tiểu luận: Tư tưởng Hồ Chí Minh về xây dựng nhà nước trong sạch vững mạnh
13
10740
524
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
3901
502
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4027
470
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.