Range of the union of two sets of integers

1.7k Views Asked by At

There are two sets of positive integers, $A$ and $B$. Let the range of $A$ be $230$ and range of $B$ be $310$, then what the range of $A \cup B$ must be at least?


I think the range of the union must be at least 310, i.e., $\max\{ran(A), ran(B)\}$, but I'm not too sure how to convince myself of this. Could anyone provide a general proof?

EDIT: The range of a finite set $P$ of positive integers is defined as $$ran(P) = \max(P) - \min(P).$$

3

There are 3 best solutions below

0
On BEST ANSWER

Your answer is correct.

Denote $a_1=\min A$, $a_2=\max A$, $b_1=\min B$, $b_2=\max B$. Then $$ a_2-a_1=230;\quad b_2-b_1=310; $$ and $$ ran(A\cup B)=\max(a_2,b_2)-\min(a_1,b_1) $$ Consider the following cases. (Drawing a picture would be a good idea at this point.)

  • $b_1>a_2$;
  • $a_1>b_2$;
  • $[a_1,a_2]\cap[b_1,b_2]\neq\emptyset$.

It is only in the third case that one can make $ran(A\cup B)$ small. In particular, one needs $[a_1,a_2]\subset[b_1,b_2]$.

6
On

NOTE

This answer was posted three hours before the asker changed/edited their original question. The answer is relevant, however, though the asker would need to translate into the language of "range".

I think you mean to say that $|A| = 230, \; |B| = 310$ where $|A|$ means the cardinality of $A$. In this case (with what I'm assuming are finite sets, A, B), cardinality of a set is equal to the number of elements in the set.

(The term "range" makes sense only when talking about functions, and even then, the term is not universally used; more standard when referring to $f: X\to Y$, we have the domain of $f$ as $X$, and codomain of $f$ being $Y$, and refer to the image of a function as the image of $f$ in $Y$, often denoted as $f(X)$: the set of elements $$\{f(x)\mid x\in X\}\subseteq Y$$


$|A\cup B|$ (the number of elements in $A\cup B$), can be found using the following: $$|A\cup B| = |A|+|B| - |A\cap B|\tag 1$$ Unless you know what elements, if any, that A and B share, i.e. $A\cap B$, I'll assume that this information was not provided, so you'll have just:

$$|A\cup B| = 230+310 - |A\cap B|\tag{2}$$

Now we'll try to find the minimum, and maximum values for $|A\cup B|$

Let's start with the maximum number of elements in $A\cup B$. From $(1), (2),$ the greatest number of elements in the set is $230 + 310 =540,$ which happens when $A\cap B = \varnothing$.

$|A\cup B|$ is least when $A\subset B$. That is, every element in $A$ is also in $B$, and so $|A\cap B| = 230$. In this case $|A\cup B| = 310 - 230 = 80.$ So $$|A\cup B| \geq 80.$$

0
On

Let $a_U=\max A, \;a_L=\min A,\; b_U=\max B, \;b_L=\min B.\;$ Let $C=\{a_U,a_L,b_U,b_L\}.$

Since $C\subset A\cup B$ we have $\max A\cup B \geq \max C\geq b_U$ and $\min A\cup B\leq \min C\leq b_L,$ so $\max A\cup B-\min A\cup B\geq b_U-b_L.$ Similarly, $\max A\cup B\geq \max C\geq a_U$ and $\min A\cup B\leq \min C\leq a_L$ so $\max A\cup B-\min A\cup B\geq a_U-a_L.$