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
Giới thiệu
Đăng ký
Đăng nhập
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
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Cơ sở dữ liệu
COMPUTATIONAL COMPLEXITY
tailieunhanh - 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
76
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
155
1
Pro drupal 7 development
721
159
0
Faculty of Computer Science and Engineering Department of Computer Science - LAB SESSION 3 RECURSION
3
241
0
Faculty of Computer Science and Engineering Department of Computer Science Part 1
4
240
1
Faculty of Computer Science and Engineering Department of Computer Science Part 2
10
134
1
Feaculty of Computer Science and Engineering Department of Computer Scienc Tutorial 3 Questions
4
142
0
Feaculty of Computer Science and Engineering Department of Computer Scienc Tutorial 4 Questions
3
138
0
Computer engineering dissertation: Robust signal processing techniques for modern gnss receivers
123
103
0
Study of component based software engineering
5
158
0
Effective approach in making Capstone project a holistic learning experience to students of undergraduate computer science engineering program
19
145
0
TÀI LIỆU XEM NHIỀU
Một Case Về Hematology (1)
8
462087
59
Giới thiệu :Lập trình mã nguồn mở
14
23863
75
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
11131
537
Câu hỏi và đáp án bài tập tình huống Quản trị học
14
10377
458
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
9657
106
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8668
1151
Tiểu luận: Nội dung tư tưởng Hồ Chí Minh về đạo đức
16
8364
423
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7948
2250
Đề tài: Dự án kinh doanh thời trang quần áo nữ
17
6993
260
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
6800
1617
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
HƯỚNG DẪN SỬ DỤNG PHẦN MỀM CAITA part 9
18
160
0
02-07-2024
báo cáo hóa học:" Increased androgen receptor expression in serous carcinoma of the ovary is associated with an improved survival"
6
127
1
02-07-2024
ĐỀ THI THỬ ĐH NĂM 2011 MÔN VẬT LÍ _ ĐỀ SỐ 101
7
122
0
02-07-2024
ĐỀ TÀI " ĐÁNH GIÁ HIỆU QUẢ HOẠT ĐỘNG KINH DOANH NGOẠI HỐI CỦA NGÂN HÀNG THƯƠNG MẠI CỔ PHẦN XUẤT NHẬP KHẨU VIỆT NAM "
51
123
2
02-07-2024
Bệnh sán lá gan trên gia súc và cách phòng trị
3
124
0
02-07-2024
Chủ đề 3 : SỰ CÂN BẰNG CỦA VẬT RẮN (4 tiết)
9
177
0
02-07-2024
Spelling hypens 8
8
101
0
02-07-2024
Thực đơn dinh dưỡng cho bà mẹ mang thai và sinh con part 2
16
124
1
02-07-2024
Báo cáo khoa học: "A rare coexistence of adrenal cavernous hemangioma with extramedullar hemopoietic tissue: a case report and brief review of the literature"
4
85
0
02-07-2024
Business English Lesson – Advanced Level's archiveFinance (1)
8
92
0
02-07-2024
TÀI LIỆU HOT
Mẫu đơn thông tin ứng viên ngân hàng VIB
8
7948
2250
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
6800
1617
Ebook Chào con ba mẹ đã sẵn sàng
112
4035
1304
Ebook Tuyển tập đề bài và bài văn nghị luận xã hội: Phần 1
62
5728
1197
Ebook Facts and Figures – Basic reading practice: Phần 1 – Đặng Tuấn Anh (Dịch)
249
8668
1151
Giáo trình Văn hóa kinh doanh - PGS.TS. Dương Thị Liễu
561
3658
667
Giáo trình Sinh lí học trẻ em: Phần 1 - TS Lê Thanh Vân
122
3850
601
Giáo trình Pháp luật đại cương: Phần 1 - NXB ĐH Sư Phạm
274
4422
548
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
11131
537
Bài tập nhóm quản lý dự án: Dự án xây dựng quán cafe
35
4307
484