TAILIEUCHUNG - Thuật toán Algorithms (Phần 4)

Tham khảo tài liệu 'thuật toán algorithms (phần 4)', khoa học tự nhiên, toán học phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 2. Arithmetic Algorithms for doing elementary arithmetic operations such as addition multiplication and division have a. very long history dating back to the origins of algorithm studies in the work of the Arabic mathematician al-Khowdrizmi with roots going even further back to the Greeks and the Babylonians. Though the situation is beginning to change the of many computer systems is their capability for doing fast accurate numerical calculations. Computers have built-in capabilities to perform arithmetic on integers and floating-point representations of real numbers for example Pascal allows numbers to be of type integer or with all of the normal arithmetic operations defined on both types. Algorithms come into play when the operations must be performed on more complicated mathematical objects such as polynomials or matrices. In this section we ll look at Pascal implementations of some simple algorithms for addition and multiplication of polynomials and matrices. The algorithms themselves are well-known and straightforward we ll be examining sophisticated algorithms for these problems in Chapter 4. Our main purpose in this section is to get used to treating mathematical objects as objects for manipulation by Pascal programs. This translation from abstract data to something which can be processed by a computer is fundamental in algorithm design. We ll see many examples throughout this book in which a proper representation can lead to an efficient algorithm and vice versa. In this chapter we ll use two fundamental ways of structuring data the array and the linked list. These data structures are used by many of the algorithms in this book in later sections we ll study some more advanced data structures. Polynomials Suppose that we wish to write a program that adds two polynomials we would 23 24 CHAPTER 2 like it to perform calculations like i 2x - 3z3 2 -x 3 x 3z3. In general suppose we wish our program to be able to compute r z p x q x where p and q are polynomials

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.