Click here to Skip to main content
15,889,816 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionNeed an efficient algorithm to solve the following problem Pin
User 1411988416-Feb-19 0:11
User 1411988416-Feb-19 0:11 
AnswerRe: Need an efficient algorithm to solve the following problem Pin
Gerry Schmitz16-Feb-19 8:33
mveGerry Schmitz16-Feb-19 8:33 
QuestionHelp to predict the output of this code Pin
Member 141133789-Jan-19 12:39
Member 141133789-Jan-19 12:39 
AnswerRe: Help to predict the output of this code Pin
Daniel Pfeffer9-Jan-19 21:48
professionalDaniel Pfeffer9-Jan-19 21:48 
AnswerRe: Help to predict the output of this code Pin
ChrisFromWales1-May-19 0:14
ChrisFromWales1-May-19 0:14 
PraiseDinic’s algorithm for Maximum Flow Pin
AshishKhuraishy6-Dec-18 3:56
AshishKhuraishy6-Dec-18 3:56 
GeneralRe: Dinic’s algorithm for Maximum Flow Pin
Patrice T25-Dec-18 16:15
mvePatrice T25-Dec-18 16:15 
SuggestionVector representation of the code. Pin
Member 1406583326-Nov-18 7:50
Member 1406583326-Nov-18 7:50 
Hello to all! I need to solve the problem. An approximate representation and partial solution is already there. This controversial mathematical question can push you away, since I do not go into some important points. I just want to state the very idea. I hope someone has enough time and will interest you. In programming, we are all accustomed to using only the numerical number system. However, theoretically, there is a vector system. Why not try to implement it in such a way that the distances between the cells of information are also carriers of information? Due to this, the counting rate will be completely predetermined, and, accordingly, it will be possible to solve much more complex tasks. Below I have laid out my presentation, as an example of the simplest implementation can be represented through the creation of an emulator.

Can apply c/c++


// designation in area. Position Form.

arr1 =
Vector1 = Vector3 + Vector2, Vector4 + (-Vector5), Vector10 + (-Vector12), Vector16 + (-Vector17) = 1;
Vector2 = (-Vector3) + Vector1, Vector6 + (-Vector5), Vector15 + (-Vector13), Vector18 + (-Vector17) = 1;
Vector3 = Vector1 + (-Vector2), Vector4 + (-Vector6), Vector7 + (-Vector9), Vector16 + (-Vector18) = 1;
Vector4 = Vector1 + Vector5, Vector3 + Vector6, Vector10 + (-Vector11), Vector7 + (-Vector8) = 1;
Vector5 = (-Vector1) + Vector4, (-Vector2) + Vector6, Vector12 + (-Vector11), Vector13 + (-Vector14) = 1;
Vector6 = (-Vector5) + (-Vector2), (-Vector3) + Vector4, Vector15 + (-Vector14), Vector9 + (-Vector8) = 1;
Vector7 = Vector4 + Vector8, Vector3 + Vector9 = 1;
Vector8 = (-Vector6) + Vector9, (-Vector4) + Vector7 = 1;
Vector9 = Vector6 + Vector8, (-Vector3) + Vector7 = 1;
Vector10 = Vector4 + Vector11, Vector1 + Vector12 = 1;
Vector11 = (-Vector5) + Vector12, (-Vector4) + Vector10 = 1;
Vector12 = Vector5 + Vector11, (-Vector1) + Vector10 = 1;
Vector13 = Vector5 + Vector14, (-Vector2) + Vector15 = 1;
Vector14 = (-Vector6) + Vector15, (-Vector5) + Vector13 = 1;
Vector15 = Vector6 + Vector14, Vector2 + Vector13 = 1;
Vector16 = Vector1 + Vector17, Vector3 + Vector18 = 1;
Vector17 = (-Vector1) + Vector16, (-Vector2) + Vector18 = 1;
Vector18 = Vector2 + Vector17, (-Vector3) + Vector16 = 1;

// arr is an array containing the shape of the initial tetrahedron for defining the reference system in space.
// 4 conditions(directions) of expansion

Vector1 * 2, Vector4 * 2, Vector3 * 2, Vector10 * 2, Vector7 * 2, Vector16 * 2;
// if not, then
Vector1 * x^(x + 1), Vector4 * x^(x + 1), Vector3 * x^(x + 1), Vector10 * x^(x + 1), Vector7 * x^(x + 1), Vector16 * x^(x + 1);

Vector3 * (-2), Vector6 * 2, Vector2 * 2, Vector9 * 2, Vector15 * 2, Vector18 * 2;
// if not, then
Vector3 * (-x^(x + 1)), Vector6 * x^(x + 1), Vector2 * x^(x + 1), Vector9 * x^(x + 1), Vector15 * x^(x + 1), Vector18 * x^(x + 1);

Vector1 * (-2), Vector2 * (-2), Vector5 * 2, Vector12 * 2, Vector13 * 2, Vector17 * 2;
// if not, then
Vector1 * (-x^(x + 1)), Vector2 * (-x^(x + 1)), Vector5 * x^(x + 1), Vector12 * x^(x + 1), Vector13 * x^(x + 1), Vector17 * x^(x + 1);

Vector4 * (-2), Vector5 * (-2), Vector6 * (-2), Vector8 * 2, Vector11 * 2, Vector14 * 2;
// if not, then
Vector4 * (-x^(x + 1)), Vector5 * (-x^(x + 1)), Vector6 * (-x^(x + 1)), Vector8 * x^(x + 1), Vector11 * x^(x + 1), Vector14 * x^(x + 1);

x = 2^n
n = 1++

int r1 = sum(arr1; sum[arr1; g]);

// the sum of all vectors, in an arbitrary order g, in the range from 1 to 18
arr1 = sum(Vector1; Vector18);
arr2 = sum(Vector18; Vector36);
arrn = sum(18*n; n+18);


// reverse motion system.
// points of position with points in the center and continuous connection of vectors at points of separation are indicated
arr1_=
Line14 = Vector1(0; 0.5); Vector4(0; 0.5);
Line15 = Vector1(0.5; 1); Vector5(0; 0.5);
Line13 = Vector1(0; 0.5); Vector3(0; 0.5);
Line34 = Vector3(0; 0.5); Vector4(0; 0.5);
Line117 = Vector1(0.5; 1); Vector17(0; 0.5);
Line12 = Vector1(0.5; 1); Vector2(0.5; 1);
Line217 = Vector2(0.5; 1); Vector17(0; 0.5);
Line25 = Vector2(0.5; 1); Vector5(0; 0.5);
Line212 = Vector2(0.5; 1); Vector12(0; 0.5);
Line213 = Vector2(0.5; 1); Vector13(0; 0.5);
Line112 = Vector1(0.5; 1); Vector12(0; 0.5);
Line37 = Vector3(0; 0.5); Vector7(0; 0.5);
Line316 = Vector3(0; 0.5); Vector16(0; 0.5);
Line310 = Vector3(0; 0.5); Vector10(0; 0.5);
Line410 = Vector4(0; 0.5); Vector10(0; 0.5);
Line416 = Vector4(0; 0.5); Vector16(0; 0.5);
Line47 = Vector4(0; 0.5); Vector7(0; 0.5);
Line512 = Vector5(0; 0.5); Vector12(0; 0.5);
Line513 = Vector5(0; 0.5); Vector13(0; 0.5);
Line517 = Vector5(0; 0.5); Vector17(0; 0.5);
Line62 = Vector6(0; 0.5); Vector2(0; 0.5);
Line63 = Vector6(0; 0.5); Vector3(0.5; 1);
Line618 = Vector6(0; 0.5); Vector18(0; 0.5);
Line69 = Vector6(0; 0.5); Vector9(0; 0.5);
Line615 = Vector6(0; 0.5); Vector15(0; 0.5);
Line79 = Vector7(0.5; 1); Vector9(0.5; 1);
Line78 = Vector7(0.5; 1); Vector8(0.5; 1);
Line89 = Vector8(0.5; 1); Vector9(0.5; 1);
Line1012 = Vector10(0.5; 1); Vector12(0.5; 1);
Line1011 = Vector10(0.5; 1); Vector11(0.5; 1);
Line1112 = Vector11(0.5; 1); Vector12(0.5; 1);
Line1315 = Vector13(0.5; 1); Vector15(0.5; 1);
Line1314 = Vector13(0.5; 1); Vector14(0.5; 1);
Line1415 = Vector14(0.5; 1); Vector15(0.5; 1);
Line1617 = Vector16(0.5; 1); Vector17(0.5; 1);
Line1618 = Vector16(0.5; 1); Vector18(0.5; 1);
Line1718 = Vector17(0.5; 1); Vector18(0.5; 1);
Line64 = Vector6(0.5; 1); Vector4(0.5; 1);
Line65 = Vector6(0.5; 1); Vector5(0.5; 1);
Line611 = Vector6(0.5; 1); Vector11(0; 0.5);
Line614 = Vector6(0.5; 1); Vector14(0; 0.5);
Line68 = Vector6(0.5; 1); Vector8(0; 0.5);


// Expansion of the reverse system
// Superimposed on top in the same position with additional conditions.

Vector1 * 2, Vector4 * 2, Vector3 * 2, Vector10 * 2, Vector7 * 2, Vector16 * 2;
// if not, then
Vector1 * x ^ (x + 1), Vector4 * x ^ (x + 1), Vector3 * x ^ (x + 1), Vector10 * x ^ (x + 1), Vector7 * x ^ (x + 1), Vector16 * x ^ (x + 1);

Vector3 * (-2), Vector6 * 2, Vector2 * 2, Vector9 * 2, Vector15 * 2, Vector18 * 2;
// if not, then
Vector3 * (-x ^ (x + 1)), Vector6 * x ^ (x + 1), Vector2 * x ^ (x + 1), Vector9 * x ^ (x + 1), Vector15 * x ^ (x + 1), Vector18 * x ^ (x + 1);

Vector1 * (-2), Vector2 * (-2), Vector5 * 2, Vector12 * 2, Vector13 * 2, Vector17 * 2;
// if not, then
Vector1 * (-x ^ (x + 1)), Vector2 * (-x ^ (x + 1)), Vector5 * x ^ (x + 1), Vector12 * x ^ (x + 1), Vector13 * x ^ (x + 1), Vector17 * x ^ (x + 1);

Vector4 * (-2), Vector5 * (-2), Vector6 * (-2), Vector8 * 2, Vector11 * 2, Vector14 * 2;
// if not, then
Vector4 * (-x ^ (x + 1)), Vector5 * (-x ^ (x + 1)), Vector6 * (-x ^ (x + 1)), Vector8 * x ^ (x + 1), Vector11 * x ^ (x + 1), Vector14 * x ^ (x + 1);

x = 2^n
n = 1++

int r1 = sum(arr1_; sum[arr1_; G]);
G = Line g

// the sum of all vectors, in an arbitrary order g, in the range from 1 to 18

arr1_ = sum(0.5*Vector1 + 0.5*VectorN; 0.5*Vector18 + 0.5*VectorN);
0.5*Vector1 + 0.5*VectorN = 1 or 0.5
arr2 = sum(Vector18; Vector36);
arrn = sum(18*n; n+18);

// number of combinations and setting of numerical conditions

K(arr1) = 2 ^ x - 1
// if not, then

K(arr1_) = 2 ^ x - 1

// number of algorithms max movement on a diverging row
:Vectorn
(arr1 - 1) ^ 2 = 17 ^ 2 = 289
(arr_1 - 1) ^ 2 = 17 ^ 2 = 289
(arrn - 1) ^ 2
(arr_1 - 1) ^ 2

// max movement arr1
:K_maxr
= sum[1; (Vectorn-2)] + (Vectorn + Vectorn+1) or
= sum(Vector1; Vector16) + (Vector n + Vector n+1);

// min movement arr1
:K_minr
= Vectorn +(arrn-Vector g)

// max movement arr1_
: K_maxr
= sum[1; (Line n - 2)] + (Line n + Line n + 1)

// min movement arr_1
: K_minr
= Vectorn + (arr_n - Line g)
// the numerical designation must be replaced on vector combinations from maximum
// to minimum in the system arr1 and vice versa in the system arr1_


I'm not so good at writing code. Moreover, it is necessary to take into account all the subtleties of the low-level environment. It is difficult to explain, but if short, it is necessary to create an artificial vector environment inside the existing numerical (point). When compliance with several specific conditions, will be folded into a figurative array. Which, in turn, is the composition of the new elements (geometric) composite units appearing in space. If you are interested, I can tell you in more detail. I do not scream with pride about the prospects and uniqueness. But I am sure that this method of calculation has never been applied before. This is just an idea. And if it seems stupid to you, that's your opinion.
GeneralRe: Vector representation of the code. Pin
Gerry Schmitz27-Nov-18 9:19
mveGerry Schmitz27-Nov-18 9:19 
GeneralRe: Vector representation of the code. Pin
shooky561-Dec-18 5:04
shooky561-Dec-18 5:04 
QuestionOptimal Task Scheduling with Complete Knowledge Pin
Member 140435574-Nov-18 12:11
Member 140435574-Nov-18 12:11 
AnswerRe: Optimal Task Scheduling with Complete Knowledge Pin
Mycroft Holmes4-Nov-18 19:31
professionalMycroft Holmes4-Nov-18 19:31 
GeneralRe: Optimal Task Scheduling with Complete Knowledge Pin
Member 140435575-Nov-18 1:37
Member 140435575-Nov-18 1:37 
AnswerRe: Optimal Task Scheduling with Complete Knowledge Pin
Gerry Schmitz12-Nov-18 8:20
mveGerry Schmitz12-Nov-18 8:20 
QuestionChess Futility pruning Pin
GM Fafkorn5-Oct-18 22:13
GM Fafkorn5-Oct-18 22:13 
QuestionAlgorithms help Pin
Member 139775798-Sep-18 7:36
Member 139775798-Sep-18 7:36 
QuestionStart with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Member 139396526-Aug-18 5:08
Member 139396526-Aug-18 5:08 
AnswerRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Stefan_Lang7-Aug-18 23:29
Stefan_Lang7-Aug-18 23:29 
AnswerRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Gerry Schmitz8-Aug-18 8:38
mveGerry Schmitz8-Aug-18 8:38 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Stefan_Lang8-Aug-18 21:12
Stefan_Lang8-Aug-18 21:12 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Gerry Schmitz9-Aug-18 9:52
mveGerry Schmitz9-Aug-18 9:52 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Stefan_Lang9-Aug-18 21:42
Stefan_Lang9-Aug-18 21:42 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Kenneth Haugland9-Aug-18 22:25
mvaKenneth Haugland9-Aug-18 22:25 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Gerry Schmitz11-Aug-18 9:19
mveGerry Schmitz11-Aug-18 9:19 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Gerry Schmitz10-Aug-18 7:38
mveGerry Schmitz10-Aug-18 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.