problem-solving

Blogs to freshen up my math (in practice)

My question, his question, but blogs as resources to be specific. I find blogs great to keep up to date... refresh material... So do you know any blogs who tackle math-related programming problems... ...

What is the most challenging technical problem you've solved in your life?

One of the greatest joys (and hardest things to convey to non-programmers) is the feeling of exhilaration we often get when we finally get that "aha!" moment working on a tough problem - then we go implement it and it works magically. I've been thinking about some of my favorite challenges and how I eventually solved them - I think it wo...

Number of arrangements

Suppose we have n elements, a1, a2, ..., an, arranged in a circle. That is, a2 is between a1 and a3, a3 is between a2 and a4, an is between an-1 and a1, and so forth. Each element can take the value of either 1 or 0. Two arrangements are different if there are corresponding ai's whose values differ. For instance, when n=3, (1, 0, 0) and...

What problems could be solved using Genetic Programming?

Today I read this blog entry by Roger Alsing about how to paint a replica of the Mona Lisa using only 50 semi transparent polygons. I'm fascinated with the results for that particular case, so I was wondering (and this is my question): how does genetic programming work and what other problems could be solved by genetic programming? ...

How important is diversity in a team of programmers?

Lots of companies have "diversity" as one of their goals. I.e. people from a wide variety of backgrounds. The idea being that different backgrounds will result in different ways of approaching problems and the result will be better solutions. How much is this true in practice? Do you find it is good to have teams consisting of people fr...

Troubleshooting "program does not contain a static 'Main' method" when it clearly does...?

My MS Visual C# program was compiling and running just fine. I close MS Visual C# to go off and do other things in life. I reopen it and (before doing anything else) go to "Publish" my program and get the following error message: "Program C:\myprogram.exe does not contain a static 'Main' method suitable for an entry point" Huh? Yes i...

What is your most useful programming related website?

Which is your most useful and important website for programming? I don't want to know which website you visit daily like discussed here, but where do you go to get your programming problems solved? (Except stackoverflow, of course) ...

"Solving Business Problems" Dev Competitions - Do They Exist?

G'day All. First time question-asker. A recent question (http://stackoverflow.com/questions/505404/what-are-good-programming-competitions) asked about good programming competitions. This got me thinking. My question is, What competitions exist for the Solving of Business Problems? Yeah, I know Real Life is the actual competition, but...

Best way to solve a distance problem

There are a set of point that are collinear. The problem is to add a new point that lies in the same line so that sum of distance from the new point to existing points is minimum. (Assume that the point lies in a horizontal line). The solution I thought of is: Sort the points according to their x-coordinates (y does not matter anyway)...

Efficient solution for a special assignment problem

Given: -A set of items that each have costs for being placed into a given container type. -A set of container types that each have a number of available containers. Example: Amount*Container-Type : 5 * A, 3 * B, 2 * C Items(Costs) : 3 * X (A=2, B=3, C=1) 2 * Y (A=5, B=2, C=2) 1 * Z (A=3, B=3, C=1) Problem: Find the best placem...

Is there really a "Best" way of solving a problem?

I have been looking at a lot of these questions asking for the "best" way to do this or the "best" way to do that. Does one person's best way make it every person's best way? Can there really be a "best" way to do a particular algorithm or to solve a problem? What are the dangers of looking for a best way over just getting the probl...

Programming an algebra equation.

Hi, in another post, MSN gave me a good guide on solving my algebra problem (http://stackoverflow.com/questions/639215/calculating-bid-price-from-total-cost). Now, even though I can calculate it by hand, I'm completely stuck on how to write this in pseudocode or code. Anyone could give me a quick hint? By the way, I want to calculate th...

Does being a programmer make you a better problem solver?

I looked for this question and could not find it. If this happens to be a duplicate, please let me know and I will take care of it. Whenever my girlfriend has an issue (be it minor or major) she always comes to me first, no matter what it is. Last night she asked me for help on something and I couldn't figure out the solution. She said ...

Are there any strategies to avoid satisficing?

Satisficing (a portmanteau of "satisfy" and "suffice") is a decision-making strategy which attempts to meet criteria for adequacy, rather than to identify an optimal solution. A satisficing strategy may often be (near) optimal if the costs of the decision-making process itself, such as the cost of obtaining complete information, are c...

Have you ever derived a programming solution from nature?

When you step back and look at ... the nature of animals, insects, plants and the problems they have organically solved perhaps even the nature and balance of the universe Have you ever been able to solve a problem by deriving an approach from nature? I've heard of Ant Colony Algorithms being able to optimize supply chain amongst o...

Trim string to length ignoring HTML.

This problem is a challenging one. Our application allows users to post news on the homepage. That news is input via a rich text editor which allows HTML. On the homepage we want to only display a truncated summary of the news item. For example, here is the full text we are displaying, including HTML In an attempt to make a b...

Riddle: The Square Puzzle

Last couple of days, I have refrained myself from master's studies and have been focusing on this (seemingly simple) puzzle: There is this 10*10 grid which constitutes a square of 100 available places to go. The aim is to start from a corner and traverse through all the places with respect to some simple "traverse rules" and reach n...

Linear Time Voting Algorithm. I don't get it.

As I was reading this (Find the most common entry in an array), the Boyer and Moore's Linear Time Voting Algorithm was suggested. If you follow the link to the site, there is a step by step explanation of how the algorithm works. For the given sequence, AAACCBBCCCBCC it presents the right solution. When we move the pointer forward...

Dining Philosophers problem - A Clarification needed

Recently I read this Wikipedia article regarding the Dining Philosophers problem but I am not clear with Chandy / Misra solution. According to the article, "When a philosopher with a fork receives a request message, he keeps the fork if it is clean, but gives it up when it is dirty." In the context of this question, he passes it if he i...

Can abstract thinking be taught?

I broke some of the cardinal rules for hiring and am now stuck with a fairly 'bad' hire. My biggest concern is that the person's abstract thinking is really weak. So, my question is do you guys think abstract thinking can be taught? And if so how? Or should I start preparing an exit strategy? I'm sure some of you guys have been caught ...