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.
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.
Richard, could you be so kind and direct me to where I can find what I am looking for, rather then just a question? This is my first attempt and I don't want to be wasting anyone's time. I would appreciate your help, thank you.
Oops! I don't really think this is hacking. This is something which is not ilegal because if you ask operators for the unlock code, they will give you but sometimes they want you to use their service for a long time and they will delay your time. Perhaps, I want to start with modem and later learn the ones for phones that are shipped outside their country of operation since some of these phones come to my country and some become useless because the relatives of those who shipped the phones have no knowledge of this.
Unlocking with any means is not ilegal. Please check your laws and the meaning of hacking and compare them if they have a link. There is a calculator for that but it is online and I want to do this to help people who do not have internet connectivity always get the chance of calculating unlock codes.
Please understand this is not for my own selfish need. I just want to put my programming skills into use by helping those people. Unlocking is neither ilegal nor hacking.
Thank you for your suggestion but I don't really think they are going to give out that. If so, they are going to ask me for product details or question to verify I have bought from them which I don't have because when I use their products, I buy them from retailers who are not accredited dealers. Buddy, if you know this just help me out if you don't know too let me know.