• Giáo trình Thiết kế & Đánh giá thuật toán - Bài giảng 6: Cấu trúc cây - Lê Nguyên KhôiGiáo trình Thiết kế & Đánh giá thuật toán - Bài giảng 6: Cấu trúc cây - Lê Nguyên Khôi

    Chèn liên tục vào MinHeap, nhưng không khôi phục tính chất thứ tự bộ phận.Khôi phục tính chất thứ tự bộ phận (sử dụng downheap) bắt đầu từ đỉnh chính giữa Sắp Xếp Cây Thứ Tự Bộ Phận – So Sánh Giống sắp xếp gộp (merge sort) Độ phức tạp 0 (n logn) Giống sắp xếp chèn (insertion sort) In-place algortihm

    pdf35 trang | Chia sẻ: thucuc2301 | Ngày: 21/11/2020 | Lượt xem: 1049 | Lượt tải: 0

  • Digital Logic Design - Lecture 22: Sequential Circuits AnalysisDigital Logic Design - Lecture 22: Sequential Circuits Analysis

    Sequential circuit consists of A combinational circuit that produces output A feedback circuit We use JK flip-flops for the feedback circuit Simple counter examples using JK flip-flops Provides alternative counter designs We know the output Need to know the input combination that produces this output Use an excitation table Built from th...

    ppt49 trang | Chia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 936 | Lượt tải: 0

  • Digital Logic Design - Lecture 21: Sequential Circuits: Flip flopsDigital Logic Design - Lecture 21: Sequential Circuits: Flip flops

    Flip flops are powerful storage elements They can be constructed from gates and latches! D flip flop is simplest and most widely used Asynchronous inputs allow for clearing and presetting the flip flop output Multiple flops allow for data storage The basis of computer memory! Combine storage and logic to make a computation circuit

    pptChia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 932 | Lượt tải: 0

  • Giáo trình Thiết kế & Đánh giá thuật toán - Bài giảng 5: Sắp xếp nhanh - Lê Nguyên KhôiGiáo trình Thiết kế & Đánh giá thuật toán - Bài giảng 5: Sắp xếp nhanh - Lê Nguyên Khôi

    Phân hoạch dựa trên phần tử ngẫu nhiên: Thời gian chạy không phụ thuộc vào dữ liệu đầu vào. Không cần giả thiết về phân phối của dữ liệu đầu vào. Không dữ liệu nào tạo nên trường hợp xấu nhất. Trường hợp xấu nhất chỉ do hàm sinh số ngẫu nhiên. Giả thiết khi phân tích thời gian chạy Mảng bao gồm các phần tử khác nhau Mảng có các phần tử g...

    pdf20 trang | Chia sẻ: thucuc2301 | Ngày: 21/11/2020 | Lượt xem: 946 | Lượt tải: 0

  • Digital Logic Design - Lecture 20: Sequential Circuits LatchesDigital Logic Design - Lecture 20: Sequential Circuits Latches

    Latches are based on combinational gates (e.g. NAND, NOR) Latches store data even after data input has been removed S-R latches operate like cross-coupled inverters with control inputs (S = set, R = reset) With additional gates, an S-R latch can be converted to a D latch (D stands for data) D latch is simple to understand conceptually When C =...

    pptChia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 986 | Lượt tải: 0

  • Digital Logic Design - Lecture 19: Recap IIDigital Logic Design - Lecture 19: Recap II

    Performs the inverse of the operation of a MUX It has one input line, the input from which is transmitted to one of 2n output lines The output lines are selected based on the select inputs

    pptChia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 984 | Lượt tải: 0

  • Digital Logic Design - Lecture 18: RecapDigital Logic Design - Lecture 18: Recap

    1s complement with negative numbers shifted one position clockwise Only one representation for 0 One more negative number than positive number High-order bit can act as sign bit

    ppt62 trang | Chia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 979 | Lượt tải: 0

  • Giáo trình Thiết kế & Đánh giá thuật toán - Bài giảng 4: Chia để trị - Lê Nguyên KhôiGiáo trình Thiết kế & Đánh giá thuật toán - Bài giảng 4: Chia để trị - Lê Nguyên Khôi

    T(n) = 7T(n/2) + Ө (n^2) n^log_b⁡a =n^log_2⁡7 = n^2.81 => T(n) ∈ Ө (n^log7) log 7 = 2.81 trông không nhỏ hơn 3 là mấy. Tuy nhiên, nên nhớ sự khác biệt là số mũ. Do đó thời gian chạy sẽ bị ảnh hưởng rất nhiều. Trên thực thế, thuật toán Strassen’s tốt hơn thuật toán nhân ma trận thông thường với n ≥ 32

    pdf21 trang | Chia sẻ: thucuc2301 | Ngày: 21/11/2020 | Lượt xem: 1492 | Lượt tải: 0

  • Digital Logic Design - Lecture 17: Problems (Mano)Digital Logic Design - Lecture 17: Problems (Mano)

    Must solve as much problems as possible Tristate buffers have three types of outputs 0, 1, high-impedence (Z) Useful for datapaths

    ppt27 trang | Chia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 1066 | Lượt tải: 0

  • Digital Logic Design - Lecture 16: More Multiplexers, Encoders and DecodersDigital Logic Design - Lecture 16: More Multiplexers, Encoders and Decoders

    Decoder allows for generation of a single binary output from an input binary code For an n-input binary decoder there are 2n outputs Decoders are widely used in storage devices (e.g. memories) Encoders all for data compression Priority encoders rank inputs and encode the highest priority input

    ppt50 trang | Chia sẻ: dntpro1256 | Ngày: 21/11/2020 | Lượt xem: 892 | Lượt tải: 0