text:
Find the next 1-sparse binary number
A positive integer N is K-sparse if there are at least K 0s between any two consecutive 1s in its binary representation.
So, the number 1010101 is 1-sparse whereas 101101 is not.
Your task is to find the next 1-sparse number for the given input number. For example, if the input is 12 (0b1100) output should be 16 (0b10000) and if the input is 18 (0b10010) output should be 20 (0b10100).
Smallest program or function (in bytes) wins! Standard loopholes disallowed.

“next” as in “next highest” or as in “with least absolute difference” ?

"next" as in "next highest".

What range of input needs to be handled?

I'm going to assume negative numbers don't need to be.

@articuno Can we create a function, or does it have to be a full program? Functions are pretty standard.

@mbomb007 you can use standard functions

Pyth, 9 bytes

Borrowing the x & (x*2) != 0 algorithm from @alephalpha
Borrowing Pyth boilerplate from @Jakube

My first attempt at Pyth:
f!.&TyThQ

Try it here
               implicit: Q = input()
f      hQ      find the first integer T >= Q + 1,
               that satisfies the condition:
 !.&TyT        T & (T * 2) is 0

CJam, 14 11 bytes
3 bytes saved thanks to DigitalTrauma.
l~{)___+&}g

Test it here.
Explanation
l~          "Read and eval input.";
  {      }g "Do while...";
   )_       "Increment and duplicate (call this x).";
     __+    "Get two more copies and add them to get x and 2x on the stack.";
        &   "Take their bitwise AND. This is non-zero is as long as x's base-2
             representation contains '11'.";

This leaves the last number on the stack which is printed automatically at the end of the program.

Python 2, 44 bytes
This is a complete python program that reads in n, and prints the answer. I think it does quite well in the readability sub-competition.
n=input()+1
while'11'in bin(n):n+=1
print n

The test results:
$ echo 12 | python soln.py
16
$ echo 18 | python soln.py
20

Pyth, 12 11 bytes
f!}`11.BThQ

Try it online: Pyth Compiler/Executor.
               implicit: Q = input()
f        hQ    find the first integer T >= Q + 1,
               that satisfies the condition:
 !}`11.BT         "11" is not in the binary representation of T

You can save a character by turning "11" into \11`.

@orlp Thanks, should have noticed this.

Mathematica, 41 30 bytes
Saved 11 bytes thanks to Martin Büttner.
#+1//.i_/;BitAnd[i,2i]>0:>i+1&

Could you add a description, please?

Perl, 31
#!perl -p
sprintf("%b",++$_)=~/11/&&redo

Or from the command line:
 perl -pe'sprintf("%b",++$_)=~/11/&&redo' <<<"18"

J, 20 characters
A monadic verb. Fixed to obey the rules.
(+1 1+./@E.#:)^:_@>:

Explanation
First, this is the verb with spaces and then a little bit less golfed:
(+ 1 1 +./@E. #:)^:_@>:
[: (] + [: +./ 1 1 E. #:)^:_ >:

Read:
    ]                             The argument
      +                           plus
        [: +./                    the or-reduction of
               1 1 E.             the 1 1 interval membership in
                      #:          the base-2 representation of the argument,
[: (                    )^:_      that to the power limit of
                             >:   the incremented argument

The argument plus the or-reduction of the 1 1 interval membership in the base-2 representation of the argument, that to the power limit applied to the incremented argument.

I basically compute if 1 1 occurs in the base-2 representation of the input. If it does, I increment the input. This is put under a power-limit, which means that it is applied until the result doesn't change any more.

Nice algorithm! It has the same length in APL: {⍵+∨/2∧/⍵⊤⍨⍵⍴2}⍣=.

@randomra Ah, I see.

APL, 18 bytes
1∘+⍣{~∨/2∧/⍺⊤⍨⍺⍴2}

This evaluates to a monadic function. Try it here. Usage:
   1∘+⍣{~∨/2∧/⍺⊤⍨⍺⍴2} 12
16

Explanation
1∘+                    ⍝ Increment the input ⍺
   ⍣{            }     ⍝ until
     ~∨/               ⍝ none of
        2∧/            ⍝ the adjacent coordinates contain 1 1 in
           ⍺⊤⍨⍺⍴2      ⍝ the length-⍺ binary representation of ⍺.

Javascript, 25 19
Using the fact that, for a 1-sparse binary number, x&2*x == 0:
f=x=>x++&2*x?f(x):x

JavaScript (ES6), 39 43
No regexp, no strings, recursive:
R=(n,x=3)=>x%4>2?R(++n,n):x?R(n,x>>1):n

Iterative version:
F=n=>{for(x=3;x%4>2?x=++n:x>>=1;);return n}

It's very simple, just using right shift to find a sequence of 11. When I find it, skip to next number. The recursive version is directly derived from the iterative one.
Ungolfed and more obvious. To golf, the trickiest part is merging the inner and outer loops (having to init x to 3 at start)
F = n=>{
  do {
    ++n; // next number
    for(x = n; x != 0; x >>= 1) {
      // loop to find 11 in any position
      if ((x & 3) == 3) { // least 2 bits == 11
        break;
      }
    }
  } while (x != 0) // if 11 was found,early exit from inner loop and x != 0
  return n
}

This %4>2 looks like some sorcery from Number Theory, can you please explain || provide a link?

@Jacob (x%4>2) is simply ((x&3)==3), but with the operator precedence is JS you avoid the 2 brackets

Simple than I thought. Now with the ungolfed version it's clear. Thanks!

Python 2, 37 bytes
f=input()+1
while f&2*f:f+=1
print f

Used the logic x & 2*x == 0 for 1-sparse number.
Thanks to @Nick and @CarpetPython.

Why the downvote? This works perfectly fine, and is well-golfed as well.

Welcome to PPCG, btw, and nice first answer! I encourage you to continue answering challenges on the site :-)

JavaScript, 75 66 62 bytes
Thanks to Martin Büttner for saving 9 bytes and Pietu1998 for 4 bytes!
function n(a){for(a++;/11/.test(a.toString(2));a++);return a;}

How it works: it runs a for loop starting from a + 1 as long as the current number is not 1-sparse, and if it is, the loop is interrupted and it returns the current number. To check whether a number is 1-sparse, it converts it to binary and checks whether it does not contain 11.
Un-golfed code:
function nextOneSparseNumber(num) {
    for (num++; /11/.test(num.toString(2)); num++);
    return num;
}

Julia, 40 bytes
n->(while contains(bin(n+=1),"11")end;n)

This creates an anonymous function that accepts a single integer as input and returns the next highest 1-sparse integer. To call it, give it a name, e.g. f=n->..., and do f(12).
Ungolfed + explanation:
function f(n)

    # While the string representation of n+1 in binary contains "11",
    # increment n. Once it doesn't, we've got the answer!

    while contains(bin(n += 1), "11")
    end

    return(n)
end

Examples:
julia> f(12)
16

julia> f(16)
20

Suggestions and/or questions are welcome as always!

Python, 39 33 bytes
Try it here: http://repl.it/gpu/2
In lambda form (thanks to xnor for golfing):
f=lambda x:1+x&x/2and f(x+1)or-~x

Standard function syntax turned out to be shorter than a lambda for once!
def f(x):x+=1;return x*(x&x*2<1)or f(x)

You can shorten the lambda one to 33 bytes: f=lambda x:1+x&x/2and f(x+1)or-~x. It turns out that of you bit-shift right rather than left, you can use x/2 instead of (x+1)/2 because the difference is always in zero bits of x+1. The spec asks for a program though.

I asked and he said we can do functions. Most of the answers are already.

><> (Fish), 31 + 3 = 34 bytes
1+:>:  4%:3(?v~~
;n~^?-1:,2-%2<

Usage:
>python fish.py onesparse.fish -v 12
16

3 bytes added for the -v flag.

JavaScript (ECMAScript 6), 40
By recursion:
g=x=>/11/.test((++x).toString(2))?g(x):x

JavaScript, 56
Same without arrow functions.
function f(x){return/11/.test((++x).toString(2))?f(x):x}

Scala, 65 bytes
(n:Int)=>{var m=n+1;while(m.toBinaryString.contains("11"))m+=1;m}

(if a named function is required, solution will be 69 bytes)

Java, 33 bytes.
Uses the method in this answer
n->{for(;(n++&2*n)>0;);return n;}

TIO

Vyxal, 6 bytes
λd⋏[›x

Try it Online!
How?
λd⋏[›x
λ      # Open a lambda for recursion
 d     #  Double
  ⋏    #  Bitwise AND the doubled input with the input
   [   #  If this is truthy (non-zero):
    ›x #   Increment and recurse

C (32 bytes)
f(int x){return 2*++x&x?f(x):x;}

Recursive implementation of the same algorithm as so many other answers.

Ruby, 44
->(i){loop{i+=1;break if i.to_s(2)!~/11/};i}

Pretty basic. A lambda with an infinite loop and a regexp to test the binary representation. I wish that loop yielded and index number.

Matlab (77 74 bytes)
m=input('');for N=m+1:2*m
if ~any(regexp(dec2bin(N),'11'))
break
end
end
N

Notes:

It suffices to test numbers m+1 to 2*m, where m is the input.
~any(x) is true if x contains all zeros or if x is empty

Perl, 16 bytes
Combining the x&2*x from various answers (I think Nick's first) with nutki's redo yields:
perl -pe'++$_&2*$_&&redo'

Tested in Strawberry 5.26.

Japt, 8 bytes
_&ZÑ}fUÄ

Run it online.

Jelly, 7 bytes
‘&Ḥ¬Ɗ1#

A full program accepting a single, non-negative integer which prints a positive integer (as a monadic link it yields a list containing a single positive integer).
Try it online!
How?
Starting at v=n+1, and incrementing, double v to shift every bit up one place and bit-wise AND with v and then perform logical NOT to test if v is 1-sparse until one such number is found.
‘&Ḥ¬Ɗ1# - Main Link: n   e.g. 12
‘       - increment           13
     1# - 1-find (start with that as v and increment until 1 match is found) using:
    Ɗ   -   last three links as a dyad:
  Ḥ     -   double v
 &      -   (v) bit-wise AND (with that)
   ¬    -   logical NOT (0->1 else 1)
        - implicit print (a single item list prints as just the item would)

Stax, 5 bytes
╦>ù╤x

Run and debug it
It works using this procedure.  The input starts on top of the stack.

Increment and copy twice.
Halve the top of the stack.
Bitwise-and top two elements on the stack.
If the result is truthy (non-zero) repeat the entire program.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Generate MathJax for the Golden Ratio Continued Fraction
In anticipation of MathJax being temporarily disabled, the rendered MathJax in this question has been replaced with images. You are still welcome to post answers but you'll have to view the rendered MathJax on another site.
PPCG just got MathJax! This means we can now easily include well formatted mathematical formulas into posts. (Handy MathJax tutorial.)
For example, here is the golden ratio expressed as an infinite continued fraction:

The MathJax code for this equation is
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$
You can find this by right clicking the formula and following Show Math As → TeX Commands.
The $$ means it is displayed on its own in the center of the page instead of inline. Use a single $ for inline.
Challenge
Write a program that takes in a non-negative integer, n, and outputs the MathJax code for that many "steps" of the continued fraction for the golden ratio.
To keep things standard across answers, you must use this exact MathJax syntax:

For n = 0, the output must be $$\varphi=1+\dots$$.
Which is rendered as:

For n = 1, the output must be $$\varphi=1+\cfrac1{1+\ddots}$$.
Which is rendered as:

For n = 2, the output must be $$\varphi=1+\cfrac1{1+\cfrac1{1+\ddots}}$$.
Which is rendered as:

For n = 3, the output must be $$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$.
Which is rendered as:

This pattern continues on for larger n. You could say that n represents the number of division lines in the equation.
Notes

\cfrac is used instead of the more common \frac.
\dots is used instead of \ddots for n = 0.
Take input from stdin or the command line.
Output to stdout (with an optional trailing newline).
Alternatively, you may write a function that takes in n as an integer and returns the MathJax code as a string (or still prints it).

Scoring
The smallest submission in bytes wins. Tiebreaker goes to the earlier submission.

Just a note to those wanting to run the stack snippet: Like many (most?) stack snippets, this doesn't work in Safari.

The stack snippet doesn't work when you type stuff... it gives Uncaught ReferenceError: textbox is not defined

@soktinpk That's strange, I'm having the same problem. But the snippet over here works even though it's the exact same... Here's an external byte counter in case.

MathJax has been reenabled for PPCG!

CJam, 51 50 bytes
$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

Code explanation:
"$$\varphi=1+"             "This is a static string";
  "\cfrac1{1+"ri:R*'\      "Repeat this string input number times. Put a \ at the end";
    "ddots"R!>             "If input is 0, remove 1st characters, else not";
      '}R*                 "Put the closing bracket R times";
        '$_                "The final $$";

Few examples:
N = 0
$$\varphi=1+\dots$$

N = 4
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$

N = 15
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}}}}}}}}}}}$$

UPDATE - 1 byte saved thanks to Sp3000!
Try it online here

A little shuffling gives 50: "$$\varphi=1+""\cfrac1{1+"ri:R*'\"ddots"R!>'}R*'$_

I didn't look at your answer at all - just coincidence. Either way, your 49 byte Pyth solution is 50 bytes in reality, because you have to escape \v to \\v.

@orlp and that is why I rolled back as there was no potential benefit in that solution being present here as well.

Python, 70 68 67 bytes
lambda n:"$$\\varphi=1+\%sdots%s$$"%("cfrac1{1+\\"*n+"d"[:n],"}"*n)

This defines an anonymous function which just uses simple string multiplication and string formatting.
(Thanks to @xnor for pointing out that \\c can just be written as \c, since c can't be escaped. Unfortunately this doesn't hold true for \\v, since \v is ASCII 11.)
Previous attempts:
lambda n:"$$\\varphi="+"1+\\cfrac1{"*n+"1+\\"+"ddots"[n<1:]+"}"*n+"$$"
lambda n:r"$$\varphi=%s1+\%s$$"%("1+\cfrac1{"*n,"ddots"[n<1:]+"}"*n)

You beat me by 14 seconds! Also 70 chars.

I think this works without using a double \ before cfrac.

@xnor Seems like it, thanks! And sorry for taking the Python golfs all the time...

Nah, I've stolen my fair share of races to post from you.

Julia, 76 73 bytes
n->("\$\$\\varphi=1+"*"\\cfrac1{1+"^n*"\\"*"d"^(n>0)*"dots"*"}"^n*"\$\$")

This creates a lambda function that takes a single integer as input and returns the MathJax as a string. To call it, give it a name, e.g. f=n->....
Unfortunately both backslashes and dollar signs have to be escaped in Julia strings because they both have special meaning. String concatenation is performed using * and string repetition with ^.
Examples:
julia> f(0)
"$$\varphi=1+\dots$$"

julia> f(4)
"$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$"

Suggestions are welcome as always!

Edit: Saved 3 bytes thanks to plannapus!

"d"^(n>0) instead of (n>0?"d":"") would make it shorter.

@plannapus: I don't understand what your name means but you're a genius! I had forgotten that "string"^0 was legit.

you're welcome. My pseudonym is the name of a radiolarian genus, being myself a radiolarian paleontologist. It translates to "flattened turnip" i think :)

I am waiting for a BF answer=)

@flawr: I hope you're not waiting on me for that...

><>, 89 86 + 3 = 89 bytes
:&"$$"{\l?!;o70.
}-1v!?:<{"}"
&:&\~"stod"&:&?:
{1->:?!v}"\+1{1carfc"
rav\$$"\~"\+1=ihp

Run with the -v flag, e.g.
py -3 fish.py program.fish -v 3

Surprisingly ><> doesn't do too badly here, since we can mimic string multiplication by having a counter which we decrement every iteration.
:&"$$"{\                     Put n into the register and push "$$"
}-1v!?:<{"}"                 Push n "}"s
&:&\~"stod"&:&?:             Push "stod", and copy the final "d" if n != 0
{1->:?!v}"\+1{1carfc"        Push n "\+1{1carfc"s
rav\$$"\~"\+1=ihp            Push "\+1=ihprav\$$"
       \l?!;o70.             Keep printing chars until the stack is empty

(-3 bytes thanks to @randomra)

Two small improvements for 3 bytes (at the end of line 1 and line 3): http://pastebin.com/wEbKhuUH

Hah the first and last line mirrors match up, didn't notice :P

Retina, 160 + 7 = 167 bytes
;`.+
$$$$\varphi=1+\dots#$0$$$$

;+(\d*)#(?:(((((((((9)|8)|7)|6)|5)|4)|3)|2)|1)|0)
$1$1$1$1$1$1$1$1$1$1$2$3$4$5$6$7$8$9$10#
    ;#
;+`\\d?dots\d(\d*)
\cfrac1{1+\ddots$1}

Each line goes into a separate source file, so I've added 1 byte for each file after the first. However, for convenience, Retina now also supports the -s command-line flag, which allows you to put all of this into a single file (in which case the newlines are treated as file separators).
The largest part of the code (98 bytes) is used to convert the input from decimal to unary (files 3 to 6). The basic idea of the code is to surround the input in $$\varphi=1+\dots...$$, then convert the input to unary, and then expand \dotsN or \ddotsN to the next level of the continued fraction (while reducing N to N-1).

T-SQL, 229 227 138
Been a while since I did an SQL answer and as always it's very verbose.
Edit Of course I over complicated it and didn't need a recursive query at all.
CREATE FUNCTION A(@ INT)RETURNS TABLE RETURN SELECT'$$\varphi=1+\'+REPLICATE('cfrac1{1+\',@)+IIF(@>0,'d','')+'dots'+REPLICATE('}',@)+'$$'S

Original
CREATE FUNCTION A(@ INT)RETURNS TABLE RETURN WITH R AS(SELECT CAST('$$\varphi=1+\dots'AS VARCHAR(MAX))S,0N UNION ALL SELECT REPLACE(STUFF(S,14,0,'cfrac1{1+\'),'\do','\ddo')+'}',N+1FROM R WHERE N<=@)SELECT S+'$$'S FROM R WHERE N=@

This creates an inline table function that uses a recursive query to stuff in the additional cfrac1{1+\ per iteration. Changing the dots to ddots was expensive, but saved a couple getting rid of the replace :).  Also having to cast the original string as 'VARCHAR(MAX)' cost a bit.
It's used as follows SQLFiddle:
SELECT *
FROM (SELECT N FROM(VALUES(0),(1),(2),(3),(4),(5))A(N)) N
    CROSS APPLY A(N.N)
N   S
--- ---------------------------------------------------------------------------
0   $$\varphi=1+\dots$$
1   $$\varphi=1+\cfrac1{1+\ddots}$$
2   $$\varphi=1+\cfrac1{1+\cfrac1{1+\ddots}}$$
3   $$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$
4   $$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$
5   $$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}}$$

Element, 63 Chars
_+2:'\$\$\\varphi\=1\+`[\\cfrac1\{1\+`]?\\[d.]`"dots`[\}`]\$\$`

This is the most straight-forward solution.  Unfortunately, the large amount of symbols in the output causes a significant increase in program length (putting the strings in the program directly causes the symbols to perform operations).  I'm sure there is room for golfing, but I don't have more time right now.
Since this language is still relatively unknown, here is a link to the interpreter, written in Perl.
_+2:                     take input, add 0 to it to make it a number, and duplicate
'                        put one copy onto the control stack
\$\$\\varphi\=1\+        a "bare" string
`                        output the string
[                        start a for loop, based on the input from earlier
    \\cfrac1\{1\+        a bare string
    `                    output it
]                        end the for loop
?                        test the second copy of the input for non-zero-ness
\\                       a bare \
[d.]                     a "for" loop used as an if block, appends a "d"
`                        output it
dots`                    output dots
"                        get rid of the if condition result so the old result is on top
[                        another for loop, still using the input from earlier
    \}`                  output a }
]                        end for loop
\$\$`                    output $$

+1 for using Element! It's time for Element to become a household name!

Ruby, 76 75 71 70 bytes
This feels suspiciously straightforward, so please let me know if I messed up somewhere.
Incidentally, this is the first thing I've ever written in Ruby - I was looking for a language that supported string repetition by multiplying, and Ruby seemed to do the trick.
f=proc{|n|'$$\varphi=1+'+'\cfrac1{1+'*n+'\dd'[0,n+2]+'ots'+'}'*n+'$$'}

To be applied like so:
f.call(0)
$$\varphi=1+\dots$$

f.call(3)
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$

@Sp3000 The former doesn't, since Ruby apparently can't convert Booleans to integers. The latter worked though, so thanks for that!

R, 93 90
Much the same as the other answers.  Thanks to @plannapus for the scan tip.
cat('$$\\varphi=1+\\',rep('cfrac1{1+\\',n<-scan()),if(n)'d','dots',rep('}',n),'$$',sep='')

cat used rather than paste0 as the result would end up with \\ rather than \.
In use
> > cat('$$\\varphi=1+\\',rep('cfrac1{1+\\',n<-scan()),if(n)'d','dots',rep('}',n),'$$',sep='')
1: 3
2:
Read 1 item
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$

+1 but instead of making it a function, if you have the user enter n as stdin on its first occurrence, you can save some characters: cat("$$\\varphi=1+\\",rep("cfrac1{1+\\",n<-scan()),if(n)"d","dots",rep("}",n),"$$",sep="")

J, 60 bytes
(<;._2'$$\varphi=1+\ cfrac1{1+\ d dots } $$ ');@#~1,~5$1,],*

Usage:
   ((<;._2'$$\varphi=1+\ cfrac1{1+\ d dots } $$ ');@#~1,~5$1,],*) 0
$$\varphi=1+\dots$$

   ((<;._2'$$\varphi=1+\ cfrac1{1+\ d dots } $$ ');@#~1,~5$1,],*) 3
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$

Method:
The string '$$\varphi=1+\ cfrac1{1+\ d dots } $$ ' is cut up at spaces and the parts are repeated 1 n signum(n) 1 n 1 times and then these parts are concatenated.
Try it online here.

JavaScript, 114 109 106 85 bytes thanks to George Reith
f=n=>'$$\\varphi=1+\\'+((x='cfrac1{1+\\'.repeat(n))&&x+'d')+'dots'+'}'.repeat(n)+'$$'

This is my first entry in a codegolf contest! Please tell me how to improve.
Previous entry (106 bytes):
w="$$\\varphi=";y=n=>{return a=!n?w+"1+\\dots$$":w+"1+\\cfrac1{".repeat(n)+"1+\\ddots"+"}".repeat(n)+"$$"}

Previous entry (109 bytes):
x="repeat",w="$$\\varphi=";y=n=>{return a=!n?w+"1+\\dots$$":w+"1+\\cfrac1{"[x](n)+"1+\\ddots"+"}"[x](n)+"$$"}

Previous entry (114 bytes):
x="repeat";y=n=>{return a=!n?"$$\\varphi=1+\\dots$$":"$$\\varphi="+"1+\\cfrac1{"[x](n)+"1+\\ddots"+"}"[x](n)+"$$"}

Paste into browser console and call as f(n) where n is the number of 'steps'.
Simplified code:

function y(n) {
   if(n === 0) {
      return "$$\\varphi=1+\\dots$$";
   } else {
      return "$$\\varphi=" + "1+\\cfrac1{".repeat(n) + "1+\\ddots"+"}".repeat(n)+"$$";
   }

x='repeat' makes it longer, not shorter: use .repeat as is and save 3 chars

http://pastebin.com/uU7tgFm9 some more improvements

Can be made into 87 bytes like so: http://pastebin.com/0Hkv9uft

Or 85 bytes http://pastebin.com/k90Fyr2m

@edc65 I like it how you checked if n is equal to 0, by just n? :   ... I didn't realise that if n = 0, n is false.

Pyth - 52 bytes
The simple approach in Pyth, pretty much stolen from @Sp3000's Python solution. Uses string formatting operator %.
%"$$\\varphi=1+\%sdots%s$$"(+*"cfrac1{1+\\"Q<\dQ*\}Q

Try it online here.
%                  String formatting
 "$$ . . . $$"     String to be formatted
 (                 Tuple (no need to close it)
  +                String concatenation
   *"..."Q         String repetition input times
   <\dQ            If Q>0 then d
  *                String repetition
   \}              The character "}"
   Q               Q times

Pyth, 50 bytes
s["$$\\varphi=1+"*Q"\cfrac1{1+"\\<\dQ"dots"*Q\}"$$

See my edit history :)

JavaScript (ES6), 76 80
Partly recursive. The single/double d is most annoying part.
F=n=>"$$\\varphi=1+\\"+(R=d=>n--?"cfrac1{1+\\"+R("d")+"}":d+"dots")("")+"$$"

Test In Firefox /FireBug console
> for(i=0;i<5;i++)console.log(F(i))

$$\varphi=1+\dots$$
$$\varphi=1+\cfrac1{1+\ddots}$$
$$\varphi=1+\cfrac1{1+\cfrac1{1+\ddots}}$$
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}$$
$$\varphi=1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\cfrac1{1+\ddots}}}}$$

Python, 90 116
since the most efficient solution has already been posted multiple times, i go with string replacement instead
f=lambda n:'$$\\varphi=1+\ddots$$'if n==0 else f(n-1).replace('\ddots','\cfrac{1+\ddots}')
# or, with exactly the same length
x='\ddots';f=lambda n:'$$\\varphi=1+'x+'$$'if n==0 else f(n-1).replace(x,'\cfrac{1+'x+'}')

Edit: damn, overlooked the dots instead of ddots for n=0, now the recursive solution with an extra clause tacked on is too ugly to compete.
x='$$\\varphi=1+\d%sots$$';f=lambda n:x%''if n==0 else x%'d'if n==1 else f(n-1).replace('\ddots','\cfrac{1+\ddots}')

This is currently missing the n=0 special case (dots instead ddots).

Haskell, 86
n%x=[1..n]>>x
f n="$$\\varphi=1+"++n%"\\cfrac1{1+"++'\\':drop(0^n)"ddots"++n%"}"++"$$"

Essentially the same approach as all solutions here. drop(0^n)"ddots" is cute, though!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Brainf*** to tinyBF converter
You don't need to know these languages to participate. All necessary information has been provided in this question.
You should write a program or function which given a brainfuck (BF) code as input outputs its tinyBF equivalent.
BF has 8 instructions characters: +-><[],. and tinyBF has 4: =+>|. Converting works the following way: starting from the beginning of the BF code each symbol is replaced by on of its two tinyBF counterparts based on the number of = signs in the tinyBF code until that point (i.e. = behaves like a toggle switch).
The converter table (with columns: Brainfuck symbol;  tinyBF symbol(s) when ther are even ='s before; tinyBF symbol(s) when ther are odd ='s before):
BF   even    odd

+      +      =+
-     =+       +
>      >      =>
<     =>       >
[      |      =|
]     =|       |
.     ==      ==
,    |=|    =|=|

(This creates an almost unique tinyBF code. The only conflict occurs if the BF code contains a [] which is generally unused as it creates an infinite void loop.)
Input

An at least 1 byte long valid brainfuck program containing only the characters +-><[],.
Guaranteed not to contain the string []
Trailing newline is optional.

Output

A tinyBF program.
Trailing newline is optional.

Examples
You can convert any BF program to tinyBF with this (1440 byte long) converter (see the Edit section for a small deviation).
Format is Input into Output

++-  into  ++=+
,[.,]  into  |=||==|=|=| or |=|=|==|=|| (both is acceptable check the Edit section)
>++.--.[<]+-,  into  >++===++===|=>|=+=+=|=|
>++-+++++++[<+++++++++>-]<.  into  >++=+=+++++++|=>=+++++++++>=+|>==

Edit
As @Jakube pointed out in the official tinyBF converter in the equivalents of the , BF instruction (|=| and =|=|) the last = signs aren't counted towards the toggle state. Both the official and mine interpretations are acceptable but you have to choose one.
This is code-golf so the shortest entry wins.

By 'odd' and 'even', do you mean the first character of the BF code is 'odd', the next is 'even', and so on?

@ASCIIThenANSI I think what's meant is the number of = characters output before the character currently being translated. Think of the = character as a toggle between two instruction sets.

@orip OK, but what about things like =|=|  that don't change the even/odd value? Or is that part of the challenge?

Is input through a file, STDIN, or our choice?

@ASCIIThenANSI Your choice.

I don't understand the second example: ,[.,]  into  |=||==|=|=|. , transforms into |=|, then there is a odd number of =s, so why doesn't [ transform into =|?

@Jakube You are correct. See the Edit section.

Are we allowed to assume that a dot as the very first character would be invalid because it makes no sense?

@kirbyfan64sos No. It does make sense though as It outputs the character with codepoint 0.

CJam, 50 bytes
l{"..+-><[],"#2mdT2$@T?:T=L'=?"== + > | |=|"S/@=}/

Try one example or all of them online.
Explanation
The magic is in the mapping! Looking up each operator's index in a carefully ordered yet simple string produces three useful pieces of information at once: whether the operator is directionless (index == 0), the direction the operator requires (index mod 2), and the index of the output operator (index / 2).
Using that handy mapping, it's a simple case of looping through each input operator and producing a direction swap operator if the direction needs to be changed, updating the direction, and producing the output operator.
l                   "Read a line of input.";
{                   "For each character of input:";
  "..+-><[],"#        "Map the character:
                        '.' -> 0  |
                        '+' -> 2  |  '-' -> 3
                        '>' -> 4  |  '<' -> 5
                        '[' -> 6  |  ']' -> 7
                        ',' -> 8  |            ";
  2md                 "Calculate the quotient and remainder of the mapping
                       divided by 2.";
  T2$@T?:T            "If the the mapping is nonzero (not '.'), set the
                       direction after this operator to the remainder above.
                       Otherwise ('.'), don't change the direction.";
  =L'=?               "If the direction before this operator is equal to the
                       direction after, produce an empty string. Otherwise,
                       produce the direction switch operator, '='.";
  "== + > | |=|"S/@=  "Map the previous mapping divided by 2 to an operator:
                         0 ('.')      -> '=='
                         1 ('+', '-') -> '+'
                         2 ('>', '<') -> '>'
                         3 ('[', ']') -> '|'
                         4 (',')      -> '|=|' ";
}/

Extended BrainFuck 276 bytes
(not counting uneccesary linefeeds)
{a<<]>&c}{b<<-]<[->}{c]<]>[>[}{d 4+[-<}3>4->3->5->-->>&d 4+>]<[-<
4+<3+<4+<8+4>]<[<]<<,[>3+&d 6->]+<-[-[-[-[14-[--[>&d 6->]+<+[--[[
-]>[-&c>.&b>>.<.<+&a->>.<.&b>.<&a->>.>>.3<&b 4>.4<&a 4>.3<&b+>>.>
>.6<]>]<]>[-3>..3<&c 3>.<<&b+>>.>.3<&a>>.<.>.<.&b+>.>.<.<&a->>.>.
<<&b 3>.5<]>]<,]

How to compile and run:
beef ebf.bf < tinybf.ebf > tinybf.bf
beef tinybf.bf < source.bf > source.tbf

It will work with any wrapping BF interpreter that uses/support 0 as EOF.
Actual EBF source before golfing:
:i:f:o:p:e:a:g
$p ~"|=+>"<[<]@o
$i,( $f+++++++(-$i------)+$i-; +
     ($i-; ,
       ($i-; -
         ($i-; .
           ($i--------------; <
             ($i--; >
               ($f++++(-$i------)+$i+; [
                 ($i--; ]
                   ((-) $f(-) )
                      $f ( $o[$p.$f-]<[@f-$e.$p.$o+$i] ) ; ]
                  ) $f ( $o[-$e.$p.$f-]<[@f-$p.$i] ) ; [
                ) $f ( $o[-$e.$g.$f-]<[@f-$g.$i] ) ; >
              ) $f ( $o[$g.$f-]<[@f-$o+$e.$g.$i] ) ; <
            ) $f (- $e.. ) ; .
          ) $f ( $o[$a.$f-]<[@f-$o+$e.$a.$i] ) ; -
        ) $f ( $o[$e.$p.$e.$p.$f-]<[@f-$o+$p.$e.$p.$i] ) ; ,
     ) $f ( $o[-$e.$a.$f-]<[@f-$a.$i] ) ; +
$i,)

BrainFuck 404 bytes
This is the trimmed output of the compiled EBF.
>>>---->--->----->-->>++++[-<++++>]<[-<++++<+++<++++<++++++++>>>>]<
[<]<<,[>+++++++[-<------>]+<-[-[-[-[--------------[--[>++++[-<-----
->]+<+[--[[-]>[-]<]>[>[>.<<-]<[->>>.<.<+<<]>]<]>[>[->>.<.<<-]<[->>.
<<<]>]<]>[>[->>.>>.<<<<<-]<[->>>>>.<<<<<<]>]<]>[>[>>>>.<<<<<-]<[->+
>>.>>.<<<<<<]>]<]>[->>>..<<<]<]>[>[>>>.<<<<-]<[->+>>.>.<<<<<]>]<]>[
>[>>.<.>.<.<<-]<[->+>.>.<.<<<]>]<]>[>[->>.>.<<<<-]<[->>>>.<<<<<]>]<,]

So it's converting BF to TinyBF... in BF. That's AWESOME.

TinyBF***, 558 bytes
Don't credit me for this, this is the TinyBF version of @Sylwester's BrainF*** answer (I used his code to convert his code into this code, :P). I just felt the need to put this answer up.
>>>=++++=>=+++=>=+++++=>=++=>>++++|=+>=++++>=|>=|=+>=++++=>=+++=>=++++=>=+++++++
+>>>>=|>=|=>|>>=|=|=|>+++++++|=+>++++++=>=|=+=>+=|=+=|=+=|=+=|=++++++++++++++=|=
++=|>++++|=+>++++++=>=|=+=>=+|=++=||=+|=>|=+|>|=>|>|>===>>+|>=|=+=>>>===>==>=+=>
>|=>=|>|=>|>|=+=>>===>==>>+|>=|=+=>>===>>>|=>=|>|=>|>|=+=>>==>>===>>>>>+|>=|=+=>
>>>>===>>>>>>|=>=|>|=>|>|>>>>===>>>>>+|>=|=+=>+>>==>>===>>>>>>|=>=|>|=>|=+=>>>==
===>>>|>|=>|>|>>>===>>>>+|>=|=+=>+>>==>===>>>>>|=>=|>|=>|>|>>===>===>===>==>>+|>
=|=+=>+>==>===>==>>>|=>=|>|=>|>|=+=>>==>===>>>>+|>=|=+=>>>>===>>>>>|=>=|>=|=||

Perl, 244 241 226 217 bytes
open(B,$ARGV[0]);%e=qw(+ + - =+ > > < => [ | ] =| . == , |=|);%o=qw(+ =+ - + > => < > [ =| ] | . == , =|=|);$q=0;while(<B>){$p='';@c=split('');foreach$c(@c){if($q%2>0){$p.=$o{$c}}else{$p.=$e{$c};}$q=$p=~/=/g;}print$p}

Works on all cases. Run with perl file.pl [filename] where file.pl is the name of the program, and [filename] is the name of the BF file.
Changes

Saved 3 bytes by using split('') instead of split('',$_).
Saved 15 bytes by:

Getting rid of $f= in front of open (3 bytes)
Replacing if($eo%2==1) with if($eo%2>0) (1 byte)
Replacing $p=$p. with $p.= (2 bytes * 2 times = 4 bytes)
Removing trailing newline, as it was optional (5 bytes)
Removed =() (3 bytes)

Saved 9 bytes by shortening variable names.

K, 91 bytes
o:0;{:[i:"..+-><[],"?x;t:i!2;t:0];`0::[o=t;"";"="],("==";"+";">";"|";"|=|")@i%2;o::t}',/0:`

It's more-or-less a direct port of @Runer112's CJam answer. And it's much longer. Life sucks.

JavaScript (ES6), 129 bytes
b=>[...b].map(x=>p+="=+,+,=>,>,=|,|,==,=|=|,+,=+,>,=>,|,=|,==,|=|".split`,`["+-><[].,".indexOf(x)+p.split`=`.length%2*8],p="")&&p

Uses an array of the 16 possibilities (8 characters times 2 parities), and indexes into this. The array is built by splitting a string, which saves 26 bytes over an array.

Ruby, 233 217 bytes
p,m,g,l,b,s,d,a,q,f=%w(+ - > < [ ] . , | =)
z=[{p=>p,m=>f+p,g=>g,l=>f+g,b=>q,s=>f+q,d=>f+f,a=>q+f+q},{p=>f+p,m=>p,g=>f+g,l=>g,b=>f+q,s=>q,d=>f+f,a=>f+q+f+q}]
i=0
ARGV[0].each_char{|c|v=z[i%2][c];print v;i+=v.count(f)}

An 8-byte improvement on the previous non-esoteric answers!
Saved 16 bytes with the %w() syntax

Ruby, 101 bytes
->s{t="";s.chars{|c|t<<((t.count(?=)+i="..+-><[],".index(c))%2<1&&i>0?"":?=)+%w(= + > | |=|)[i/2]};t}

Try it online!
Uses the second interpretation of the ambiguous , translation rule.


text:
What language is this?
I'm working on something and came across this after I interpreted some brainfuck code. It looks like another esoteric language but I'm not sure what. Anyone know?
(CB;:9]~}5Yz2Vw/StQr*)M:,+*)('&%$#"!~}|{zyx875t"2~p0nm,+jch'`%

Where did you find this? Context can give clues.

@orip Based on what I've seen, maybe it's CJam or GolfScript? This is going by the snippets of code I've seen, I've never worked with either.

It was in a challenge for a programming competition.

@ASCIIThenANSI By the way, my name is ORLP lowercase, not ORIP ;)

@MichaelYousef Which one? One on StackExchange? If it was here, it should be labeled.

No, it was a past challenge for International Capture the Flag. I want to ideally run the code and see what it returns. It should most likely print out some string that is an answer.

Malbolge programs can be identified by decreasing ascii sequences like ~}|{zyx. I noticed that only after seeing the answer, though.

After one second of Googling a portion of the string (5Yz2Vw), I found the following page:
http://www.xchg.info/wiki/index.php?title=ICTF_2011_:_Challenge_13_-_250_Points
On that page it's deduced the code is Malbolge.

you beat me by a couple of seconds, also here is an online IDE to run the code

When I run the code on it, I get an error though. Any suggestions? Also, the only reason we know it's Malbolge is because there's an answer somewhere. We would need to find this out in the dark.

strange for me it ouputs: EvIl!  , and yes thats capital i lower l

So I figured out that there's supposed to be some whitespace in it from the link you have. When I ran the brainfuck code through the interpreter, I got the exact string I posted. When I interpreted without whitespace, nothing. When I interpreted what they posted on that site with the whitespace, it suddenly worked. Odd.
Also I still have no idea how they figured out it was Malbolge. They googled and found some stuff that linked it to Malebolge -> Malbolge, I have no idea how that's what they got.

I figured it out. If you look at Wiki's page on esoteric languages, you see that Malbolge talks about circles of hell, and that this code should likely be Malbolge.


text:
Interpreting Fish (no, not that Fish)
Consider these five ASCII art sea creatures:

Standard fish: ><> or <><
Speedy fish: >><> or <><<
Sturdy fish: ><>> or <<><
Stretchy fish: ><<<> or <>>><
Crab: ,<..>,

Write a program that accepts an arbitrary string of the characters <>,.. If there is a way to interpret the entire string as a series of non-overlapping sea creatures, then the string should be reprinted with single spaces inserted between creatures. If this interpretation is impossible, nothing should be output (the program silently ends).
For example, the string <><><> can be interpreted as two standard fish back-to-back. The corresponding output would be <>< ><>.
As another example, the string ><>><>> contains "instances" of...
(brackets only added as indicators)

a couple standard fish: [><>][><>]>
a speedy fish: ><[>><>]>
a sturdy fish in a couple ways: [><>>]<>> and ><>[><>>]

however, only the pairing of a standard fish and a sturdy fish [><>][><>>] spans the entire length of the string with no fish sharing characters (no overlaps). Thus the output corresponding to ><>><>> is ><> ><>>.
If there are multiple ways the string could be interpreted, you may print any one of them. (And only print one of them.) For example, <><<<>< can be interpreted as a standard fish and a sturdy fish: [<><][<<><], or as a speedy fish and a standard fish: [<><<][<><]. So either <>< <<>< or <><< <>< would be valid output.

The crabs are just for fun. Since they don't start or end with < or >, they are much easier to identify (at least visually). For example, the string
,<..>,><<<>,<..>,><>,<..>,<>>><,<..>,><>>,<..>,<<><,<..>,<><,<..>,>><>

would obviously produce the output
,<..>, ><<<> ,<..>, ><> ,<..>, <>>>< ,<..>, ><>> ,<..>, <<>< ,<..>, <>< ,<..>, >><>

Here are some examples of strings (one per line) that produce no output:
<><>
,<..>,<..>,
>>><>
><<<<>
,
><><>
,<><>,
<<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><

The last string here can be parsed if you remove the leading <:
<<>< ><<<> >><> ><> ><> <>< <>>>< >><> >><> >><> ><>> <<><

(There may be other possible outputs.)
Details

The input string will only contain the characters <>,..
The input string will be at least one character long.
Take input in any common way (command line, stdin) and output to stdout.
The shortest code in bytes wins. (Handy byte counter.) Tiebreaker is earlier post.

Nice codegolf with parallels to compression (greedy/lazy substring matching)

I thought we were going to interpret Fish' lyrics :-(

@RemcoGerlich Not that Fish either

Finally a code-golf for RFC 3889 General Fish Transfer Format (implementing RFC3500: Standard Fish Transfer Format)!

Bonus points if you do it using BrainF***! And the longer it takes your program to realize its own code isn't fish-compliant, the better.

I saw this and scrolled down, resigned to the fact that this would be @Calvin'sHobbies and nobody, nobody else.

((><>)|(<><)|(>><>)|(<><<)|(><>>)|(<<><)|(><<<>)|(<>>><)|(,<..>,))+

@Kevin: Exactly what I was thinking when I saw this question :D

what about ><><> from this string you can create two independent fish, how this should be handled?

@user902383 There are two fish in there but they overlap, so there is no output.

Pyth, 64 48 50 bytes
#jdhfqzsTsm^+msXtjCk2U2"<>""
\r.1"",<..>,"dlzB

Test case.

Version that doesn't take forever (O(9n/3)) here, in 52 bytes.

This is the brute force approach, generate all sequences and check whether any sum to the input. Fish diagrams compressed as characters, whose binary representations are the > and <. The whole thing is wrapped in a try-catch block so that no output occurs when no results are found.
This is an O(9n) solution.
Some characters are stripped above, because control characters are used. They are reproduced faithfully at the link above.
xxd output:
0000000: 236a 6468 6671 7a73 5473 6d5e 2b6d 7358  #jdhfqzsTsm^+msX
0000010: 746a 436b 3255 3222 3c3e 2222 0a5c 7212  tjCk2U2"<>"".\r.
0000020: 141b 1d2e 3122 222c 3c2e 2e3e 2c22 646c  ....1"",<..>,"dl
0000030: 7a42                                     zB

Is the online compiler too slow to run it on the example input in the question ?

Yes, much too slow / too short a time out. ><>><>> takes 15 seconds on my machine.

O(9^n), holy inefficiency!

@mbomb007 I don't see anything about efficiency in the rules :P +1!

@mbomb007: Probably still better than a C++ compiler.

Non-deterministic Turing Machine, 20 states, 52 transitions (882 bytes maybe)
How do you convert this to bytes? I've written the files (absolutely not golfed) to execute this machine with Alex Vinokur's Simulator of a Turing Machine1. wc -c outputs the following (excluding the description file and the input files):
 12 alphabet
 49 meta
740 rules
 81 states
882 total

Anyways, I was preparing for my Computer Science A-Levels, so I thought this would be a good exercise (I don't know what I was thinking). So here's the definition:
$$\begin{align*}
M & = (Q, \Sigma, \iota, \sqcup, A, \delta) \\
Q & = \{q_{0},q_{1},q_{2},q_{3},q_{4},q_{5},q_{6},q_{7},q_{8},q_{9},q_{10},q_{11},q_{12},q_{13},q_{14},q_{15},q_{16},q_{17},q_{18},q_{19}\} \\
\Sigma & = \{< \: ; \: > \: ; \: , \: ; \: . \: ; \: X \: ; \: $\} \\
\iota & = q_0 \\
\sqcup & = $ \\
A & = \{q_0, q_5\}
\end{align*}$$

(the transition function)
Excuse the bad image, but I couldn't be bothered with redrawing this thing on a computer. If you actually want to decipher the transition rules, I recommend you read through the rules file I linked above.

I've used Xs instead of spaces because spaces are hard to visualize here and the simulator doesn't accept spaces in the alphabet.
The concept is fairly simple - q1 to q4 are used to catch right-facing fishes, q11 to q14 are used to catch left-facing fishes, q15 to q19 for crabs and the q5 to q10 blob is simply for inserting a space and moving all following characters one to the right.
If the string is interpretable, it accepts the string and the tape contains the string with spaces inserted. Otherwise it rejects the string (I guess this counts as no output - emptying the tape would be pretty easy but would require lots of transition rules and I don't think it would make the transition function prettier to look at).

1 Note: It's difficult to compile. I had to edit the src/tape.cpp file and replace LONG_MAX with 1<<30 and then go to the demo directory, edit the Makefile to replace EXE_BASENAME with turing.exe and execute make. Then go to the directory with the files I've written and execute /path/to/turing/download/src/turing.exe meta.

Apparently I +1 for insanity.

fish (yes, that fish), 437 bytes
This strikes me as one of those programming tasks where exactly one language is right.
#!/usr/bin/fish

set the_fishes "><>" "<><" ">><>" "<><<" "><>>" "<<><" "><<<>" "<>>><" ",<..>,"
set my_fishes

function startswith
        set -l c (echo -n $argv[2]|wc -c)
        echo $argv[1]|cut -c(math $c+1)-
        test $argv[2] = (echo $argv[1]|cut -c-$c)
end

function pickafish
        set -l fix 1
            while true
                if test $fix -gt (count $the_fishes); return 1; end

                if not set rest (startswith $argv[1] $the_fishes[$fix])
                            set fix (math $fix+1)
                        continue
                end
                set my_fishes $my_fishes $the_fishes[$fix]
                    if test -z $rest
                        echo $my_fishes
                            exit
                    end
                    if not pickafish $rest
                    set my_fishes $my_fishes[(seq (math (count $my_fishes) - 1))]
                    set fix (math $fix+1)
                        continue
                end
        end
end

pickafish $argv[1]

The following version is still the longest answer to the challenge,
set t "><>" "<><" ">><>" "<><<" "><>>" "<<><" "><<<>" "<>>><" ",<..>,";set m;function p;set -l i 1;while true;test $i -gt 9; and return 1;if not set r (begin;set c (echo $t[$i]|wc -c);echo $argv[1]|cut -c$c-;test $t[$i] = (echo $argv[1]|cut -c-(math $c-1));end);set i (math $i+1);continue;end;set m $m $t[$i];if test -z $r;echo $m;exit;end;if not p $r;set m $m[(seq (math (count $m)-1))];set i (math $i+1);continue;end;end;end;p $argv[1]

but since this was done mostly for the pun (you'll excuse, I hope), better golfing is left as an exercise to the reader.

What do you know, there are (at least) two right languages for this job!  Someone (who is no me) should do the other one :-)

Same program in 383 chars of BASH with a BASE64 blob included:
printf 'H4sIADSjKlUCA4VPQW6DMBC89xUj5AOocSSOlV1/BHGgjgMrBUPN0kRRHl/jmEg99WBLszM7M7s4BqMw2hQotNHxNy+QkDYJZU7rTJqED/p4NIdCLdFmVOfVW6bJY04DeQGhVteBLg4cVqfYLQxBkD3jQ6HzJwTHa/BRRmf4ibEtBpRfriefXCxKZ4cJghtB7eNqIW2lnqMu9D9N3T7sGtOssDInJCk+982/MlmOHQ+I6rqKRv5UpRxCntN7XSk7eSYfK0f+eR3EmI23qilH3iFCrjIqdyNO8nzJvJH7alMu7jsnlHZafWw5VluD9r/0/c2vQ95+AYBxAwS2AQAA'|base64 --decode|gzip -d>a;fish a

><>, 602 bytes
0&>i:0)?vr>:5%4-?v}:5%?;}:5%1-?;}:5%1-?;}:5%2-?;}:5%4-?;}&~0& v
  \     /        >:5%2-?v}:5%2-?v}:5%?v}:5%2-?v}              v
 &:?v;>*} ^      v      <       >:5% ?v}:5%?v} :5% ?v}:5%2-?v}v
v&-1< ^48<                                  >: 5%2-?v}:5%2-  ?v&1+&0}}v
>    :?v~^       >:5%?v}:5%?v}:5%2-  ?v}:5%  ?v}              v
^~v?%8:<                    >:5%2-?v}: 5%2-?v} :5%2- ?v}:5%?v}v
^{<        >0>=?;:v                         >: 5%    ?v}:5%  ?v&1+&0}}v
           ^lo~<  <   >            >  >       >     > >     >  02.
          \}*48^?=i:                                          <       <

A solution in Fish, probably very golfable but it's my first ><> program. It takes its input from the input stack and runs on the online ><> interpreter.
How it works :
A loop reads all the input and stacks it, reverse it and put a -1 on the bottom wich will mark that parsing is complete (all characters stay on the stack until the string is deemed parsable).
The parsing uses the fact all characters are different modulo 5, and all patterns are deterministic except <><< and ><>>. Parsed characters are put on the bottom of the stack.
When a pattern is complete, if -1 is on top, all characters are printed, otherwise a space is added and the program loops.
If <><< or ><>> are encountered, the register is incremented (0 at the start), and a 0 is placed on the stack before the last character (so that <>< or ><> stays after rollback). If an error appears afterwards during parsing, the register is decreased, all characters after the 0 are put back on top (except spaces thanks to a %8=0 test).
If an error is detected while the register is 0, or inside the crab, the program just ends immediately.

Python 3, 156
*l,s=[],input()
for _ in s:l+=[y+[x]for x in"><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,".split()for y in l]
for y in l:
 if"".join(y)==s:print(*y);break

The strategy is to generate lists of fish and compare their concatenation to the input string.
This takes impossibly long. If you actually want to see an output, replace for _ in s with for _ in [0]*3, where 3 is the upper bound for the number of fish. It works to use s because s contains at most one fish per char.
Thanks to Sp3000 for bugfixes and a char save on input.
Old 165:

f=lambda s:[[x]+y for x in"><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,".split()for y in f(s[len(x):])if s[:len(x)]==x]if s else[[]]
y=f(input())
if y:print(*y[0])

@Sp3000 Good catch, I think I know the problem.

@Sp3000 I think it should work now. This was a case of the ternary a and b or c giving a wrong value when b might be Falsey. I reverted to if/else for 2 chars, but there might be a way to make the ternary work.

Since you're in Python 3 already, you might as well (ab)use it :P *l,s=[],input()

you forgot to decrease the byte count when you did ^that

Perl, 81 + 1 bytes
/^((>><>|><(|>|<<)>|<><<|<(|<|>>)><|,<\.\.>,)(?{local@a=(@a,$2)}))*$(?{say"@a"})/

Try this code online.
This code expects the input in the $_ variable; run this with Perl's -n switch (counted as +1 byte) to apply it to each input line, e.g. like this:
perl -nE '/^((>><>|><(|>|<<)>|<><<|<(|<|>>)><|,<\.\.>,)(?{local@a=(@a,$2)}))*$(?{say"@a"})/'

This code uses Perl's regexp engine (and specifically its embedded code execution feature) to perform an efficient backtracking search.  The individual fishes found are collected in the @a array, which is stringified and printed if the match is successful.
This code also uses the Perl 5.10+ say feature, and so must be run with the -E or -M5.010 switch (or use 5.010;) to enable such modern features.  By tradition, such switches used solely to enable a particular version of the language are not included in the byte count.
Alternatively, here's a 87-byte version that requires no special command-line switches at all.  It reads one line from stdin, and prints the result (if any) to stdout, without any trailing linefeed:
<>=~/^((>><>|><(|>|<<)>|<><<|<(|<|>>)><|,<\.\.>,)(?{local@a=(@a,$2)}))*$(?{print"@a"})/

Ps. If printing an extra space at the beginning of the output was allowed, I could trivially save two more bytes with:
/^((>><>|><(|>|<<)>|<><<|<(|<|>>)><|,<\.\.>,)(?{local$a="$a $2"}))*$(?{say$a})/

You can knock off a few bytes if you factorise, e.g. ><(>|<<)>

@Sp3000: Thanks! That does save a byte for each direction of fish.

Python 2, 234 bytes
I tried a Python regex solution first, but there seems to be no way to extract the groups after a match on multiple patterns. The following is a recursive search which seems to do well on the test cases.
a='><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,'.split()
def d(t,p=0):
 if p<len(t):
  for e in a:
   z=p+len(e)
   if e==t[p:z]:
    if z==len(t):return[e]
    c=d(t,z)
    if c:return[e]+c
c=d(raw_input())
if c:
 print' '.join(c)

An example test:
$ echo ",<..>,><<<>,<..>,><>,<..>,<>>><,<..>,><>>,<..>,<<><,<..>,<><,<..>,>><>" | python soln.py
,<..>, ><<<> ,<..>, ><> ,<..>, <>>>< ,<..>, ><>> ,<..>, <<>< ,<..>, <>< ,<..>, >><>

And the ungolfed version:
fishtypes = '><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,'.split()

def getfish(t, p=0):
    if p < len(t):
        for afish in fishtypes:
            z = p+len(afish)
            if afish == t[p:z]:
                if z == len(t) :
                    return [afish]
                fishlist = getfish(t, z)
                if fishlist :
                    return [afish]+fishlist

fishlist = getfish(raw_input())
if fishlist:
    print ' '.join(fishlist)

I think your very last if can be on a single line (like you did elsewhere). Also, instead of if p<len(t) I think you can do if t[p:] to save a few bytes.

Python 3, 196 186 bytes
F="><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,".split()
def g(s):
 if s in F:return[s]
 for f in F:
  i=len(f)
  if f==s[:i]and g(s[i:]):return[f]+g(s[i:])
R=g(input())
if R:print(*R)

Simple recursion. g either returns a list of parsed fish, or None if the input string is unparseable.

C# - 319 bytes
This solution is shamefully simple, hardly anything to Golf. It's a complete program, takes input as a line from STDIN, and outputs the result to STDOUT.
using C=System.Console;class P{static void Main(){C.Write(S(C.ReadLine()));}static string S(string c){int i=c.LastIndexOf(' ')+1;foreach(var o in"<>< ><> <<>< ><>> >><> <><< ><<<> <>>>< ,<..>,".Split()){string k=c+"\n",m=c.Substring(i);if(m==o||m.StartsWith(o)&&(k=S(c.Insert(i+o.Length," ")))!="")return k;}return"";}}

It simply attempts to match each fish to the first position after a space (or at the start of the string), and matches each type of fish with it. If the fish fits, then it recursively calls the solver after inserting a space after the fish, or simply returns it's input (with a \n for output reasons) if the unmatched string is literally the fish (i.e. we've found a solution).
I haven't made much of an attempt to give the fish string the usual kolmogorov treatment, because it isn't all that long, and I can't find a cheap way to reverse a string in C# (I don't think LINQ will pay), so there may be some opportunity there, but I somewhat doubt it.
using C=System.Console;

class P
{
    static void Main()
    {
        C.Write(S(C.ReadLine())); // read, solve, write (no \n)
    }

    static string S(string c)
    {
        int i=c.LastIndexOf(' ')+1; // find start of un-matched string

        // match each fish
        foreach(var o in"<>< ><> <<>< ><>> >><> <><< ><<<> <>>>< ,<..>,".Split())
        {
            string k=c+"\n", // set up k for return if we have finished
            m=c.Substring(i); // cut off stuff before space
            if(m==o|| // perfect match, return straight away
               m.StartsWith(o)&& // fish matches the start
               (k=S(c.Insert(i+o.Length," "))) // insert a space after the fish, solve, assign to k
               !="") // check the solution isn't empty
                return k;
        }

        // no fish match
        return"";
    }
}

Oh, you got me. Didn't see it was a multiple definition. Removed comment to reduce noise.

Haskell(Parsec) - 262
import Text.Parsec
c=words"><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,"
p c d=choice[eof>>return[],lookAhead(choice$map(try.string)d)>>=(\s->try(string s>>p c c>>=(\ss->return$s:ss))<|>p c(filter(/=s)c))]
main=interact$either show unwords.runParser(p c c)()""

This prints an error message if the input can't be split, as opposed to failing silently.

import sys

def unfish(msg,dict,start):
    if(len(msg[start:])<3):
        return "";
    for i in range(3,6):
        if (msg[start:start+i] in dict):
            if(start+i==len(msg)):
                return msg[start:start+i];
            else:
                ret = unfish(msg,dict,start+i);
                if ret != "":
                    return msg[start:start+i]+" "+ret;
    return ""

dict = {'><>':1,'<><':1,'>><>':1,'<><<':1,'><>>':1,'<<><':1,'><<<>':1,'<>>><':1,',<..>,':1};

print unfish(sys.argv[1],dict,0);

im a bit of a python noob so ignore the weirdness :P

Welcome to PPCG. This is a code-golf challenge, meaning you should try to write the code with as few characters as possible. For a start you could use single letter variables (e.g. m instead of msg, s instead of start, ...) and use only 1 space per increment. And please post add the character-count of your program (you can count them here).

Thanks @Jakube , I didn't know that it was a golf challenge as well. Thanks for the tips.

Ruby, 177 bytes
Not the shortest but the first one in ruby:
def r(e,p,m)t='';p.each{|n|t=e.join;return r(e<<n,p,m)if m=~/^#{t+n}/};(m==t)?e:[];end
puts r([],%w(><<<> <>>>< ><>> <<>< >><> <><< ><> <>< ,<..>,),gets.strip).join(' ')

The attempt here is to recursively extend a regexp and match it against the input.
If a longer match is found r() will recurse, if not it will check if the last match consumes the whole input string and only then output it with added spaces.

Jelly, 35 bytes
“¦¿Æ×‘B;¬$ị⁾<>“,<..>,”ṭ
J¢ṗẎẎ⁼¥Ƈ⁸ḢK

Try it online!
This is brutally inefficient, clocking in at around (I believe) \$O(9^{n^2})\$, and times out on TIO for strings of length \$7\$ or more
Returns 0 if the input cannot be interpreted as fish
A much faster version is 38 bytes, timing out for length \$21\$ or more
How it works
Similar to isaacg's Pyth answer, we generate all possible fish strings, then look for the one(s) equal to the input
“¦¿Æ×‘B;¬$ị⁾<>“,<..>,”ṭ - Helper link. Returns a list of fish
“¦¿Æ×‘                  - [5,11,13,17]
      B                 - Convert to binary; [[1,0,1],[1,0,1,1],[1,1,0,1],[1,0,0,0,1]]
        ¬               - Logical NOT of each bit; [[0,1,0],[0,1,0,0],[0,0,1,0],[0,1,1,1,0]]
       ; $              - Concatenate to the bits; [[1,0,1],[1,0,1,1],...,[0,0,1,0],[0,1,1,1,0]]
          ị⁾<>          - Index into "<>", replacing 1 with < and 0 with >
              “,<..>,”  - Yield the crab
                      ṭ - Append it to the fish

J¢ṗẎẎ⁼¥Ƈ⁸ḢK - Main link. Takes a fish F of length n on the left
J           - Yield [1, 2, ..., n]
 ¢          - Get the list of fish
  ṗ         - For each i in 1,2,...,n get the i'th Cartesian power of the fish
   Ẏ        - Concatenate into a list of lists
      ¥Ƈ    - Keep those lists for which the following is true:
    Ẏ       -   When concatenated into a flat list of characters,
     ⁼      -   the list equals
        ⁸   -   the input F
         Ḣ  - Take the first list of fish
          K - Join by spaces

CJam, 111 96 91 (or 62 bytes)
An iterative greedy approach to keep figuring out what all fish combinations are possible as you iterate. Really not golfed right now.
q_aa\,{{" È÷®µãÑø"255b5b" ><,."f=S/\f{)_3$#{;;;}{2$,>:P@a\a++}?PR+!{S:R*W<o}*}~}%}*];

The code contains some unprintable characters, so use the link below for reference.
Update Encoded the string
Will add explanation once done golfing
Try it online here

62 bytes
Super slow version. This basically creates all the combinations and checks which are equal to the input.
L"¬ééãLù:9$"255b6b5," ><,."erS/aq:Q,*{m*}*{sQ=}=`"[]\""-

This also contains unprintable characters, so rely on the below link.
Try it online here

Haskell, 148 146 bytes
main=mapM_ putStr.take 1.filter(all(`elem`words"><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,").words).map concat.mapM(\a->[[a],a:" "])=<<getLine

Testing:
$ echo "><>><>>>" | runhaskell fishes.hs

$ echo "><>><>>" | runhaskell fishes.hs

<> ><>>

Explanation
Based on my earlier answer to a similar question.
The algorithm runs in exponential time.
This reads from right to left.
=<<getLine              -- Read a line from STDIN.
mapM(\a->[[a],a:" "])   -- Replace each letter 'a' by "a" or "a " in
                        -- all possible ways, collect results to a list.
map concat              -- Concatenate those lists-of-strings into strings.
filter(all(...).words)  -- Keep those whose words are correct fish.
take 1                  -- Discard all but the first one.
mapM_ putStr            -- Print each string in that 1- or 0-element list.
main=                   -- That is the main function.

This will not print a string that ends with a space, even though such strings are generated too, because its no-space counterpart is generated first.

JavaScript (ES6), 164
Recursive, depth first scan.
As a program with I/O via popup:
alert((k=(s,r)=>'><>0<><0>><>0<><<0><>>0<<><0><<<>0<>>><0,<..>,'.split(0)
.some(w=>s==w?r=w:s.slice(0,l=w.length)==w&&(t=k(s.slice(l)))?r=w+' '+t:0)?r:'')
(prompt()))

As a testable function:
k=(s,r)=>'><>0<><0>><>0<><<0><>>0<<><0><<<>0<>>><0,<..>,'.split(0)
.some(w=>s==w?r=w:s.slice(0,l=w.length)==w&&(t=k(s.slice(l)))?r=w+' '+t:0)?r:''

Test suite (run in Firefox/FireBug console)
t=['<><><>', '><>><>>', '<><<<><',',<..>,><<<>,<..>,><>,<..>,<>>><,<..>,><>>,<..>,<<><,<..>,<><,<..>,>><>',
'<><>',',<..>,<..>,','>>><>','><<<<>',',','><><>',',<><>,',
'<<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><','<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><']

t.forEach(t=>console.log(t + ': ' +k(t)))

Output
<><><>: <>< ><>
><>><>>: ><> ><>>
<><<<><: <>< <<><
,<..>,><<<>,<..>,><>,<..>,<>>><,<..>,><>>,<..>,<<><,<..>,<><,<..>,>><>: ,<..>, ><<<> ,<..>, ><> ,<..>, <>>>< ,<..>, ><>> ,<..>, <<>< ,<..>, <>< ,<..>, >><>
<><>:
,<..>,<..>,:
>>><>:
><<<<>:
,:
><><>:
,<><>,:
<<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><:
<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><: <<>< ><<<> >><> ><> ><> <>< <>>>< >><> >><> >><> ><>> <<><

Ungolfed just the k function
function k(s)
{
  var f='><>0<><0>><>0<><<0><>>0<<><0><<<>0<>>><0,<..>,'.split(0)
  var i, w, l, t

  for (w of f)
  {
    if (s == w)
    {
      return w
    }
    l = w.length
    if (s.slice(0,l) == w && (t = k(s.slice(l))))
    {
      return w + ' ' + t
    }
  }
  return ''
}

Python 3, 166 164 bytes
def z(s,p=''):[z(s[len(f):],p+' '+s[:len(f)])for f in'<>< <><< <<>< <>>>< ><> >><> ><>> ><<<> ,<..>,'.split(' ')if s.startswith(f)]if s else print(p[1:])
z(input())

Recursive solution. Late to the party, but I thought I'd post it anyway since it beats Sp3000's by 20 22 bytes without having to brute-force the answer.

Haskell, 148 142
p[]=[[]]
p s=[i:j|i<-words"><> >><> ><>> ><<<> <>< <><< <<>< <>>>< ,<..>,",i==map fst(zip s i),j<-p$drop(length i)s]
    g s=unwords$head$p s++p[]

this uses list comprehensions to iterate over the fish, pick the ones who match the start and continue recursively.

The challenge explicitly asks for a full program that prints its output, as opposed to a function.

Java, 288 bytes
public class F{public static void main(String[]q){d("",q[0]);}static System y;static void d(String a,String b){if(b.isEmpty()){y.out.println(a);y.exit(0);}for (String s : "><> <>< >><> <><< ><>> <<>< ><<<> <>>>< ,<..>,".split(" "))if(b.startsWith(s))d(a+" "+s,b.substring(s.length()));}}

Formatted:
public class F {
    public static void main(String[] q) {
        d("", q[0]);
    }

    static System y;

    static void d(String a, String b) {
        if (b.isEmpty()) {
            y.out.println(a);
            y.exit(0);
        }
        for (String s : "><> <>< >><> <><< ><>> <<>< ><<<> <>>>< ,<..>,".split(" "))
            if (b.startsWith(s)) d(a + " " + s, b.substring(s.length()));
    }
}

I wasn't going for size, but here is an easy to understand way of doing this in Dart.
const List<String> fish = const [
  "><>",
  "<><",
  ">><>",
  "<><<",
  "><>>",
  "<<><",
  "><<<>",
  "<>>><",
  ",<..>,"
];

String fishy(String input) {
  var chars = input.split("");
  if (chars.isEmpty || !chars.every((it) => [">", "<", ",", "."].contains(it))) {
    throw new Exception("Invalid Input");
  }

  var result = [];
  var i = 0;
  var buff = "";
  while (i < chars.length) {
    buff += chars[i];

    if (fish.contains(buff)) {
      result.add(buff);
      buff = "";
    } else if (chars.length == 6) {
      return "";
    }

    i++;
  }

  return result.join(" ");
}

void main() {
  print(fishy(",<..>,><<<>,<..>,><>,<..>,<>>><,<..>,><>>,<..>,<<><,<..>,<><,<..>,>><>"));
}

Javascript (122 135 bytes)
Not the most golfed here, could be stripped down a little.
This one is regex based, and a tad hard to figure out what is going on.
alert(prompt(R=RegExp,r='(<<?><|><>>?|,<\.\.>,|>><>|><<<>|<><<|<>>><)').match(R('^'+r+'+$'))[0].split(R(r+'(?=[>,]|$)','g')).join(' '))

This one is a one-liner.
Basically, I check the syntax and then I split the string based on the chars and join it together.
It throws an exception when you give it an invalid input.
If it can't throw exceptions (126 139 bytes):
(i=prompt(R=RegExp,r='(<<?><|><>>?|,<\.\.>,|>><>|><<<>|<><<|<>>><)')).match(R('^'+r+'+$'))&&alert(i.split(R(r+'(?=[>,]|$)','g')).join(' '))

Both are one-liners.
Both work the same way.

Thank you @edc65 for detecting the edge case that wasn't working well.

You can test it here (output will be written to the document).
It is based on the version that throws exceptions when you introduce invalid code.

var alert=console.log=function(s){document.write(s)+'<br>';};
try{
alert(prompt(R=RegExp,r='(<<?><|><>>?|,<\.\.>,|>><>|><<<>|<><<|<>>><)').match(R('^'+r+'+\x24'))[0].split(R(r+'(?=[>,]|\x24)','g')).join(' '));
}catch(e){console.log(e);}

(Currently, there's a bug on stack snippets, I've posted in on meta It was already asked yesterday. For it to work, I've replaced $ with \x24, which has the same output. You can read about the bug here: http://meta.codegolf.stackexchange.com/questions/5043/stack-snippets-messing-with-js)

Fail with example ><>><>>. I think this can't solved so easily with Regexp, you need some lookahead or backtrak or whatsoever...

@edc65 DAMN! For now, I don't have a solution. I'll try to fix later

Scala, 299 Bytes
type S=String
type L[T]=List[T]
def c(s:S):L[L[S]]={val f=List("><>","<><",">><>","<><<","><>>","<<><","><<<>","<>>><",",<..>,").filter(s.startsWith);if(f.isEmpty)List(List(s)) else f.flatMap(i => c(s.drop(i.size)).map(i::_))}
def p(s:S)=println(c(s).find(_.last.isEmpty).fold("")(_.mkString(" ")))

Test Cases
val tests = Seq("><>", "<><", ">><>", "<><<", ">><>", "<><<", "><<<>", "<>>><", ",<..>,", "><>><>", "><><><", ",<..>,<><", "<<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><", "<<><><<<>>><>><>><><><<>>><>><>>><>>><>><>><<><")
tests.foreach(p)

Output
><>
<><
>><>
<><<
>><>
<><<
><<<>
<>>><
,<..>,
><> ><>
><> <><
,<..>, <><

<<>< ><<<> >><> ><> ><> <>< <>>>< >><> >><> >><> ><>> <<><


text:
Slime Molds Can Count!
Background
Slime molds are awesome.
If you place them on a surface with food sources, they will spread their tendrils to find the food, after which they form a network of connections between the sources.
In this challenge, you shall simulate a slime mold looking for food.
Moreover, this particular mold will stop once it's found enough.
Input
Your inputs shall be a list L of 2D integer coordinates in the native format of your language, and a nonnegative integer N.
The list L is guaranteed to be duplicate-free, but it may not be sorted.
The input N is between 0 and the length of L, inclusive.
The list L represents a set of coordinates for food sources.
For example, the list
[(0,0),(2,-1),(3,1),(0,4),(5,5)]

could be interpreted visually as
     o
o

   o
o
  o

Output
Your output is another duplicate-free list K of 2D integer coordinates on the same format as the input.
It represents the network formed by the slime mold, and it shall satisfy the following conditions:

The intersection of L and K has size exactly N.
The set K is connected as a subset of the integer grid (via orthogonal or diagonal adjacencies).
If any coordinate of K is removed, it no longer satisfies the first two conditions.

Note that if N = 0, the output must be an empty list.
An example of an acceptable output for the above list L and N = 4 would be
[(0,0),(0,1),(0,2),(0,3),(0,4),(1,4),(2,4),(3,3),(3,2),(3,1),(3,5),(4,5),(5,5)]

which can be visualized as
   xxO
Oxx
x  x
x  x
x  O
O
  o

where each O represents a coordinate in both L and K, and each x represents a coordinate in K but not in L.
Other outputs are also acceptable, and the "tendrils" don't have to be the shortest possible.
For example, this is also an acceptable solution:
   xxOxx
Oxx     x
  x    x
 x    x
x  o x
O   x
  Ox

Rules
Both the input and output shall be lists, not sets or other datatypes.
The coordinates themselves can be lists or tuples.
You can change the order of the two inputs if needed.
You can write either a full program or a function.
The lowest byte count wins, and standard loopholes are disallowed.
Test Cases
Your program should work on these lists for all applicable values of N.
[]
[(2,3)]
[(0,0),(1,0),(0,1),(1,1)]
[(0,0),(2,-1),(3,1),(0,4),(5,5)]
[(0,0),(1,0),(2,0),(3,0),(0,3),(1,3),(2,3),(3,3)]
[(0,0),(1,0),(2,0),(3,0),(0,3),(1,3),(2,3),(3,3),(0,1),(0,2),(3,1),(3,2),(8,1),(8,2),(-5,1),(-5,2)]
[(0,0),(20,0),(15,15),(-10,4),(-10,3),(0,-5),(7,6),(7,7),(8,8),(9,8),(10,-2),(-1,12),(-3,10)]
[(0,0),(1,0),(2,0),(3,0),(5,0),(6,0),(7,0),(0,9),(1,9),(2,9),(3,8),(4,9),(5,10),(6,10),(7,9),(3,3),(4,4),(5,5)]

Visualized:
===
o
===
oo
oo
===
     o
o

   o
o
  o
===
oooo

oooo
===
     oooo
o    o  o    o
o    o  o    o
     oooo
===
                         o

         o

       o

                  oo
                 o
                 o

o
o

          o                   o

                    o

          o
===
     oo
ooo o  o
   o

     o
    o
   o

oooo ooo

CJam, 77 95 bytes
I think this can be golfed a bit more, but here goes:
q~$<_{{:X;]{[X\]z::-~mhW*}$~:Y{_)Y1{_@=X@=}:B~-g-{+__X=!\}:C~1B=!&}g{_(Y0B-g-\C0B=!&}g}*]_&}L?p

Input goes like N <Array of coordinate array>. For example:
4 [[0 0] [1 5] [2 1] [0 3] [5 0] [5 5]]

Output:

[[0 5] [1 5] [0 4] [0 3] [0 0] [0 2] [0 1] [1 1] [2 1]]

Algorithm:
The algorithm is pretty straight forward and goes like:

Sort the input coordinate array. This makes the coordinates sorted first by row and then by column.
Now we pick first N points
Now we reduce on these N points. The destination is the last point and the source is the closes point to that last point.
Then we start with the top-left most point, walk right (or left) till its on or directly above the next point.
Then we walk down to reach the next point.
It is guaranteed that there will be no uncovered point left to the above point in the same row. This ensures that we do not touch any other point that the chosen N. Choosing the closes point also ensures that second rule is held true.

Try it online here


text:
Nameless to Brainf**k converter
This is inspired by the Brainf*** to tinyBF converter challenge.
Brainf**k (which will be henceforth referred to as BF) is a well-known estoric programming language, so I won't go over it too much here.
Nameless language is a binary-looking version of BF. See the linked page for more info.
Your challenge is to implement a golfed Nameless-to-BF converter. It should implement all of the commands except for 1100 (which isn't really possible to implement in BF) and 1010 (that isn't really possible, either). Any characters other than 1's and 0's should be ignored because they can be used for comments (after all, you wouldn't want an unreadable program, right? ;).
Here's a simple table of a Nameless -> BF mapping:
0000 -> >
0001 -> <
0010 -> +
0011 -> -
0100 -> .
0101 -> ,
0110 -> [
0111 -> ]
1011 -> [-]
1000 -> adds the base 10 value of the next command to the current memory cell (see below)
1001 -> subtracts the base 10 value of the next command from the current memory cell (see below)

NOTE: I accidentally flipped < and >. Thanks to @IlmariKaronen for pointing that out.
For 1000 and 1001, you can directly implement it in the translator. For instance, this:
1000 0010

could be written as:
++

The translator determined the value of the next command in advance and wrote it out.
Invalid sequences (e.g. 1111) and the presence of 1000/1001 at the end of the program are undefined; you don't have to handle them.
MAY THE GOLFING BEGIN!!!

Is it supposed to be binary? eg. 3 == 51 == 00110011 == --???

OK, I looked it up. + in BF increments the current cell by 1 (so if the current cell has a value of 2, + would make it 3.) 1000 0100 does become ++++++++ and 1001 0100 becomes ---------. I'm also assuming 1000/1001 at the end of a line is also undefined.

@ASCIIThenANSI 0100 is 4, by the way, so 1000 0100 is ++++.

@mbomb007 Oh, whoops. I meant 1000 0100 becomes ++++..

Note that you can, in fact, implement 1100 in BrainFuck. Translate 0000 to ">>", translate 0001 to "<<", prepend "+>" to the program, and translate 1100 to "<-[+<<-]+>", assuming you're targeting a BrainFuck interpreter where "<" at the start of the tape is illegal, or wraps back to the end of the tape. It's a whole lot harder otherwise.

@LymiaAluysia That makes sense, but it needs a compatible BF interpreter  (maybe Beefit would work, since it pads the memory buffer...but it might also end up with 0 as the "random" value).

I've cleaned up some obsolete comments. Let me know if you want anything restored that didn't make it into the challenge (but I think everything did.)

Ah... one question. Is excessive numbers also undefined? Such as in the program "11001"

@LymiaAluysia Yes.

CJam, 58 bytes
q{As#)},:~4/2fb{(:X8<"><+-.,[]"X={XA<{("+-"X=*}"[-]"?}?o}h

Try it online.
Explanation
q               "Read the input.";
{As#)},         "Remove any extraneous characters (not '0' or '1').";
:~              "Evaluate each character ('0' -> 0, '1' -> 1).";
4/2fb           "Split into groups of 4 (Nameless commands) and numerically
                 evaluate each group as an array of binary digits.";
{               "While command values remain:";
  (:X             "Grab the next command value.";
  8<              "If the command value is less than 8:";
  "><+-.,[]"X=    "Then: It maps directly to a BF command. Look it up.";
  {               "Else:";
    XA<             "If the command value is less than 10:";
    {("+-"X=*}      "Then: It is 8 or 9. Grab the next command value and
                     produce a string of that many copies of '+' if the former
                     command value is 8, or '-' if it is 9.";
    "[-]"?          "Else: It is 11. Produce its translation, '[-]'.";
  }?
  o               "Output the BF translation.";
}h

Perl - 343 339 305 bytes
I know CJam's already done it, but I figured I'd try a non-esoteric solution.
open(F,$ARGV[0]);%s=qw(0000 > 0001 < 0010 + 0011 - 0100 . 0101 , 0110 [ 0111 ] 1011 [-]);while(<F>){$x=0;$p='';@c=split(' ');foreach$c(@c){if($c=='1000'){for(1..oct("0b".$c[$x+1])){$p.='+'}}elsif($c=='1001'){for(1..oct("0b".$c[$x+1])){$p.='-'}}elsif(exists$s{$c}){$p.=$s{$c}}else{$p.=$c.' '};$x++}print$p}

It keeps comments, and prints it without a trailing newline.
If I've missed anything, please let me know.
Changes

Saved 4 bytes by deleting unnecessary characters, and fixed comments.
Saved 34 bytes by removing checking for 1000/1001 at the end of a line. (Credit to mbomb007)

Note that you don't have to ignore 1000 at the end of a line. "Invalid sequences (e.g. 1111) and the presence of 1000/1001 at the end of the program are undefined; you don't have to handle them."

@mbomb007 Anything that's not a valid Nameless-to-BF command gets ignored (it's assuming it's a comment). Unless you mean we assume the user does not add 1000/1001 to the end of a line.

Yes, we assume the user doesn't enter invalid input. (The other characters are comments, so technically valid.)

@mbomb007 OK, thanks. I shaved off about 30 bytes, thanks to you! :)

Golfed Perl code is non-estoric?! ;)

@kirbyfan64sos Still better than most of the golfing languages out there, including BF itself.

@ASCIIThenANSI BF isn't really used for golfing unless the competition is for the least number characters, and I'd prefer K to Perl if the error messages weren't such crap (then again, it usually takes me forever to fix my Perl errors, too).

Python 2, 221 216 bytes
Run it here: http://repl.it/hxJ/1
Not sure if it can be golfed more. I had to use a while (very annoyingly) instead of a list comprehension for the whole thing, since the iterator must skip an instruction if the instruction is 1000 or 1001. (By the way, the indentations are tab characters.)
import re
b='><+-.,[]'
i=re.sub('[^01]','',input())
n=[int(j,2)for j in re.findall('.'*4,i)]
k=0;o=''
while k<len(n):
    c=n[k]
    if c<8:o+=b[c]
    elif c<10:o+=n[k+1]*('+'if c<9 else'-');k+=1
    else:o+='[-]'
    k+=1
print o

Do NOT edit my solution without my approval. If you want to suggest an improvement, post a comment, but this is MY solution, not yours. If you have a different one, add your own answer. Thanks.