For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
In pseudocode, the general C4.5 algorithm for building decision trees is:
1. Check for base cases
2. For each attribute a
2.1. Find the normalized information gain ratio from splitting on a
3. Let a_best be the attribute with the highest normalized information gain
4. Create a decision node that splits on a_best
5. Recur on the sublists obtained by splitting on a_best, and add those nodes as children of node
Apparently you can't be bothered to do your own research because I found a java implementation of C4.5 in about 15 seconds. All you have to do is bother to lift a finger to type "C4.5 java" into Google.
There are 2 types of tiles: Type 1: ** * Type 2: ** (where each star is a square block) Each tile can be rotated or flipped in all ways. There is a box with 2-by-n dimensions. So, for example, if n=10 then the box dimensions are 2 X 10 as shown below. ************ You have infinite supplies of Type 1 and Type 2 tiles. You have to cover the box with the tiles that you have. You can use any number of type 1 tiles and type 2 tiles. You can choose to use all tiles of same type and none tiles of the other type. But you cannot overlap the tiles. Also, when you cover the box with tiles, none of the tiles should be out of the boundaries of the box, and no part of the box should be empty (no block shud be empty). The tiles should perfectly cover the box with no holes and no protrusions. Your task is to write a program in python that will count the number of different ways (configurations) in which u can cover the box with tiles. 2 cofigurations of covering a box are different if the type or orientation (or both) of any tile of those 2 configurations are different. To clarify things further, there are following configurations of the tiles: 1) ** 2) * * 3) ** * 4) ** * 5) * ** 6) * ** If there are 2 tiles in the configuration that are of same type and placed in same orientation, then if you swap the positions of these 2 tiles, it WILL NOT be counted as a different configuration because all tiles of same type and same orientation are identical. Write a program that will accept an input, n, and produce an output, the total number of different configurations to cover the box of dimensions 2 X n. Example: If n=2, output should be 2. Because 1 configuration could be 2 type-1 tiles placed vertically, and another configuration could be 2 type-1 tiles placed horizontally. If n=3, output should be 5
That's a task, not a question. And your post is not a question that fits the purpose of this forum. You didn't ask for an explanation of a specific part of this task, so do you want the whole thing explained in even more words than it already consists of?
I suggest you try a bit harder understanding it and, if needed, come back with a more specific question.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
It would help if you fixed the formatting, but I get the general idea.
Unsurprisingly, it's a tiling problem. There is a rectangle that you have to fill with these shapes, filling it perfectly. Then you have to count in how many distinct ways that can be done, with "distinct" meaning exactly what you'd expect (but they spell it out for good measure).
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.
Last Visit: 31-Dec-99 19:00 Last Update: 26-Apr-15 11:29