I have the following problem:
Lets say I'm in a city with some friend we have a bunch of tasks to do. All persons start on a different position, for example (0/0), (10/5), (-20/0), ... , and every person can move x corrdinates per second.
Every task has:
A coordinate where it can be completed (for example (40/50))
A importance value ranging from 0 - X (for example importance = 5)
A time that is needed to complete this task
Also, some tasks can only be done if others are already completed.
Now comes the tricky thing: The group has a certain time, in which they can complete tasks. They now need to choose which tasks they want to complete, the goal is that the summarized "importance value" of the completed tasks is as high as possible. The group is also allowed to split up.
I tried to solve the problem in the past hours but i haven't come far and i'm burnt out. Please help
I have an array of several segments of a path with known start / end point. Direction of each segment is not known. It can be from start to end point or vice versa.
Each segment object is something like this:
PointA = p1
PointB = p2
pointA_is_connected = true (false for the first or last segment)
pointB_is_connected = true (false for the first or last segment)
I want to create a path from one end to another in one direction with all segments that can be connected to each other. All the segments in an array are segments of a ONE path.
Here is an image of what I have (in red) and what I want to have (in green)
What's the best way to achieve this? http://pgtehran.euphrat.es/pic.png[^]
You need to define a property that have to be 'comparable' and from wich result you can decide which segment choose.
I.e. defining coordinates for each starting and ending point of each segment you can choose an arbirtary small circle and search for those segments that are closer to your endpoint. The closest will be 'connected', then you will repeat the search with the opposite end of last connected segment until there are no more segments available.
Start and end point does have coordinates property.
Why choose an arbitrary small circle for checking? why don't check if the next point is exactly same as the start/end point of the current segment?
Now i'm very much what you guys would call a total amateur
when it comes to math algorithms and any form of cryptography but i was just wondering if elliptic curve private keys usually rely on static values for all encrypted binaries being signed and verified
can a atacker not recover K if DA shares the same public and private exponent?
The following code is a basic algorithm for hamming distance calculation, but due to the design of my application, it requires many times to use this algorithm, in order to improve application efficiency, I want to improve the efficiency of this algorithm, is there any appropriate methods? Assembly language possible?
Yes, well it depends which assembly language.
The most obvious thing is to use __popcnt64[^] to do 8 times as many popcnts in a cycle. Haswell can sustain 2 reads, a xor, a popcnt, an add and a fused sub/branch pair (hopefully the compiler will rewrite the loop logic) all together once per cycle, so that's pretty good.
You can also try the pshufb trick[^], the benchmark there shows it's a bit better. That takes more effort to make it really fast, doing as much vertical work as possible before doing a horizontal reduction and so on. May work better with AVX2, hard to say in advance.
Determine the incorrect statement below concerning the Union-Find data structure we
discussed in class (with union by rank and path-compression).
1. The union operation sometimes may not increase the height of
the resultant tree
2. The union operation can at most increase the height of
the resultant tree by one
3. The union operation always increases the height of
the resultant tree by one
4. The find operation sometimes may not increase the degree of
the root of
the resultant tree
5. The find operation requires two traversals f
rom node to root
I know this "isn't your homework" but we don't know what the Union-Find structure is as we weren't in the "class" where this was "discussed". If this was your homework I'd suggest getting additional help from your tutor if you need things explained, or arrange a study group with fellow students. But as this isn't your homework and we don't have access to the information needed to find a solution, there is nothing we can do to help.
I'm having trouble with the SPOJ problem below. While I'm new to C# I feel like I understand the concepts and am simply having trouble transferring it into code. More than anything the structure of the code is what I can't seem to picture in my head. To my understanding I need to find Brenda's optimal line first and then find out how best for Ann to react.
I'm at the point where I think I need less of a hint and more of a semi-solution so I can figure out where the gap in my understand is. Any help at all would be appreciated.
We have a project in which I am the head creator and we are in need of an algorithm. The algorithm must consist of multiple variables that will conclude the best possible option(s) based off of information collected by the user (if more details are needed please ask and I may be able to answer them based on the question). Can anyone help in creating the algorithm or direct us to someone who can help? Any guidance would be appreciated, thank you.
How do you expect us to ask you questions for details (not to say giving any answers) if you do not provide any details to start with...
What 'variables', what 'best possible option', what information collected', what 'user'?
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
I realize it was very general. I was more looking for someone who might be able to help with this and I can go into more details with that individual. I can explain a little more. We are working with some basketball coaches and part of the project is asking the question, how can a coach mathematically determine the best athlete for the program by the statistics each athlete provides while calculating what the coach needs to help their program? Also we would like to calculate the distance from the athlete to the program to give the probability of which player would be the best choice. I hope this provides a little more insight on the project.
I was more looking for someone who might be able to help with this
If you are trying to recruit a developer to write code for you then you are on the wrong site. Take another look at the link I posted in my previous response, which explains how to formulate a valid question.
Last Visit: 31-Dec-99 18:00 Last Update: 2-Jul-22 20:54