Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking to write a program that will generate valid sudoku puzzles. Essentially, a sudoku puzzle is just an 81 digit number. (The blanks are zeroes.) I would then like to use these puzzles in an Android app.

Is there any risk to using randomly generated puzzles in an app? If another app has the same puzzle, am I infringing somehow? All computer data is numbers, so theoretically a random number generator could stumble upon a copyrighted work at some point.

share|improve this question

closed as off topic by MichaelT, World Engineer Apr 28 '13 at 17:04

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Reusing existing collections might be problematic. A random puzzle matching some existing puzzle is certainly no problem. – CodesInChaos Apr 28 '13 at 17:05
Hello and Welcome to Programmers. This question isn't really on-topic here. I'm not sure if it's on-topic anywhere on the network given the localized nature of legal matters and the laws dealing with legal advice in a public space. Talk to a lawyer is the best advice anyone can really give. You might try Ask Patents' chat but I'm not sure that this question would be on topic there either. Have a pleasant day. – World Engineer Apr 28 '13 at 17:06
I am not a lawyer. The output of a "mechanical" process cannot be copyrighted. Copyright requires some creative action to it. Following an algorithm can create a derivative work (the output of flex is derivative of the input) - but what it generates cannot be copyrighted by itself. As I understand it The output of a sudoku puzzle generator, when following an algorithm, cannot be copyrighted (if you construct one by hand, that is a question for lawyers). – user40980 Apr 28 '13 at 17:07
@WorldEngineer I really wasn't sure which site would be best suited for this question. It really is a question about recording the results of an algorithm when those results may be copyrighted. I appreciate the responses. – dangowans Apr 28 '13 at 20:30
up vote 1 down vote accepted

This seems a lot like asking: Should I worry that something I write might have already been copyrighted by someone else?

The answer, of course, is that most people just don't worry about it. If you write something of any length yourself, rather than copying it from somewhere else, then the chance that you're going to write exactly the same thing that someone else did is pretty small. And if it ever does become an issue, you'll probably have some supporting evidence to show that you really did create the work yourself -- notes, books that you read on the topic, etc.

I think the same thing applies to your sudoku generator. The number of possible puzzles that your program could generate is huge: one source I found with a quick search says the number is 6.6709 * 10^21. Now, how many puzzles could have been copyrighted already? Millions, perhaps? Any way you look at it, the probability that someone playing your game happens upon a copyrighted puzzle must be vanishingly small. Also, the work that you are publishing is not a collection of canned puzzles -- it's just an algorithm that generates puzzles. Nobody can say that you copied their work (unless you lifted the code for generating puzzles from someone else).

TL/DR: Don't worry about it.

Also: I'm not a lawyer, and I'm not giving you legal advice here. I'm just pointing out the odds. If you have legal questions or concerns, talk to your own lawyer.

share|improve this answer
It is an interesting question. The digits of an irrational number contain all possible sequences - including the DVD of the latest star wars movie and all possible future star wars movies. So my pi generator must violate Disney's copyright! Although in practice the Disney corp would go after the creator of the universe for setting Pi to be irrational ;-) – Martin Beckett Apr 28 '13 at 19:07
Thanks for the advice. I'm pretty sure it's safe to record the output of an algorithm. I appreciate your insight. – dangowans Apr 28 '13 at 20:27
@MartinBeckett As an aside, only remotely tangentially related to the question and answer at hand, you may find illegal number and illegal prime to be interesting reading. – user40980 Apr 29 '13 at 1:35

IANAL, and you should never use legal advice given to you by a stranger on the internet. If you're at all worried contact a lawyer.

Having said that, I doubt very much that Sudoku is under copyright or that it might be possible to copyright an individual puzzle. What is copyrightable is the method of generation; your algorithm. Ensure you make your own up rather than using someone else's. Unless, of course, it's published with an open source licence.

P.S. I dispute your characterization of Sodoku as an 81 digit number; it's a number puzzle that uses 81 single digit numbers.

share|improve this answer
It's an 81 digit number in a base-9 system expressed with the digits 1-9 rather than 0-8. :-) – Carson63000 Apr 28 '13 at 20:22
@Ben I doubt very much might be possible to copyright an individual puzzle. IANAL either, but I doubt very much that you are correct here. Individual puzzles certainly ARE copyrighted on a regular basis. Good puzzles are usually created by hand, and it'd be hard to argue that they're any less a creative work than a crossword puzzle. What is copyrightable is the method of generation; your algorithm. Again, no. Ideas (algorithms included) can be patented, but not copyrighted. Copyright is for protecting specific expressions of an idea. Maybe things are different in the UK? – Caleb Apr 29 '13 at 3:07
@Caleb - I think totally different: once the Sudoku rules are fixed, there exist so many valid puzzles, and everyone is free to find them and write them actually down. You wouldn't argue that certain right-angeled triangles could be patented, or certain prime numbers (though, finding them gets harder and harder as the numbers grow). – Ingo Apr 29 '13 at 9:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.