Programmers: Is this puzzle a "named problem?" and can you help me with it?

1 Answer

Answer :

I’d call it “enumerating a list of all combinations”. There’s a field of math called “combinatorics” which I did not study but I assume probably has a word for this. It doesn’t seem like a puzzle so much as a task. It quickly becomes a massive amount of work with massive output if you have more and more values, because they all multiply together to get the number of possible combinations. i.e. nCombinations = nFOOs x nBARs x nBAZs… Your approach sounds fundamentally correct. The tree analogy is a nice visual metaphor, but I think it will be simpler to program it without thinking of it. That is, I think you can “just” do a recursion. Make a function that takes such a list as input, and what it does is goes through every value for the first key, writes the key and each value in turn, followed by the output of a call to that same function, called with a list of all the key/values except the first one that is being iterated by the current execution. ... Er… I suppose you also need to take a parameter for the previous text to repeat for each iteration, and tweak it to get the output format you want, but that’s essentially it, I think.

Related questions

Description : Any programmers willing to help me solve a triangle?

Last Answer : Are you sure whether your language is using degrees vs. radians for the angle?

Description : Any Python programmers willing to help me find a bug?

Last Answer : Anything for the sake of science. I will look at the code and see if I can find the bug. As I understand it, you want to find the number of distinct locus values. By just looking at the csv ... just how the parsing is supposed to work. Also, what is the calling sequence to get the program started?

Description : Hey programmers, can you direct me to site similar to stackoverflow?

Last Answer : stackexchange.com is gaining traction.

Description : Programmers: Thoughts on this AI game where you fight via code?

Last Answer : answer:Hmm. Cool, but so far I’m stuck on the tutorial with some sort of error: > Game.mothership.moveTo(1,0) undefined

Description : Why does Microsoft make it so hard for programmers to call their application programs?

Last Answer : Have you explored Entity Framework 4.0/4.1? I have played around with it and it looks promising.

Description : Object-oriented programmers: what is your process when you're physically coding?

Last Answer : answer:What language are you coding in? In .net there are interfaces, that I have found to be very useful. I don;t remember whether Java has anything similar. With interfaces you can avoid the ... to be able to test as I go along. This frequently leads to initial concentration on auxiliary modules.

Description : How do you find talented programmers to build a website?

Last Answer : You look at their portfolio and check out some of their previous customers. Preferably, you have someone with some technical knowledge help you with the evaluation.

Description : Roughly how much do programmers change to create Apps for iPhone/iPad? Does the client get the coding?

Last Answer : My son has developed apps directly for Apple; not through a company. If his experience might be relevant to you @Dog, PM me and I will talk to him.

Description : Computer programmers: if you had to make a music video of the beauty/elegance of your thought process, what music and visuals would you pick?

Last Answer : answer:There are many aspects to programming, and so it's hard to come up with an analogy that fits them all. I used to write a fair amount of poetry in what feels like a former life. ... They have some actions which are public facing, and others that are strictly private and not exposed to others.

Description : Is there a website equivalent to fluther but dedicated to programmers and developers?

Last Answer : There is a paid service called expert’s exchange which has always looked promising.. though I’ve never paid so I’m not sure.

Description : Programmers: I'm in the mood to learn a new language. Which one should it be?

Last Answer : Perl. Hubby says it makes business application easier to program.

Description : For Programmers: What resources can you offer to someone learning C?

Last Answer : try this link: http://www.programmingtutorials.com/ also i've found the for dummies series to be helpful on many topics and i know they have a unit on c (includes a cd with compiler if i ... should ensure you're leaning the right flavor of c. there are many books available on the topic. good luck

Description : What do contract Ruby on Rails programmers get paid?

Last Answer : Where? A reasonably qualified Rails developer in New York City or the San Francisco Bay area can expect to make significantly more than a reasonably qualified Rails developer in rural Iowa.

Description : Can you help fix this programming problem in Python?

Last Answer : You can’t treat arrays of digits as a single number. The easiest way to read a numeric string is to use the sys library to read a line from the keyboard. import sys print(“Enter value for mass”) mass = sys.stdin.readline() mass = float(mass)

Description : PHP problem with && and possibly a malfuntioning array?

Last Answer : answer:Unfortunately the examples above don't really shed a lot of light without some additional information. Maybe we can help with some troubleshooting tips in general? A couple of things that come to mind ... is where you're expecting it. Good luck with it, I hope it all comes together.

Description : How to solve this problem I have with a restore (backup) file I made in SQL Server 2008?

Last Answer : try to see if you have volume optimization enabled, it prevents certain changes from happening and really gives the user a hell of alot more trouble than it is worth.

Description : Geometry Gurus. Can you help me solve for an angle?

Last Answer : answer:The simplest solution would indeed be to have an IF ELSE statement there and have two separate cases depending on whether (RadialPointY - CenterPointY) is positive (@Angle < 180) or ... values it actually is cannot be determined without some sort of test of (RadialPointY - CenterPointY).

Description : Hey mathematicians, would you like to help me find patterns between rolling ball clocks?

Last Answer : answer:I read the article & watched the video, but I don't get it. It takes 27 balls to display 12:59 (12 balls on the hours rack, 11 on the 5-min, 4 on the 1-min). But ... there are no simple rules among the numbers you've compiled. In other words, your algorithm might be its shortest description!

Description : Can you help me find an App that can help one make App's? (any platform, including pen and paper, details inside)

Last Answer : answer:I'm not sure if it's quite what you're looking for, but my buddy makes AppCooker. You can use it with AppTaster to create mockups and make them play. I can't speak to their efficacy personally because ... charge $75-125/hour. If that's the route you end up wanting to take, feel free to PM me.

Description : Can somebody help me finding e-books to download for programming for MIT, Oxford, Harvard etc?

Last Answer : answer:“MIT OpenCourseWare makes the course materials that are used in the teaching of almost all MIT’s undergraduate and graduate subjects available on the Web, free of charge” http://web.mit.edu/ocw/

Description : Can you help me find some useful Wordpress plugins?

Last Answer : just to be sure you’ve checked wordpress plugins page right? you want each post to turn like a page? i think you would need to make that specially with either flash or ajax or something.

Description : Can anyone help me with some CSS?

Last Answer : How is it jumbled? Often for IE i use a second stylesheet and apply it using : < ![endif]—> The first one is your first stylesheet, the second is a stylesheet that only fixes the things that are bad in IE.

Description : MySQL help!

Last Answer : answer:You spelled “propeller” wrong, for one thing. Table SERVICE_REQUEST has a primary key, SERVICE_ID, which is a DECIMAL field. In your attempt to load the table with the error record, the secondary key value you attempted to insert for SERVICE_ID, ‘7’ is a CHAR value. That’s a show-stopper.

Description : I understand what the PL/SQL code below is supposed to do, but when I run the code, it won't compile. Can anybody help with why this is so?

Last Answer : answer:PL\SQL really isn’t my thing, but I believe you need something between the first IF statement and the ELSIF. What do you want it to do with the number if it is 50 or 90?

Description : Does anyone here have experience working with PL/SQL? I need some help getting started...

Last Answer : answer:PL/SQL is Oracle's take on SQL. It's mostly vanilla SQL, but with some Oracle-specific twists. You need Oracle SQL Developer or something similar. I doubt other relational ... more closely resembling a true object-oriented language, so make sure you get something Oracle-specific!.

Description : Excel spreadsheet help (formulas)

Last Answer : Which version of excel are you using? In 2010 it has a square root function which is =sqrt(CellNameHere). Also as far as the second problem with the multiplication table can you not just use the cell name for example =$B$1*A2 and then drag it down?

Description : How to use cron in ruby on rails (2.3.5). Please help?

Last Answer : answer:At the UNIX prompt, type man crontab and help documentation will appear. - Crontab is the interface you use to schedule jobs in cron. It launches a basic text editor - usually vi but anything you want - and you enter in one ... . 30 21 * * 3 /path/to/maintenance.sh # #---------------------

Description : Help with a basic Java program?

Last Answer : answer:just a guide, don’t know java correct the syntax and stuff and this should be your loop. INPUT=B for(A=1; A=0; a=a-1){ print/echo/say ”*”; } print linebreak// } for(A=B; A=>0; A=A-1){ for(a=A; a=>0; a=a-1){ print/echo/say ”*”; } print linebreak// }

Description : Help assignment of Linear Programming?

Last Answer : answer:It's just a means of solving problems when there are apparently too many variables to otherwise make sense of the situation with a simple algebraic solution. The problem needn't be complex, it only ... and how to set up the problem, see the site: http://www.purplemath.com/modules/linprog3.htm

Description : Did Network TV Programming Strategy help cable clean their clocks?

Last Answer : answer:They do something really, really stupid - they split the crowd. This is something I'm trying to help a few bar owners I know figure out. When there's a local metal show at Bar 1, ... worried about not letting each other make a decent profit, they're cutting their own profit in the process!

Description : Help with an error I am getting in VBA?

Last Answer : You might not have used selection with proper object. You can check it out in object browser (View->Object Browser) if the object you've used has that property/method or not. For example, if you are trying to ... block, make sure you end it with End With . Example: With Cells(1,1) .Value=1 End With

Description : Javascript help, please?

Last Answer : any ideas, anyone?

Description : [PHP] Forgot Password Help?

Last Answer : You could try using the built in PHP crypt() function, you pass the string and a salt you want to encrypt, then to decrypt it use the decrypt() function and the same salt. That should give you the same password back. Though really you should try to push for a randomly generated password on reset.

Description : Excel Help - Macros question?

Last Answer : this is the first post on here that i have not gotten a response for within minutes…I am shocked! Have a stumped your guys?

Description : Mail.app crashing at launch. Help, please?

Last Answer : I would run disc utility and fix permissions then reboot

Description : Help With Tumblr (Disqus Comments)

Last Answer : I just ran into this same problem. I don’t suppose you know the answer yet…

Description : I have filled in all the information. Finally the invoice is something. Then comes the merchant number and bKash personal number. And with the reference number is coming. How can I make the payment. Help! ?

Last Answer : I think you want to buy something hosting or domain type , if so you take their personal number from your provider. Then send money by developing that number. And give the number from which you sent the money to their live support. They will pay the payment.

Description : Describe re-entrant procedure with the help of schematic diagram.

Last Answer : Re-entrant Procedures: A procedure is said to be re-entrant, if it can be interrupted, used and re-entered without losing or writing over anything. To be a re-entrant, Procedure ... program execution flow reenters in the procedure1. These types of procedures are called reentrant procedures.

Description : Function or application allowing me to connect or disconnect wifi?

Last Answer : Some routers - Belkins and older Ciscos, had an app that would allow you to remotely-control your router from your phone. You didn't say what kind of router you have, so it's hard to guess. You can ... . Bottom line - you can do this easily if you have a wifi-based power switch and an app. example

Description : Can anyone tell me what kind of program is used by the Polyglot Project?

Last Answer : I don’t get your question. Are you asking what programming language is being used?

Description : What textbooks will teach me about the programming aspect of games?

Last Answer : answer:I don't know squat about game design, but I would be very surprised if at least some of their textbooks aren't standard books about programming and algorithms. It seems to me that ... game designer / Jim Thompson, Barnaby Berbank-Green, Nic Cusworth Fundamentals of Game Design / Ernest Adams

Description : Is there somewhere where I can have someone look at my code and give me suggestions on how to make it better?

Last Answer : There are dozens of PHP forums on the web where you can submit things like that. Just search for PHP community or PHP forum. Most web design forums and communities will have an area for programming ... own forums as well. Just post a thread showing your code and asking for whatever help you need.

Description : Which of the Following problems can be modeled as CSP? a) 8-Puzzle problem b) 8-Queen problem c) Map coloring problem d) All of the mentioned

Last Answer : d) All of the mentioned

Description : A problem solving approach works well for ______________ a) 8-Puzzle problem b) 8-queen problem c) Finding a optimal path from a given source to a destination d) Mars Hover (Robot Navigation)

Last Answer : d) Mars Hover (Robot Navigation)

Description : Application software A. is designed to help programmers B. is used to control the operating System C. performs specific task for computer users D. is used for making design only

Last Answer : C. performs specific task for computer users

Description : Salesforce SDK uninstallation from XCode?

Last Answer : Too many variables – only you know your code, how it was written, and how extensible (or not) it was in the first place. I assume you have been to the Saleforce API and SDK pages.

Description : Is there a program where you can identify music in a specific website?

Last Answer : Need Answer

Description : What is a good programming language to make a multiple choice quiz?

Last Answer : Google classroom should work.

Description : Is there a website that shows all the English words, idioms, etc ever invented, including archaic, unofficial, and newest words that have just been invented?

Last Answer : The problem with such a lexicon would be that there have been a lot of slang, dialect, idioms, and unofficial words that 99% of people have never heard of. Besides that, the English language is ... pretty good vocabulary. Hopefully, someone will recommend some. I am unable to do this at the moment.

Description : How can I add HTML markup to this ajax result?

Last Answer : Need Answer