|
This code sort X, Y and Z so that X > Y > Z
code between 'then' and 'endif' is swaping values
if x < y then t= x; x= y; y= t; endif
if x < z then t= x; x= z; z= t; endif
if y < z then t= y; y= z; z= t; endif
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
I would like to know why my previous message was downvoted ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
modified 1-Aug-15 22:58pm.
|
|
|
|
|
It's a high level member too - my counter-vote only brought the message back up to a 3.
Possibly the same person reported in B&S[^] who's been randomly abuse-voting Lounge messages.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you very much.
You probably right, and I have been a prey of choice since hi downvoted my answers 5 times in a row.
Nota: I am only Silver member, so my upvote will not be as good as yours
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Hi All
I had to solve a specific problem for a client, this problem take some time to come with a original solution, that is working.
What i would like to know is if my solution is a original solution, if it fits as an algorithm or more like a recipe (since is very specific to this problem), and also if it is an original algorithm where should I publish it.
Thanks in avance for your answers.
Now the problem:
I Work with business process management, a common issue in BPM is who to define who does which tasks and how to implement a rule based on the responsabilities and role of the user.
In this case an aproval depend on the CEO (the one that must do the task). However he can delegate the task (everytime or in vacation) to the CFO and Manager A.
Also the Manager A delegates to both the Assistant Manager 1 (AM1) and Assistant Manager 2 (AM2), and the CFO delegates to Finantial Manager A (FMA) and Finantial Manager B (FMB).
So a process may be aproved by any of these groups:
- CEO
- CFO and Manager A
- CFO and AM1 and AM2
- FMA and AM1 and AM2
- FMB and AM1 and AM2
- FMA and Manager A
- FMB and Manager B
Second part:
(Assume CEO - Level 1, CFO - Level 2, Manager A - Level 2, The others - Level 3)
We seen that someone in level 2 can aprove with someone in level 3 of another branch.
However it gets tricky since AM1 (level 3) can delegate its on tasks on CFO (level 2 of the other branch)
So this line
- CFO and AM1 and AM2
turns into 2 lines:
- CFO and AM1 and AM2
- CFO and CFO and AM2 (because CFO only aproves once so it become: - CFO and AM2)
This seems hard, but belive i am not give all the requirements, the real problem as some issues more, but the main question is the one I explained above.
The Solution
I will give the solution, maybe write an article where. However first i want to know if it already exists, or something similar. But google for task delegation returns results obviously nothing to do with this problem.
|
|
|
|
|
Hi,
Seems related to oriented graph
Numerous mathematical tools exist for graphs.
So there is little chance that your solution is original, or at least efficient tools already exist for this family of problems.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Tanks ppolymorphe
I was always looking at trees and not graphs.
After your tip i did some research and i think my solution fits more or less in Direct Acyclic Graph more than oriented graph. The image (of the Hasse diagram) in this site is prety similiar with my solution https://en.wikipedia.org/wiki/Directed_acyclic_graph[^]
I am going to read some more about this.
|
|
|
|
|
Rui__Silva wrote: Tanks ppolymorphe You're welcome.
Rui__Silva wrote: After your tip i did some research and i think my solution fits more or less in Direct Acyclic Graph more than oriented graph. Oriented is a direct translation from French, the right translation is Directed
Glad you found what you were looking for.
- If you consider my answer useful, you can up vote it (green arrow when the mouse is on left at beginning of answer).
- If you think the problem solved, change the tittle of your question and add Answered or Solved
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Anonymous down-vote countered.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks you ! Thanks you ! Thanks you all up voters
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
modified 1-Jul-15 14:36pm.
|
|
|
|
|
Hello, everybody.
I've got next problem. There is three objects:
1. first one, with next characteristics: circular area of view, speed, drag coefficient;
2. wind (or water current, doesn't matter; some sort of resistance) with some strength and direction;
3. polygon, concave (in general case).
I need to build path of first object inside this polygon, which will:
1. cover whole polygon by view area;
2. be optimal by travel time;
3. takes into account wind direction and strength.
In other words, I need to carry out exploration in a given area on optimal trajectory while scout can be drift away.
Thanks, Viktor.
|
|
|
|
|
Do you have a question?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
My question, actually, is: what algorithms should I use to build this trajectory?.. I know, that maybe this is strange. I investigate this problem last few days and already have some sort of solution. I just want to find some people who might solve this task earlier.
|
|
|
|
|
Viktor Grabarchuk wrote: I just want to find some people who might solve this task earlier. The thing has a location, a direction (vector, some arrow) and a speed (velocity in them expensive manuals)
Once you have those three things in an oject, you can introduce "forces" like gravity.
Do keep in mind that you are asking for something rather complex; there is a huge difference in resistance between wind and water, also depending on the shape of the object it hits, any currents that form due to that shape, any contaminations and other stuff. Other stuff like temperatures of below 0 where water does not tend to flow
Start out with something fun one can easily play with; have a ball bounce on the screen and change the gravity to be equal to the moon. Once you have one force, introducing a new one should not be hard.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have a an array of values like:
array(0.2,0.0,0.4,0.7) min: 0.0 , max: 5.0
and every value represent something and I have some attributes in the database that corresponds to these values. Now what I need to do is I need to search the records from database on the bases of above mentioned array. Kindly suggest me an algorithm that would do something like this. I need something like machine learning that would be able to do this thing with flexibility. What I have found from my research that following algorithm is closer to what I am looking for:
http://www.econ.ohio-state.edu/jpeck/Econ501aL4.pdf
http://www.solver.com/k-nearest-neighbors-classification-example
For Example: Configuration array => ('attr1'=> 0.2, 'attr2'=>0.54, 'attr3'=>0.66, 'attr4'=> 0.78)
Records:
| attr1 | attr2 | attr3 | attr4 |
1) 0.45 0.33 0.55 0.66
2) 0.32 0.12 0.34 0.99
3) 0.78 0.41 0.10 0.74
4) 0.88 0.12 0.74 0.10
5) 0.72 0.02 0.00 0.55
Now I need an algorithm which can get me results (records) using the above mentioned array.
|
|
|
|
|
|
I have a quick question.
Which type of math subjects should i refresh myself on for algorithms class??
Is there any Direct recources i can find for this??
Thankyou
|
|
|
|
|
|
There's no specific math subject that would be more important than others for algorithms in general. The most important skill for developing or understanding algorithms is logical thinking and the ability to break a problem into smaller parts. Unless, of course, if you're going to deal with algorithms for a specific problem domain in particular - like graphics or sound processing - then certain math subjects will certainly be more helpful than others.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Not just for algorithms, but for Computer Science in an overall sense - Mathematics for Computer Science[^]. You'll also find video lectures there.
modified 5-Jun-15 1:48am.
|
|
|
|
|
I would say Boole Algebra.
Everywhere you have a condition, it is Boole Algebra.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Hi friends,
find the θ bound for f(n)=n2/2-n/2?
we need to find the upper bound and lower bound.
If anybody know please send the solution with explaination.
Thanks,
Arjun
|
|
|
|
|
C
modified 23-May-15 13:46pm.
|
|
|
|
|
Chaitanya Pai wrote: I have tried a lot to arrive at the solution. Show what you have tried and explain what does not work, and people will try to help you. But no one is going to hand you a complete solution.
modified 23-May-15 8:16am.
|
|
|
|
|
I am having a major 'head against wall' problem here...
Given two base 36 values ('A0ZWS0P' and 'A0ZWS9P', for example) and a third (random) value,
how would you go about determining whether the random value was 'between' the starting and ending values?
I am working in 2012 VB.Net
|
|
|
|