
- •Професійна іноземна мова
- •7.05070201«Програмне забЕзПечення автоматизованих систем»
- •Професійна іноземна мова
- •7.05070201 «Програмне забЕзПечення автоматизованих систем»
- •Передмова
- •Lesson 1
- •Lesson 2
- •Lesson 3
- •Lesson 4
- •Lesson 5
- •Lesson 6
- •Lesson 7
- •Lesson 8
- •Lesson 9
- •Lesson 10
- •Lesson 11
- •Lesson 12
- •Lesson 13
- •Lesson 14
- •Lesson 15
- •Список літератури (джерел):
Lesson 9
Read the text: Introduction to Discrete Structures - whats and whys. Part 1.
Discrete mathematics is mathematics that deals with discrete objects. Discrete objects are those which are separated from (not connected to/distinct from) each other. Integers (aka whole numbers), rational numbers (ones that can be expressed as the quotient of two integers), automobiles, houses, people etc. are all discrete objects. On the other hand real numbers which include irrational as well as rational numbers are not discrete. As you know between any two different real numbers there is another real number different from either of them. So they are packed without any gaps and cannot be separated from their immediate neighbors. In that sense they are not discrete. In this course we will be concerned with objects such as integers, propositions, sets, relations and functions, which are all discrete. We are going to learn concepts associated with them, their properties, and relationships among them among others. Some of the major reasons that we adopt formal approaches are 1) we can handle infinity or large quantity and indefiniteness with them, and 2) results from formal approaches are reusable. As an example, let us consider a simple problem of investment. Suppose that we invest $1,000 every year with expected return of 10% a year. How much are we going to have after 3 years, 5 years, or 10 years? The most naive way to find that out would be the brute force calculation. Let us see what happens to $1,000 invested at the beginning of each year for three years. First let us consider the $1,000 invested at the beginning of the first year. After one year it produces a return of $100. Thus at the beginning of the second year, $1,100, which is equal to $1,000*(1+0.1), is invested. This $1,100 produces $110 at the end of the second year. Thus at the beginning of the third year we have $1,210, which is equal to $1,000*(1+0.1)(1+ 0.1), or $1,000* (1+0.1)2. After the third year this gives us $1,000*(1+0.1)3.
Similarly we can see that the $1,000 invested at the beginning of the second year produces $1,000 (1+0.1)2 at the end of the third year, and the $1,000 invested at the beginning of the third year becomes $1,000*(1+0.1). Thus the total principal and return after three years is 1,000*(1+0.1)+$1,000*(1+0.1)2 +$1,000*(1+0.1)3, which is equal to $3,641.
One can similarly calculate the principal and return for 5 years and for 10 years. It is, however, a long tedious calculation even with calculators. Further, what if you want to know the principal and return for some different returns than 10%, or different periods of time such as 15 years ? You would have to do all these calculations all over again.
We can avoid these tedious calculations considerably by noting the similarities in these problems and solving them in a more general way. Since all these problems ask for the result of investing a certain amount every year for certain number of years with a certain expected annual return, we use variables, say A, R and n, to represent the principal newly invested every year, the return ratio, and the number of years invested, respectively. With these symbols, the principal and return after n years, denoted by S, can be expressed as S=A(1 + R) + A(1 + R)2 + ... + A(1 + R)n .
As well known, this S can be put into a more compact form by first computing S - (1 + R)S as S =A ( (1 + R)n + 1 - (1 + R) ) / R . Once we have it in this compact form, it is fairly easy to compute S for different values of A, R and n, though one still has to compute (1 + R)n + 1 . This simple formula represents infinitely many cases involving all different values of A, R and n. The derivation of this formula, however, involves another problem. When computing the compact form for S, S - (1 + R)S was computed using S = A(1 + R) + A(1 + R)2 + ... + A(1 + R)n .While this argument seems rigorous enough, in fact practically it is a good enough argument, when one wishes to be very rigorous, the ellipsis ... in the sum for S is not considered precise. You are expected to interpret it in a certain specific way. But it can be interpreted in a number of different ways. In fact it can mean anything. Thus if one wants to be rigorous, and absolutely sure about the correctness of the formula, one needs some other way of verifying it than using the ellipsis. Since one needs to verify it for infinitely many cases (infinitely many values of A, R and n), some kind of formal approach, abstracted away from actual numbers, is required. Suppose now that somehow we have formally verified the formula successfully and we are absolutely sure that it is correct. It is a good idea to write a computer program to compute that S, especially with (1 + R)n + 1 to be computed.
Suppose again that we have written a program to compute S. How can we know that the program is correct? As we know, there are infinitely many possible input values (that is, values of A, R and n). Obviously we cannot test it for infinitely many cases. Thus we must take some formal approach.
Exercise 1. Learn the following words and word-combinations:
integer, aka, quotient, on the other hand, gap, proposition, to be concerned with, handle, infinity, return, principalt |
Exercise 2. Answer the questions:
1) What are discrete objects?
2) Why are we interested in the formal/theoretical approaches in computer science?
3) How can we calculate the principal and return?
4) What kind of calculating the principal and return is?
5) How can we avoid tedious calculations?
Exercise 3. Choose the correct ending from B to complete each of the following sentences in A:
A |
B |
1) Suppose again that |
a) involves another problem |
2) We cannot test it for |
b) a member of different ways |
3) We must take some |
c) formal approach is required |
4) Some kind of |
d) infinitely many cases |
5) It can be interpreted in computers |
e) we have written a program to |
6) The derivation of the formula |
f) formal approach |
Exercise 4. Complete the sentences with suitable words. The first letter of each word is given:
1) Real numbers which include i…….. as well as r…… numbers are not discrete.
2) We can handle i…… or large q….. and indefiniteness with them.
3) They are packed without any g….. and cannot be separated from their n…..
4) You would have to do all these c…. all over again.
5) How can we know that the program is c…..?
Exercise 5. Compose a story on one of the topics (up to 100 words):
1) Discrete Mathematics.
2) Formal/theoretical approaches in computer science.
3) Explain what should be done to verify the correctness of the calculations.