Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetSystemOptions[
- "ReduceOptions" -> "ExhaustiveSearchMaxPoints" -> {10000, 100000}];
- Clear[n, M];
- n = {a, b, c};
- M = {1, 2, 3};
- TraditionalForm[Simplify[a x + b y + c z + d == 0]] /.
- Solve[{Abs[n . M + d]/Norm[n] == 2,
- 1 <= a <= 10, -5 <= b <= 10, -5 <= c <= 10, a > b > c}, {a, b, c,
- d }, Integers]
- SetSystemOptions[
- "ReduceOptions" -> "ExhaustiveSearchMaxPoints" -> {10000, 100000}];
- Clear[n, M];
- n = {a, b, c};
- M = {1, 2, 3};
- sol = Solve[{Abs[n . M + d]/Norm[n] == 2,
- 1 <= a <= 10, -5 <= b <= 10, -5 <= c <= 10, a > b > c}, {a, b, c,d }, Integers]
- TraditionalForm[Simplify[a x + b y + c z + d == 0]] /.
- DeleteDuplicates[sol,
- With[{v1 = Normalize[{a, b, c, d} /. #1],
- v2 = Normalize[{a, b, c, d} /. #2]},
- v1 == v2 || v1 == -v2] &]
- r = Reduce[ a x + b y + c z + d == 0 && EuclideanDistance[{1, 2, 3}, {x, y, z}] == 2,
- {a, b, c, d}, Integers]
- (a | b | c | d) ∈ Integers && (
- (z == 1 && y == 2 && x == 1 && d == -a - 2 b - c) ||
- (z == 3 && ((y == 0 && x == 1 && d == -a - 3 c) ||
- (y == 2 && ((x == -1 && d == a - 2 b - 3 c) ||
- (x == 3 && d == -3 a - 2 b - 3 c))) ||
- (y == 4 && x == 1 && d == -a - 4 b - 3 c))) ||
- (z == 5 && y == 2 && x == 1 && d == -a - 2 b - 5 c))
- Normal @ Solve[1 <= a <= 5 && -5 <= b <= 5 && -5 <= c <= 5 && a > b > c && r,
- {a, b, c, d}, Integers]
- SetSystemOptions[
- "ReduceOptions" -> "ExhaustiveSearchMaxPoints" -> {10000, 100000}];
- Clear[n, M];
- n = {a, b, c};
- M = {1, 2, 3};
- TraditionalForm[Simplify[a x + b y + c z + d == 0]] /.
- Solve[{Abs[n.M + d]/Norm[n] == 2,
- 1 <= a <= 10, -5 <= b <= 10, -5 <= c <= 10, a > b > c,
- GCD[a, b, c, d] == 1}, {a, b, c, d}, Integers]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement