| symbol | write | ||
|---|---|---|---|
| + | + | ||
| − | - | ||
| 3y | 3y | ||
| y ⋅ 3 | y*3 | ||
| (3 + 4)(x + 5) | (3+4)(x+5) | ||
| (x+1)/(y+6) | ||
2
| 2 3/4 | ||
| |x + 1| | |x+1| | ||
| x2n | x^(2n) | ||
| √x + 1 | sqrt x+1 | ||
| n√x + 1 | root(n)(x+1) |
| symbol | write |
|---|---|
| < | < |
| ≤ | <= |
| = | = |
| ≠ | != |
| ≥ | >= |
| > | > |
| symbol | write | remark |
|---|---|---|
| ∧ | /\ | and (also and works) |
| ∨ | \/ | or (also or works) |
| ¬ | ! | not (also not works) |
| F | FF | false |
| T | TT | true |
| U | UU | undefined |
| → | --> | material implication |
| ↔ | <-> | material equivalence |
| && | && | short-circuit and |
| || | || | short-circuit or |
| symbol | write | remark |
|---|---|---|
| ⇒ | ==> | |
| ⇐ | <== | |
| ⇔ | <=> | treats U and F as equivalent |
| ≡ | === | treats U and F as different |
| symbol | write |
|---|---|
| ∀ x: | AA x: |
| ∀ x; 0 ≤ x < y: | AA x; 0 <= x < y: |
| ∃ x: | EE x: |
| ∃ x; x + 2 ≠ z: | EE x; x+2 != z: |
arithmetic feedback • line segment • cottage • minimum • Pólya’s problem • 3|x| ≥ |x − 3| + 5 • Selection Sort • volleyball • divisible by 7 • sum of cubes • ∃ P ∧ Q(x) • ∀ x: P(x) ∨ Q(x) • print a DFA
For each of the following images, write a formula so that the formula is true if and only if x is in the blue area.
Write a short formula so that the formula is true if and only if x is in the blue area. HintSay within your answer that x is not 5.
Here you may design each part of the cottage. The answers are not mathematically unique, because parts may overlap. For instance, the chimney may continue through the roof so that its lower end can be horizontal. However, only the most natural options are allowed for the window and roof (but, as is usual, they may be expressed in many mathematically equivalent ways).
Here is a C++ implementation of Selection Sort.
Let n = A.size().
| 1 | void SelectionSort( array_type & A ){ |
| 2 | for( unsigned i = 0; i+1 < A.size(); ++i ){ |
| 3 | unsigned p = i; |
| 4 | for( unsigned j = i+1; j < A.size(); ++j ){ |
| 5 | if( A[j].x < A[p].x ){ p = j; } |
| 6 | } |
| 7 | elem_type tmp = A[i]; A[i] = A[p]; A[p] = tmp; |
| 8 | } |
| 9 | } |
Our next goal is to find the smallest natural number that can be written as a sum of two cubes of natural numbers in two different ways, and to find those two ways. The formula C(x, y) has been pre-programmed so that, to the extent needed below, it is true if and only if y = x3 ≥ 0. Please use it for representing cubes. You may write other expressions in the places of x and y. (For reasons that are related to fundamental limitations of computation, the integer logic mode of MathCheck does not accept x3 or x ⋅ x ⋅ x as such.)
In the next questions, P represents any formula where x does not occure free, and Q(x) represents any formula. It is possible that there is no shorter correct answer than the given formula as such.
Although MathCheck can deal with formulas, it cannot deal with symbols that represent arbitrary formulas. Therefore, when MathCheck checks your answer in the boxes below, it uses hidden formulas that depend on the value of the variable q so that all relevant possibilities will be tested. If you get a counter-example, please pay attention to the “left” and “right” values in it, and not to the values of q and x.
Write as short formulas as possible that mean the same as the given formulas, when P ≡ F.
Write as short formulas as possible that mean the same as the given formulas, when P ≡ T.
The results show that a certain law is valid.
What law?
AnswerLet P and
Q(x) be formulas.
If x does not occur free in P, then
∃ x: P ∧ Q(x) ⇔ P ∧ ∃ x:
Q(x)