Sunday, June 30, 2024

Algebra+ 08 - Fibonacci: UNIZOR.COM - Math+ & Problems - Algebra

Notes to a video lecture on http://www.unizor.com

Algebra+ 08 - Fibonacci

Note
We will use both terms average and mean interchangeably, but usually with proper qualification, like geometric mean or harmonic average.

Problem A

The Fibonacci sequence F(n) for integer n=0,1,2,3... is a sequence of numbers that starts with
F(0)=0, F(1)=1
and satisfies the rule for any integer n≥0:
F(n) + F(n+1) = F(n+2)
which results in
F(2)=F(0)+F(1)=0+1=1
F(3)=F(1)+F(2)=1+1=2
F(4)=F(2)+F(3)=1+2=3
F(5)=F(3)+F(4)=2+3=5
F(6)=F(4)+F(5)=3+5=8
F(7)=F(5)+F(6)=5+8=13
etc.
Derive formula for the Fibonacci sequence.

Hint A
Prove that if the following equation
Xn + Xn+1 = Xn+2
is true for n=0, it's true for any other positive integer n.

Solution A

Let's prove the statement in the Hint A above by using mathematical induction.
For n=0 it's assumed to be true.
Assume, it's true for some n, that is assume that
Xn + Xn+1 = Xn+2
is true for some n.
We have to prove that it's true for n+1, that is we have to prove that
Xn+1 + Xn+2 = Xn+3
Indeed,
Xn+1 + Xn+2 =
= X·(Xn + Xn+1) =
=
[use assumption for n] =
= X·Xn+2 = Xn+3


The formula
Xn + Xn+1 = Xn+2
looks very much like the definition for Fibonacci sequence
F(n) + F(n+1) = F(n+2)
But are there any X that satisfy the initial conditions for Fibonacci sequence
F(0)=0, F(1)=1?
If yes, the solution for a formula describing the sequence would be solved.

The answer is YES.
First of all, let's find value(s) of X for n=0, that is let's solve the equation
Xn + Xn+1 = Xn+2
for n=0.
X0 + X1 = X2 or
1 + X = X2 or
X2 − X − 1 = 0
It has two solutions
X1,2 = (1 ± √1+4)/2 =
= (1 ± √5)/2

Both of these values, if used in the expression
Xn + Xn+1 = Xn+2
transform it into identity for any natural n because they do it for n=0 and because we have proven above by induction that, if true for n=0, it's true for all natural n.

Let's check if a condition
F(n) + F(n+1) = F(n+2)
is satisfied for F1(n)=X1n and F2(n)=X2n.

For X1:
F1(n) = [(1+√5)/2]n
F1(n+1) = [(1+√5)/2]n+1
F1(n) + F1(n+1) =
=
[(1+√5)/2]n+[(1+√5)/2]n+1=
=
[(1+√5)/2]n·[1+(1+√5)/2] =
=
[(1+√5)/2]n·[(3+√5)/2] =
=
[(1+√5)/2]n·[(6+2√5)/4] =
=
[(1+√5)/2]n·[(1+2√5+5)/4] =
=
[(1+√5)/2]n·[(1+√5)/2]2 =
=
[(1+√5)/2]n+2 = F1(n+2)
Similarly, the condition
F(n) + F(n+1) = F(n+2)
is satisfied for X2, we omit analogous calculations.

While the main condition of Fibonacci sequence, connecting any element with a sum of two preceding ones, is satisfied for both variants above, initial conditions for Fibonacci sequence
F(0)=1, F(1)=1
are not yet satisfied.

Notice that if
X1n + X1n+1 = X1n+2 and
X2n + X2n+1 = X2n+2 then
p·X1n+q·X2n +
+ p·X
1n+1+q·X2n+1 =
= p·X
1n+2+q·X2n+2

for any p and q.
So, the obvious suggestion is to find such p and q that a function
F(n) = p·X1n+q·X2n
where X1=(1+√5)/2 and
X2=(1−√5)/2, would satisfy the initial condition as well as the formula connecting the next sequence value with a sum of two preceding ones.

Condition F(0)=0 gives
p·X10+q·X20 = 0
Any non-zero number raised to the power of 0 gives 1. So, this condition is equivalent to
p + q = 0
Condition F(1)=1 gives
p·X11+q·X21 = 1
Any non-zero number raised to the power of 1 is itself. So, this condition is
p·X11 + q·X21 = 1 or
p·(1+√5)/2 + q·(1−√5)/2 = 1

Now we have a system of two linear equations with two unknowns p and q.
From the first equation
q = −p
Substitute it to the second equation:
p·(1+√5)/2 − p·(1−√5)/2 = 1
from which follows
p = 1/√5 and
q = −1/√5

The final formula for Fibonacci sequence is, therefore,
F(n) = (1/√5[(1+√5)/2]n
− (1/√5
[(1−√5)/2]n

Saturday, June 29, 2024

Algebra+ 07 - Averages: UNIZOR.COM - Math+ & Problems - Algebra

Notes to a video lecture on http://www.unizor.com

Algebra+ 07

Note
We will use both terms average and mean interchangeably, but usually with proper qualification, like geometric mean or harmonic average.

Problem A

Given that a fence around a rectangular field should have the length L, what should the sides of this field be to maximize the field's area?
What is the maximum area of a field in this case?

Hint
Arithmetic mean (average) of two positive real numbers is not less than their geometric mean (average).
These averages are equal only if the participating numbers are equal.

Answer
All sides must be equal to L/4 to form a square field.
The area will then be L²/16.


Problem B

In lecture UNIZOR.COM - "Math 4 Teens" - "Math Concepts" - "Induction" - "Averages" we have proven that arithmetic mean of N positive real numbers is greater or equal to their geometric mean:
(X1+X2+...+XN)/N ≥
≥ (X1·X2·...·XN)1/N

Prove now that geometric mean of N positive numbers is greater or equal to their harmonic mean:
(X1·X2·...·XN)1/N
≥ N/(1/X1+1/X2+...+1/XN)


Hint B
Use the theorem about arithmetic and geometric means mentioned above for numbers 1/X1, 1/X2 etc.


Problem C

Prove that quadratic mean of N positive numbers is greater or equal to their arithmetic mean:
sqrt[(X12+X22+...+XN2)/N]
≥ (X1+X2+...+XN)/N

where sqrt is a square root function.

Hint C
The proof in general case is similar to the one with only a few numbers.
Let's analyze the situation with only 2 components.
Start from what's necessary to prove
sqrt[(a2+b2)/2] ≥ (a+b)/2
Since all numbers are positive, get rid of sqrt function by raising both sides of an inequality to the power of 2 and apply invariant transformations.
(a2+b2)/2 ≥ (a+b)2/4
2·(a2+b2) ≥ a2+2a·b+b2
a2+b2−2a·b ≥ 0
(a−b)2 ≥ 0
which is obvious, and all transformations are reversible.
Therefore, the proof is to derive the required inequality by reversed transformations from the obviously correct last inequality.

Let's illustrate the same approach for 4 numbers.
sqrt[(a2+b2+c2+d2)/4]
≥ (a+b+c+d)/4

Since all numbers are positive, get rid of sqrt function by raising both sides of an inequality to the power of 2.
(a2+b2+c2+d2)/4 ≥
≥ (a+b+c+d)2/16


Use the invariant transformations:
4·(a2+b2+c2+d2) ≥
≥ a2+b2+c2+d2+
+2ab+2ac+2ad+
+2bc+2bd+2cd


3·(a2+b2+c2+d2) ≥
≥ 2ab+2ac+2ad+
+2bc+2bd+2cd


(a−b)2+(a−c)2+(a−d)2+
+(b−c)2+(b−d)2+(c−d)2 ≥ 0

which is obvious, and all transformations are reversible.
Therefore, the proof is to derive the required inequality by reversed transformations from the obviously correct last inequality.

Proof C
Given N positive real numbers Xi (i∈[1,N]).
Notice that
1≤ i ≤NXi]2 =
=
Σ1≤ i ≤NXi2 +
+
Σ1≤ i < j ≤N2XiXj

Let's start from the obvious
Σ1≤ i < j ≤N(Xi−Xj)2 ≥ 0
From this follows:
(N−1)·Σ1≤ i ≤NXi2
Σ1≤ i < j ≤N2XiXj ≥ 0
Move products of different numbers to the right side of the inequality and add the sum of the squares of all numbers to both sides.
Σ1≤ i ≤NXi2
Σ1≤ i ≤NXi2 +
+
Σ1≤ i < j ≤N2XiXj
Transform the right side into a square of the sum of all numbers.
Σ1≤ i ≤NXi2
1≤ i ≤NXi]2


Summary

Harmonic mean (HM)
N / i∈[1,N]1/Xi]
is less or equal to
geometric mean (GM)
i∈[1,N]Xi]1/N
which is less or equal to
arithmetic mean (AM)
i∈[1,N]Xi] / N
which is less or equal to
quadratic mean (QM)
sqrt{[Σi∈[1,N]Xi2] / N}

HM ≤ GM ≤ AM ≤ QM

Thursday, June 27, 2024

Geometry+ 10: UNIZOR.COM - Math+ & Problems - Geometry

Notes to a video lecture on http://www.unizor.com

Geometry+ 10

Problem A

Given two parallel lines and a segment AB on one of them. Using only a straight line ruler, increase the length of segment AB by a factor of N.
In other words, find a point B' on the same line as AB such that the length of AB' is N times greater than the length of AB.

Solution A
Let's repeat the doubling of a segment, explained in the previous lecture Geometry 09 as Problem C.
Assume, AB is on the lower parallel line as on the picture below.

Choose any segment CD along the upper parallel line and divide it in halves by point P, as described in the Problem B of lecture Geometry 09.
Connect A and C, connect B and P. Lines AC and BP intersect at some pointM (if they don't and happened to be parallel, choose a longer CD.)
Now connect M and D and extend it to intersect with the lower parallel line at point B'.
The segments AB and BB' have equal length because segments CP and BP have equal length and two pairs of triangles are similar:
ΔAMB is similar to ΔCMP,
ΔBMB' is similar to ΔPMD.
Now we are ready to increase the length of AB by any factor.
To do this, just repeat the doubling of the size for segment BB' getting point B", so segment AB" has a triple length of AB.
Repeating this procedure any number of times we will get the new segment's length any number of times larger than the length of AB.


Problem B

Given two parallel lines and a segment AB on one of them. Using only a straight line ruler, divide segment AB into N sub-segments of equal length.
In other words, find points B1, B2, ...,BN−1 on segment AB such that the length of any segment BiBi+1 is 1/Nth of the length of AB for any i∈[0,N−1], assuming A= B0 and B=BN.

Solution B
Assume, AB is on the lower parallel line.
Choose any segment CD along the upper parallel line and increase its length by a factor of N as described in the Problem A. Associate symbol D0 with point C, D1 with D and new points that double the length of a previous segment will be D2, D3, ...,DN.

Connect A=B0 with C=D0 and B with DN, extending these two lines to an intersection point M (if they are parallel and do not intersect, choose different point D.) Connecting point M with each Di and extending to intersect with AB, gives all the points Bi.

Tuesday, June 25, 2024

Geometry+ 09 : UNIZOR.COM - Math+ & Problems - Geometry

Notes to a video lecture on http://www.unizor.com

Geometry+ 09

Theorem A

Given two parallel lines, point M not on any of them and not in-between them, and two lines from this point M intersecting the given parallel lines at points A, B (on a far line), C and D (on a near line).
So, ACDB is a trapezoid.
Opposite intersection points are connected by segments AD and BC intersecting themselves at point Q.
Line connecting points M and Q intersects CD at point P and is extended to intersect AB and point N.

Prove that point P is a midpoint of CD and point N is a midpoint of AB.

Proof A
Let's use the symbols:
CP=x, PD=y, AN=a, MB=b.
Consider triangles
ΔAMN and ΔCMP.
They are similar because all angles are correspondingly equal.
Therefore,
x/a = MP/MN
Consider triangles
ΔBMN and ΔDMP.
They are similar because all angles are correspondingly equal.
Therefore,
y/b = MP/MN = x/a
Consider triangles
ΔCPQ and ΔBNQ.
They are similar because all angles are correspondingly equal.
Therefore,
x/b = PQ/QN
Consider triangles
ΔDPQ and ΔANQ.
They are similar because all angles are correspondingly equal.
Therefore,
y/a = PQ/QN = x/b
Now we have
y/b = x/a and
y/a = x/b
Simple algebraic transformations lead us to the following:
y·a = x·b and
y·b = x·a
All variables are positive real numbers, so we can divide the first equation by the second, canceling x and y, getting
a/b = b/a
a² = b²
a = b
From this follows
x = y
End of Proof.


Problem B

Given two parallel lines and a segment AB on one of them.
Using only a straight line ruler, divide segment AB in two equal parts.

Solution B
The solution is based on the results of Problem A above.
All we need to do is to pick up any point M, like the one on a picture above, connect it to points A and B with points C and D being the intersections of MA and MB with another parallel line.
The figure ABCD is a trapezoid, its diagonals AD and BC intersect at point Q. Line MQ with an extension to pointN bisects segments AB and CD at point N.


Problem C

Given two parallel lines and a segment AB on one of them.
Using only a straight line ruler, double the length of this segment.
In other words, find point B' on the same line where AB is located such that the length of AB equals to the length of BB'.

Solution C
First of all, pick any segment CD on another parallel line (not the one where AB is on) and divide it in half by point P, as explained in the Problem B.
Draw one line through points A and C and another through points B and P.
Assuming these line are not parallel, let M be their point of intersection (if AC||BP, choose different point D and start again.)
Line MD will cross line where segment AB is located at point B'. Segments AB and BB' will have equal lengths because CP and PD are of equal length (the proof is trivial, it follows from similarity of triangles.)

Monday, June 24, 2024

Arithmetic+ 09 : UNIZOR.COM - Math+ & Problems - Arithmetic

Notes to a video lecture on http://www.unizor.com

Arithmetic+ 09

Try to solve this problem without any writing, just in your head.

Problem A

A large water tank is filled to the brim.
It's capacity is unknown.
There are two pipes used to empty this tank.
If only the first pipe is open, the tank will be empty in 14 minutes.
If both pipes are open, the tank will be empty in 10 minutes.
Assume that the speed of the water flow is always constant and depends only on the pipe's diameter.
How long would it take to empty this tank, if only the second pipe is used?

Solution A
An easy way to solve this problem without pen and paper is to see how much water different pipes can let through in the same amount of time.
Let's choose a number divisible by both 14 and 10, like 70.
If a tank can be emptied through pipe #1 in 14 minutes, in 70 minutes this pipe can empty 5 tanks.
Two pipes can let through the water of one tank in 10 minutes. Therefore, in 70 minutes two pipes can empty 7 tanks of water.
So, the pipe #1 in 70 minutes can empty 5 tanks. Both pipes in the same amount of time (70 minutes) can empty 7 tanks of water. Therefore, pipe #2 alone in 70 minutes can empty 7−5=2 tanks of water.
Therefore, one tank the pipe #2 can empty in 70/2=35 minutes.

Answer A
The second pipe can empty the tank in 35 minutes.


Problem B

Mike and David felt like having an ice cream for lunch.
However, it appeared that Mike is short on money. He needed $3 more to buy a single scoop of ice cream.
David looked at his money and it appeared that he is also short by $1 to buy a single scoop of ice cream.
Then they thought to combine their amounts and buy only one scoop to share. Unfortunately, the total was insufficient for a single scoop even then.
How much (in whole dollars) does a scoop of ice cream cost?

Solution B
If Mike had, at least, $1 in his pocket, combined with David's money (who was short by $1), they would be able to buy a scoop of ice cream.
Since they were short even combining their money, Mike's capital was zero dollars.
Therefore, since he was short by $3, the price of a scoop of ice cream was $3.

Answer B
A scoop of ice cream costs $3.


Problem C

There are circles and squares drawn on a sheet of paper.
Some of them are red, the other are blue.
The number of red circles is equal to the number of blue squares.
What is greater, the number of red shapes or the number of squares?

Solution C
The number of red shapes equals to the number of red squares plus the number of red circles.
The number of squares equals to the number of red squares plus the number of blue squares.
The first term of each statement above ("red squares") is the same.
The second term in the first statement ("red circles") equals to the second term in the second statement ("blue squares"). Therefore, the number of red shapes equals to the number of squares.

Answer C
The number of red shapes is equal to the number of squares.

Sunday, June 23, 2024

Arithmetic+ 08: UNIZOR.COM - Math+ & Problems - Arithmetic

Notes to a video lecture on http://www.unizor.com

Arithmetic+ 08

Try to solve this problem without any writing, just in your head.

Problem A

There are certain number of students in the class and certain number of desks.
If 2 students sit at a desk, 5 desks will remain unoccupied.
If 1 student sits at a desk, 5 students will have no place to sit at.
How many students should sit by 2 at the desk and how many should sit by 1 at the desk, so all students will have seats and all desks occupied?

Solution A
If a single seating arrangement results in 5 students without a desk, we can put these students as doubles, which results in a combination of 5 doubles plus unknown singles needed to occupy all desks.
If double seating results in 5 desks unoccupied, let's convert 5 doubles into singles to have 5 students to occupy previously unoccupied 5 desks. Then the number of singles will be 10 (5 doubles converted into singles and 5 previously unoccupied desks having only one student each).
So, to occupy all desks with double or single we should use 5 doubles and 10 singles.
Incidentally, it makes the number of desks 15 and the number of students 20.

Answer A
5 desks should accommodate two students each and 10 desks should sit single student each.


Problem B

A large water tank is filled to the brim.
It's capacity is unknown.
There are two pipes used to empty this tank.
If only the first pipe is open, the tank will be empty in 14 minutes.
If both pipes are open, the tank will be empty in 10 minutes.
Assume that the speed of the water flow is always constant and depends only on the pipe's diameter.
How long would it take to empty this tank, if only the second pipe is used?

Solution B
An easy way to solve this problem without pen and paper is to see how much water different pipes can let through in the same amount of time.
Let's choose a number divisible by both 14 and 10, like 70.
If a tank can be emptied through pipe #1 in 14 minutes, in 70 minutes this pipe can empty 5 tanks.
Two pipes can let through the water of one tank in 10 minutes. Therefore, in 70 minutes two pipes can empty 7 tanks of water.
So, the pipe #1 in 70 minutes can empty 5 tanks. Both pipes in the same amount of time (70 minutes) can empty 7 tanks of water. Therefore, pipe #2 alone in 70 minutes can empty 7−5=2 tanks of water.
Therefore, one tank the pipe #2 can empty in 70/2=35 minutes.


Logic+ 11: UNIZOR.COM - Math+ & Problems - Logic

Notes to a video lecture on http://www.unizor.com

Logic+ 11

Problem A

During an epidemic people tried to sit as far from each other as possible.
Consider a row of 11 seats.
Maximum number of people to accommodate in these seats, so that none sits next to another and there is only one empty seat between people is 6:
I-I-I-I-I-I,
where 'I' signifies a seat taken by a person and '-' is an empty seat.
Considering every new person takes a seat as far as possible from those who already sit, where would you put the first person to be able to sit the maximum number of people?

Hint
If you put the first person at the left or the right edge of a row, or right in the middle, you will not be able to accommodate 6 people.
Here is an example:
I----------,
I---------I,
I----I----I,
and the next person would inevitably leave 2 empty seats in a row, which would prohibit the 6th person to sit without another person sitting next to him.

Solution A
To reach the maximum occupancy of 6 people without anyone sitting next to another, that is to reach configuration
I-I-I-I-I-I,
the configuration after 3 people have taken their seat should be
I---I---I-- or --I---I---I,
because that would force the next 3 people to take seats in-between the already taken with one empty seat between them.
Then the previous configuration after 2 people have taken their seat should be
I-------I-- or --I-------I,
because the 3rd person, taking the seat as far from those taken, would bring the configuration to the one above.
Therefore, the first person should take either the seat #9 or #3 to get the configuration
--------I-- or --I--------,
which would lead to all the above configurations step-by-step.

Answer
To reach the maximum number of people to sit on 11 seats without them being next to another, start from pointing to seats #3 or #9.
Then the sequence of fillings of the seats would be
--------I-- or --I--------,
I-------I-- or --I-------I,
I---I---I-- or --I---I---I,
which leaves 3 empty seats for the next 3 people exactly in-between already taken ones, leaving an empty seat between people.

Saturday, June 22, 2024

Logic+ 10: UNIZOR.COM - Math+ & Problems - Logic

Notes to a video lecture on http://www.unizor.com

Logic+ 10

Problem A

Two mathematicians, Mike and David, have met their classmate Helen and asked about her birthday.
She decided to test their logical skills and answered as follows.
"My birthday is one of these days:
15th of May,
16th of May,
19th of May,
17th of June,
18th of June,
14th of July,
16th of July,
14th of August,
15th of August,
17th of August."
Then she told Mike her month and told David her day of birthday, and asked them to guess the full birthday.
After thorough thinking, Mike said: "I cannot determine the birthday, but I know for sure that David can't do it either."
David replied: "I was not able to determine Helen's birthday before you said it, but now I can."
Then, in his turn, Mike said: "Now I also know Helen's birthday."
What is the Helen's birthday?"

Solution A
Let's start with something simple.
Mike has a month of the birthday, while David has a day of the month.
Since days 18 and 19 occur only once among all the possible dates, David, if given one of these dates, would immediately realize that Helen's birthday is either 18th of June or 19th of May.
Not only he was not able to determine the birthday before Mike's first statement, Mike said that David for sure cannot determine it. How would Mike know that David has no chance to determine the birthday? Because the month given to Mike is not May nor June. Otherwise, there would be a chance that David got 18th or 19th, in which case he would be able to determine the birthday.
So, the birthday is not in May nor in June. Only if Mike has July or August he can say what he did.
From the first Mike's statement David can conclude that the month must be either July or August.
Mike, in his turn, understood that the day David was given is one of these: 14, 15, 16, 17.
The remaining possibilities are
14th of July,
16th of July,
14th of August,
15th of August,
17th of August.
David realizes that Mike went through this logic when saying that he cannot determine the birthday nor David can.
At this point David said that he knows the birthday. Hence, the day given to David cannot be the 14th, because that would leave two possibilities for the birthday - 14th of July and 14th of August. Since David said that he knows the birthday, the day given to him is 15th, 16th or 17th, as each of them is unique.
Mike also realizes that it cannot be the 14th, since David said that he knows the birthday.
Hearing that, Mike understands that it must be one of the remaining unique dates: 16th of July, 15th of August or 17th of August.
Now Mike said that he knows the birthday, which is possible only if he was given the unique month of July and, therefore, the day must be the 16th.

Answer
Based on statements Mike and David made, Helen's birthday is
the 16th of July.

Thursday, June 20, 2024

Arithmetic+ 07: UNIZOR.COM - Math+ & Problems - Arithmetic

Notes to a video lecture on http://www.unizor.com

Arithmetic+ 07

Problem A

Two friends mathematicians, Mike and David, met after a long time and Mike tells that he has three sons.
"How old are they?" - asked David.
"Sum of their ages is 13." - answered Mike.
The David replied: "I see, you are challenging me. What else can you tell, so I can determine their ages?"
"The product of their ages is the number of windows in that building across the street." - said Mike.
David counted the windows in the building and said: "But this is still insufficient to determine the ages of your sons."
Mike added then: "Take into consideration that my oldest son is a redhead."
David responded: "Then I can say that their ages are..."
"That is correct." - said Mike.
What are the ages of Mike's sons?

Solution A
There are many combinations of three natural numbers with a sum of them equal to 13.
We can write down all of them.
For each such combination we can calculate the product of its numbers.
1 × 1 × 11 = 11,
1 × 2 × 10 = 20,
1 × 3 × 9 = 27,
1 × 4 × 8 = 32,
1 × 5 × 7 = 35,
1 × 6 × 6 = 36,
2 × 2 × 9 = 36,
2 × 3 × 8 = 48,
2 × 4 × 7 = 56,
2 × 5 × 6 = 60,
3 × 3 × 7 = 63,
3 × 4 × 6 = 72,
3 × 5 × 5 = 75,
4 × 4 × 5 = 80
If all products are different, that would be sufficient for David to determine which combination represents the ages of Mike's sons, because he would compare the products with the number of windows he counted.
However, since David said that the information about the product is insufficient, it means that there are some combinations that give the same product.
Only 36 is repeated for two combinations, so the answer must be among them.
Information that the oldest son is a redhead resolves the dilemma in favor of (2,2,9), because (1,6,6) combination has two oldest sons.

Answer A
The ages of three Mike's sons are 2, 2 and 9.


Tuesday, June 18, 2024

Logic+ 09 - Formal Logic: UNIZOR.COM - Math+ & Problems - Logic

Notes to a video lecture on http://www.unizor.com

Logic+ 09 - Formal Logic

We will use the following symbols for logical operations:
disjunction (logical OR),
conjunction (logical AND),
~ negation (logical NOT),
implication (if...then).

Logical manipulation with true or false statements (conjunction, disjunction, negation) can be modeled using the analogy with integer numbers, where true statement acts like a positive integer number (usually, number 1), false statement acts like zero, conjunction acts like multiplication, disjunction acts like addition, negation of positive number is zero and negation of zero is some positive number (usually, number 1).

Here is an illustration of the analogy between logical operations and operations on integer numbers (letter T stands for a true statement, letter F stands for a false statement):
T ∧ T = T; 1 · 1 = 1
T ∧ F = F; 1 · 0 = 0
F ∧ F = F; 0 · 0 = 0
T ∨ T = T; 1 + 1 = 2
T ∨ F = T; 1 + 0 = 1
F ∨ F = F; 0 + 0 = 0
~T = F; ~1 = 0
~F = T; ~0 = 1

Another important analogy is between logical operations and operations on sets.
In particular,
Conjunction is analogous to intersection of two sets.
Disjunction is analogous to union of two sets.
Negation is analogous to complement of a set.
We can also use this analogy with sets to model the logical operation of implication.
When statement A implies statement B (A → B), it can be represented as A being a subset of B, which means that, if an element belongs to A, it also belongs to B.
Both analogies described above are very useful in analyzing the truth value of a complicated logical statement.


Problem A

Consider the following statements:
S1 - It's raining
S2 - I like to walk in a park
S3 - I sing
S4 - I forgot my umbrella
S5 - I like dogs
S6 - I like cats
S7 - I read books
S8 - I bake a pie
Express symbolically the following statement:
Q1 - When it's raining, I don't like to walk in the park.
Q2 - When it's not raining, I like to walk in the park.
Q3 - When it's not raining, I like to walk in the park and sing.
Q4 - I like to walk in the park and sing.
Q5 - It's raining and I did not forget my umbrella.
Q6 - I like both dogs and cats.
Q7 - I like dogs, but not cats.
Q8 - I don't like neither dogs nor cats.
Q9 - When it's raining, I either read a book or bake a pie.
Q10 - It's raining, so I read a book and bake a pie.

Answer A
Q1 = S1 → (~S2)
Q2 = (~S1) → S2
Q3 = (~S1) → (S2 S3)
Q4 = S2 S3
Q5 = S1 (~S4)
Q6 = S5 S6
Q7 = S5 (~S6)
Q8 = (~S5) (~S6)
Q9 = S1 → (S7 S8)
Q10 = S1 S7 S8


Problem B

Given the following statements:
S1(true) - Prague is the capital of Chech Republic
S2(true) - There are 100 cents in a dollar
S3(false) - China is a European country
S4(false) - All adult population of the Earth is literate
Evaluate (true or false) the following statements:
Q1 = S1 S2
Q2 = S1 (~S2)
Q3 = S1 S2
Q4 = S1 (~S2)
Q5 = S1 (~S1)
Q6 = S1 (~S1)
Q7 = S1 S3
Q8 = S1 (~S3)
Q9 = S1 S3
Q10 = S1 (~S3)
Q11 = S3 (~S3)
Q12 = S3 (~S3)
Q13 = S4 S3
Q14 = S4 (~S3)
Q15 = S4 S3
Q16 = S4 (~S3)

Answer B
Q1 is True
Q2 is False
Q3 is True
Q4 is True
Q5 is True
Q6 is False
Q7 is False
Q8 is True
Q9 is True
Q10 is True
Q11 is True
Q12 is False
Q13 is False
Q14 is False
Q15 is False
Q16 is True


Problem C

Consider a basic implication
"If A then B" A→B, where
A (antecedent): two numbers are integers
B (consequent): their sum is an integer
Converse: B→A
Inverse: ~A→~B
Contrapositive: ~B→~A
Q1: Basic A→B: If A is a true statement, is B a true statement?
Q2: Converse B→A: If B is a true statement, is A a true statement?
Q3: Inverse ~A→~B: If A is a false statement, is B a false statement?
Q4: Contrapositive ~B→~A: If B is a false statement, is A a false statement?

Answer C
Q1: Yes, B is True. True → True. From a true antecedent statement only true consequent statement can follow.
Q2: Cannot tell, truth or false consequent statement has no influence on antecedent one.
Q3: Cannot tell, from a false antecedent statement anything can follow, true or false.
Q4: Yes, A is False, because it cannot be true, it would contradict Q1. If A→B is True, ~B→~A is also True.

Thursday, June 13, 2024

Logic+ 08: UNIZOR.COM - Math+ &Problems - Logic

Notes to a video lecture on http://www.unizor.com

Logic+ 08

Problem A

Trains between points A and B are running regularly with the same speed and the same interval between trains in each direction.
As you go in a train from A to B, you see trains going in an opposite direction every 10 minutes.
How many trains come to point A in an hour?

Answer A:
Three trains come to point A during every hour.


Problem B

Some crime was committed, and there are only three suspects, only one of which has committed this crime.
Suspect A said that suspect B committed this crime.
Suspect B denied this accusation.
Suspect C said that he is innocent as well.
Who committed this crime, if it becomes known that only one of the suspects told the truth, while two others lied?

Solution B
If A said the truth, and B indeed committed this crime, C said the truth as well, which contradicts the condition of only one of the suspects telling the truth.
So, A has definitely lied, so the crime was committed by either himself or by C.
If the crime was committed by A, then B and C both said the truth, so we again have a contradiction with a condition that there is only one truthful person.
Therefore, the only conclusion we can come up with is that this crime was committed by C.

Checking B
If C committed the crime, both A and C lied, while B said the truth, which satisfies the condition of a problem.


Problem C

Solve the equation
a+2b+3c+4d = 22
for a, b, c and d, if it's given that these unknown numbers are all positive integers, are different and do not exceed 4.

Hint C
There are four unknowns and four possible values:
1, 2, 3 and 4.
So, the question only is, which of them is a, which is b, which is c and which is d.
From Combinatorics we know that there are 4!=24 ways to assign 4 values to 4 unknowns, so we can try all of them until we get the proper equation. But this is not a nice approach. Try to reduce the number of calculations by applying some logic.
The easy way to reduce the number of calculations is to start assigning the highest possible value (4) to variable d, which participates in the equation with a multiplier 4. This immediately renders the impossibility to assign the other variables values because the left side of an equation will obviously exceed 22.

Answer C
a=3, b=4, c=1, d=2


Problem D

There are red and blue balls in a box.
Only one ball is not red.
All balls except one are blue.
How many balls are in a box and what are they?

Answer
There are two balls in a box - one red and one blue.


Problem E

Given three objects: a table, a bottle and a book.
When a bottle is on a table and a book is on the floor, the distance from the top of a bottle to a top of a book is 100 cm.
When a book is on a table and a bottle is on the floor, the distance from the top of a bottle to a top of a book is 50 cm.
What is the height of a table?

Answer
The height of a table is 75 cm.

Wednesday, June 12, 2024

Logic+ 07 Einstein's Riddle: - UNIZOR.COM - Math+ &Problems - Logic

Notes to a video lecture on http://www.unizor.com

Logic+ 07

Problem A

This logical problem is known as "Einstein's Riddle" and is considered to be quite a difficult logical problem.
We suggest an approach that seems to be lengthy but effective that gradually leads to a solution.
Here is a problem.

There are five houses on a straight line street, each painted in a different color.
In each house lives a person of a different nationality.
These five owners drink certain beverages (all different), smoke certain cigars (all different) and keep certain pets (all different).

Some information is known about this arrangement. This information is below with abbreviations in parenthesis suggested in the beginning of a solution that follows.

A01. (N1|C1) The Brit lives in the red house.
A02. (N2|P1) The Swede keeps dogs as pets.
A03. (N3|D1) The Dane drinks tea.
A04. (C2-C3) The green house is on the left of the white house.
A05. (C2|D2) The green house’s owner drinks coffee.
A06. (S1|P2) The person who smokes Pall Mall rears birds.
A07. (C4|S2) The owner of the yellow house smokes Dunhill.
A08. (H3|D3) The man living in the center house drinks milk.
A09. (N5|H1) The Norwegian lives in the first house.
A10. (S3/P3) The man who smokes blends lives next to the one who keeps cats.
A11. (P4\S2) The man who keeps horses lives next to the man who smokes Dunhill.
A12. (S4|D4) The owner who smokes Blue Master drinks beer.
A13. (N4|S5) The German smokes Prince.
A14. (N5\C5) The Norwegian lives next to the blue house.
A15. (S3\D5) The man who smokes blend has a neighbor who drinks water.

The question is, who owns the fish?

Solution A

First of all, we will represent all the information in a shorter notation for brevity.
Let's number the houses in order they are located on a street (left to right):
H1, H2, H3, H4 and H5

As it is specified, we have people of 5 different nationalities:
N1 = Brit,
N2 = Swede,
N3 = Dane,
N4 = German,
N5 = Norwegian.

There are 5 different colors of the houses:
C1 = Red,
C2 = Green,
C3 = White,
C4 = Yellow,
C5 = Blue.

There are 5 different drinks:
D1 = Tea,
D2 = Coffee,
D3 = Milk,
D4 = Beer,
D5 = Water.

There are 5 different smokes:
S1 = Pall Mall,
S2 = Dunhill,
S3 = Blends,
S4 = Blue Master,
S5 = Prince.

There are 5 different pet animals:
P1 = Dogs,
P2 = Birds,
P3 = Cats,
P4 = Horses,
P5 = Fish.

The following table will represent all the information we know from a problem:
House#:H1H2H3H4H5
Nation:
Color:
Drink:
Smoke:
Pet:

The following statements can be immediately used to partially fill our table:
A08: The man living in the center house drinks milk.
A09. The Norwegian lives in the first house.
A14. The Norwegian lives next to the blue house.
House#:H1H2H3H4H5
Nation:N5
Color:C5
Drink:D3
Smoke:
Pet:

Let's concentrate on the color of the house H1.
It cannot be red (C1) because of conditions A01 and A09.
It cannot be green (C2) or white (C3) because then its neighbor is blue (C5) that contradicts condition A04.
Therefore, its color is the only one remaining - yellow (C4).
From this we can use condition A07 (The owner of the yellow house smokes Dunhill) concluding that in this house H1 the person smokes Dunhill (S2).
Furthermore, using A11 (The man who keeps horses lives next to the man who smokes Dunhill), we conclude that in house H2 the owner keeps horses (P4).
House#:H1H2H3H4H5
Nation:N5
Color:C4C5
Drink:D3
Smoke:S2
Pet:P4

Let's analyse the drink that Norwegian (N5) is drinking in yellow (C4) house H1, smoking Dunhill (S2).
It cannot be milk (D3) because it is drunk in house H3, as we have already determined.
It cannot be tea (D1) because of condition A03 (The Dane drinks tea).
It cannot be coffee (D2) because of condition A05 (The green house’s owner drinks coffee).
It cannot be beer (D4) because of condition A12 (The owner who smokes Blue Master drinks beer).
The only choice of a drink for house H1 is water (D5). Furthermore, this consideration helps to determine the smoke in the house H2 because of condition A15 (The man who smokes blend has a neighbor who drinks water). The smoke in house H2 must be blend (S3).
House#:H1H2H3H4H5
Nation:N5
Color:C4C5
Drink:D5D3
Smoke:S2S3
Pet:P4

Now we can determine the nationality of a person in house H2.
It's not Norwegian (N5), who we know lives in house H1.
It's not Brit (N1), who lives in a red (C1) house, as specified in condition A01 (The Brit lives in the red house), while house H2, as we determined, is blue (C5).
It's not Swede (N2) because of condition A02 (The Swede keeps dogs as pets), while we know the pets in house H2 are horses (P4).
It's not German (N4) because of condition A13 (The German smokes Prince), while we know that in house H2 the owner smokes blends (S3).
Therefore, the owner of house H2 must be Dane (N3).
Immediately follows from this is that the drink in house H2 is tea (D1) because of condition A03 (The Dane drinks tea).
House#:H1H2H3H4H5
Nation:N5N3
Color:C4C5
Drink:D5D1D3
Smoke:S2S3
Pet:P4

From conditions A04 (The green house is on the left of the white house) follows that a pair of houses green () and white () are either at places H3 and H4 or H4 and H5.
But condition A05 (The green house’s owner drinks coffee) makes the combination H3 and H4 impossible, since we have determined that in house H3 the drink is milk (D3), not coffee (D2). Therefore, the house H4 is green (C2) and H5 is white (C3), which leaves house H3 to be red (C1) and its owner to be Brit (N1) because of the condition A01 (The Brit lives in the red house).
Also, condition A05 (The green house’s owner drinks coffee) tells us that in house H4 the drink is coffee (D2).
That leaves a drink of house H5 to be beer (D4).
From condition A12 (The owner who smokes Blue Master drinks beer) immediately follows that the owner of house H5, where a drink is beer (D4), smokes Blue Master (S4).
House#:H1H2H3H4H5
Nation:N5N3N1
Color:C4C5C1C2C3
Drink:D5D1D3D2D4
Smoke:S2S3S4
Pet:P4

From condition A13 (The German smokes Prince) follows that house H5 cannot belong to German (N4) because the smoke in house H5 is Blue Master (S4), as has been established.
Therefore, the owner of house H5 is Swede (N2) and German (N4) owns house H4.
From condition A02 (The Swede keeps dogs as pets) now follows that pets of house H5 are dogs (P1) and smoke of house H4 is Prince (S5).
That leave smoke Pall Mall (S1) for house H3.
Follows from it and condition A06 (The person who smokes Pall Mall rears birds) that birds (P2) are kept at house H3
House#:H1H2H3H4H5
Nation:N5N3N1N4N2
Color:C4C5C1C2C3
Drink:D5D1D3D2D4
Smoke:S2S3S1S5S4
Pet:P4P2P1

From condition A10 (The man who smokes blends lives next to the one who keeps cats) and the established fact that blend (S3) is smoked in house H2 follows that cats (P3) can be in a neighboring to H2 house, either H1 or H3.
But we have already established that birds (P2) are kept at house H3. Therefore, cats (P3) are kept at house H1.
That leaves house H4 for fish (P5).
House#:H1H2H3H4H5
Nation:N5N3N1N4N2
Color:C4C5C1C2C3
Drink:D5D1D3D2D4
Smoke:S2S3S1S5S4
Pet:P3P4P2P5P1

Answer
Fish is kept in house H4 owned by German, painted in green, who drinks coffee and smokes Prince.

Sunday, June 9, 2024

Trigonometry+ 10: UNIZOR.COM - Math+ & Problems - Trigonometry

Notes to a video lecture on http://www.unizor.com

Trigonometry+ 10


Problem A


Prove that ∠BAC = ½∠AOC.
Using this, derive the trigonometric identity for any acute angle α:
sin(α)·tan(½α) = 1−cos(α)


Problem B

Solve the equation
arcsin(x) = arccos(x)

Solution B
Let's recall the domain, co-domain and draw a graph of both functions.
Domain for both arcsin(x) and arccos(x) is x∈[−1,1].
Co-domain for arcsin(x) is x∈[−π/2,π/2].
Co-domain for arccos(x) is x∈[0,π].
Below are graphs of functions arcsin(x) (red) and arccos(x) (blue). This graph will be used in the next problem as well, that's why we marked points x=1/4 and x=11/16.

An obvious guess of the solution to the above equation, where both graphs intersect, would be x=√2/2 since, as we all know,
sin(π/4)=cos(π/4)=√2/2
and, therefore,
arcsin(√2/2)=π/4 and
arccos(√2/2)=π/4.
An easy proof to this is as follows.
Take a sine function of both parts of an original equation
sin(arcsin(x)) = sin(arccos(x))
x = sin(arccos(x))
The value of x must be positive, as we see from the graph above.
Therefore,
x = √1−cos²(arccos(x))
x = √1−x²
x² = 1 − x²
x² = 1/2
(retaining only positive solution)
x = √2/2


Problem C

Calculate
3·arcsin(1/4) + arccos(11/16)

Solution C

Let's set for brevity
α = arcsin(1/4)
sin(α) = 1/4
β = arccos(11/16)
cos(β) = 11/16

Considering the positive values of arcsin()'s and arccos()'s arguments, the angles α and β they represent must be in the first quarter between 0 and π/2.

From sin²(α)+cos²(α)=1 and
sin(α)=1/4 follows:
cos(α)=√15/4

Since cosβ=11/16, then
sin(β)=3√15/16

Also, it looks like we will need formulas for a sine and a cosine of a triple angle.
Let's derive them.
sin(3x) = sin(x+2x) =
= sin(x)·cos(2x) +
+ cos(x)·sin(2x) =
= sin(x)·
[1−2sin²(x)] +
+ cos(x)·2sin(x)·cos(x) =
=sin(x) − 2sin³(x) +
+ 2sin(x)·
[1−sin²(x)] =
= 3sin(x) − 4sin³(x)


Using these formulas, we can evaluate a sine of the sum of two angles in this problem.
sin[3·arcsin(1/4) +
+ arccos(11/16)
] =
= sin(3α + β) =
= sin(3α)·cos(β)+cos(3α)·sin(β)


Evaluating the components of the above expression separately:

sin(3α) = 3sin(α) − 4sin³(α) =
= 3/4 − 4/64 = 11/16


cos(β) = 11/16

cos(3α) = √1−121/256 =
= 3√15/16


sin(β) = 3√15/16

Combining all these values, we obtain
sin(3α + β) =
= 121/256 + 135/256 = 1


Since a sine of an angle, that is a sum of two acute angles, is equal to 1, the angle itself is equal to π/2.

Wednesday, June 5, 2024

Trigonometry+ 09: UNIZOR.COM - Math+ & Problems - Trigonometry

Notes to a video lecture on http://www.unizor.com

Trigonometry+ 09


Problem A

Prove:
limx→0[sin(x)/x] = 1


Proof A
In the lecture Trigonometry 07 (Problem C) of this Math+ & Problems course we have proven geometrically that for an acute angle θ, measured in radians, the following inequalities are true:
sin(θ) ≤ θ ≤ tan(θ)
The left inequality can be transformed into
sin(x)/x ≤ 1
Using the definition of function tan(x)=sin(x)/cos(x), the right inequality can be transformed into
cos(x) ≤ sin(x)/x
Combining together, these inequalities give
cos(x) ≤ sin/x ≤ 1
As x→0, lower and upper boundaries of sin(x)/x tend to 1.
Therefore, limx→0[sin(x)/x] = 1


A different proof can be obtained based on using the L'Hopital's Rule (see UNIZOR.COM: Math 4 Teens - Calculus - Derivatives - Main Theorems - L'Hopital's Rule) as follows:
limx→0[sin(x)/x] =
= limx→0[sin'(x)/x'] =
= limx→0[cos(x)/1] = 1


The following theorems assume that the overall dimensions of regular polygons are not growing to infinity but restricted to some values, while the number of sides of polygons increases to infinity.


Problem B

Prove that the perimeter of a regular polygon tends to a circumference of an inscribed into it circle, if the number of its sides tends to infinity.
More precisely, prove that the difference between a perimeter of a regular N-sided polygon and a circumference of a circle inscribed into it is an infinitesimal variable as N→∞.

Proof B
Let
p - perimeter of a regular polygon,
N - number of its sides,
r - radius of an inscribed circle.
Then,
p = 2N·r·tan(½·2π/N) =
= 2N·r·sin(π/N)/cos(π/N) =

(substitute x=π/N,
so if N→∞, x→0)
= 2π·r·[sin(x)/x]/cos(x)
As x→0, cos(x)→1.
As proven in Problem A above, limx→0[sin(x)/x] = 1
Therefore, the limit of a perimeter p equals to 2π·r, which is a circumference of an inscribed circle.


Problem C

Prove that the perimeter of a regular polygon tends to a circumference of a circumscribed around it circle, if the number of its sides tends to infinity.
More precisely, prove that the difference between a perimeter of a regular N-sided polygon and a circumference of a circle circumscribed around it is an infinitesimal variable as N→∞.

Proof C
Let
p - perimeter of a regular polygon,
N - number of its sides,
R - radius of a circumscribed circle.
Then,
p = 2N·R·sin(½·2π/N) =
= 2N·R·sin(π/N) =

(substitute x=π/N,
so if N→∞, x→0)
= 2π·R·[sin(x)/x]
As x→0, sin(x)/x→1.
Therefore, the limit of a perimeter p equals to 2π·R - a circumference of a circumscribed circle.


Problem D

Prove that the area of a regular polygon tends to an area of an inscribed into it circle, if the number of its sides tends to infinity.
More precisely, prove that the difference between an area of a regular N-sided polygon and an area of a circle inscribed into it is an infinitesimal variable as N→∞.

Proof D
Let
A - area of a regular polygon,
p - perimeter of a regular polygon,
N - number of its sides,
r - radius of an inscribed circle.
Dividing a regular polygon into N equilateral triangles with common vertex in a center of an inscribed circle leads to an obvious formula for its area
A = ½·p·r
Since the limit of a perimeter p equals to 2π·r,
limN→∞A = ½·2π·r·r = π·r²


Problem E

Prove that the area of a regular polygon tends to an area of a circumscribed around it circle, if the number of its sides tends to infinity.
More precisely, prove that the difference between an area of a regular N-sided polygon and an area of a circle circumscribed around it is an infinitesimal variable as N→∞.

Proof E
Let
A - area of a regular polygon,
p - perimeter of a regular polygon,
N - number of its sides,
R - radius of a circumscribed circle.
r - radius of an inscribed circle.
Notice that
r² + (p/2N)² = R²
and, therefore,
limN→∞(R−r) = 0.
That is, radiuses of inscribed and circumscribed circles have the same limit.
Dividing a regular polygon into N equilateral triangles with common vertex in a center of a circumscribed circle leads to an obvious formula for its area
A = ½·p·√R²−(p/2N)²
In this formula, as proved above, the limit of a perimeter p equals to 2π·r, which is the same as 2π·R.
An expression p/2N has limit zero as N→∞.
Therefore,
limN→∞A = ½·2π·R·R = π·R²