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.
Hi everyone, If there is anything you don't understand in what I'm about to explain, feel free to express it, as english is not my mother language.
I'm working on a bus routing problem. I've been reading few papers about vehicule routing problem, network designing and stuff like that, in order to pick the algorithm that will fit the most what I want.
Seems like genetic algorithm is the most used for that kind of problem. However, I don't know if it fits with my specific demand, cause I have less constraints than in the applications covered in the papers, so I was wondering maybe there are "simpler" algorithms out there that can do the job.
Thing is I don't have no constraints regarding traffic or vehicle capacity nor designing the network itself : in fact, my input data are : - Predefined bus lines with all the stops - Distance between each point - Schedules for each lines
So my work consists in determining how much buses do I need to optimize use time and distance for each bus used.
My real question is, should I keep looking into genetic algorithms even if I have less constraints than in the applications of it i've seen, or do you feel that there can be a more effective algorithm.
Hey guys, Im stuck on this algorithm or problem for which I have to come up with a solution and create psuedocode for this. Any help would be appreciated. "The Big British Brass Barrel Consortium (BBBBC) has a lot of barrels (made of brass). Every day they receive a large set of orders from other companies for their barrelling needs. Each company will send them a list of different fluids that they have, for which they need barrels to transport the fluids. The various amounts of fluids will be specified in terms of their volume in cubic metres. The BBBBC have a large stock of barrels and they store the height and diameter of their barrels in a database. Every day they need to work out if they have enough barrels in stock to fulfil the orders. If they don’t then they need to compile a list of the number and capacity of barrels that they’ll need to borrow from their competitors. Propose a solution to solve this problem." Thats what I got to DO! Also, Private messages would be appreciated.
We do not do your HomeWork. HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them. Any failure of you will help your teacher spot your weaknesses and set remedial actions. So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better. When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
Hi there, I am interested in reading about the prediction of schedules/calendars. However, I am pretty sure I am looking for the wrong terminology (often finding papers to do with processor instruction scheduling etc.).
An example of something I want to achieve is: a user is logging each time they exercise during the day and for how long, over time this builds up a past schedule of their exercise routine. Based on that past routine, I would like to predict what the next day's exercise may be like taking into account patterns that emerge (for example, only swimming on thursday afternoons for 1hr).
What should I be looking for? What would this area be called? Any good examples of papers in this area? Thanks for your help!
Hello, For my new project, I have to develop an algorithm called frequency sweep. The function parameters are nFreqStart, nFreqEnd and dSweepTime'. As an example: for nFreqStart = 800Hz, the period T of this signal is 1.25ms, for nFreqEnd = 1600Hz, T is 0.625ms and the sum of all frequencies from nFreqStart to nFreqEnd must not be higher than dSweepTime.
What I don't understand is why you do your first counter.
I guess my first question is: Why are you trying to calculate the frequencies of your CPU, but also how? You're just simply increasing an integer every time it loops?
In your first loop, your initialize, you set the nStep to one less than your frequencies? Literally all I'm seeing is that you are getting the summation of all numbers between 800 and 1600.
If all you need to do is calculate "the computation complexity... O((n-1)! * n2)" then you should do exactly that. But you're not doing that. You're doing: ∑k=18000.001875/k
Instead just set n1 to nFreqEnd - nFreqStart and n2 to nFreqStop - nFreqStart. Then plug it in. I don't understand what O is, but plug that in too. It would be helpful to know what you are returning exactly...
Hello, so I have to write a term paper on the subject of Root sorting. Google doesn't give me anything useful so I am here to ask someone who understands data structures and algorithms to give me some pointers on the subject. As far as I got is that I figured out it has something to do with sorting a binary tree and using the root of a binary tree. Can you please give me some insight on what algorithms should I look for or what book should I read?
Why don't you draw the graph and see which one is closer to the bottom? Basically, these are just the grading system of the algorithms (used to classify the algorithms based on their complexity), to find out which is better as compared to which is not. I personally use only Big O notation (instead of others, lower bounds, both bounds etc. instead of all of that just consider Big O, and draw the graph). Go here and do that, https://www.desmos.com/calculator[^]. The larger that a function grows with each input, the more time and space that it consumes (time and space might be relative to the data source or the algorithm being used). That is why, a better algorithm is the one that doesn't take much time. In my opinion, log (n2) is a better function — look at the slopes that each of them makes.
which of the 2 are dominant
What do you mean by dominant? The better algorithm would have a lower slope as compared to the one with a higher slope (the higher slope one is a bad algorithm depending on the data source).
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
thanks for the link. I assumed that a "dominant" function is equivalent to f = Ω(g), where f is 10 log n. So we are in agreement, since conversely g is O(f), where g is log(n^2). I was simply attempting to use a mathematical approach to prove or disprove.
Given an undirected graph G = (V,E), and an integer k, the cycle-elimination problem is to decide if all the cycles of the graph can be eliminated by deleting at most k edges from the graph. Either show that the problem is NP-complete, or describe a polynomial-time algorithm for it
do you have some ideas for the solution ? shall i reduce the task to Feedback arc set problem ?