M
M
Maxim Yakovenko2020-07-19 14:30:39
Mathematics
Maxim Yakovenko, 2020-07-19 14:30:39

Who can explain the essence of the problem Three paired maxima?

Given the following task:

You are given three positive (that is, strictly greater than 0) integers x, y, and z.
Your task is to find positive integers a, b and c such that x=max(a,b), y=max(a,c) and z=max(b,c), or determine that it is impossible to find such values a, b and c.


Couldn't decide on my own. So I went to read the analysis. Not the logic of reasoning, not at all obvious to me. Perhaps someone can help clarify it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dmshar, 2020-07-19
@TheLazzziest

If there is no really
clear condition. One can only assume that x ≤ y ≤ z . There are no equality restrictions.
then we argue as follows:
X is the maximum of a and b. For definiteness, we take either a < b or a=b (since equalities are allowed).
Those. we already have b=X. For a, the condition a<=b must be satisfied.
It follows from the conditions Y=max(a,c), Z=max(b,c) and the condition a<=b that с>=b. Then c=Y, c=Z.
Therefore, the condition is satisfied only by such pairs for which either all three given numbers X,Y,Z are equal to each other, or X < Y=Z and then b=X, c=Y=Z, a is an arbitrary number less than or equal to b.
The algorithm boiled down to the fact that you check whether the specified conditions are met and if one of them is met, you directly get your a, b and c without any selection.

H
hint000, 2020-07-19
@hint000

A solution exists when
max(x, y) = max(y, z) = max(x, z),
AND
{if min (x, y, z) < max(x, y, z), then min (x, y, z) > 1}
.
We leave the proof as a home exercise. ;)
PS my condition almost corresponds to what dmshar outputted , only written in a slightly more general form. I didn't use the x ≤ y ≤ z constraint.

S
Saboteur, 2020-07-19
@saboteur_kiev

I don't understand the problem at all. There are no conditions for xyz specified here.
We just calculate abc, or we go to the teacher and clarify the conditions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question