Exercise 1.2 · Q9: Is the halving-and-rounding-up function bijective?
Let be defined by State whether the function is bijective. Justify your answer.
and , but . So is not one-one.
Let . Then is even, and . So is onto.
is onto but not one-one. Hence is not bijective.
Want the reason behind every step, the basics and the checks?
Work out a few values and the pattern is plain: , , , , and so on. The function pairs up neighbours, and , and sends both to . Every output is reached, so is onto. But every output is reached twice, so is not one-one. A bijection must be both, so is not bijective.
- Given
- A rule with two cases, one for odd and one for even , from to .
- To find
- Whether is bijective, that is, both one-one (injective) and onto (surjective), with a justification.
- Plan
- (1) Confirm really is a function from to . (2) Tabulate values to see the pattern. (3) Test one-one. If it fails, a single counterexample settles it. (4) Test onto by solving for an arbitrary . (5) Conclude.
Basics you need
A piecewise rule uses a different formula on different parts of the domain. To evaluate , first decide which piece falls in (here: is odd or even?), then use only that piece. Basics: what a function is
is one-one if different inputs always give different outputs: . To show it fails, one pair with is enough. Basics: one-one and onto
is onto if every in the codomain is the image of something: for each there is an with . To prove it, take an arbitrary and construct such an .
Every even natural number is , and every odd natural number is , for some . (So , , and so on.) Basics: even and odd
Bijective means one-one and onto. If either property fails, the function is not bijective. Basics: one counterexample disproves a "for all"
Solution
Check that really maps into
The formulas contain divisions by 2, so first make sure the outputs are natural numbers, not fractions.
- If is odd, then is even, so is a whole number. It is at least , so it is in .
- If is even, then is a whole number, at least , so it is in .
Every natural number is either odd or even, never both, so exactly one formula applies to each . Hence assigns exactly one natural number to every natural number: it is a genuine function .
The question says , but with a piecewise formula it is worth confirming. If some output were , the codomain would be wrong and the question would not make sense. The check also tells us that the two pieces never overlap or leave gaps.Odd + 1 = even: if , then . That is why comes out whole.Tabulate values and spot the pattern
1 2 3 4 5 6 7 8 9 10 parity odd even odd even odd even odd even odd even formula 1 1 2 2 3 3 4 4 5 5 Each output appears exactly twice. In general, write the odd number as and the even number just after it as :
Each pair of neighbours lands on the same output . Every output receives an arrow (onto), but every output receives two (not one-one). Before trying to prove anything about a strange-looking function, compute a few values. The table shows what to expect: two-to-one behaviour, so one-one should fail and onto should hold. The general formula confirms the pattern holds for every , not just the ten we listed.Writing odd numbers as and even numbers as (Basic 4) turns "odd" and "even" into algebra we can substitute into the formulas.One-one? No: one counterexample settles it
From the table,
So although . Two different inputs share an output, so is not one-one.
"One-one" is a claim about every pair of inputs: whenever the outputs agree, the inputs must agree. A claim about every pair is destroyed by a single pair that breaks it. So we do not need the general argument here; the specific pair 1, 2 is a complete and rigorous disproof.To disprove "for all", give one counterexample. To prove "for all", you need a general argument. Basics: proving and disprovingOnto? Yes: build an input for any output
Take an arbitrary . We need some with . From Step 2 we know where to look: is the output of the even number . Choose . This is a natural number, and it is even, so the second formula applies:
So every is an image under , and is onto. (The odd number works too, since . That second preimage is exactly why is not one-one.)
"Onto" says every element of the codomain is hit. That is a "for every " claim, so a few examples will not do. We take a general and produce an input that works. Guessing the input is legitimate, provided we then check it: we confirm that is in the domain and that really equals .To prove onto: for an arbitrary in the codomain, find in the domain with . Always check that the you find actually lies in the domain. Basics: one-one and ontoConclude
A bijection must be both one-one and onto. is onto (Step 4) but not one-one (Step 3), so is not bijective.
Note how this compares with finite sets. In Examples 13 and 14 the textbook shows that for a function from a finite set to itself, one-one and onto always come together. This exercise is a reminder that on an infinite set like they can split apart: here we have onto without one-one. (Example 10 is another such case.)
No, is not bijective. It is onto, because every equals . It is not one-one, because . In fact is exactly two-to-one: . (Textbook answer: "No".)
Balloon Pop, in the chapter’s Games tab. Machine 2 is this function: find the double hit, and see that every balloon can be hit. Play Balloon Pop ↗
Pick an output, say . Step 4 says should give it: is even, so . ✓ The other preimage is : it is odd, so . ✓ Two inputs, one output, exactly as the analysis predicts.
- Using the wrong piece. uses because 3 is odd; it is , not .
- "Each piece is one-one, so is one-one." Each formula on its own never repeats a value, but the two pieces can collide with each other, and here they always do.
- Stopping at "not one-one" without saying why onto holds. The question asks you to justify; a complete answer reports both properties.
- Forgetting to check the preimage is in the domain. If the codomain included 0, there would be no natural with , and onto would fail.
- With a piecewise function, test one-one across the pieces, not just within each piece.
- One-one fails with one counterexample. Onto is proved by constructing a preimage for an arbitrary output, then checking it.
- On infinite sets, onto and one-one are independent. Finite sets mapped to themselves are the special case where they coincide.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Odd numbers are , even numbers are , | Steps 1, 2 | Definition of odd and even |
| Steps 2–4 | Direct substitution into the two formulas | |
| Definitions of one-one, onto, bijective | Steps 3–5 | Definitions 5–7, Section 1.3 (Lesson: types of functions) |
| One counterexample disproves a "for all" statement | Step 3 | Logic of quantifiers |
| Finite sets: one-one ⇔ onto | Step 5 remark | Examples 13 and 14 |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →